redhat-scholars / openshift-admins-devops

5 stars 6 forks source link

Vertical Pod Autoscaler #5

Open thoraxe opened 4 years ago

thoraxe commented 4 years ago

vpa docs

stress container

thoraxe commented 4 years ago
apiVersion: apps/v1
kind: Deployment
metadata:
  name: stress
  labels:
    app: stress
spec:
  replicas: 1
  selector:
    matchLabels:
      app: stress
  template:
    metadata:
      labels:
        app: stress
    spec:
      containers:
      - name: stress-container
        image: polinux/stress
        command: ['stress', '-c', '1']
thoraxe commented 4 years ago
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: stress-recommender
spec:
  targetRef:
    apiVersion: "apps/v1"
    kind:       Deployment 
    name:       stress 
  updatePolicy:
    updateMode: "Auto" 
thoraxe commented 4 years ago

This doesn't appear to work when a limitrange is defined on the namespace. trying to figure out why.