OpenShift Deployment Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
* [[OpenShift_Concepts#Deployment_Operations|OpenShift Concepts - Deployments]]
* [[OpenShift_Concepts#Deployment_Operations|OpenShift Concepts - Deployments]]
* [[OpenShift Operations#Subjects|OpenShift Operations]]
* [[OpenShift Operations#Subjects|OpenShift Operations]]
* [[OpenShift Build Operations#Overview|Build Operations]]


=Get Deployment List=
=Get Deployment List=

Revision as of 04:52, 21 November 2017

External

Internal

Get Deployment List

oc get deploy

The deployments returned by this list are backed by deployment pods, which can be retrieved with

oc get pods

Starting a Deployment

oc rollout latest dc/<deploymentconfig-name>

This will start the number of replicas specified in ?


oc scale dc logging-es-3fs5ghyo --replicas=1



scaling the pod instead of the deploymentconfig may modify the deployment config. Verify


Assigning Pods to Specific Nodes

https://docs.openshift.com/container-platform/3.6/dev_guide/deployments/basic_deployment_operations.html#assigning-pods-to-specific-nodes


Assigning a Pod to Nodes that Match a Node Selector

Edit the DeploymentConfig that defines the pod:

oc edit dc/<pod-name>

Inject the node selector specification under

spec:
  ...
  template:
    ...
    spec:
      ...
      nodeSelector:
        keyA: valueA

Restart the corresponding pod, by simply deleting it.

For more details on concepts related to pod placement, see:

Pod Placement