How to use basic authentication in the HTTP activity node in Kubernet?

I have a Docker container that issues a health check that is protected by basic authentication. I read the search query documentation here , but I cannot find any details on how to provide basic credentials. Is this not supported by Kubernet? Are there any workarounds?

+4
source share
3 answers

Now you can add headers for life support probes:

livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
    httpHeaders:
      - name: Authorization
        value: Basic aGE6aGE=

It may be worth noting that:

Aladdin OpenSesame , base64- Aladdin: OpenSesame, QWxhZGRpbjpPcGVuU2VzYW1l. :

: QWxhZGRpbjpPcGVuU2VzYW1l

: https://en.wikipedia.org/wiki/Basic_access_authentication

base64 :

echo -n "Aladdin:OpenSesame" | base64
+4

HTTP-. ( IP-), , ExecAction, :

curl -G --fail --silent --output=/dev/null -u ${AUTH_USER}:${AUTH_PASSWD} localhost:${AUTH_PORT}

, , - , auth localhost.

+5

I also ran into this problem and I used TCP Socket Checks by Openshift. You must specify the port on which the server is running.

livenessProbe:
  tcpSocket:
    port: 8080
  initialDelaySeconds: 15
  timeoutSeconds: 1

TCP Liveness Probe on Qubernets

0
source

Source: https://habr.com/ru/post/1614188/


All Articles