2017-11-08 19:28:16 +08:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: my-nginx
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
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-11-08 19:28:16 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
|
|
|
- name: config-volume
|
|
|
|
mountPath: /tmp
|
|
|
|
volumes:
|
|
|
|
- name: config-volume
|
|
|
|
configMap:
|
|
|
|
name: special-config
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: special-config
|
|
|
|
namespace: default
|
|
|
|
data:
|
|
|
|
log_level: WARN
|