← Kubernetes for Go developers

KUBERNETES TUTORIAL · KUBECTL SIMULATOR · 6 LESSONS

Networking: Services, DNS, Ingress and policies

ClusterIP, NodePort and LoadBalancer Services, endpoints and targetPort, cluster DNS, Ingress routing, NetworkPolicies and end-to-end traffic debugging.

  1. Services: a stable virtual IP and DNS name in front of changing pods

    Expose a Deployment through a ClusterIP Service, trace a request from selector to endpoints to targetPort, and fix a wrong targetPort and a selector that matches no pods.

    6 min · Worked lesson

  2. Service types: NodePort, LoadBalancer, ExternalName and headless Services

    Pick the right Service type for each job, reach a NodePort and a LoadBalancer from outside the cluster, and explain what externalTrafficPolicy changes.

    5 min · Worked lesson

  3. Cluster DNS: CoreDNS, service names, search domains and ndots

    Resolve Services and StatefulSet pods by short and fully qualified names across namespaces, explain the extra lookups that ndots:5 causes, and debug name resolution from inside a pod.

    6 min · Worked lesson

  4. Ingress: route HTTP by host and path through an ingress controller

    Write an Ingress with host and path rules for an IngressClass, route two Services behind one entry point, and tell a controller 404 from a controller 503.

    6 min · Worked lesson

  5. NetworkPolicies: default deny and label-based allow-lists for pod traffic

    Isolate pods with NetworkPolicies, allow traffic by pod label, namespace and IP block, build a default-deny baseline that keeps DNS working, and verify enforcement from a client pod.

    6 min · Worked lesson

  6. Debugging traffic end to end: latency, saturation, errors and rollbacks

    Follow a request from client to container port, read latency, saturation and error signals under load, and fix an overloaded Service and a bad release with scaling and kubectl rollout undo.

    6 min · Worked lesson