Complete the code to create a Vertical Pod Autoscaler resource for a deployment named 'web-app'.
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: web-app-vpa
spec:
targetRef:
kind: Deployment
name: [1]The Vertical Pod Autoscaler targets the deployment named 'web-app' to adjust its resource requests automatically.
Complete the code to set the update policy of the Vertical Pod Autoscaler to 'Auto'.
spec:
updatePolicy:
updateMode: [1]Setting updateMode to 'Auto' allows the Vertical Pod Autoscaler to automatically update pod resource requests.
Fix the error in the resource specification by completing the missing field for resource policy to limit CPU max usage.
spec:
resourcePolicy:
containerPolicies:
- containerName: '*'
maxAllowed:
cpu: [1]The maxAllowed CPU value should be in millicores, so '1000m' means 1 CPU core max allowed.
Fill both blanks to define a VPA that targets a StatefulSet named 'db-statefulset' and sets the update mode to 'Initial'.
spec:
targetRef:
kind: [1]
name: [2]
updatePolicy:
updateMode: InitialThe VPA targets the StatefulSet named 'db-statefulset' and updateMode 'Initial' applies recommendations only on pod creation.
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.
spec:
targetRef:
kind: [1]
name: [2]
updatePolicy:
updateMode: [3]
resourcePolicy:
containerPolicies:
- containerName: '*'
maxAllowed:
memory: 512MiThe VPA targets the DaemonSet 'log-agent', disables automatic updates with 'Off', and limits memory to 512Mi.