Managing Application Deployments Flashcards

1
Q

Tree types of probes

A

startup, readiness, liveness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does readiness probe determines?

A

whether or not a container is ready to serve requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens if an app fails readiness probe?

A

OpenShift removes the IP address for the container from the endpoints of all services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What happens container fails liveness probe?

A

OCP kills the container and tries to redeploy it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Readiness probe config key

A

spec.containers.readinessprobe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Liveness probe config key

A

spec.containers.livenessprobe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Five options that control probes

A
  1. initialDelaySeconds
  2. timeoutSeconds
  3. periodSeconds
  4. successThreshold
  5. failureThreshold
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Three protocols for probe execution

A
  1. http
  2. exec
  3. tcp socket
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you edit deployment using the GUI

A

Edith the deployment YAML by going to Workloads → Deployment →

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Create http readiness probe using oc

A

oc set probe deployment myapp –readiness –get-url=http://:8080/healthz –period=20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Create tcp liveness probe using oc

A

oc set probe deployment myapp –liveness –open-tcp=3306 –period=20 –timeout-seconds=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Get help with probe creation

A

oc set probe –help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the use of DeploymentConfig?

A

Enables you to use additional features, such as

  1. Custom deployment strategies
  2. Lifecycle hooks (also available on Deployment)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Two types of deployment strategies

A
  1. Route based
  2. Deployment config based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Change deployment strategy with oc

A

oc patch dc/mysql –patch ‘{“spec”:{“strategy”:{“type”:”Recreate”}}}’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Continuously run “oc get pods”

A

watch -n 2 oc get pods

17
Q

Set an env variable on a dc

A

oc set env dc/mysql HOOK_RETRIES=5

18
Q

Start a deployment

A

oc rollout latest dc/name

19
Q

view the history of deployments

A

oc rollout history dc/name

20
Q

See details of a specific deployment

A

oc rollout history dc/name –revision=1

21
Q

Retry a deployment that failed previously

A

oc rollout retry dc/name

22
Q

scale the number of pods in a deployment

A

oc scale dc/name –replicas=3

23
Q

Two types of events that trigger a deployment:

A
  • Configuration change
  • Image change
24
Q

Set a deployment trigger for a deployment configuration

A

oc set triggers dc/name –from-image=myproject/origin-ruby-sample:latest -c helloworld

25
Q

Deploy java app by specifying maven repo

A

oc new-app –as-deployment-config –name quip

–build-env MAVEN_MIRROR_URL=URL

https://github.com/user/app-deploy

26
Q

Activate readiness and liveness probes for an application

A

oc set probe dc/quip –liveness –readiness –get-url=http://:8080/ready –initial-delay-seconds=30 –timeout-seconds=2

27
Q

Assign an OCP internal name to an external service

A

oc create service externalname myservice –external-name myhost.example.com