Skip to content

Latest commit

 

History

History
42 lines (38 loc) · 811 Bytes

hpa.md

File metadata and controls

42 lines (38 loc) · 811 Bytes

Configure Horizontal Pod Autoscaler

Modify deployment.yaml with Resource limits

  
          resources:
          limits:
            cpu: '1'
            memory: "500Mi"
          requests:
            cpu: '1'
            memory: "500Mi"

hpa.yaml file in helm chart

 apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
 name: petclicnic-hpa
spec:
 maxReplicas: 5
 minReplicas: 1
 scaleTargetRef:
   apiVersion: extensions/v1beta1
   kind: Deployment
   name: petclinic-deployment
 targetCPUUtilizationPercentage: 50

Install siege package on K8 Master

Siege is a stress tester for HTTP/HTTPS

yum -y install epel-release
yum -y install siege
siege -q -c 2 -t 2m http://ip:port
q = quiet mode
c = concurrent
2m = time period