I installed Kubernetes version 10
kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead",GitTreeState:"archive", BuildDate:"2018-03-29T08:38:42Z",GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"archive", BuildDate:"2018-03-29T08:38:42Z",
GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
When i execute :
kubectl delete deployment example
Error: unknown command "verion" for "kubectl"
it is not useful here to put --force Or --cascade=false ==> I tried all this put there is no change
When I execute :
kubectl get nodes ==> Master return Nodes , it is Okay
Any help ?
I solved it By putting the Right ca.crt and server.key in the Controller-manager :
/etc/kubernetes/controller-manager
KUBE_CONTROLLER_MANAGER_ARGS="--root-ca-file=/srv/kubernetes/ca.crt --service-account-private-key-file=/srv/kubernetes/server.key"
Use
kubectl get all
This lists all the pods, service, deployment, replicaset, job and cronjobs. from this you can know the name of deployment you want to delete.
kubectl delete <name of deployment as displayed from get all command>
I had a similar issue where I could not delete a deployment with Kubernetes installed in Docker Desktop. The solution has been going to Docker Desktop > Preferences > Reset Kubernetes cluster.