kubectlminikubeeclipse-ditto

Deployment of Ditto and MongoDB using kubectl fails because of unsupported version "extensions/v1beta1"


I try to start Ditto using kubernetes/minikube by following the instructions in the projects README.txt. While deploying mongoDB and later the Ditto services with the command

kubectl apply -f deployment/kubernetes/mongodb/mongodb.yaml

I get the following error message:

error: unable to recognize "deployment/kubernetes/mongodb/mongodb.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

I think I have to change the version to "api/v1", but doing this causes the next error:

error: error validating "deployment/kubernetes/mongodb/mongodb.yaml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

I use the following versions:

Ditto: release-1.5

minikube version: v1.14.1

kubectl client version: Major:"1", Minor:"19", GitVersion:"v1.19.2

kubectl server version: Major:"1", Minor:"19", GitVersion:"v1.19.2"

Does anybody knwo how I can fix this problem. I don't know which fields and which values I have to add to make the .yaml files working as expected.

Thank you very much in advance.


Solution

  • You can take a look at the files in this PR here: https://github.com/eclipse/ditto/tree/master/deployment/kubernetes/deploymentFiles

    The deployment files are updated and now use apiVersion: apps/v1.