官术网_书友最值得收藏!

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 kubectl config file (found at ~/.kube/config by default) defines contexts. A context links to a cluster and a user object. The cluster defines how.

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
主站蜘蛛池模板: 龙海市| 广宗县| 西安市| 江永县| 鹤峰县| 萝北县| 哈密市| 望江县| 郴州市| 浪卡子县| 扎鲁特旗| 四子王旗| 咸丰县| 志丹县| 新干县| 剑河县| 井研县| 喜德县| 海南省| 县级市| 芮城县| 安塞县| 石渠县| 林甸县| 江源县| 新巴尔虎左旗| 西充县| 龙井市| 砀山县| 和田市| 南和县| 白玉县| 龙州县| 曲阳县| 阆中市| 锦州市| 西乌珠穆沁旗| 郁南县| 安阳县| 中方县| 蒲城县|