devops-exercises/exercises/kubernetes/solutions/services_01_solution.md
abregman e1379fb6b5 Add system design notebook image
As well as two Kubernetes basic exercises.
2021-07-12 04:26:03 +03:00

320 B

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