Managing Operators Flashcards

1
Q

Check the list of available operators

A

oc get packagemanifests

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

Inspect an operator

A

oc describe packagemanifests file-integrity-operator

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

Get an operator version

A

oc get packagemanifests file-integrity-operator
–output=’jsonpath={range .status.channels[*]}{.name}{“\n”}{end}’

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

get list of installed operators across namespaces

A

oc get csv -A

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

list the operators managed by the OLM

A

oc get subs -A

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

Namespace CR for operator creation

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

Operators that are installed using the OLM require a group that matches the namespace name. True or False?

A

True

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

CR to create a group for the operator

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

CR to create an operator sub

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

Steps to create an operator

A

1) Create namespace with: openshift.io/cluster-monitoring: “true”
2) Create an operator group
3) Create a subscription object

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

Check the logs of the OLM pod to verify operator installation

A

oc logs pod/olm-operator-c5599dfd7-nknfx \
-n openshift-operator-lifecycle-manager

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

Inspect the subscription object to verify the operator status

A

oc describe sub <subscription-name> -n <namespace></namespace></subscription-name>

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

Deleting Operator

A

1) oc delete sub <subscription-name>
2) oc get sub <subscription-name> -o yaml | grep currentCSV
3) oc delete csv <currentCSV></currentCSV></subscription-name></subscription-name>

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

view events and logs of an operator

A

oc logs deployment.apps/file-integrity-operator

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

get all objects related to an operator

A

oc get all -n openshift-file-integrity

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

view the status and events from custom resources related to a given operator

A

1) oc describe deployment.apps/file-integrity-operator | \
grep -i kind
2) oc get crd | grep -i fileintegrity

17
Q

list the cluster operators and their status

A

oc get clusteroperator

18
Q

Extract the release of a cluster operator

A

1) VER=”$(oc get clusterversion version -o jsonpath=’{.status.desired.image}’)”

2) oc adm release extract –from=$VER –to=release-image
3) less release-image/samples06-operator.yaml

19
Q

List the Cluster Samples Operator pods

A

oc get pods -n openshift-cluster-samples-operator

20
Q

View logs for the Cluster Samples Operator pods.

A

oc logs pod/cluster-samples-operator-5d7d5b94b6-rw284 -n openshift-cluster-samples-operator –all-containers