<p>Hi I am running kubernetes cluster where I run mailhog container.</p>

<p>But I need to run it with own docker run parameter. If I would run it in docker directly. I would use command:</p>

<pre><code>docker run  mailhog/mailhog -auth-file=./auth.file
</code></pre>

<p>But I need to run it via Kubernetes pod. My pod looks like:</p>

<pre><code>   apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: mailhog
    spec:
      replicas: 1
      revisionHistoryLimit: 1
      strategy:
          type: RollingUpdate
      template:
        metadata:
          labels:
            app: mailhog
        spec:
          containers:
          - name: mailhog
            image: us.gcr.io/com/mailhog:1.0.0
            ports:
            - containerPort: 8025
</code></pre>

<p>How to achieve to run Docker container with parameter -auth-file=./auth.file via kubernetes. Thanks.</p>

<p>I tried adding under <code>containers</code></p>

<pre><code>        command: ["-auth-file", "/data/mailhog/auth.file"]
</code></pre>

<p>but then I get </p>

<pre><code> Failed to start container with docker id 7565654 with error: Error response from daemon: Container command '-auth-file' not found or does not exist.
</code></pre>

<p>thanks to @lang2</p>

<p>here is my deployment.yaml:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: mailhog
spec:
  replicas: 1
  revisionHistoryLimit: 1
  strategy:
      type: RollingUpdate
  template:
    metadata:
      labels:
        app: mailhog
    spec:
      volumes:
      - name: secrets-volume
        secret:
            secretName: mailhog-login
      containers:
      - name: mailhog
        image: us.gcr.io/com/mailhog:1.0.0
        resources:
          limits:
            cpu: 70m
            memory: 30Mi
          requests:
            cpu: 50m
            memory: 20Mi
        volumeMounts:
        - name: secrets-volume
          mountPath: /data/mailhog
          readOnly: true
        ports:
        - containerPort: 8025
        - containerPort: 1025
        args:
          - "-auth-file=/data/mailhog/auth.file"
</code></pre>
