Managing Application Deployments Flashcards
Tree types of probes
startup, readiness, liveness
What does readiness probe determines?
whether or not a container is ready to serve requests
What happens if an app fails readiness probe?
OpenShift removes the IP address for the container from the endpoints of all services.
What happens container fails liveness probe?
OCP kills the container and tries to redeploy it
Readiness probe config key
spec.containers.readinessprobe
Liveness probe config key
spec.containers.livenessprobe
Five options that control probes
- initialDelaySeconds
- timeoutSeconds
- periodSeconds
- successThreshold
- failureThreshold
Three protocols for probe execution
- http
- exec
- tcp socket
How do you edit deployment using the GUI
Edith the deployment YAML by going to Workloads → Deployment →
Create http readiness probe using oc
oc set probe deployment myapp –readiness –get-url=http://:8080/healthz –period=20
Create tcp liveness probe using oc
oc set probe deployment myapp –liveness –open-tcp=3306 –period=20 –timeout-seconds=1
Get help with probe creation
oc set probe –help
What is the use of DeploymentConfig?
Enables you to use additional features, such as
- Custom deployment strategies
- Lifecycle hooks (also available on Deployment)
Two types of deployment strategies
- Route based
- Deployment config based
Change deployment strategy with oc
oc patch dc/mysql –patch ‘{“spec”:{“strategy”:{“type”:”Recreate”}}}’