作者:识趣
链接:https://www.orchome.com/10621
来源:OrcHome
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
通过workingDir字段。下面是一个nginx容器的例子,workingDir设置为`/workdir’。
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 1
template:
metadata:
labels:
name: nginx
spec:
containers:
- name: nginx
image: mynginximage
workingDir: /workdir
https://www.orchome.com/10621
https://kubernetes.io/zh/docs/tasks/inject-data-application/define-command-argument-container/
https://kubernetes.io/zh/docs/tasks/inject-data-application/define-environment-variable-container/