同步期间出错:googleapi:错误400:为Kubernetes配置入口时

时间:2018-10-24 19:00:05

标签: google-kubernetes-engine kubernetes-ingress

我具有以下入口配置:

我具有以下入口配置:

kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: dev-ingress
  namespace: dev
  annotations:
    kubernetes.io/ingress.class: "gce"
    kubernetes.io/ingress.global-static-ip-name: "dev-ingress"
spec:
  tls:
    - secretName: mydomain-net-tls
      hosts: 
        - mydomain.net
    - secretName: mydomain-me-tls
      hosts:
        - mydomain.me
  rules:
    - host: something.mydomain.net
      http:
        paths:
        - path: /*
          backend:
            serviceName: myservice-dev-service
            servicePort: mainnet

服务如下:

kind: Service
apiVersion: v1
metadata:
  name: myservice-dev-service
  namespace: dev
spec:
  selector:
    app: my-node
  ports:
  - name: mainnet
    protocol: TCP
    port: 80
    targetPort: 3001

我尚未为部署配置任何livenessprobe,并且readinessprobe配置了以下值

readinessProbe: 
          httpGet:
              path: /somepath/status
              port: 3001
          initialDelaySeconds: 120 #wait this period after staring fist time
          periodSeconds: 300    # polling interval every 5 minutes
          timeoutSeconds: 60  

之前运行良好,但是现在出现以下错误:

Error during sync: googleapi: Error 400: Invalid value for field 'resource.checkIntervalSec': '360'. Must be less than or equal to 300, invalid

resource.checkIntervalSec代表什么?我想念什么?

1 个答案:

答案 0 :(得分:0)

这很可能是您的健康检查探针,因为checkIntervalSec默认情况下两次检查之间的时间间隔是5秒,但是该值可以在1到300之间。 {1}}都将以秒为单位表示您的检查间隔。

如果要使用允许的最大间隔秒数,则需要将periodSeconds: 300降低到timeoutSeconds: 60