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

Kubernetes Environment Construction and pre-Environment preparation of Advanced docker (32)

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Original articles, welcome to reprint. Reprint please indicate: reproduced from IT Story Association, thank you!

Original link address: "Advanced article" kubernetes environment building and pre-environment preparation of docker (32)

Last time I talked about the theoretical part of K8s, and I started the practice part this time. From the actual operation of the environment, we have an in-depth understanding of the components of k8s and its architecture design. For beginners, it is really difficult to build a complete K8s environment, at least I feel very troublesome when I build it at the intermediate level. If you surf the Internet scientifically, you can use kubernetes-admin, but I believe that most of the old guys, especially K8s servers, do not have scientific Internet access ability at all. For this problem, the community has also put forward a lot of self-developed deployment plans. Many kinds of schemes have been enthusiastically adopted after iteration. Are not very suitable for beginners, although easy to solve, but the installation of nodes for you is still a black box, the learning costs of these programs are very high, some are not flexible enough, want to special configuration. Source code: https://github.com/limingios/msA-docker swarm branch vagrant/k8s and

Https://github.com/limingios/kubernetes-starter

Refer to the installation of k8s summarized by experts.

Https://github.com/limingios/kubernetes-starter

Pleasant installation of network cluster installation in the case of green network deepens the in-depth understanding of k8s

Try to make the deployment as simple as possible, install for the first time, peel off the authentication and authorization parts, put the non-necessary installation at the end, and grasp the operating mechanism of K8s as a whole. Finally, the authentication authorization is added. The difficulty of K8s is authentication and authorization, after joining it, it will make people feel the whole process and make people feel very complicated, so I stripped it when I first installed it here.

Script gen-config.sh

The script is very simple, it is to help you generate some configuration files, because k8s involves a lot of scripts, it is impossible to manually knock bit by bit, the configuration is written into a template, through the script to generate configuration files to adapt to their own environment. For example, the hostname,ip of your machine, the file storage path is different.

Pre-environment preparation virtual machine introduction and installation

The three virtual machines are still generated through vagrant. Vagrant has the corresponding docker installed.

System type IP address node role CPUMemoryHostnameCentos7192.168.66.101master12Gserver01Centos7192.168.66.102worker11Gserver02Centos7192.168.66.103worker11Gserver03

Three machines accept all ip packets to forward $vi / lib/systemd/system/docker.service# to find ExecStart=xxx, and add a line above this line, the content is as follows: (required for K8s network) ExecStartPost=/sbin/iptables-I FORWARD-s 0.0.0.0max 0-j ACCEPT

Three machine startup services $systemctl daemon-reload$ service docker start

System setup (all nodes) turn off, disable firewall (so that connections between all machines can be established through any port) systemctl stop firewalldsystemctl disable firewalld# view status systemctl status firewalld

# set system parameters-allow routing to be forwarded without processing bridge data

# write configuration file $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