Bootstrap FreeKB - OpenShift - Deployment status using the oc status command
OpenShift - Deployment status using the oc status command

Updated:   |  OpenShift articles

An image contains the code used to create a deployment. Then, a deployment can be created from an image, which should then create a replica set (which is the number of pods that should be created), and then the pods should be created.

When deploying an application using the oc new-app command, if the --as-deployment-config flag is not used, the application will be created as a deployment, not a deployment config. In this scenario, a replica set will be used to create the pods.

 

If the --as-deployment-config flag is used, the application will be created as a deployment config. In this scenario, a replication controller will be used to create the pods.

 

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

Before you can use the oc status command, you must first use the oc login command to login, and also use the oc project command to select the project that you want to get the status against. Let's say the oc get deployments command show that project "myProject" contain 1 deployment, "app001".

~]# oc project myProject
~]# oc get deployments
NAME            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
app001          1         1         1            1           205d

 

The oc status command will display the status of the each deployment in the project. The oc config view or oc get apiserver commands can be used to display the API Server URL (api.openshift.example.com in this example).

svc/app001 - 10.17.52.114:27017
  deployment/app001 deploys api.openshift.example.com/rhscl/app001:1-45
    deployment #5 running for 6 months - 1 pod
    deployment #4 deployed 6 months ago
    deployment #3 deployed 6 months ago
    deployment #2 deployed 6 months ago

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter d6cfd8 in the box below so that we can be sure you are a human.