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

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
主站蜘蛛池模板: 上杭县| 阿克苏市| 宁乡县| 沐川县| 芦溪县| 仪征市| 庆阳市| 昆明市| 福鼎市| 越西县| 阿拉善右旗| 南投市| 五河县| 万盛区| 淮滨县| 嘉禾县| 琼中| 宁武县| 芜湖市| 繁昌县| 黄梅县| 乐都县| 繁峙县| 沐川县| 津市市| 广水市| 沈丘县| 溧阳市| 龙游县| 横峰县| 霞浦县| 辽阳市| 霍州市| 固原市| 翼城县| 高陵县| 苍梧县| 天门市| 普格县| 太康县| 哈尔滨市|