Examples Of Openshift Commands
Example 1 : Verify Installation
- Run the following command to verify that the OpenShift CLI is installed and accessible:
oc version
Example 2: Login To OpenShift Cluster
- Use the oc login command to log in to your OpenShift cluster. You will need the URL of your OpenShift cluster and valid credentials.
oc login <cluster_url>
Example 3: Verify Connection
- Run the following command to verify that you are connected to the OpenShift cluster:
oc whoami
oc get nodes
oc get csr
- It should display information about the currently logged-in user.
Example 4: Explore OpenShift Commands
- You can now use the oc command to interact with your OpenShift cluster. For example, you can list pods, services, or deploy applications.
oc get pods
oc get services
oc get cluster operators
OpenShit CLI
OpenShift CLI is an amazing tool that works with the management of resources inside the OpenShift container platform. In this article, we will investigate the different parts of the OpenShift CLI, its elements, establishment systems, and give instances of orders to arrangement and deletion of resources.
The OpenShift CLI (Command Line Interface) is a tool for interacting with and managing OpenShift container platform resources from the command line. It gives engineers and heads a strong and productive method for performing different undertakings, for example, sending applications, scaling assets, overseeing clients, and observing the stage.