Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liveness probe failed: private network connection refused #152

Closed
JWDobken opened this issue Oct 10, 2020 · 5 comments
Closed

Liveness probe failed: private network connection refused #152

JWDobken opened this issue Oct 10, 2020 · 5 comments

Comments

@JWDobken
Copy link

JWDobken commented Oct 10, 2020

I am running my cluster with:

and that is all working fine:

image

Now when I deploy the CSI driver:

$ kubectl apply -f https://raw.githubusercontent.com/hetznercloud/csi-driver/master/deploy/kubernetes/hcloud-csi.yml
csidriver.storage.k8s.io/csi.hetzner.cloud created
storageclass.storage.k8s.io/hcloud-volumes created
serviceaccount/hcloud-csi created
clusterrole.rbac.authorization.k8s.io/hcloud-csi created
clusterrolebinding.rbac.authorization.k8s.io/hcloud-csi created
statefulset.apps/hcloud-csi-controller created
daemonset.apps/hcloud-csi-node created
service/hcloud-csi-controller-metrics created
service/hcloud-csi-node-metrics created

The hcloud-csi-driver of the hcloud-csi-controller and the hcloud-csi-nodes will keep restarting forever. But when I try to read the logs, I get:

$ kubectl -n kube-system logs hcloud-csi-controller-0 hcloud-csi-driver
Error from server: Get https://10.244.0.5:10250/containerLogs/kube-system/hcloud-csi-controller-0/hcloud-csi-driver: dial tcp 10.244.0.5:10250: connect: connection refused

and the events from the pod description reports that the Liveness probe fails:

Liveness probe failed: Get http://10.244.1.8:9808/healthz: dial tcp 10.244.1.8:9808: connect: connection refused
@JWDobken
Copy link
Author

this solves my issue: #143 (comment)

@LKaemmerling
Copy link
Member

@JWDobken we won't recommend using the host network for this. It looks like something on your network stack is wrong (Maybe missing routes?). Exposing the CSI Driver via the host network, exposes all the ports completely, so an attacker might use these open ports as an entry point.

@JWDobken
Copy link
Author

JWDobken commented Oct 12, 2020

thanks @LKaemmerling.

Also, I cannot shell connect to containers other than on the master node. So that might have the same cause. Although I can't figure out exactly what.

$ kubectl exec -it my-csi-app -- /bin/sh
Error from server: error dialing backend: dial tcp 10.244.0.3:10250: connect: no route to host

@JWDobken
Copy link
Author

JWDobken commented Oct 12, 2020

OK.. if I diable ufw on all nodes, everything works fine.

I'm definitely not an expert in this field at all, so if anyone can tell me how to properly set up my firewall for this private network it would be much appreciated.

My current ufw settings:

 ufw --force reset
ufw allow ssh
ufw allow 6443
ufw allow http
ufw allow https
ufw default deny incoming
ufw --force enable
ufw status verbose

@LKaemmerling
Copy link
Member

OK.. if I diable ufw on all nodes, everything works fine.

I'm definitely not an expert in this field at all, so if anyone can tell me how to properly set up my firewall for this private network it would be much appreciated.

My current ufw settings:

 ufw --force reset
ufw allow ssh
ufw allow 6443
ufw allow http
ufw allow https
ufw default deny incoming
ufw --force enable
ufw status verbose

@JWDobken you should whitelist the whole private network range. As a sample

ufw allow from 10.0.0.0/8 # when this is your Hetzner Cloud Network Range

So basically you need to make sure that the intercluster communication can work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants