image.png

    image.png

    • 编辑器

    https://www.katacoda.com/courses/kubernetes/playground

    image.png

    1. controlplane $ kubectl expose pod d1 --target-port 80 --type NodePort
    2. service/d1 exposed
    3. controlplane $ kubectl get svc
    4. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    5. d1 NodePort 10.103.81.35 <none> 80:30959/TCP 18s
    6. kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 34m
    7. controlplane $