kubenetes 架构

k8s 介绍

 

 分为Master 和node 节点,master 是调度分配任务的,node 实际接受master 调度进行工作的,master 运行的apiserver 接口用户的管理命令,所有服务都是通过api server 通讯的。

etcd  保存一些配置信息

scheduler

controller-manager

kubelet    接受调度,管理pod

kube-proxy   服务发现和负载均衡

pod k8s中最小部署单元,里面是容器,通常关系紧密的几个容器部署在同一个pod中。

k8s 安装方式

kubeadm  把整个安装过程包装起来,方便安装,安装方式就是把k8s 的除kubelet 外的其他相关组件都以镜像的形式运行起来(推荐)

二进制    可以更清晰了解整个架构,容易排错(推荐)

minikube  单机版,用于快速搭建环境测试等

yum     不推荐

k8s kubeadm方式安装

准备环境

关闭防火墙:
$ systemctl stop firewalld
$ systemctl disable firewalld
​
关闭selinux:
$ sed -i 's/enforcing/disabled/' /etc/selinux/config 
$ setenforce 0
​
关闭swap:
$ swapoff -a $ 临时
$ vim /etc/fstab $ 永久
​
添加主机名与IP对应关系(记得设置主机名):
$ cat /etc/hosts
192.168.31.61 k8s-master
192.168.31.62 k8s-node1
192.168.31.63 k8s-node2
​
将桥接的IPv4流量传递到iptables的链:
$ cat > /etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
View Code

相关文章:

  • 2022-01-15
  • 2021-12-23
  • 2022-12-23
  • 2021-10-02
  • 2021-12-05
  • 2021-09-17
  • 2021-12-16
猜你喜欢
  • 2021-09-10
  • 2021-09-26
  • 2021-03-31
  • 2022-12-23
  • 2021-06-05
  • 2021-10-22
相关资源
相似解决方案