<p>Kuberentes returns the following error:</p>

<pre><code>fabiansc@Kubernetes-Master:~/Dokumente$ kubectl run -f open-project.yaml
Error: required flag(s) "image" not set
</code></pre>

<p>I want to create Open Project based on a Kubernetes On-Prem installation. There are <a href="https://www.openproject.org/docker/" rel="nofollow noreferrer">references for docker</a>; however I would like to use Kubernetes on top of it to get more familar with it. It's important to keep things working after a reboot of my host. Therefore I want to persistent the open project configuration. Docker references this by adding a volume (-v option):</p>

<pre><code>docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \
  -v /var/lib/openproject/pgdata:/var/openproject/pgdata \
  -v /var/lib/openproject/static:/var/openproject/assets \
  openproject/community:8
</code></pre>

<p>My Kubernetes file looks like the following:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: open-project-pod
  labels:
    environment: production
spec:
  containers:
    - name: open-project-container
      image: openproject/community:8
      ports:
        - name: open-project
          containerPort: 80
          protocol: TCP
      volumeMounts:
        - mountPath: "/var/openproject"
          name: data
      livenessProbe:
        tcpSocket:
          port: 80
        initialDelaySeconds: 600
        timeoutSeconds: 1
  volumes:
    - name: data
      persistentVolumeClaim:
        claimName: open-project-storage-claim
  imagePullSecrets:
    - name: regcred
</code></pre>

<p>Error: required flag(s) "image" not set</p>

<p>The correct command is <code>kubectl apply -f open-project.yaml</code></p>
