Scheduling PODs Flashcards

(37 cards)

1
Q

Set requests and limits for a deployment

A

oc set resources deployment hello-world-nginx –requests cpu=10m,memory=20Mi –limits cpu=80m,memory=100Mi

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

Show resources consumed by a pod

A

oc adm top pods

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

shows actual usage for one or more nodes in the cluster

A

oc adm top nodes -l node-role.kubernetes.io/worker

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

List of resources that a quota can restrict by their count or number

A
  • pods
  • replicationcontrollers
  • controllers
  • services
  • secrets
  • persistentvolumeclaims
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

compute resources that can be restricted by a quota

A
  • requests.cpu
  • requests.memory
  • requests.storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

create a resource quota is by using the oc

A

oc create quota dev-quota –hard services=10,cpu=1300m,memory=1.5Gi

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

create resource quota from file

A

oc create –save-config -f dev-quota.ym

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

Resource quota CR

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

list available quotas

A

oc get resourcequota

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

displays the cumulative limits set for all ResourceQuota

A

oc describe quota

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

Delete quota

A

oc delete resourcequota QUOTA

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

create a limit range resource from a YAML

A

oc create –save-config -f dev-limits.yml

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

view the limit constraints enforced in a project

A

oc describe limitrange dev-limits

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

Delete limit range

A

oc delete limitrange dev-limits

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

create a cluster quota for all projects owned by qa user

A

oc create clusterquota user-qa –project-annotation-selector openshift.io/requester=qa –hard pods=12,secrets=20

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

create cluster quota for projects labeled env=qa

A

oc create clusterquota env-qa –project-label-selector env=qa –hard pods=10,services=5

17
Q

delete a cluster resource quota

A

oc delete clusterquota QUOTA

18
Q

create a new template resource in the openshift-config namespace

A

oc create -f project-template.yaml -n openshift-config

19
Q

create a new project template

A

oc adm create-bootstrap-project-template -o yaml > /tmp/project-template.yaml

20
Q

create a horizontal pod autoscaler resource

A

oc autoscale deployment/hello –min 1 –max 10 –cpu-percent 80

21
Q

get information about horizontal pod autoscaler resources in the current project

22
Q

get custer version

A

oc get clusterversion

23
Q

Apply the latest update to your cluster or update to a specific version

A
  • oc adm upgrade –to-latest=true
  • oc adm upgrade –to=VERSION
24
Q

review the status of the Cluster Version Operator (CVO)

A

oc get clusterversion

25
review the status of the install cluster operators
oc get clusteroperators
26
Retrieve teh console URL
oc whoami --show-console
27
See resource consumption by all nodes
oc adm top node
28
Start a shell session on the node
oc debug node/master01
29
Specify resources for an app using editor
1. oc edit deploy/hello 2. Under image and resources 3. Under resources and limits or requests 4. Under limits and requests and cpu, memory, services, etc.
30
Create a project template with specific quota and limits
1. oc adm create-bootstrap-project-template \> template.yaml 2. Edit to add quota, limits and requests 3. **oc create -f template.yaml -n openshift-config** 4. oc patch projects.config -p '{"spec":{"projectRequestTemplate":{"name":"project-request"}}}' --type merge
31
Edit cluster to use customer project template
oc patch projects.config -p '{"spec":{"projectRequestTemplate":{"name":"project-request"}}}' --type merge
32
What objects can be limited by limit range?
* pod * image * persistent volume claim * image stream * container
33
Create limit range CR
34
Command for application creation dry run
**oc create deployment loadtest --dry-run=client --image quay.io/redhattraining/loadtest:v1.0 \> -o yaml**
35
How do you watch htpasswd update progress
oc get pods -n openshift-authentication
36
Make admin a cluster admin
oc adm policy add-cluster-role-to-user cluster-admin admin
37
Update node 'foo' with a taint
oc adm taint nodes foo dedicated=special-user:NoSchedule