2022-02-08 13:53:07 -06:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: my-nginx
|
2022-02-08 15:32:58 -06:00
|
|
|
namespace: default
|
2022-02-08 13:53:07 -06:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
run: my-nginx
|
|
|
|
replicas: 2
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
run: my-nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: my-nginx
|
|
|
|
image: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: my-nginx
|
|
|
|
labels:
|
|
|
|
run: my-nginx
|
2022-02-08 15:31:57 -06:00
|
|
|
namespace: default
|
2022-02-08 13:53:07 -06:00
|
|
|
spec:
|
2022-02-08 15:49:51 -06:00
|
|
|
type: LoadBalancer
|
2022-02-08 13:53:07 -06:00
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
run: my-nginx
|