Exploring Kubernetes Services with Meshery
Introduction
In this tutorial, we’ll learn to implement Kubernetes Services, the resources responsible for exposing applications inside and outside the cluster. Using Meshery Playground, an interactive live cluster environment, we’ll perform hands-on labs to gain practical experience with the Kubernetes Services, without writing any YAML.
NOTE: If this is your first time working with Meshery Playground, consider starting with the Exploring Kubernetes Pods with Meshery Playground tutorial first or Exploring Kubernetes Deployments with Meshery.
Prerequisites
- Basic understanding of containerization and Kubernetes concepts.
- Access to the Meshery Playground. If you don’t have an account, sign up at Meshery Playground.
Lab Scenario
Deploy a simple application or a simple Pod and expose it using ClusterIP, NodePort, and LoadBalancer services. Each service will route traffic to the pods via a common label selector. We’ll inspect the service details in Operator mode to confirm their types and behavior.
Objective
Learn how to create, manage, and explore Kubernetes Services to expose applications within the context of a microservices architecture.
Steps
Access Meshery Playground
- Log in to the Meshery Playground using your credentials.
- On successful login, you should be at the dashboard.
-
Click Kanvas from the left menu to navigate to the Kanvas design page.

NOTE: Kanvas is still in beta.
Create a Deployment
-
In the Kanvas Design page, start by renaming the design to a name of your choice for easier identification later.

-
From the floating dock below, click the Kubernetes icon and then click Deployment from the list. This will create the Deployment component on the design canvas.

-
Click or Drag the Deployment component onto the canvas and the Configure tab automatically opens.

-
Change the Name of the deployment and the Namespace if required. For this demonstration, we will leave them as they are and deploy this to the default namespace.
-
Set Replicas to
2. Under Selector and MatchLabels, Set a matchLabel pair. Here we have setapp:9988110.
-
Under Template → Metadata → Labels, add the same label
app:9988110.
- While still under Template, click Spec to load the spec configuration modal. Then scroll down and click + Add Item next to Containers. This will create a container Containers 1. Click on it and add:
- Image:
meshery/meshery-milestone:latest - Name:
meshery-milestone

- Image:
-
Click outside to close the modal. The deployment is now ready and it will look similar to this:

- Validate and Deploy the design: Click Validate (Actions toolbar), ensure that there are no errors and then click Deploy. Wait for the deployment to complete (Notifications will appear on bottom right).
You have now deployed a Deployment with 2 pods running in the cluster.
Add a ClusterIP Service
-
From Components, search for Service and drag it to the canvas, rename the service, here I will go with
service-clusterip. Click on the service component to open its config modal.
- In the service configuration modal:
- Set Type to
ClusterIP. - Click on + Add Item under Ports to add a port called Ports 1. Click on it and add:
- Port:
80 - TargetPort:
80(These match the container port that our image serves on.)
- Port:
- Also add the same key value pair as before under Selector:
app:9988110 - We will also add the same label as the deployment for easier identification in Operator Mode.

- Set Type to
- Connect the Service to the Deployment: Click over the service component until green dots appear, click the arrow and select network. Drag to the deployment. This creates a Network link.

From the Actions Tab, Undeploy the deployment first and then, validate and dry-run the new design, resolve any errors that may arise. Now, deploy the design. A pop up in the bottom right will confirm that the design is successfully configured.

Switch to Operator mode, explore the Service details. Select the service-clusterip resource to see its details.

Notice the ClusterIP listed under Addresses and that no external IP or NodePort is assigned. This confirms that a ClusterIP service provides an internal IP reachable only within the cluster.
This Service has a ClusterIP (10.98.146.20) and a selector (app=9988110). Any Pod with that label automatically becomes part of the Service’s backend. This label-to-Pod binding is how a ClusterIP Service internally routes traffic to its backing workloads.

Add a NodePort Service
To allow external access, we’ll use a NodePort service. For simplicity, I will switch from using deployment to Pod for our next Service.
-
Back in Design mode, we will drag a Pod from the dock onto the canvas. Scroll down within the Pod configuration modal to the Containers section. Click + to add a container. Expand Containers-1. Next, fill out some of the required container specifications. Start by entering the container image, we will use meshery/meshery-milestone:latest for this exercise. Give the container a name and a unique label (This unique label will be used by the service selector.).

-
Now, drag a Service component onto the canvas and rename it to
service-nodeport. -
Under the config modal, set Type to
NodePortand the same selector as the Pod label, so that our Service is able to connect with our Pod.
- Click on + Add Item under Ports to reveal Ports 1, expand Ports 1 and add:
- Port:
80 - TargetPort:
80 - NodePort:
30091(or leave blank to auto-assign).
- Port:
- Validate and deploy from the Action tab at the top right.

Now switch to Operator mode, click on any component to view details(like type or selector) about the Service or the Pod.

Note that this service is mapped NodePort and is accessible on the Node’s IP address.
Expand the details section and you will see a NodePort value (30091), this means the service is exposed on each Node’s IP at port 30091. You can access the app externally via http://<NodeIP>:30091.

The Operator mode also provides an interactive terminal, along with other Details about the Pod. Click on the Pod to reveal the Initiate Terminal Session option.

NOTE: In Meshery Playground, Node IPs may not be directly reachable from your local machine due to the sandboxed environment. The NodePort value confirms that the Service is correctly exposed by Kubernetes, even if direct browser access is restricted.
Add a LoadBalancer Service
Finally, we’ll create a LoadBalancer service. In a real cloud environment, this would provision an external load balancer. In Meshery Playground, you will see how the service object is defined, even though a real cloud IP isn’t provided.
- In Design mode, add another Pod to the canvas (as before). Add a container with Name
meshery-milestone, Imagemeshery/meshery-milestone:latest, and add labelapp:8080(or any unique label). - Drag a Service component onto the canvas, rename it
service-loadbalancer. - In the service’s Configure panel, set Type to
LoadBalancer. Under Selector, addapp:8080. - Under Ports, click + Add Item. Expand Ports 1 and set:
- Port:
80 - TargetPort:
80
- Port:
-
Close the panel.

- Validate and Deploy (undeploy the old design first).
In Operator mode, observe the LoadBalancer service. In a real Kubernetes environment, a LoadBalancer provides an external IP address.

Cleaning Up
To remove all the resources you created in this tutorial: in Design mode, go to Actions → Undeploy and confirm. This will delete the Deployments/Pods and Services from the cluster.
Conclusion
Congratulations! You’ve successfully completed the lab on exploring Kubernetes Services with Meshery Playground. You created and deployed a sample application, then exposed it with different Service types (ClusterIP, NodePort, LoadBalancer).
Continue exploring more scenarios in the Meshery Kanvas to enhance your skills.