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

Updated:   |  OpenShift articles

A deployment is used to manage the pods that are created to run an application. The deployment ensures that the desired number of pod replicas are running and can handle updates to the application by rolling out new versions of the pods. The deployment creates and manages a replica set, which in turn manages the pods.

flowchart TB subgraph Project["OpenShift Project/Namespace"] Deployment[Deployment] Replica_Set[Replica Set] subgraph Pods["Pod Replicas"] Pod1[Pod 1
Container] Pod2[Pod 2
Container] Pod3[Pod 3
Container] end end Deployment -->|Creates/Manages| Replica_Set Replica_Set -->|Manages| Pod1 Replica_Set -->|Manages| Pod2 Replica_Set -->|Manages| Pod3 style Deployment fill:#90CAF9 style Replica_Set fill:#FFE082 style Pods fill:#FFCCBC

It is also noteworthy that a route provides a URL that can be used to access the application from outside the OpenShift cluster. For example, if the route is configured to use the hostname myapp.mydomain.com, then users can access the application by navigating to http://myapp.mydomain.com. The route will forward the request to the service, which will then forward the request to one of the pods that are running the application.

flowchart LR subgraph Project["OpenShift Project/Namespace"] subgraph Pods["Pod Replicas"] Pod1[Pod 1
Container] Pod2[Pod 2
Container] Pod3[Pod 3
Container] end SVC[Service] Route[Route] end USER[External User] --> Route --> SVC SVC --> Pod1 SVC --> Pod2 SVC --> Pod3 style SVC fill:#A5D6A7 style Pods fill:#FFCCBC style USER fill:#CE93D8

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.11.12.13: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 e6856f in the box below so that we can be sure you are a human.