Guia-Tutorial-kubernetes/yaml-del-pelado/07-hello-deployment-svc-clusterIP.yaml

32 lines
469 B
YAML
Raw Normal View History

2022-09-19 18:31:05 +02:00
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:
ports:
- port: 8080
targetPort: 8080
selector:
role: hello