Como criar um Pod nginx e expor o trafego na port 80

Comando:

kubectl run nginx-porta-oitenta --image=nginx --restart=Never --port=80

Teste:

kubectl describe pod nginx-porta-oitenta

Resultado:

ame:         nginx-porta-oitenta
Namespace:    default
Priority:     0
Node:         kind-worker2/172.18.0.3
Start Time:   Mon, 10 Jan 2022 15:52:22 -0300
Labels:       run=nginx-porta-oitenta
Annotations:  <none>
Status:       Running
IP:           10.244.1.6
IPs:
  IP:  10.244.1.6
Containers:
  nginx-porta-oitenta:
    Container ID:   containerd://3c488493e838a2df67066979e6e91ac62f4ec53fda75b0d6fd31605b41c547a1
    Image:          nginx
    Image ID:       docker.io/library/nginx@sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Mon, 10 Jan 2022 15:52:34 -0300
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-zbc2s (ro)

Como listar os Pods de todos namespaces

Comandos:

kubectl get po --all-namespaces

# ou

kubectl get po -A

Resultado:

NAMESPACE            NAME                                         READY
default              db-595b5997b5-g249f                          1/1  
default              hello-server-64679d86dd-q5pjn                1/1  
default              web-574d97b97d-w88j8                         1/1  
ingress-nginx        ingress-nginx-admission-create-bqm7t         0/1  
ingress-nginx        ingress-nginx-admission-patch-t9vfj          0/1  
ingress-nginx        ingress-nginx-controller-5f9484b677-hs9gc    1/1  
kube-system          coredns-74ff55c5b-64tjg                      1/1  
kube-system          coredns-74ff55c5b-7zrzc                      1/1  
kube-system          etcd-kind-control-plane                      1/1  
kube-system          kindnet-j2n2q                                1/1  
kube-system          kindnet-wtbhs                                1/1  
kube-system          kindnet-xjnz7                                1/1  
kube-system          kube-apiserver-kind-control-plane            1/1  
kube-system          kube-controller-manager-kind-control-plane   1/1  
kube-system          kube-proxy-p26x8                             1/1  
kube-system          kube-proxy-pk8hm                             1/1  
kube-system          kube-proxy-qjjw8                             1/1  
kube-system          kube-scheduler-kind-control-plane            1/1  
local-path-storage   local-path-provisioner-547f784dff-kqpqk      1/1