Guia-Tutorial-kubernetes/files/yaml-del-pelado/09-hello-deployment-svc-loadBalancer.yaml

33 lines
490 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:
type: LoadBalancer
ports:
- port: 8080
targetPort: 8080
selector:
role: hello