Kubernetes pod cannot ping url or wget HTTPS site

9/13/2021

I'm trying to install SonarQube onto a bare-metal kubernetes cluster.

All is working except for when the software inside the pod tries to make a HTTPS request.

I've checked using wget (pod doesn't have curl & cannot use ping) & using the kubernetes DNS debugging guide, however whenever I make a call such as wget https://google.com I get the following error:

Connecting to google.com (192.168.1.179:443)
ssl_client: google.com: TLS connect failed
wget: error getting response: Connection reset by peer
command terminated with exit code 1

The IP address 192.168.1.179 is the address of another server on the host network. The resolv.conf I have (ubuntu host) is:

nameserver 1.1.1.1
nameserver 1.0.0.1

I can't figure out why this is happening or how to fix it. DNS is working but not resolving HTTPS.

I'm using Calico, kubernetes dashboard, MetalLB, ingress-nginx & sonarqube

Edit: After restarting the host the DNS servers successfully changed to 1.1.1.1.

However, now I'm presented with the following

Connecting to google.com (142.250.204.14:443)
ssl_client: google.com: TLS connect failed
wget: error getting response: Connection reset by peer
command terminated with exit code 1
-- Brayden
dns
https
kubernetes
sonarqube

1 Answer

9/14/2021

This error went away when I: 1. Disabled my firewall (ufw) and; 2. Restarted the machine for the DNS changes to take affect.

-- Brayden
Source: StackOverflow