0

我正在尝试将网络服务部署到 Google 的 Kontainer 引擎。我创建了一个集群cluster size: 4 AND total cores: 8。在我的 yaml 配置中,我正在为我的三个服务创建部署,并Service公开这些服务以及ingress处理路由。

这是我的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

它返回一个令人困惑的错误:

没有最低可用性您可以在下面的屏幕截图中看到: 在此处输入图像描述

请帮帮我!

提前致谢!

4

2 回答 2

0

对我来说,等待完成了工作。我注意到在部署服务时;在侧窗格中写道,部署所有容器最多可能需要 5 分钟。

于 2019-06-28T20:59:09.897 回答
0

多个条件可以触发这个无意义的错误:

  1. 资源不足
  2. 就绪探测失败
  3. 活力探测失败
于 2019-09-08T04:10:41.480 回答