Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 320 Bytes

services_01_solution.md

File metadata and controls

19 lines (17 loc) · 320 Bytes

Services 01 - Solution

kubectl run nginx --image=nginx --restart=Never --port=80 --labels="app=dev-nginx"

cat << EOF > nginx-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  selector:
    app: dev-nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9372
EOF