In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the installation steps of Kubernetes". 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 steps of Kubernetes.
Kubernetes installation environment
3 machines of Centos7.1 system
Master:192.168.0.120
Nodes:192.168.0.106, 192.168.0.107
=
Master
=
1 install kubernetes etcd flannel on Master
Yum install kubernetes etcd flannel-y
2 modify configuration file / etc/kubernetes/controller-manager
# specify key file, key file can be generated by command: openssl genrsa-out / etc/kubernetes/service.key 2048
KUBE_CONTROLLER_MANAGER_ARGS= "--service_account_private_key_file=/etc/kubernetes/service.key"
3 modify configuration file / etc/kubernetes/apiserver
# The address on the local server to listen to. Set to all monitoring
KUBE_API_ADDRESS= "--address=0.0.0.0"
# Comma separated list of nodes in the etcd cluster. Specify the address of the etcd node
KUBE_ETCD_SERVERS= "--etcd-servers= http://192.168.0.120:2379"
# Address range to use for services. This is to set the ip network segment where Service will be run in the future.
KUBE_SERVICE_ADDRESSES= "--service-cluster-ip-range=192.168.1.0/24"
# Add your own! Specify the key file
KUBE_API_ARGS= "--service_account_key_file=/etc/kubernetes/service.key"
4 modify configuration file / etc/kubernetes/config
# How the controller-manager, scheduler, and proxy find the apiserver
KUBE_MASTER= "--master= http://192.168.0.120:8080"
5 modify configuration file / etc/etcd/etcd.conf
ETCD_LISTEN_CLIENT_URLS= "http://0.0.0.0:2379"
ETCD_ADVERTISE_CLIENT_URLS= "http://192.168.0.120:2379"
6 start etcd and kubernetes services
Systemctl start etcd kube-apiserver kube-controller-manager kube-scheduler
Systemctl enable etcd kube-apiserver kube-controller-manager kube-scheduler
7 modify configuration file / etc/sysconfig/flanneld
# etcd url location. Point this to the server where etcd runs
FLANNEL_ETCD= "http://192.168.0.120:2379"
# etcd config key. This is the configuration key that flannel queries
# For address range assignment
FLANNEL_ETCD_KEY= "/ atomic.io/network"
8 set the value of etcd config
# create a file as follows. The IP specified by Network will be the IP address range to be run by the container in the future:
Cat flannel-config.json
{
"Network": "172.16.0.0plus 16"
"SubnetLen": 24
"Backend": {
"Type": "vxlan"
"VNI": 1
}
}
# set the config of etc through the contents of the file
Etcdctl set atomic.io/network/config < flannel-config.json
9 start the flannel service
Systemctl start flanneld
Systemctl enable flanneld
At this point, Master is installed and configured. Execute the following command to view master information:
Kubectl cluster-info
=
Nodes
=
The following installation configuration should be done on each node. Here, take the 107node as an example (with docker installed as the premise)
1 install kubernetes and flannel
Yum-y install kubernetes flannel
2 modify / etc/kubernetes/config
KUBE_MASTER= "--master= http://192.168.0.120:8080"
3 modify / etc/kubernetes/kubelet
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
KUBELET_ADDRESS= "--address=0.0.0.0"
# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME= "--hostname-override=node107.kuber.com"
# location of the api-server
KUBELET_API_SERVER= "--api-servers= http://192.168.0.120:8080"
4 modify / etc/sysconfig/flanneld
# etcd url location. Point this to the server where etcd runs
FLANNEL_ETCD= "http://192.168.0.120:2379"
5 start flannel and kube related services
# Note that the services of kube launched on Node and Master are different
Systemctl start flanneld kube-proxy kubelet
Systemctl enable flanneld kube-proxy kubelet
# restart docker service
Systemctl restart docker
At this point, when the Node node is configured, you can view the node information by executing the following command on Master
Kubectl get nodes
At this point, I believe that everyone on the "Kubernetes installation steps" have a deeper understanding, might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.