Bootstrap FreeKB - OpenShift - List Replication Controllers
OpenShift - List Replication Controllers

Updated:   |  OpenShift articles

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

There are various ways to deploy pods.

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.

Replicas is the number of pods that should be created for the deployment.

An application can be deployed as a deployment or as a deployment config. When deploying the application as a deployment (not a deployment config), a replica set will be used to create the pods.

 

When deploying an application as a deployment config (not a deployment), a replication controller will be used to create the pods.

 

The oc get deploymentconfigs command can be used to view the applications that have been deployed using the --as-deployment-config flag.

~]$ oc get deploymentconfigs
NAME      REVISION   DESIRED   CURRENT   TRIGGERED BY
my-app    1          1         1         config,image(my-app:latest)

 

The oc get replicationcontrollers (or oc get rc) command can be used to list the replication controllers. In this example, the deployment config has 1 replica which means that 1 pod should be created for the deployment.

TIP

The -A or --all-namespaces flag can be used to list the replication controllers in every namespace.

The -n or --namespace flag can be used to list the replication controllers in a certain namespace.

~]$ oc get rc
NAME       DESIRED   CURRENT   READY   AGE
my-app-1   1         1         1       42s

 

The oc get pods command can be used to display the pods. In this example, as expected, one pod was created for the deployment config.

~]# oc get pods
NAME                       READY   STATUS     RESTARTS  AGE
my-app-5b9879db6d-9mzm2    1/1     Running    0         8d

 




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