Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

414
Views
Failed to download OpenAPI error with Kubernetes deployment

I'm learning Kubernetes and I've just installed minikube on my mac.

I have a docker image that I'd like to deploy. I created a deployment yaml file which looks like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: sonarqube
spec:
  template:
    metadata:
      labels:
        app: sonarqube
    spec:
      containers:
        - image: docker-sonarqube-developer:latest
          args:
            - -Dsonar.web.context=/
          name: sonarqube
          env:
            - name: SONARQUBE_JDBC_USERNAME
              value: sonarqube
            - name: SONARQUBE_JDBC_PASSWORD
              value: sonarqube
          ports:
            - containerPort: 9000
              name: sonarqube

I am trying to deploy my docker image on minikube with the following command:

kubectl create -f deployment.yaml

But I'm getting an error and I'm not sure what's going on.

W0628 09:18:45.550812   64359 factory_object_mapping.go:423] Failed to download OpenAPI (the server could not find the requested resource), falling back to swagger
error: error validating "k8s/deployment.yaml": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false

Minikube is running and I can access the dashboard.

❯ kubectl get nodes
NAME       STATUS    ROLES     AGE       VERSION
minikube   Ready     master    17h       v1.15.0

The docker image is available locally

❯ docker ps -a                                                                     
CONTAINER ID        IMAGE                        COMMAND             CREATED      
6fcfdad92d16        docker-sonarqube-developer   "./bin/run.sh"      16 hours                         

Any idea what's wrong?

Thanks!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

First Check the kubectl version

Check whether the Minor for both client and server version are same

$Kubectl version

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.20.2",

Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0",

If not,then follow the below steps-

$curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl

$chmod +x ./kubectl

$sudo mv ./kubectl /usr/local/bin/kubectl

Now check the version again

$kubectl version

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2",

Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0",

$kubectl create -f deployment.yaml

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!