43 lines
732 B
YAML
43 lines
732 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: test-nginx
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
run: test-nginx
|
|
replicas: 3
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: test-nginx
|
|
spec:
|
|
containers:
|
|
- name: test-nginx
|
|
image: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: test-nginx
|
|
namespace: default
|
|
labels:
|
|
run: test-nginx
|
|
spec:
|
|
type: LoadBalancer
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
selector:
|
|
run: test-nginx
|