values.yaml
cat << EOF > values.yaml
config:
ladder:
nodesToReplicas:
- [1, 1]
- [2, 2]
options:
namespace: default
target: "deployment/nginx-deployment"
EOF
Shell
복사
CPA Install
helm repo add cluster-proportional-autoscaler https://kubernetes-sigs.github.io/cluster-proportional-autoscaler
helm repo update
helm upgrade --install cluster-proportional-autoscaler \
-f values.yaml \
cluster-proportional-autoscaler/cluster-proportional-autoscaler
Shell
복사
Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
resources:
limits:
cpu: "100m"
memory: "64Mi"
requests:
cpu: "100m"
memory: "64Mi"
ports:
- containerPort: 80
YAML
복사
kubectl apply -f deployment.yaml
Shell
복사
Test
kubectl logs -l app.kubernetes.io/instance=cluster-proportional-autoscaler
Shell
복사