2017-04-14 17:39:40 +08:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: my-nginx
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
run: my-nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: my-nginx
|
2018-05-04 19:53:39 +08:00
|
|
|
image: harbor-001.jimmysong.io/library/nginx:1.9
|
2017-04-14 17:39:40 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
2017-05-11 15:25:21 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: my-nginx
|
|
|
|
labels:
|
|
|
|
app: my-nginx
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
protocol: TCP
|
|
|
|
name: http
|
|
|
|
selector:
|
|
|
|
run: my-nginx
|