If you've played around with Kubernetes, you are aware of the rapid evolution of the most widely used container orchestration platform. Red Hat OpenShift is an enterprise-ready application platform built on Kubernetes and ready for production environments. With OpenShift 4, Red Hat aims to provide new releases at a frequent cadence. To help keep on top of all of the new changes, and to help sysadmins and DevOps people who have to deal with multiple versions of your Kubernetes platform at the same time, I wrote this article hoping to help you more easily overcome challenges you may face.
Our friend the alternatives command
The alternatives command creates, removes, maintains, and displays information about the symbolic links comprising the alternatives system.
From the man page:
The alternatives system is a reimplementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on Perl; it is intended to be a drop-in replacement for Debian's update-dependencies script.
You can find a very good introduction to the command here on the Enable Sysadmin site: Introduction to the alternatives command in Linux.
After that brief introduction to the alternatives command, it's time to get to work.
[ You might also enjoy: A sysadmin's guide to basic Kubernetes components ]
The oc command
First, create the root directory for all your oc client versions. For example:
$ sudo mkdir -p /opt/openshift/client/
For each version you want to use or configure, do the following steps:
1. Create the folder and copy the binary for the version you choose:
$ sudo mkdir /opt/openshift/client/x.y.z
$ sudo cp /binary/path/x.y.z/oc /opt/openshift/client/x.y.z/
2. Create a new alternative:
$ sudo alternatives --install /bin/oc oc /opt/openshift/client/x.y.z/oc 90
3. Next, select one of the versions you just configured. To do so, type the following:
$ sudo alternatives --config oc
If you are one of those whose mantra is "do more with less," here's a little extra tip:
$ alias oc_switch='sudo alternatives --config oc'
Want to know more about Linux aliases? See one of the following links from the Enable Sysadmin site:
OpenShift tips and tricks and Kubernetes tools
More oc tips are collected and explained by my friend Eduardo Minguez, Principal System Engineer at Red Hat, in his OpenShift 4 tips & tricks site, a collection of OpenShift 4 tips and tricks to make your container life easier.
Finally, I'd like to encourage you to attend the session 10 awesome Kubernetes tools every user should know presented by Alex Soto, Red Hat's Director of Developer Experience.
If you are new to OpenShift or not yet a pro user, the session will likely make your day.
[ Get this free ebook: Managing your Kubernetes clusters for dummies. ]
The following list provides additional tools, organized by the tool name and a link for more information, that you may wish to check out.
Über den Autor
Ähnliche Einträge
More than meets the eye: Behind the scenes of Red Hat Enterprise Linux 10 (Part 4)
Why should your organization standardize on Red Hat Enterprise Linux today?
The Overlooked Operating System | Compiler: Stack/Unstuck
Linux, Shadowman, And Open Source Spirit | Compiler
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
Virtualisierung
Erfahren Sie das Neueste über die Virtualisierung von Workloads in Cloud- oder On-Premise-Umgebungen