2016-04-14 55 views

回答

11

是的,通過workingDir字段的container spec。下面是一個帶有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