Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The installation process of kubeadm

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the installation process 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 "the installation process of kubeadm".

Preparatory work for installation

One or more machines running one of the following systems:

Ubuntu 16.04 +

Debian 9

CentOS 7

RHEL 7

Fedora 25x26 (best-effort)

HypriotOS v1.0.1 +

Container Linux (tested with 1800.6.0)

2 GB or more memory per machine (if there is not enough memory, the application space will be small)

2 or more cpu

Full network connection between all machines in the cluster (public or private networks are good)

Unique hostname, MAC address, and product_uuid for each node. Please see here for details.

A specific port should be opened. For details, please see here.

Disable Swap. For kubelet to work properly, swap must be disabled.

Verify that the MAC address and product_uuid of each node are unique

You can use the command ip link or ifconfig-a to get the MAC address of the network interface

You can use the sudo cat / sys/class/dmi/id/product_uuid command to check the product_uuid

Hardware devices are likely to have unique addresses, although some virtual machines may have the same value. Kubernetes uses these values to uniquely identify nodes in the cluster. If these values are not unique to each node, the installation process may fail.

Check the network adapter

If you have multiple network adapters and the Kubernetes component is not accessible on the default route, we recommend that you add an IP route so that the Kubernetes cluster address passes through the appropriate adapter.

Check the required port

Primary node

Protocol direction port range target user TCP inbound 6443*Kubernetes API server all TCP inbound 2379-2380etcd server client APIkube-apiserver, etcdTCP inbound 10250Kubelet API oneself, Control planeTCP inbound 10251kube-scheduler own TCP inbound 10252kube-controller-manager own work node protocol direction port range target user TCP inbound 10250Kubelet API oneself, Control planeTCP inbound 30000-32767NodePort Services** all

* * for more information on the default port of NodePort Services, please see here.

Any port number marked with * is rewritable, so you need to make sure that any custom ports you provide are available.

Although the etcd port is included in the master node, you can also host your own etcd cluster on external or custom ports.

The pod network plug-in you use (see below) may also need to open some ports. Since this is different from each pod network plug-in, refer to the plug-in documentation for which ports these plug-ins need.

Install runtime

Since v1.6.0, Kubernetes has enabled CRI, the container runtime interface, by default. The container runtime used by default is Docker, which is enabled through the built-in dockershim CRI implementation of kubelet.

Other CRI-based runtimes include:

Containerd (CRI plug-in built into containerd)

Cri-o

Frakti

Rkt

For more information, see the CRI installation instructions.

Install kubeadm, kubelet, and kubectl

These packages need to be installed on all machines:

Kubeadm: the command to boot the cluster.

Kubelet: a component that runs on all machines in the cluster, performing operations such as starting pods and containers.

Kubectl: a command-line tool that communicates with clusters.

Kubeadm does not install or manage kubelet or kubectl for you, so you need to make sure that the version of the Kubernetes control panel that kubeadm installs for you matches the kubelett and kubectl you installed. If the version does not match, there is a risk of version skew, which can lead to running problems. However, a small version tilt is supported between kubelet and the control panel, but the kubelet version may never exceed the API server version. For example, kubelets running 1.7.0 should be fully compatible with the 1.8.0 API server, and vice versa.

For more information about version skew, see:

Kubernetes version and version skew policy

Version skew strategy specific to Kubeadm

Installation of CentOS,RHEL or Fedora system environment

The following yum source library needs VPN to download and install normally due to network problems.

Cat

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report