Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!

Start Kubernetes The Beginner's Guide to Kubernetes PDF 下载


分享到:
时间:2021-07-02 07:43来源:http://www.java1234.com 作者:转载  侵权举报
Start Kubernetes The Beginner's Guide to Kubernetes PDF 下载
失效链接处理
Start Kubernetes  The Beginner's Guide to Kubernetes PDF 下载


本站整理下载:
提取码:67gk 
 
 
相关截图:
 
主要内容:
After you’ve installed one of these tools, make sure you download the Kubernetes CLI. Kubernetes
CLI is a single binary called kubectl, and it allows you to run commands against your cluster. To
make sure everything is working correctly, you can run kubectl get nodes to list all nodes in the
Kubernetes cluster. The output from the command should look like this:
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
docker-desktop Ready master 63d v1.16.6-beta.0
You can also check that the context is set correctly to docker-desktop. Kubernetes uses a
configuration file called config to find the information it needs to connect to the cluster. Kubernetes
CLI reads this file from your home folder - for example $HOME/.kube/config. Context is an element
inside that config file, and it contains a reference to the cluster, namespace, and the user. If you’re
accessing or running a single cluster, you will only have one context in the config file. However,
you can have multiple contexts defined that point to different clusters.
Using the kubectl config command, you can view these contexts and switch between them. You can
run the current-context command to view the current context:
$ kubectl config current-context
docker-desktop
There are other commands such as use-context, set-context, view-contexts, etc. I prefer to use a tool
called kubectx. This tool allows you to switch between different Kubernetes contexts quickly. For
example, if I have three clusters (contexts) set in the config file, running kubectx outputs this:
$ kubectx
docker-desktop
peterj-cluster
minikube
The tool highlights the currently selected context when you run the command. To switch to the
minikube context, I can run: kubectx minikube.
The equivalent commands you can run with kubectl would be kubectl config get-contexts to view
all contexts, and kubectl config use-context minikube to switch the context.
Before you continue, make sure your context is set to docker-desktop if you’re using Docker for
Mac/Windows or minikube if you’re using Minikube.
Let’s get started with your journey to Kubernetes and cloud-native world with the container
orchestration!

 

------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐