<p>I have an application, which I deployed with docker run and it worked fine. Now I am trying to run that application on Kubernetes.</p>

<p>I have tried to build my deployment.yaml file but not able to complete it getting validation error.</p>

<p>Below is my docker run command</p>

<p><code>docker run -e LICENSE="accept" -d --name=container1 -p 10000:10000 -v /opt/app/install:/install/resources appCentre:6.0.0 appCentre_setup deploy_setup</code></p>

<p>and deployment.yaml file I am trying to build</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: appCentre
labels:
    app: appCentre
spec:
replicas: 1
selector:
    matchLabels:
    app: appCentre
template:
    metadata:
    labels:
        app: appCentre
    spec:
        containers:
        - name: appCentre
            image: appCentre:6.0.0
            args:
            - "appCentre_setup"
            - "deploy_setup"
            ports:
            - containerPort: 10000
            volumnMounts:
                - name: volumn-app-appCentre
                mountPath: /install/resources
    volumns:
      - name: volumn-app-appCentre
        hostPath:
            path: /opt/app/install
            type: Directory
</code></pre>

<p>How can I proceed?</p>

niting
<p>The easiest way would be to generate the base yaml using:</p>

<pre><code>kubectl run appCentre --image=appcentre:6.0.0 -l app=appCentre --expose --port=1000 --env=LICENSE="accept" --dry-run -o yaml
</code></pre>

<p>and then modify for your needs.</p>

<p>You should also check <a href="https://kubernetes.io/docs/reference/kubectl/docker-cli-to-kubectl/" rel="nofollow noreferrer">here</a> as @mchawre point.</p>

<p>I hope this helps. </p>
