Create a Service
Create a Kubernetes Service to provide a stable network endpoint for your Pods.
Prerequisites
- The target Pods must be running.
- Note the Pod labels in advance (needed for Selector configuration).
Step 1. Open the Create Service form
Select Service Discovery → Services from the left sidebar. Click the Create service button in the top right.
From the dropdown, select Create as form. Select Create from YAML to write YAML directly.
Step 2. Enter basic settings
| Field | Description | Example |
|---|---|---|
| Name | Service name (lowercase letters, numbers, hyphens) | my-app-svc |
| Namespace | Target namespace | default |
| Type | Service type | ClusterIP |
Service Type Guide
| Type | Description | Use Case |
|---|---|---|
| ClusterIP | Internal cluster communication only (default) | Microservice internal connections |
| NodePort | External access via NodeIP:Port | Quick external access testing |
| LoadBalancer | Auto-provisions an external load balancer | Production external exposure |
Step 3. Configure the Selector
Enter the label key-value pairs of the target Pods in the Selector field.
app: my-appTIP
An incorrect Selector will prevent traffic from reaching Pods even after the Service is created. Verify Pod labels in the Pods list first.
Step 4. Configure Ports
Click Add Port to add a port mapping.
| Field | Description | Example |
|---|---|---|
| Protocol | Protocol | TCP |
| Port | Service port (client-facing) | 80 |
| Target Port | Pod port (container listening port) | 8080 |
| Node Port | Port exposed on the node (NodePort type only) | 30080 |
Step 5. Confirm creation
Click Create. You will be redirected to the Services list to verify the new Service.
- ClusterIP: Access via internal DNS (
my-app-svc.default.svc.cluster.local) - NodePort: Access externally via
NodeIP:NodePort - LoadBalancer: Access is available once an External IP is assigned in the list