Skip to content

5.1. Services

Overview

The Services page manages every Service held on the MCM control plane in one place. A Service is the Kubernetes resource that provides a stable network endpoint for a set of pods.

What it is for:

  • Managing multi-cluster Services together
  • Setting up network communication between applications
  • Service discovery and load balancing
  • Distributing Services through a PropagationPolicy

Where Services are used:

  • Internal communication between pods (ClusterIP)
  • Exposing traffic outward (NodePort, LoadBalancer)
  • Connecting to an external service (ExternalName)
  • Building a microservice architecture

How the Screen Is Laid Out

The Services page shows the Service list as a table.

The Services main screen

The Elements at the Top of the Page

ElementDescription
Namespace filterShows only the Services of a particular namespace
Refresh buttonRefreshes the Service list
Create buttonOpens the dialog for creating a new Service
Search boxSearches by Service name

Table Columns

ColumnDescriptionSortable
NameThe Service name
NamespaceThe namespace the Service belongs to
TypeThe Service type (ClusterIP/NodePort/LoadBalancer/ExternalName)
Cluster IPThe in-cluster IP assigned to the Service
PortsThe port mapping (80→80/TCP, for example)
AgeThe time since the Service was created
ActionsThe edit and delete buttons-

Service Types

TypeDescription
ClusterIPReachable only on the in-cluster IP (the default)
NodePortReachable from outside on a fixed port of each node
LoadBalancerReachable from outside through a cloud load balancer
ExternalNameMaps to an external DNS name

How the Ports Are Shown

The Ports column shows the Service's port mapping:

  • Format: [port]→[target port]/[protocol]
  • For example 80→80/TCP -- Service port 80 goes to pod port 80, over TCP

Service Detail

Clicking a Service row opens the detail panel.

Service detail

The Detail Panel Header

ElementDescription
Service nameThe name of the chosen Service
NamespaceThe namespace the Service belongs to
TypeThe Service type (ClusterIP, for example)

The Action Buttons

ButtonWhat it does
RefreshRefreshes the Service information
EditOpens the YAML edit mode
DeleteDeletes the Service

The Tabs

The Overview Tab

Shows the Service's basic information, selector, and ports.

Basic information:

ItemDescription
NameThe Service name
NamespaceThe namespace the Service belongs to
TypeThe Service type
Cluster IPThe in-cluster IP assigned
HostnameThe Service's DNS name (my-service.namespace.svc.cluster.local, for example)
AgeThe time since creation
CreatedWhen the Service was created
Session AffinityThe session stickiness setting (None/ClientIP)

Selector:

Shows the label selector by which the Service picks the pods to send traffic to:

  • Search filters the labels
  • The copy button copies a label

Ports:

Shows the port mappings defined on the Service as a table:

ColumnDescription
NameThe port name (optional)
ProtocolThe protocol (TCP/UDP)
PortThe port the Service exposes
Target PortThe pod's actual port

The Endpoints Tab

Shows the endpoints connected to the Service.

The Endpoints tab

Internal Endpoint:

Shows the endpoint reachable from inside the cluster:

  • The DNS name: [service-name].[namespace]
  • The port: [port]/[protocol]

External Endpoints:

Shows the endpoints reachable from outside:

  • Shown for the NodePort and LoadBalancer types
  • The external IP and port
  • Where there is none, the message "No external endpoints" is shown

The Multi-Cluster Policies Tab

Shows the multi-cluster policies that apply to the Service.

The multi-cluster policies tab

PropagationPolicy:

ColumnDescription
NameThe PropagationPolicy name
NamespaceThe namespace the policy belongs to
ScopeNamespace-scoped policies / cluster-scoped policies
Target ClustersThe list of target clusters

OverridePolicy:

Shown where there are per-cluster custom settings.

The Labels Tab

Shows the list of Kubernetes labels applied to the Service.

The Annotations Tab

Shows the list of annotations applied to the Service.

The Events Tab

Shows the Kubernetes events related to the Service.

Creating a Service

Creates a new Service on the MCM control plane.

Fields

FieldRequiredDescription
NameThe Service name
NamespaceThe namespace to deploy into
TypeChoose the Service type
SelectorThe labels that pick the target pods
PortsThe port mapping

Creating by Service Type

ClusterIP (the default):

apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: default
spec:
type: ClusterIP
selector:
app: my-app
ports:
- port: 80
targetPort: 8080
protocol: TCP

NodePort:

apiVersion: v1
kind: Service
metadata:
name: my-nodeport-service
namespace: default
spec:
type: NodePort
selector:
app: my-app
ports:
- port: 80
targetPort: 8080
nodePort: 30080 # in the range 30000-32767
protocol: TCP

LoadBalancer:

apiVersion: v1
kind: Service
metadata:
name: my-loadbalancer-service
namespace: default
spec:
type: LoadBalancer
selector:
app: my-app
ports:
- port: 80
targetPort: 8080
protocol: TCP

ExternalName:

apiVersion: v1
kind: Service
metadata:
name: my-external-service
namespace: default
spec:
type: ExternalName
externalName: external.example.com

Editing the YAML

The "Edit YAML" tab lets you write the Service definition directly.

Service Operations

Editing a Service

  1. Choose the Service
  2. Press the "Edit" button in the detail panel
  3. Change the Service definition in the YAML editor
  4. Press the "Save" button

Note: a change to a Service reaches the pods it connects at once.

Deleting a Service

⚠️ Caution: deleting a Service makes network access through it impossible. Check what applications depend on it.

  1. Choose the Service to delete
  2. Press the "Delete" button in the detail panel
  3. Type the Service name in the confirmation dialog
  4. Press the "Delete" button

Worked Examples

Scenario 1: Creating a ClusterIP Service for Internal Communication

  1. Press the "Create" button
  2. Enter the Service details:
    • Name: backend-service
    • Namespace: production
    • Type: ClusterIP
    • Selector: app=backend
    • Ports: 80 → 8080/TCP
  3. Press the "Create" button
  4. Name the target clusters with a PropagationPolicy
  5. Reach it from the frontend at backend-service.production.svc.cluster.local:80

Scenario 2: Creating a LoadBalancer Service for External Exposure

  1. Press the "Create" button and choose the Edit YAML tab
  2. Write this YAML:
    apiVersion: v1
    kind: Service
    metadata:
    name: web-service
    namespace: web
    spec:
    type: LoadBalancer
    selector:
    app: web-frontend
    ports:
    - port: 80
    targetPort: 3000
  3. Press the "Create" button
  4. Check the external IP on the Endpoints tab
  5. Reach the service on that external IP

Scenario 3: Checking a Service's Endpoints

  1. Click the Service you want to check in the list
  2. Choose the Endpoints tab
  3. Check the DNS name under Internal Endpoint
  4. Check the external access details under External Endpoints (where they apply)

Scenario 4: Deploying a Service Across Clusters

  1. Create the Service
  2. Create a PropagationPolicy:
    • Resource selector: name the Service
    • Target clusters: choose the clusters to deploy to
  3. Check the "Multi-Cluster Policies" tab in the detail panel
  4. Confirm the Service has been deployed to the target clusters

Scenario 5: Configuring a Multi-Port Service

  1. Press the "Create" button and choose the Edit YAML tab
  2. Write this YAML:
    apiVersion: v1
    kind: Service
    metadata:
    name: multi-port-service
    namespace: default
    spec:
    type: ClusterIP
    selector:
    app: my-app
    ports:
    - name: http
    port: 80
    targetPort: 8080
    - name: https
    port: 443
    targetPort: 8443
    - name: metrics
    port: 9090
    targetPort: 9090
  3. Press the "Create" button
  4. Each port then handles a different kind of traffic

Comparing the Service Types

TypeInside the clusterFrom outsideWhere it is used
ClusterIPInternal microservice communication
NodePort✅ (node IP:port)Development and test environments
LoadBalancer✅ (the load balancer IP)Exposing production outward
ExternalName✅ (DNS)Not applicableConnecting to an external service

Service Discovery

How a Service is found in Kubernetes:

1. By DNS:

[service-name].[namespace].svc.cluster.local
  • For example my-service.production.svc.cluster.local
  • Within the same namespace, my-service alone is enough

2. By environment variable:

MY_SERVICE_SERVICE_HOST=10.0.0.1
MY_SERVICE_SERVICE_PORT=80

The Selector and the Endpoints

A Service picks its pods through the selector:

selector:
app: my-app
tier: backend
  • Every pod matching the selector becomes an endpoint of the Service
  • A pod is included as an endpoint only while it is Ready
  • The endpoints update automatically

Session Affinity

Routes requests from the same client to the same pod:

OptionDescription
NoneRound-robin load balancing (the default)
ClientIPSession stickiness by client IP
spec:
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800 # 3 hours

The Headless Service

A Service whose ClusterIP is None:

spec:
clusterIP: None
selector:
app: my-stateful-app
  • Gives pod DNS directly, with no load balancing
  • Used together with a StatefulSet
  • A DNS lookup returns every pod IP

Managing Services Across Clusters

When deploying a Service to several clusters through MCM:

PropagationPolicy:

  • Copies the same Service to several clusters
  • Chooses the clusters and sets the deployment strategy

OverridePolicy:

  • Applies different Service settings per cluster
  • For example, a different NodePort range per cluster

Resolving Problems

When the Service cannot be reached:

  • Check the selector is right
  • Check the target pods are Running
  • Check the pods' ports are right
  • Check no network policy is blocking the traffic

When it cannot be reached from outside:

  • Check the Service type is NodePort or LoadBalancer
  • Check the firewall rules
  • For a LoadBalancer, check an external IP has been assigned

When the DNS lookup fails:

  • Check the CoreDNS pods are working
  • Check the Service name and namespace are right
  • The DNS form: [service].[namespace].svc.cluster.local

Next Steps