Google Container Engine Error: Does not have minimum availability

7/5/2018

I'm trying to deploy a web service to Google's Kontainer Engine. I have created a cluster with cluster size: 4 AND total cores: 8. In my yaml configuration, I'm creating a deployment for three of my services and a Service to expose these services along with the ingress to handle routing.

And Here's my yaml:

kind: Deployment
apiVersion: apps/v1
metadata:
  name: nodeapp-deployment
  labels:
    app: nodeapp
spec:
  replicas: 3 #We always want more than 1 replica for HA
  selector:
    matchLabels:
      app: nodeapp
  template:
    metadata:
      labels:
        app: nodeapp
    spec:
      containers:
      - name: wishlist # svc name
        image: karthequian/wishlist:1.0 #Dockerhub image
        ports:
        - containerPort: 8080 #Exposes the port 8080 of the container
        env:
        - name: wishlist-port #Env variable key passed to container that is read by app
          value: "8080" # Value of the env port.        

      - name: catalog # svc name
        image: karthequian/wishlist-catalog:1.0 #Dockerhub image
        ports:
        - containerPort: 8081 #Exposes the port 8080 of the container
        env:
        - name: catalog-port #Env variable key passed to container that is read by app
          value: "8081" # Value of the env port.        

      - name: auth # svc name
        image: karthequian/wishlist-auth:1.0 #Dockerhub image
        ports:
        - containerPort: 8082 #Exposes the port 8080 of the container
        env:
        - name: auth-port #Env variable key passed to container that is read by app
          value: "8082" # Value of the env port.        


kind: Service
apiVersion: v1
metadata:
  name: nodeapp-service
  labels:
    app: nodeapp-service
  namespace: default
spec:
  type: ClusterIP
  selector:
    app: nodeapp
  ports:
  - name: wishlist-port
    protocol: TCP
    port: 8080
  - name: catalog-port
    protocol: TCP
    port: 8081
  - name: auth-port
    protocol: TCP
    port: 8082

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nodeapp-service
  labels:
    app: nodeapp-service  
spec:
  rules:
  - host:
    http:
      paths:
      - path: /wishlist
        backend:
          serviceName: nodeapp-service
          servicePort: 8080
      - path: /products
        backend:
          serviceName: nodeapp-service
          servicePort: 8081
      - path: /login
        backend:
          serviceName: nodeapp-service
          servicePort: 8081

It returns a confusing error as:

Does not have the minimum availability As you can see in the screenshot below: enter image description here

Help me, please!

Thanks in advance!

-- Abdul Rehman
google-kubernetes-engine
kubernetes
kubernetes-deployment

2 Answers

6/28/2019

For me waiting did the job. I noticed that while I was deploying my service; at the side pane it was written that it might take up to 5 minutes to deploy all containers.

-- Salman Sheikh
Source: StackOverflow

9/8/2019

Multiple conditions can trigger this uninformative error:

  1. Insufficient resources
  2. Readiness probe failure
  3. Liveliness probe failure
-- Charlie
Source: StackOverflow