[英]Getting 'didn't match node selector' when running Docker Windows container in Azure AKS
[英]Azure kubernetes deployment error - 0/1 nodes are available: 1 node(s) didn't match node selector
我正在將我的應用程序之一部署到Azure Kubernetes。 我已經配置了ACR和AKS,我正在嘗試通過azure CLI進行部署。
這是kubernetes部署文件的內容
kind: Deployment
metadata:
name: pocaksimage1
spec:
replicas: 1
template:
metadata:
labels:
app: pocaksimage1
spec:
nodeSelector:
"beta.kubernetes.io/os": windows
containers:
- name: pocaksimage1
image: pocaksimage1
ports:
- containerPort: 6379
name: pocaksimage1
---
apiVersion: v1
kind: Service
metadata:
name: pocaksimage1
spec:
ports:
- port: 6379
selector:
app: pocaksimage1
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: pocaksimage1
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 5
template:
metadata:
labels:
app: pocaksimage1
spec:
nodeSelector:
"beta.kubernetes.io/os": windows
containers:
- name: pocaksimage1
image: repo
ports:
- containerPort: 80
resources:
requests:
cpu: 250m
limits:
cpu: 500m
env:
- name: PRE_PROD
value: "pocaksimage1"
imagePullSecrets:
- name: pocsecret
---
apiVersion: v1
kind: Service
metadata:
name: pocaksimage1-front
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: pocaksimage1-front
我收到的錯誤是“ 0/1個節點可用:1個節點與節點選擇器不匹配”。
請幫助我解決此問題。
謝謝
我想問題在於AKS尚不支持Windows節點,因此您實際上沒有Windows節點。 您可以使用Windows節點創建AKS,但此時它仍處於預覽狀態。
https://github.com/Azure/AKS/blob/master/previews.md#windows
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.