-
Notifications
You must be signed in to change notification settings - Fork 0
K8s Services
Philip Fourie edited this page Apr 13, 2020
·
1 revision
Service uses selector
to forward traffic to the selected pods
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: ClusterIP
selector:
app: nginx
ports:
- protocol: TCP
port: 8080
targetPort: 80
kubectl get svc
kubectl get endpoints my-service