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

Kubernetes installation and configuration

In this chapter, you will install Minikube—a simple single-node Kubernetes cluster. While not suitable for any production-grade workload, it is a useful tool to learn the basics of cluster management quickly. Although it supports several drivers for VM providers, in this tutorial we will use the KVM2 driver since KVM virtualization is available even in a base Linux environment.

The easiest method is to go to https://kubernetes.io/docs/getting-started-guides/minikube/ and install Minikube on your favorite OS. Then go to https://kubernetes.io/docs/tasks/tools/install-kubectl/ and install kubectl. kubectl is a CLI command to manage Kubernetes. Once you are done, it is time to start Minikube:

$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Downloading Minikube ISO
...
<output omitted>
...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

Once download and setup stages are complete, check your Kubernetes cluster status with the minikube command:

$ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.101

Check the Kubernetes cluster status with the kubectl command:

$ kubectl cluster-info
Kubernetes master is running at https://192.168.99.101:8443

We can also open a browser or use the curl command to verify the Kubernetes API:

$ curl https://192.168.99.101:8443
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "Unauthorized",
"reason": "Unauthorized",
"code": 401
}

There is a nice dashboard that comes with Kubernetes's nice-looking GUI, available on port 30000 via HTTP (for example, http://192.168.99.100:30000/). You can open your browser using the same IP we used for cluster verification:

Kubernetes GUI 

At this moment, there is not much to look at, as our simple cluster has only one node, one service, and three default namespaces. This is one way to manage Kubernetes, but to be able to effectively use all its features and troubleshoot issues, you need to get comfortable with using CLI, which is what the next section is about.

主站蜘蛛池模板: 鄂尔多斯市| 定兴县| 积石山| 监利县| 高唐县| 阿尔山市| 贵德县| 麻栗坡县| 梧州市| 长丰县| 体育| 乳山市| 库车县| 丹东市| 日喀则市| 泾源县| 铁岭县| 深圳市| 高雄县| 大宁县| 孝昌县| 浦北县| 贵阳市| 论坛| 甘谷县| 勐海县| 齐河县| 万荣县| 弋阳县| 松原市| 长寿区| 福州市| 元江| 枣庄市| 衡阳市| 古交市| 芦山县| 阜阳市| 库尔勒市| 曲水县| 彰化县|