<p>I'm trying to run the command &quot;<strong>oc apply -f basic-ocp-demo.yaml</strong>&quot; in order to <strong>create services and deployment</strong> in my <strong>openshift</strong>, but I get an error regarding &quot;<strong>unable to decode &quot;basic-ocp-demo.yaml &quot;: no kind &quot;Deployment&quot; is registered for version &quot;v1beta1 &quot;</strong></p>
<p><strong>My file look like :</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  type: NodePort
  selector:
    app: nginx-app
    type: front-end
  ports:
    - port: 80
      targetPort: 80
      nodePort: 30012
---
kind: Deployment
apiVersion: v1beta1 
metadata:
  name: nginx-deployment
  labels:
    app: nginx-app
    type: front-end
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx-app
      type: front-end
  template:
    metadata:
      labels:
        app: nginx-app
        type: front-end
    spec:
      containers:
        - name: nginx-container
          image: nginx:latest
</code></pre>
<p><strong>oc apply command output:</strong></p>
<pre><code>[root@localhost openshift]# oc apply -f basic-ocp-demo.yaml 
service &quot;nginx-service&quot; created
error: unable to decode &quot;basic-ocp-demo.yaml&quot;: no kind &quot;Deployment&quot; is registered for version &quot;v1beta1&quot;
</code></pre>
<p>Seems that my service nginx was created but the Deployment kind has no registration for version &quot;<strong>v1bet1</strong>&quot;, I tried to put many other version but the same problem:</p>
<p>I've tried with &quot;<strong>apps/v1</strong>&quot;, the same issue:</p>
<pre><code>error: unable to decode &quot;basic-ocp-demo.yaml&quot;: no kind &quot;Deployment&quot; is registered for version &quot;apps/v1&quot;
</code></pre>
<p>I've made a curl where can be seen all the apis available but I don't know what to choose from that list for my Deployment Kind.</p>
<p>Here is my apis list : <a href="https://92.42.107.195:8443/apis" rel="nofollow noreferrer">https://92.42.107.195:8443/apis</a></p>

Ciocoiu Petrisor
<p>It would appear you are running an extremely old version of OpenShift/Kubernetes. So all you have available is <code>apps/v1alpha1</code>. You should upgrade ASAP.</p>
