Files

21 lines
647 B
YAML

# A Service gives a stable way to reach a set of Pods, even as individual
# Pods are created and destroyed and get new internal IP addresses over
# time. This Service selects any Pod labelled app: demo (see
# deployment.yaml) and forwards traffic to it.
#
# ClusterIP keeps this demo internal: this Hetzner deployment does not use
# MetalLB or a cloud load balancer. Reach it with kubectl port-forward over
# the private Kubernetes API rather than opening public application ports.
apiVersion: v1
kind: Service
metadata:
name: demo
namespace: demo
spec:
type: ClusterIP
selector:
app: demo
ports:
- port: 80
targetPort: 80