<p>Is it possible to set the working directory when launching a container with Kubernetes ?</p>

<p>Yes, through the <code>workingDir</code> field of the <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container" rel="noreferrer">container spec</a>. Here's an example replication controller with an nginx container that has <code>workingDir</code> set to <code>/workdir</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: nginx
    spec:
      containers:
        - name: nginx
          image: mynginximage
          workingDir: /workdir
</code></pre>
