Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the working mechanism of kubeadm

Shulou Source: shulou.com Published: 2022-05-31 18:03:00 10月04日 Update

This article mainly explains "what is the working mechanism of kubeadm". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the working mechanism of kubeadm"?

Introduction

Kubeadm provides a total of five subcommands:

Kubeadm init

Kubeadm join

Kubeadm token

Kubeadm reset

Kubeadm version

This can be seen in cmd/kubeadm/app/cmd/cmd.go:29 in the k8s v1.5.0 code:

Func NewKubeadmCommand (f cmdutil.Factory, in io.Reader, out, err io.Writer) * cobra.Command {cmds: = & cobra.Command {Use: "kubeadm", Short: "kubeadm: easily bootstrap a secure Kubernetes cluster" Cmds.ResetFlags () cmds.SetGlobalNormalizationFunc (flag.WarnWordSepNormalizeFunc) cmds.AddCommand (NewCmdInit (out)) cmds.AddCommand (NewCmdJoin (out)) cmds.AddCommand (NewCmdReset (out)) cmds.AddCommand (NewCmdToken (out)) cmds.AddCommand (NewCmdVersion (out)) return cmds}

Two subcommands, kubeadm init and join, are the most critical. By executing kubeadm init on master, completing the initialization of master, and then executing kube join on other node to add node to cluster, a set of security cluster can be built.

For more introduction and introduction to kubeadm, please refer to the official documentation:

Installing Kubernetes on Linux with kubeadm

Kubeadm reference

Needless to say, after reading the kubernetes v1.5.0 source code, the following are the work flow charts of the kube init and join subcommands respectively, so that you can understand its working mechanism.

Kubeadm init working mechanism

Kubeadm join working mechanism

At this point, I believe you have a deeper understanding of "what is the working mechanism of kubeadm". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Work mechanism command two content more learning practical deeper security size code entry knowledge key interest official practical practical nonsense accordingly Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Microsoft MariaDB Huawei OPPO Reno