How to make sure Livenes/Readinesss probe getting done with http and not with https

7/16/2019

I have 2 clusters and on 1st cluster liveness is being checed with http but on second autometically its being checked with https.

How to make sure by yaml it don't happen.

    livenessProbe:
      httpGet:
        path: /api/version
        port: 80
      initialDelaySeconds: 90
      timeoutSeconds: 10
      periodSeconds: 15
    readinessProbe:
      httpGet:
        path: /api/version
        port: 80
      initialDelaySeconds: 30
      timeoutSeconds: 10
      periodSeconds: 15      
    ports:
    - containerPort:  80
      name:  http
-- Vatan Soni
google-kubernetes-engine
kubernetes
kubernetes-helm
kubernetes-ingress
ubuntu

1 Answer

7/16/2019

The type of check will depend on the "httpGet" field, you can define the "scheme" which defaults to HTTP.

Scheme to use for connecting to the host. Defaults to HTTP.

Based on your sample config, your checks should be done using HTTP against port 80. Do you have kubelet or container logs that show the requests coming in as HTTPS?

-- Patrick W
Source: StackOverflow