Segui os passos da aula, e não consegui da mesma forma publicar uma porta usando o NodePort. Meu cenário é:
- Um k8s como master rodando em uma máquina, e um node worker rodando numa vm na minha máquina.
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
node01 Ready worker1 12h v1.24.0 192.168.200.10 <none> Debian GNU/Linux 10 (buster) 4.19.0-20-amd64 containerd://1.6.4
seeds Ready control-plane 12h v1.24.0 192.168.68.110 <none> Debian GNU/Linux 10 (buster) 5.4.106-1-pve containerd://1.6.4
$ kubectl get all -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default pod/pod-1 1/1 Running 0 4m24s
kube-system pod/calico-kube-controllers-77484fbbb5-jkrqt 1/1 Running 1 (30m ago) 13h
kube-system pod/calico-node-pc4dq 1/1 Running 1 (30m ago) 13h
kube-system pod/calico-node-vlsb8 1/1 Running 1 (30m ago) 13h
kube-system pod/coredns-6d4b75cb6d-6wv7g 1/1 Running 1 (30m ago) 13h
kube-system pod/coredns-6d4b75cb6d-trstd 1/1 Running 1 (30m ago) 13h
kube-system pod/etcd-seeds 1/1 Running 8 (30m ago) 13h
kube-system pod/kube-apiserver-seeds 1/1 Running 8 (30m ago) 13h
kube-system pod/kube-controller-manager-seeds 1/1 Running 2 (30m ago) 13h
kube-system pod/kube-proxy-2br77 1/1 Running 1 (30m ago) 13h
kube-system pod/kube-proxy-k2z67 1/1 Running 1 (30m ago) 13h
kube-system pod/kube-scheduler-seeds 1/1 Running 8 (30m ago) 13h
metallb-system pod/controller-7476b58756-9b8kg 1/1 Running 1 (30m ago) 13h
metallb-system pod/speaker-pt8h5 1/1 Running 1 (30m ago) 13h
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 13h
default service/svc-pod-1 NodePort 10.108.204.80 192.168.200.10 80:30000/TCP 94s
kube-system service/kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 13h
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/calico-node 2 2 2 2 2 kubernetes.io/os=linux 13h
kube-system daemonset.apps/kube-proxy 2 2 2 2 2 kubernetes.io/os=linux 13h
metallb-system daemonset.apps/speaker 1 1 1 1 1 kubernetes.io/os=linux 13h
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
kube-system deployment.apps/calico-kube-controllers 1/1 1 1 13h
kube-system deployment.apps/coredns 2/2 2 2 13h
metallb-system deployment.apps/controller 1/1 1 1 13h
NAMESPACE NAME DESIRED CURRENT READY AGE
kube-system replicaset.apps/calico-kube-controllers-77484fbbb5 1 1 1 13h
kube-system replicaset.apps/coredns-6d4b75cb6d 2 2 2 13h
metallb-system replicaset.apps/controller-7476b58756 1 1 1 13h