Open network-charles opened 1 month ago
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
Component version: Cluster Autoscaler 1.30.1 Image = registry.k8s.io/autoscaling/cluster-autoscaler:v1.30.1
registry.k8s.io/autoscaling/cluster-autoscaler:v1.30.1
What k8s version are you using (kubectl version)?:
kubectl version
$ kubectl version Client Version: v1.30.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.30.2
What environment is this in?:
KWOK cluster kwokctl version v0.6.0 go1.22.3 (linux/amd64)
kwokctl version v0.6.0 go1.22.3 (linux/amd64)
What did you expect to happen?:
I expected the node to scale.
What happened instead?:
Nothing happened
How to reproduce it (as minimally and precisely as possible):
ca.demo
# Scale node up & down using CA # Set up Cluster kwokctl create cluster --enable-metrics-server --enable-crds=Metric --enable-crds=ClusterResourceUsage --enable-crds=ResourceUsage # Apply metrics usage kubectl apply -f https://github.com/kubernetes-sigs/kwok/releases/download/v0.6.0/metrics-usage.yaml ## Create the nodes kwokctl scale node --replicas 1 kubectl get node node-000000 -o yaml > node.yaml # Configure cluster-autoscaler to use kwok cloud provider helm repo add autoscaler https://kubernetes.github.io/autoscaler helm upgrade --install cluster-autoscaler autoscaler/cluster-autoscaler \ --set "autoDiscovery.clusterName"="kwok-kwok" \ --set "cloudprovider"=kwok --set "image.tag"="v1.30.1" \ --set "image.repository"="registry.k8s.io/autoscaling/cluster-autoscaler" helm template cluster-autoscaler autoscaler/cluster-autoscaler --set "cloudProvider"="kwok" \ -s templates/configmap.yaml \ --namespace=default > config-map-kwok.yaml kubectl apply -f config-map-kwok-copy.yaml # static # delete the existing configmap kubectl delete configmap kwok-provider-templates # create a new configmap with your node yamls kubectl create configmap kwok-provider-templates --from-file=templates=node.yaml ## Create pods kubectl apply -f deployment.yaml
deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:alpine ports: - containerPort: 80 affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: type operator: In values: - kwok podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - nginx topologyKey: kubernetes.io/hostname
/area cluster-autoscaler
cc @vadasambar PTAL! /area provider/kwok
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
Component version: Cluster Autoscaler 1.30.1 Image =
registry.k8s.io/autoscaling/cluster-autoscaler:v1.30.1
What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?:
KWOK cluster
kwokctl version v0.6.0 go1.22.3 (linux/amd64)
What did you expect to happen?:
I expected the node to scale.
What happened instead?:
Nothing happened
How to reproduce it (as minimally and precisely as possible):
ca.demo
deployment.yaml