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

  • 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 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
主站蜘蛛池模板: 武夷山市| 缙云县| 文安县| 巴彦淖尔市| 大姚县| 小金县| 翼城县| 磐安县| 丹寨县| 九龙坡区| 班戈县| 同德县| 任丘市| 德钦县| 永寿县| 西华县| 泰州市| 宣化县| 长白| 昭觉县| 襄樊市| 竹山县| 泰顺县| 镇巴县| 平阳县| 太白县| 太和县| 揭东县| 张北县| 芜湖县| 上林县| 石泉县| 玉屏| 五常市| 孝昌县| 广州市| 施甸县| 凤山市| 青铜峡市| 澳门| 鹤岗市|