Hi all, I hope you are doing find and I find a co...
# k3s
b
Hi all, I hope you are doing find and I find a couple of k3s experts here. I installed K3s on AWS and connected it with a postgres DB. Systemctrl status shows me that the server is running, but when I check the pods, I see that most is not running. Which pod must I troubleshoot first to derive meaningful conclusions. How do they depend on each other: NAME READY STATUS RESTARTS AGE coredns-ff8999cc5-chpfc 0/1 Running 0 13s helm-install-traefik-57pjr 0/1 Error 1 (2s ago) 13s helm-install-traefik-crd-h4bzq 0/1 Error 1 (2s ago) 13s local-path-provisioner-774c6665dc-hst45 0/1 CrashLoopBackOff 1 (2s ago) 13s metrics-server-6f4c6675d5-r22dg 0/1 Error 1 (2s ago) 13s
I am wondering if this can be related to the local OS firewall 🧐
m
Also check if selinux is enabled, if so, you can either install with selinux enabled in the config.yaml or set it to permissive as well as follow the requirements page.
b
I check later. I thought SELinux is primarily a redhat think and not a default ob ubuntu. Thanks for pointing this out. I try and let you know.
m
Apologies, assumed you were using Amazon Linux since you mentioned running this in AWS. If you are using Ubuntu ami then disregard selinux.
πŸ‘ 1
b
The firewall is not the problem as it is already inactive.
Starting from coredns, I have already the problem that the api is not reachable: [INFO] plugin/kubernetes: pkg/mod/k8s.io/client-go@v0.31.2/tools/cache/reflector.go243 failed to list *v1.EndpointSlice: Get "https://10.43.0.1:443/apis/discovery.k8s.io/v1/endpointslices?limit=500&resourceVersion=0": dial tcp 10.43.0.1443 connect: connection refused [ERROR] plugin/kubernetes: Unhandled Error
I made another test on my local ubuntu deskto machine and it is working. However, in this case, the difference that I am not using and external DB as in AWS.
m
gotcha. Sorry, I'm not familiar with running k3s on external db in aws. Hopefully someone else can assist.
Maybe iam policies are preventing kube-api communicating with external db
b
I think the connection to the postgres DB works. The k3s server client was able to connect and to create the kubernetes DB schema.
I updated now all listining ports and settings in the sysetmd startup to the default except of the external DB. This improved the situation NAME READY STATUS RESTARTS AGE coredns-ff8999cc5-9xsn6 1/1 Running 1 (36m ago) 55m helm-install-traefik-2dbrv 0/1 Completed 21 55m helm-install-traefik-crd-kcvfz 0/1 Completed 20 55m local-path-provisioner-774c6665dc-5fx2c 1/1 Running 20 (23m ago) 55m metrics-server-6f4c6675d5-bj52h 1/1 Running 20 (23m ago) 55m svclb-traefik-322b8687-tb2n5 2/2 Running 0 22m traefik-67bfb46dcb-lzttx 1/1 Running 0 22m
Now thes pods are running, but the API endpoints are not reachable. Logs from coredns are: sudo kubectl -n kube-system logs coredns-ff8999cc5-9xsn6 | vi - [ERROR] plugin/kubernetes: Unhandled Error 14 [INFO] plugin/kubernetes: waiting for Kubernetes API before starting server 15 [INFO] plugin/kubernetes: pkg/mod/k8s.io/client-go@v0.31.2/tools/cache/reflector.go243 failed to list *v1.Namespace: Get "https://10.43.0. 1:443/api/v1/namespaces?limit=500&resourceVersion=0": dial tcp 10.43.0.1443 connect: connection refused sudo journalctl -u k3s | vi - [ERROR] plugin/kubernetes: Unhandled Error 14 [INFO] plugin/kubernetes: waiting for Kubernetes API before starting server 15 [INFO] plugin/kubernetes: pkg/mod/k8s.io/client-go@v0.31.2/tools/cache/reflector.go243 failed to list *v1.Namespace: Get "https://10.43.0. 1:443/api/v1/namespaces?limit=500&resourceVersion=0": dial tcp 10.43.0.1443 connect: connection refused
Tomorrow is another day. Sometimes it just needs another day of sleep and a good idea to resolve the problem.
πŸ‘ 1
m
Any custom kubelet or kube-api args added to your config?
b
Well in the startup service file. I can post it tomorrow. Late in my timezone. Cheers 😁 βœ‹
πŸ‘ 1