k8s-clusters/cluster/home/default/my-nginx.yml

36 lines
539 B
YAML
Raw Normal View History

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:
2022-02-08 15:55:55 -06:00
- port: 8000
2022-02-08 13:53:07 -06:00
protocol: TCP
selector:
run: my-nginx