31 lines
502 B
YAML
31 lines
502 B
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: my-nginx
|
|
spec:
|
|
replicas: 2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: my-nginx
|
|
spec:
|
|
containers:
|
|
- name: my-nginx
|
|
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/nginx:1.9
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: my-nginx
|
|
labels:
|
|
app: my-nginx
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
run: my-nginx
|