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.

Comments

  • mrosebury
    mrosebury 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.

  • chrispokorni
    chrispokorni Posts: 2,301

    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

    defaults
    ...
            mode    tcp
            option  tcplog
    ...
    

Categories

Upcoming Training