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