Guia-Tutorial-kubernetes/yaml-del-pelado/08-hello-deployment-svc-nodePort.yaml

34 lines
506 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: hello
spec:
replicas: 3
selector:
matchLabels:
role: hello
template:
metadata:
labels:
role: hello
spec:
containers:
- name: hello
image: gcr.io/google-samples/hello-app:1.0
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: hello
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
nodePort: 30000
selector:
role: hello