当前位置:网站首页>Build an integrated kubernetes in Fedora
Build an integrated kubernetes in Fedora
2022-06-28 08:17:00 【Xinyouyou】
fedora Project home page :https://start.fedoraproject.org/
Kubernetes on Fedora About :https://fedoramagazine.org/kubernetes-on-fedora-iot-with-k3s/
One . stay fedora Install in docker
1. Update package
yum update
2. lookup docker Package and install
yum list docker

yum install docker.x86_64
Note that you need to install according to the name of the actual package you find
3. Check after installation docker
You can try the following command :
docker<Tab>
docker <Tab><Tab>
docker -h
docker -v
Finally, be sure to run docker version command
docker version
The last error is because fedora It doesn't start automatically docker daemon, You need to start it manually .
4. start-up docker daemon service
systemctl enable docker.service
systemctl start docker.service
sudo docker version

systemctl status docker.service
5. Check the relevant software installation package
rpm -ql docker | less
Specific document description
/var/lib/docker:docker pull The following image files and containers are in the secondary directory .
/etc/sysconfig/docker: When docker When the command runs as a daemon for the service , This file is used to collect information for docker Command options . By default, only –selinux-enabled Option to enable the docker Of SELinux Support . A configuration in this file DOCKER_CERT_PATH Will start docker The key file required by the service is stored in the specified directory /etc/docker
/etc/sysconfig/docker-network: This file is used to collect and transmit to docker Network options for services
/etc/syscofig/docker-storage: This file is used to change docker How services store data . By default, it will be mounted to /var/lib/docker A sparse echo file of the directory . You can choose to use raw storage devices to store metadata and data .
/etc/udev/rules.d/80-docker.rules: This document is used to inform udev Service configuration docker The device mapping file used by the service ,docker The service uses the device mapping file to access the host properties required by the container
/usr/share/doc/docker: Deposit docker Project documents for . Contains software changes and license information , And readme file .
/usr/share/man:docker Online help page for commands
Two . stay fedora Install in Kubernetes
1. Find out the relevant software packages
yum list kubernetes
yum list etcd
2. Install related packages
sudo yum install -y --enablerepo=updates-testing kubernetes.x86_64 etcd.x86_64
In this command –enablerepo=updates-testing characteristic , The purpose is to obtain the latest version of k8s, Be careful , I just want to try more of the latest features , But they can be unstable , If this happens, you need to completely delete the relevant packages , And use the command without this feature to reinstall .
Finally, it can be seen that the integrated software package has been installed k8s All components of the cluster
3. close firewalld
In order to make k8s Work , Need to install iptables, Check to see if... Is installed on your machine iptables, If not installed, run yum install iptables Installation .
because k8s Very dependent on iptables Firewall rules communicate between components , Therefore, in order to facilitate learning, close any firewall manager that may cause conflicts 
systemctl stop firewalld
systemctl disable firewlld
systemctl status firewalld
4. To configure Master and Node service
In a k8s In the cluster , stay master and node Yes k8s Configuration is to tell them how to communicate : The configuration file is /etc/etcd/etcd.conf and /etc/kubernetes Files in directory .
Here is the integration built on only one node k8s, And because master and node The default configuration for most services of is set to find each other in the local host , Therefore, this information does not need to be added to the integrated cluster .
!!! because k8s There is absolute permission management in : Role based default permission management .
Whether it's a user or k8s Its own service components , All of them are subject to ACL(Access Control List) The control of , At first, for the convenience of trial k8s Related functions : edit /etc/kubernetes/apiserver file , from KUBE_ADMISSION_CONTROL Delete this line ServiceAccount. This allows you to do simple pod Bypass during deployment ServiceAccount characteristic .
# default admission control policies
#KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ResourceQuota"
5. start-up master service
MSERVICES="etcd kube-apiserver kube-controller-manager kube-scheduler"
systemctl restart $MSERVICES
systemctl enable $MSERVICES
systemctl is-active $MSERVICES
systemctl is-enabled $MSERVICES

6. start-up node service
NSERVICES="kube-proxy kubelet docker"
systemctl restart $NSERVICES
systemctl enable $NSERVICES
systemctl is-active $NSERVICES
systemctl is-enabled $NSERVICES
7. Check cluster status
kubectl cluster-info
kubectl get node
So far an integrated k8s The cluster has been set up .
边栏推荐
- About ASM disk space full, clean up ASM disk
- 【学习笔记】线性基
- In flood fighting and disaster relief, the city donated 100000 yuan of love materials to help Yingde
- [learning notes] differential constraint
- B_QuRT_User_Guide(26)
- 安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
- Login common test case
- Not so Mobile
- ROS 笔记(08)— 服务数据的定义与使用
- MySQL implements transaction persistence using redo logs
猜你喜欢

The maximum number of Rac open file descriptors, and the processing of hard check failure

Three step problem of leetcode

Vagrant installation

Jenkins' common build trigger and hook services (V)

Jacobian matrix J commonly used in slam

Connaissez - vous le protocole TCP (2)?

Children's unit of 2022 Paris fashion week ended successfully at Wuhan station on June 19

Software testing and quality final review

PMP从报考到拿证基本操作,了解PMP必看篇

Reverse mapping of anonymous pages
随机推荐
sql分析(查询截取分析做sql优化)
ROS 笔记(08)— 服务数据的定义与使用
Is it reliable for the top ten securities companies to register and open accounts? Is it safe?
Upgrade HDP spark to spark 2.4.8 without upgrading ambari
The micro kernel zephyr is supported by many manufacturers!
Discussion on the application of GIS 3D system in mining industry
Redis master-slave structure and application scenarios
Leetcode swing series
Connaissez - vous le protocole TCP (2)?
设置网页的标题部分的图标
Do you know TCP protocol (1)?
Uvcgan: unt vision transformer cycle-consistent Gan for unpropared image-to-image translation
2022第六季完美童模 佛山赛区 初赛圆满落幕
券商注册开户靠谱吗?安全吗?
Jacobian matrix J commonly used in slam
Redis deployment under Linux & redis startup
PMP从报考到拿证基本操作,了解PMP必看篇
三角变换公式
22/02/14 study notes
About ASM disk space full, clean up ASM disk