OpenShift Deployment Operations: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 43: | Line 43: | ||
oc describe dc <''dc-name''> | oc describe dc <''dc-name''> | ||
=Starting a Deployment= | =Starting a Deployment= | ||
Line 65: | Line 49: | ||
This will start the number of replicas specified in <font color=red>?</font> | This will start the number of replicas specified in <font color=red>?</font> | ||
oc scale dc logging-es-3fs5ghyo --replicas=1 | oc scale dc logging-es-3fs5ghyo --replicas=1 |
Revision as of 00:14, 25 November 2017
External
Internal
Overview
View Deployment Controllers for Project
oc get dc
View the Latest Deployment for a Deployment Controller
oc deploy <deployment-controller-name>
For each on-going deployment, there is a deployment pod, whose name can be inferred from the list of pods for the project:
oc get pods
View Deployment Logs
The log of the deployment can be obtained from the deployment pod:
oc get pods NAME READY STATUS RESTARTS AGE ... <dc-name>-1-deploy 1/1 Running 0 7m
Then
oc logs -f <dc-name>-1-deploy
The same log can be obtained from the deployment itself:
oc logs -f dc/<dc-name>
View Deployment Events
oc describe dc <dc-name>
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
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:
Turn Off Auto-Deployment After Build
oc set triggers dc/<deployment-config-name> --remove-all