<p>I am trying to deploy the next frontend-deployment.yaml in Kubernetes using Jenkins, but I am having the next error:</p>

<pre><code>[frontend] Running shell script
+ kubectl apply -f IKonnekt/frontend-deployment.yaml
error: unable to recognize "IKonnekt/frontend-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
</code></pre>

<p>If I run <code>kubectl apply -f IKonnekt/frontend-deployment.yaml</code> from a machine inside the Kubernetes cluster it works fine.</p>

<pre><code>Kubernetes Client Version: 1.12.1
Kubernetes Server Version: 1.11.0
</code></pre>

<p>This is my frontend-deployment.yaml:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ikonnekt-frontend-deployment
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: ikonnekt-frontend
    spec:
      containers:
      - name: ikonnekt-frontend
        image: ikonnektfrontend
        imagePullPolicy: Always
        env:
        - name: REACT_APP_API
          value: "http://IP:Port"
        - name: REACT_APP_AUTH_ENDPOINT
          value: "http://IP:Port/auth"
        ports:
        - containerPort: 80
      imagePullSecrets:
      - name: regcred
</code></pre>

<p>Just change <strong>apiVersion</strong> to  this: <code>apiVersion: apps/v1</code></p>
