Error during sync: googleapi: Error 400: while configuring ingress for Kubernetes

10/24/2018

I have the following ingress configuration:

I have the following ingress configuration:

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

And the service is as follows:

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

I haven't configured any livenessprobe for the deployment and the readinessprobe is configured with the following values

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  

It was running fine earlier, however now I get the following error:

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

What does resource.checkIntervalSec stand for and what am I missing?

-- kosta
google-kubernetes-engine
kubernetes-ingress

1 Answer

10/25/2018

This is most probably your health check probe, ascheckIntervalSec is the time interval between checks by default is 5 seconds but the value can be from 1 to 300 Maximun, you set your periodSeconds: 300 and timeoutSeconds: 60 both will represent your check interval in second.

you need to lower your periodSeconds to 240 if you want to use the maximum interval second allowed.

-- Alioua
Source: StackOverflow