k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

Installing k3s cluster on azure vm #10014

Closed khalidkhushal closed 3 weeks ago

khalidkhushal commented 3 weeks ago

I have installed k3s cluster on azure vm using following cmd:

curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.24.2+k3s1" INSTALL_K3S_EXEC="server --config ~/k3s-config-files/server-config.yaml" sh -s - --write-kubeconfig-mode 644

I have installed bare metal ingress controller and a loadbalancer service using: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/baremetal/deploy.yaml here is the result for kubectl get svc -A

NAMESPACE       NAME                                    TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
default         kubernetes                              ClusterIP      10.43.0.1       <none>        443/TCP                      14m
ingress-nginx   ingress-nginx-controller                NodePort       10.43.230.191   <none>        80:32579/TCP,443:31967/TCP   14m
ingress-nginx   ingress-nginx-controller-admission      ClusterIP      10.43.142.52    <none>        443/TCP                      14m
kube-system     kube-dns                                ClusterIP      10.43.0.10      <none>        53/UDP,53/TCP,9153/TCP       14m
kube-system     metrics-server                          ClusterIP      10.43.183.183   <none>        443/TCP                      14m
ingress-nginx   ingress-nginx-controller-loadbalancer   LoadBalancer   10.43.120.250   10.1.0.4      80:30735/TCP,443:30158/TCP   14m

I can see the internal IP of node as external IP in loadbalancer but I can not connect to the cluster using Public IP of VM. I am trying to debug but not able to find the reason.