1234567891011121314151617181920212223242526272829303132 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: myapp
- namespace: fsprod
- labels:
- app: myapp
- spec:
- replicas: 1
- selector:
- matchLabels:
- name: myapp
- template:
- metadata:
- labels:
- name: myapp
- spec:
- containers:
- - name: myapp
- image: nexusip/fsserver/imagename
- imagePullPolicy: Always
- securityContext:
- runAsUser: 0 #设置以ROOT用户运行容器
- privileged: true
- ports:
- - containerPort: 80
- imagePullSecrets:
- - name: fsregsecret
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
|