diff --git a/k8s-deploy-template.yaml b/k8s-deploy-template.yaml index 745d80c59148d16a1615f403c5d92e55b3dfef7c..ef7aead5526c690b6aa66b27f5690d23b200a33e 100644 --- a/k8s-deploy-template.yaml +++ b/k8s-deploy-template.yaml @@ -6,6 +6,15 @@ metadata: labels: app: ${APP_NAME} spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: alibabacloud.com/nodepool-id + operator: In + values: + - ${NODE_ID} replicas: ${REPLICAS} selector: matchLabels: @@ -22,7 +31,7 @@ spec: imagePullPolicy: Always resources: limits: - memory: ${memoryLimit} + memory: ${MEMORY_LIMIT} ports: - containerPort: ${PORT} protocol: TCP