Welcome to the Linux Foundation Forum!

Lab 16.1 Step 5 'kubectl get nodes' error 'http: server gave HTTP response to HTTPS client

Lab 16.1 Step 5 'kubectl get nodes' fails when the ha-proxy private IP address is used in the master etc hosts file (and the master IP address is commented out).
Error 'Unable to connect to the server: http: server gave HTTP response to HTTPS client!'.
Nodes are using GCP. Possibly confusion between the alias and hostnames.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 5

    haproxy.cfg has server k8scp 10.2.0.2:6443 check - but the hostname is master. k8scp 6443 was used in the earlier labs in the worker join process.

  • Posts: 2,449

    Hi @mrosebury,

    In the haproxy.cfg file, the three control plane hostnames and internal IP addresses are to be used. The k8scp alias is to be reassigned to the ha-proxy server private IP (instead of the first control plane private IP) in all /etc/hosts files.

    The http vs https error may be due to a typo in the haproxy.cfg file. A complete file can be found in the SOLUTIONS tarball, it may help to compare and possibly find the difference causing the error.

    Regards,
    -Chris

  • On the HTTP/HTTPS issue: please check that in haproxy configuration file you have set

    1. defaults
    2. ...
    3. mode tcp
    4. option tcplog
    5. ...

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training