Difficulty: beginner
Estimated Time: 10-15 minutes

Overview

A Service is an abstraction in kubernetes that allows you to connect to pods, it provides two main functionalities service-discovery and load-balancing.

Some typical uses of a Service are:

  • provide an endpoint to connect to an application, such as an nginx webserver
  • create a load-balancer that will distribute traffic to pods
  • create an external endpoint to a service outside of the cluster for example an RDS database

There are multiple types of services:

  • NodePort that exposes a port on all the nodes
  • LoadBalancer that create a loadbalancer depending on your environment
  • ClusterIP which creates a dedicated IP which can usually be only access inside of the cluster

Congratulations. You've now learned Services! Continue onto the next scenario in this course.

Manage Services

Step 1 of 5

Launch Deployment

First things first, lets create a deployment that we will use to learn the various service types.

To do so run:

kubectl create -f nginx-deployment.yml

and make sure all is healthy:

kubectl get deploy

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

This tab will not be visible to users.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]