Reputation: 59
I need to run sudo minikube start --memory=4096 --cpus=2 for my use case. However it is running with 1 cpu already. Somehow I started it w/o creating an entry in ~/kube/config so "kubectl config delete-cluster minikube" returns, "error: cannot delete cluster minikube, not in /home/ec2-user/.kube/config".
Trying to work around this, to delete my cluster and start with a larger one, I ran, "kubectl config set current-context minikube". Which created this entry in .kube/config: cat .kube/config
apiVersion: v1
clusters: null
contexts: null current-context: minikube
kind: Config
preferences: {}
users: null
NOTE: ignore double spaces I had to enter carriage returns to get the proper format)
Anyone know how to delete my current cluster, so I can create a bigger one with more memory and cpus?
Upvotes: 6
Views: 15516
Reputation: 29
I run minikube
with --driver=docker
and 1 cpu, using this command :
minikube start --driver=docker --extra-config=kubeadm.ignore-preflight-errors=NumCPU --force --cpus 1
So if I want to delete minikube and all its files, I use those two commands:
minikube stop
minikube delete --all=true --purge=true
then you can run minikube with your specifications :
minikube start --memory=4096 --cpus=2
Upvotes: 2
Reputation: 385
To change cpus or memory you want to get the profile name like mentioned before:
minikube profile list
And then delete the profile you want to change, in my case it was minikube:
minikube delete --profile minikube
Then you can start minikube again creating new profile:
minikube start --vm-driver=virtualbox --cpus 8 --memory 16g
Upvotes: 17
Reputation: 388
You'll need to run minikube stop
, then you should be able to start minikube again with more resources (minikube start --memory=4096 --cpus=2
).
No need to delete your cluster.
Upvotes: 4