- Kubernetes on AWS
- Ed Robinson
- 268字
- 2021-06-10 18:41:26
Starting Minikube
Once you have got minikube and your chosen virtualization tool installed, we can use it to build and start a local Kubernetes cluster.
If you choose to use minikube tool's default settings, doing so couldn't be simpler. Just run:
minikube start
You should then see some output, similar to the following:
Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster.
minikube start has many options that can be used to configure the cluster that is launched. Try running minikube help start to find out what you can customize.
You might want to set --cpus and/or --memory to customize how much of your computer's resources are used for the Minikube VM.
Assuming that everything went as expected, that's it; you should have a cluster installed and running on your local machine.
The minikube start command creates a kubectl context pointing to the API server running within the Minikube VM, and is correctly configured with a user that will allow access to Kubernetes.
As you progress through this book, you will of course want to add additional contexts in order to connect to remote clusters that you many have set up. You should be able to switch back to the minikube context whenever you want to use minikube by running the following command:
kubectl config use-context minikube