Difficulty: intermediate
Estimated Time: 30-45 minutes

BoxBoat Logo

Welcome to the Services Lab! We'll cover the following topics!

  • ClusterIP
  • NodePort
  • Pod-to-Pod communication

Please email feedback to: [email protected]

Now that we've learned about Services work, let's complete a challenge app.


Step 1 of 7

Intro to Services

Although each Pod has a unique IP address, those IPs are not exposed outside the cluster without a Service. Services allow your applications to receive traffic. Services can be exposed in different ways by specifying a type in the ServiceSpec:

  • ClusterIP (default) - Exposes the Service on an internal IP in the cluster. This type makes the Service only reachable from within the cluster.
  • NodePort - Exposes the Service on the same port of each selected Node in the cluster using NAT. Makes a Service accessible from outside the cluster using NodeIP:NodePort. Superset of ClusterIP.
  • LoadBalancer - Creates an external load balancer in the current cloud (if supported) and assigns a fixed, external IP to the Service. Superset of NodePort.
  • ExternalName - Exposes the Service using an arbitrary name (specified by externalName in the spec) by returning a CNAME record with the name. No proxy is used. This type requires v1.7 or higher of kube-dns (now core-dns)

We'll cover LoadBalancers in our next demo after this lab, and ExternalName is beyond the scope of this course.