0
0
Kubernetesdevops~10 mins

Vertical Pod Autoscaler concept in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Vertical Pod Autoscaler resource for a deployment named 'web-app'.

Kubernetes
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: web-app-vpa
spec:
  targetRef:
    kind: Deployment
    name: [1]
Drag options to blanks, or click blank then click option'
Aweb-app
Bdatabase
Ccache
Dfrontend
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different deployment name that does not exist.
Confusing the kind field with the deployment name.
2fill in blank
medium

Complete the code to set the update policy of the Vertical Pod Autoscaler to 'Auto'.

Kubernetes
spec:
  updatePolicy:
    updateMode: [1]
Drag options to blanks, or click blank then click option'
AOff
BInitial
CAuto
DManual
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Off' disables updates.
Using 'Manual' requires manual approval for updates.
3fill in blank
hard

Fix the error in the resource specification by completing the missing field for resource policy to limit CPU max usage.

Kubernetes
spec:
  resourcePolicy:
    containerPolicies:
    - containerName: '*'
      maxAllowed:
        cpu: [1]
Drag options to blanks, or click blank then click option'
A2Gi
B1Gi
C500m
D1000m
Attempts:
3 left
💡 Hint
Common Mistakes
Using memory units like 'Gi' for CPU limits.
Setting too low CPU limits causing pod failures.
4fill in blank
hard

Fill both blanks to define a VPA that targets a StatefulSet named 'db-statefulset' and sets the update mode to 'Initial'.

Kubernetes
spec:
  targetRef:
    kind: [1]
    name: [2]
  updatePolicy:
    updateMode: Initial
Drag options to blanks, or click blank then click option'
AStatefulSet
BDeployment
Cdb-statefulset
Dweb-app
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing Deployment kind with StatefulSet name.
Using wrong updateMode for the scenario.
5fill in blank
hard

Fill all three blanks to create a VPA spec that targets a DaemonSet named 'log-agent', sets update mode to 'Off', and limits memory max allowed to 512Mi.

Kubernetes
spec:
  targetRef:
    kind: [1]
    name: [2]
  updatePolicy:
    updateMode: [3]
  resourcePolicy:
    containerPolicies:
    - containerName: '*'
      maxAllowed:
        memory: 512Mi
Drag options to blanks, or click blank then click option'
ADaemonSet
Blog-agent
COff
DDeployment
Attempts:
3 left
💡 Hint
Common Mistakes
Using Deployment kind instead of DaemonSet.
Setting updateMode to 'Auto' when 'Off' is required.