Assumption:
You have docker desktop installed
You are on mac
So let gets started!
Step 1: Install minikube
brew install minikubeStep 2: Start a cluster using the docker driver
minikube start --driver=dockerStep 3: Gets the status of a local Kubernetes cluster
minikube statusStep 4: Install kubectx. this will help you to switch to another cluster that is in kubeconfig
brew install kubectxStep 5: Write in terminal
kubectxYou will see on which cluster you are right now. It should be minikube
If for some reason it is not on minikube. Then execute the command:
kubectx minikubeStep 6: Now this is where you could enable addons that are useful for your use case. In my use case I will enable default-storageclass and metallb.
minikube addons enable default-storageclassCheck in the entire list if the add is enabled:
minikube addons listEnable one more addon:
minikube addons enable metallbConfigure it with you IPs:
minikube addons configure metallbStep 7: Now stop the minikube
minikube stopStep 8: Start minikube
minikube startNote: in case your minikube has issue you can start it with specific version of kubernetes e.g.:
minikube start --kubernetes-version 1.21.2Step 9: Create config.json file
Under path: ~/.minikube/config create config.json file
{
"cpus": 8,
"driver": "docker",
"memory": "12000"
}Save the file and check it with:
cat ~/.minikube/config/config.jsonor just run the command minikube config view
Step 10: Setup resources in docker desktop
Go to your docker desktop app, navigate to /Preferences/Resources and setup cpu, memory and disk image to be aligned with minikube config.
You could setup:
CPUS: 8
Memory: 16GB
Disk image size: 225 GB
Step 11: Make sure Kubernetes is disabled in docker desktop
Go to your docker desktop once again navigate to /Preferences/Kubernetes
Uncheck the Enable Kubernetes