“The cloud” is an evocative name, but to anyone used to bare metal servers or desktop workstations, it is a painful reminder of the intangibility of a strange new computing environment. The cloud isn't a singular thing you can pick up and take back to your workshop; there's no hard drive or even a real CPU, at least not in the sense that you can pry open to upgrade or troubleshoot.
If that sounds familiar, you might want to try the oc command, which provides a simple and singular interface from your workstation to your cluster. Here are three ways the oc command helps you take control of your cloud-based computer, whether you're running Red Hat OpenShift Service on AWS (ROSA) or Red Hat OpenShift Local.
1. Connect with your cloud
Mouse clicks are expensive– at least, they feel that way. It takes time to take your hands off the keyboard, drag a cursor around the screen to click a button, drag it somewhere else to click another button, and so on. It adds up, and that's exactly why so many sysadmins and developers work in the terminal.
If you're used to logging into servers, then in the world of cloud computing, oc
is like SSH. Using a personal token, it lets you connect to an OpenShift install and interact with it using commands instead of a mouse and a web browser.
2. oc is kubectl++
If you're used to logging into a Kubernetes control plane to interact with your cluster, then oc
is like kubectl
. You can use both, but you're likely to find that oc
does everything you used to do with kubectl
, usually with the exact same syntax. Instead of typing kubectl get svc
to view your services, for example, you can just type oc get svc
for the same result. The oc
command interacts with Kubernetes plus OpenShift.
3. No more clicking
If you've been introduced to the workflow in the OpenShift UI, you already know half of what you need for the oc
command. You can create a project:
$ oc new-project myproject
Spin up an image:
$ oc create deployment mynginx --image=nginx
In other words, you can use oc
to do anything you might otherwise do on OpenShift in the web browser.
OpenShift through the terminal
OpenShift doesn't just add a graphical user interface to Kubernetes. It adds terminal orchestration to your Kubernetes orchestration. The oc
command gives you all the power of kubectl
plus the user-friendly power of OpenShift. And it's the same on any cloud, whether it's Red Hat OpenShift on AWS (ROSA), Red Hat OpenShift Local, or a hybrid cloud within your own organization.
Ready to try these commands yourself? Experiment in the Red Hat Developer Sandbox today.
Über den Autor
Seth Kenlon is a Linux geek, open source enthusiast, free culture advocate, and tabletop gamer. Between gigs in the film industry and the tech industry (not necessarily exclusive of one another), he likes to design games and hack on code (also not necessarily exclusive of one another).
Nach Thema durchsuchen
Automatisierung
Das Neueste zum Thema IT-Automatisierung für Technologien, Teams und Umgebungen
Künstliche Intelligenz
Erfahren Sie das Neueste von den Plattformen, die es Kunden ermöglichen, KI-Workloads beliebig auszuführen
Open Hybrid Cloud
Erfahren Sie, wie wir eine flexiblere Zukunft mit Hybrid Clouds schaffen.
Sicherheit
Erfahren Sie, wie wir Risiken in verschiedenen Umgebungen und Technologien reduzieren
Edge Computing
Erfahren Sie das Neueste von den Plattformen, die die Operations am Edge vereinfachen
Infrastruktur
Erfahren Sie das Neueste von der weltweit führenden Linux-Plattform für Unternehmen
Anwendungen
Entdecken Sie unsere Lösungen für komplexe Herausforderungen bei Anwendungen
Original Shows
Interessantes von den Experten, die die Technologien in Unternehmen mitgestalten
Produkte
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud-Services
- Alle Produkte anzeigen
Tools
- Training & Zertifizierung
- Eigenes Konto
- Kundensupport
- Für Entwickler
- Partner finden
- Red Hat Ecosystem Catalog
- Mehrwert von Red Hat berechnen
- Dokumentation
Testen, kaufen und verkaufen
Kommunizieren
Über Red Hat
Als weltweit größter Anbieter von Open-Source-Software-Lösungen für Unternehmen stellen wir Linux-, Cloud-, Container- und Kubernetes-Technologien bereit. Wir bieten robuste Lösungen, die es Unternehmen erleichtern, plattform- und umgebungsübergreifend zu arbeiten – vom Rechenzentrum bis zum Netzwerkrand.
Wählen Sie eine Sprache
Red Hat legal and privacy links
- Über Red Hat
- Jobs bei Red Hat
- Veranstaltungen
- Standorte
- Red Hat kontaktieren
- Red Hat Blog
- Diversität, Gleichberechtigung und Inklusion
- Cool Stuff Store
- Red Hat Summit