# This config creates a deployment with two pods, each requesting 100 millicores # and trying to utilize slightly above 500 millicores (repeatedly using CPU for # 0.5s and sleeping 0.5s). # It also creates a corresponding Vertical Pod Autoscaler that adjusts the # requests. # Note that the update mode is left unset, so it defaults to "Auto" mode. --- apiVersion: "autoscaling.k8s.io/v1beta1" kind: VerticalPodAutoscaler metadata: name: hamster-vpa-deprecated spec: selector: matchLabels: app: hamster --- apiVersion: apps/v1 kind: Deployment metadata: name: hamster spec: selector: matchLabels: app: hamster replicas: 2 template: metadata: labels: app: hamster spec: containers: - name: hamster image: registry.k8s.io/ubuntu-slim:0.1 resources: requests: cpu: 100m memory: 50Mi command: ["/bin/sh"] args: - "-c" - "while true; do timeout 0.5s yes >/dev/null; sleep 0.5s; done"