简体   繁体   中英

Azure kubernetes deployment error - 0/1 nodes are available: 1 node(s) didn't match node selector

I am working on deploying one of my application to the Azure Kubernetes. I have ACR and AKS configured, I am trying the deployment through azure CLI.

Here is the kubernetes deployment file content

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

The error I am getting is "0/1 nodes are available: 1 node(s) didn't match node selector."

Please help me to get this resolved.

Thanks

I suppose the issue is with the fact AKS doesnt yet support windows nodes, so you dont really have windows nodes. You can create AKS with windows nodes, but its in preview at this point in time.

https://github.com/Azure/AKS/blob/master/previews.md#windows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM