Sign inSign up

hwaner/busybox

By hwaner

Updated over 3 years ago

Image
0

41

hwaner/busybox repository overview

--- 오토스케일링 실습(HPA: Horizontal Pod Autoscaler)

vi php-apache.yaml apiVersion: apps/v1 kind: Deployment metadata: name: php-apache spec: selector: matchLabels: run: php-apache replicas: 2

template: metadata: labels: run: php-apache spec: containers: - name: php-apache image: hwaner/hpa-example:latest ports: - containerPort: 80 resources: limits: cpu: 500m requests: cpu: 200m

apiVersion: v1 kind: Service metadata: name: php-apache labels: run: php-apache spec: ports:

  • port: 80 selector: run: php-apache

vi hpa.yaml apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: php-apache spec: maxReplicas: 4 minReplicas: 2 scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: php-apache targetCPUUtilizationPercentage: 50 status: currentCPUUtilizationPercentage: 0 currentReplicas: 2 desiredReplicas: 2

kubectl run -i --tty load-generator --rm --image=hwaner/busybox:v1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done"

Tag summary

Content type

Image

Digest

sha256:74f634b1b

Size

706.2 kB

Last updated

over 3 years ago

docker pull hwaner/busybox:v1.28