我正在将我的一个应用程序部署到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个节点与节点选择器不匹配。”
请帮助我解决此问题。
谢谢
答案 0 :(得分:0)
我想问题在于AKS尚不支持Windows节点,因此您实际上没有Windows节点。您可以使用Windows节点创建AKS,但此时它仍处于预览状态。
https://github.com/Azure/AKS/blob/master/previews.md#windows