How to install a working container container running Kubernetes

Is it possible to set the working directory when starting the container using Kubernetes?

+5
source share
1 answer

Yes, through the workingDir field workingDir the container specification . Here's an example of a replication controller with a nginx container with workingDir set to /workdir :

 apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 1 template: metadata: labels: name: nginx spec: containers: - name: nginx image: mynginximage workingDir: /workdir 
+11
source

Source: https://habr.com/ru/post/1247159/


All Articles