K8s(1.20.15版本)部署(3master+2node)

这篇具有很好参考价值的文章主要介绍了K8s(1.20.15版本)部署(3master+2node)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1.准备工作

准备五台centos 7的虚拟机(每台虚拟机分配2核2G,存储使用20G硬盘,必须2核不然报错):如下图机器的分配情况:

IP 节点名称 节点类型
10.10.10.11 k8s-master11 master
10.10.10.12 k8s-master12 master
10.10.10.13 k8s-master13 master
10.10.10.21 k8s-node01 node
10.10.10.22 k8s-node02 node
10.10.10.200 k8s-master-lb load-balance

1.1 基本【】配置

五台机器配置hosts

vim /etc/hosts

10.10.10.11 jx-nginx-11 k8s-master11
10.10.10.12 jx-nginx-12 k8s-master12
10.10.10.13 jx-nginx-13 k8s-master13
10.10.10.21 jx-nginx-21 k8s-node01
10.10.10.22 jx-nginx-22 k8s-node02
10.10.10.100 k8s-master-lb


1.2yum源配置

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

1.3 必备工具安装

yum install wget jq psmisc vim net-tools telnet yum-utils device-mapper-persistent-data lvm2 git -y

1.4有节点关闭防火墙、selinux、dnsmasq、swap。

systemctl disable --now firewalld 
systemctl disable --now dnsmasq
systemctl disable --now NetworkManager

setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config

1.5 关闭swap分区


swapoff -a && sysctl -w vm.swappiness=0
sed -ri '/^[^#]*swap/s@^@#@' /etc/fstab


1.6 安装ntpdate

rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
yum install ntpdate -y

所有节点同步时间。时间同步配置如下:

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo 'Asia/Shanghai' >/etc/timezone
ntpdate time2.aliyun.com

## 加入到crontab
crontab -e
*/5 * * * * ntpdate time2.aliyun.com

所有节点配置limit:

ulimit -SHn 65535

vim /etc/security/limits.conf
# 末尾添加如下内容
* soft nofile 655360
* hard nofile 131072
* soft nproc 655350
* hard nproc 655350
* soft memlock unlimited
* hard memlock unlimited

Master11节点免密钥登录其他节点:

ssh-keygen -t rsa
for i in k8s-master11 k8s-master12 k8s-master13 k8s-node21 k8s-node22;do ssh-copy-id -i .ssh/id_rsa.pub $i;done

所有机器内核升级

cd /root
wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-4.19.12-1.el7.elrepo.x86_64.rpm
wget http://193.49.22.109/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.19.12-1.el7.elrepo.x86_64.rpm


cd /root && yum localinstall -y kernel-ml*
grub2-set-default  0 && grub2-mkconfig -o /etc/grub2.cfg
grubby --args="user_namespace.enable=1" --update-kernel="$(grubby --default-kernel)"

##重启生效
yum update -y  && reboot

所有节点安装ipvsadm:

yum install ipvsadm ipset sysstat conntrack libseccomp -y
vim /etc/modules-load.d/ipvs.conf 
##加入以下内容
ip_vs
ip_vs_lc
ip_vs_wlc
ip_vs_rr
ip_vs_wrr
ip_vs_lblc
ip_vs_lblcr
ip_vs_dh
ip_vs_sh
ip_vs_fo
ip_vs_nq
ip_vs_sed
ip_vs_ftp
ip_vs_sh
nf_conntrack_ipv4
ip_tables
ip_set
xt_set
ipt_set
ipt_rpfilter
ipt_REJECT
ipip

## 加载内核配置
systemctl enable --now systemd-modules-load.service

开启一些k8s集群中必须的内核参数,所有节点配置k8s内核

cat <<EOF > /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
fs.may_detach_mounts = 1
vm.overcommit_memory=1
vm.panic_on_oom=0
fs.inotify.max_user_watches=89100
fs.file-max=52706963
fs.nr_open=52706963
net.netfilter.nf_conntrack_max=2310720

net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_intvl =15
net.ipv4.tcp_max_tw_buckets = 36000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_max_orphans = 327680
net.ipv4.tcp_orphan_retries = 3
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.ip_conntrack_max = 65536
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.tcp_timestamps = 0
net.core.somaxconn = 16384
EOF

sysctl --system

安装组件

所有节点安装docker

yum install docker-ce-19.03.* -y
##开机自启
systemctl daemon-reload && systemctl enable --now docker

所有节点安状kubeadm

yum install kubeadm-1.20* kubelet-1.20* kubectl-1.20* -y

默认配置的pause镜像使用gcr.io仓库,国内可能无法访问,所以这里配置Kubelet使用阿里云的pause镜像:

cat >/etc/sysconfig/kubelet<<EOF
KUBELET_EXTRA_ARGS="--pod-infra-container-image=registry.cn-hangzhou.aliyuncs.com/google_containers/pause-amd64:3.2"
EOF
systemctl daemon-reload

高可用组件安装

## 所有Master节点通过yum安装HAProxy和KeepAlived:
yum install keepalived haproxy -y


vim /etc/haproxy/haproxy.cfg 
## 删除所有内容,加入以下内容,并修改自己ip
global
  maxconn  2000
  ulimit-n  16384
  log  127.0.0.1 local0 err
  stats timeout 30s

defaults
  log global
  mode  http
  option  httplog
  timeout connect 5000
  timeout client  50000
  timeout server  50000
  timeout http-request 15s
  timeout http-keep-alive 15s

frontend monitor-in
  bind *:33305
  mode http
  option httplog
  monitor-uri /monitor

frontend k8s-master
  bind 0.0.0.0:16443
  bind 127.0.0.1:16443
  mode tcp
  option tcplog
  tcp-request inspect-delay 5s
  default_backend k8s-master

backend k8s-master
  mode tcp
  option tcplog
  option tcp-check
  balance roundrobin
  default-server inter 10s downinter 5s rise 2 fall 2 slowstart 60s maxconn 250 maxqueue 256 weight 100
  server k8s-master01	10.10.10.11:6443  check
  server k8s-master02	10.10.10.12:6443  check
  server k8s-master03	10.10.10.13:6443  check

所有Master节点配置KeepAlived,

配置不一样,注意区分
注意每个节点的IP和网卡(interface参数)

Master11节点的配置:

! Configuration File for keepalived
global_defs {
    router_id k8s-master11
script_user root
    enable_script_security
3
vrrp_script chk_apiserver {
    script "/etc/keepalived/check_apiserver.sh"
    interval 5
    weight -5
    fall 2  
rise 1
}
vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    mcast_src_ip 10.10.10.200
    virtual_router_id 51
    priority 101
    advert_int 2
    authentication {
        auth_type PASS
        auth_pass K8SHA_KA_AUTH
    }
    virtual_ipaddress {
        10.10.10.200
    }
#    track_script {
#       chk_apiserver
#    }
}

Master02节点的配置:

! Configuration File for keepalived
global_defs {
    router_id k8s-master12
script_user root
    enable_script_security
}
vrrp_script chk_apiserver {
    script "/etc/keepalived/check_apiserver.sh"
    interval 5
    weight -5
    fall 2  
rise 1
}
vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    mcast_src_ip 10.10.10.200
    virtual_router_id 51
    priority 101
    advert_int 2
    authentication {
        auth_type PASS
        auth_pass K8SHA_KA_AUTH
    }
    virtual_ipaddress {
        10.10.10.200
    }
#    track_script {
#       chk_apiserver
#    }
}

Master03节点的配置:

! Configuration File for keepalived
global_defs {
    router_id k8s-master13
script_user root
    enable_script_security
}
vrrp_script chk_apiserver {
    script "/etc/keepalived/check_apiserver.sh"
    interval 5
    weight -5
    fall 2  
rise 1
}
vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    mcast_src_ip 10.10.10.200
    virtual_router_id 51
    priority 101
    advert_int 2
    authentication {
        auth_type PASS
        auth_pass K8SHA_KA_AUTH
    }
    virtual_ipaddress {
        10.10.10.200
    }
#    track_script {
#       chk_apiserver
#    }
}

配置KeepAlived健康检查文件:

 vim /etc/keepalived/check_apiserver.sh 
 ## 加入下面内容
#!/bin/bash

err=0
for k in $(seq 1 3)
do
    check_code=$(pgrep haproxy)
    if [[ $check_code == "" ]]; then
        err=$(expr $err + 1)
        sleep 1
        continue
    else
        err=0
        break
    fi
done

if [[ $err != "0" ]]; then
    echo "systemctl stop keepalived"
    /usr/bin/systemctl stop keepalived
    exit 1
else
    exit 0
fi
##加以执行权限
chmod +x /etc/keepalived/check_apiserver.sh
## 启动haproxy和keepalived
systemctl daemon-reload
systemctl enable --now haproxy
systemctl enable --now keepalived
### 测试vip
ping 10.10.10.200

集群初始化

主要在三台master加入下面的yaml

vim /root/kubeadm-config.yaml
##加入以下内容
apiVersion: kubeadm.k8s.io/v1beta2
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: 7t2weq.bjbawausm0jaxury
  ttl: 24h0m0s
  usages:
  - signing
  - authentication
kind: InitConfiguration
localAPIEndpoint:
  advertiseAddress: 10.10.10.11
  bindPort: 6443
nodeRegistration:
  criSocket: /var/run/dockershim.sock
  name: k8s-master11
  taints:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master
---
apiServer:
  certSANs:
  - 10.10.10.200
  timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta2
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controlPlaneEndpoint: 10.10.10.200:16443
controllerManager: {}
dns:
  type: CoreDNS
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: registry.cn-hangzhou.aliyuncs.com/google_containers
kind: ClusterConfiguration
kubernetesVersion: v1.20.15
networking:
  dnsDomain: cluster.local
  podSubnet: 172.168.0.0/16
  serviceSubnet: 10.96.0.0/12
scheduler: {}

所有Master节点提前下载镜像,可以节省初始化时间

kubeadm config images pull --config /root/kubeadm-config.yaml 

Master11节点初始化,初始化以后会在/etc/kubernetes目录下生成对应的证书和配置文件,之后其他Master节点加入Master01即可:

kubeadm init --config /root/kubeadm-config.yaml  --upload-certs

初始化成功之后记录下token值

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

  export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

You can now join any number of the control-plane node running the following command on each as root:

  kubeadm join 10.10.10.100:16443 --token 7t2weq.bjbawausm0jaxury \
    --discovery-token-ca-cert-hash sha256:2eb41cbafe1464ba85f617cfa60424540c0b2d5ff121e30946b10ec9e518a5a8 \
    --control-plane --certificate-key 505ca58be261429e1495681c3aaafc0396a06e522d131afa83390bd5bfc1629b

Please note that the certificate-key gives access to cluster sensitive data, keep it secret!
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use
"kubeadm init phase upload-certs --upload-certs" to reload certs afterward.

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 10.10.10.100:16443 --token 7t2weq.bjbawausm0jaxury \
    --discovery-token-ca-cert-hash sha256:2eb41cbafe1464ba85f617cfa60424540c0b2d5ff121e30946b10ec9e518a5a8


Master11节点配置环境变量,用于访问Kubernetes集群:

cat <<EOF >> /root/.bashrc
export KUBECONFIG=/etc/kubernetes/admin.conf
EOF
source /root/.bashrc

查看节点状态

kubectl get nodes


NAME           STATUS     ROLES                  AGE     VERSION
k8s-master11   NotReady   control-plane,master   5m23s   v1.20.15

初始化其他master加入集群

 kubeadm join 10.10.10.100:16443 --token 7t2weq.bjbawausm0jaxury \
    --discovery-token-ca-cert-hash sha256:2eb41cbafe1464ba85f617cfa60424540c0b2d5ff121e30946b10ec9e518a5a8 \
    --control-plane --certificate-key 505ca58be261429e1495681c3aaafc0396a06e522d131afa83390bd5bfc1629b

添加Node节点加入集群

 kubeadm join 10.10.10.100:16443 --token 7t2weq.bjbawausm0jaxury \
    --discovery-token-ca-cert-hash sha256:2eb41cbafe1464ba85f617cfa60424540c0b2d5ff121e30946b10ec9e518a5a8

查看集群状态:

[root@jx-nginx-11 ~]# kubectl  get node
NAME           STATUS   ROLES                  AGE    VERSION
jx-apache-21   Ready    <none>                 95m    v1.20.15
jx-apache-22   Ready    <none>                 95m    v1.20.15
jx-nginx-12    Ready    control-plane,master   98m    v1.20.15
jx-nginx-13    Ready    control-plane,master   97m    v1.20.15
k8s-master11   Ready    control-plane,master   101m   v1.20.15

Calico安装,以下步骤只在master11执行

cd /root/ ; git clone https://github.com/dotbalo/k8s-ha-install.git

cd /root/k8s-ha-install && git checkout manual-installation-v1.20.x && cd calico/
sed -i 's#etcd_endpoints: "http://<ETCD_IP>:<ETCD_PORT>"#etcd_endpoints: "https://192.168.0.201:2379,https://192.168.0.202:2379,https://192.168.0.203:2379"#g' calico-etcd.yaml


ETCD_CA=`cat /etc/kubernetes/pki/etcd/ca.crt | base64 | tr -d '\n'`
ETCD_CERT=`cat /etc/kubernetes/pki/etcd/server.crt | base64 | tr -d '\n'`
ETCD_KEY=`cat /etc/kubernetes/pki/etcd/server.key | base64 | tr -d '\n'`
sed -i "s@# etcd-key: null@etcd-key: ${ETCD_KEY}@g; s@# etcd-cert: null@etcd-cert: ${ETCD_CERT}@g; s@# etcd-ca: null@etcd-ca: ${ETCD_CA}@g" calico-etcd.yaml


sed -i 's#etcd_ca: ""#etcd_ca: "/calico-secrets/etcd-ca"#g; s#etcd_cert: ""#etcd_cert: "/calico-secrets/etcd-cert"#g; s#etcd_key: "" #etcd_key: "/calico-secrets/etcd-key" #g' calico-etcd.yaml

POD_SUBNET=`cat /etc/kubernetes/manifests/kube-controller-manager.yaml | grep cluster-cidr= | awk -F= '{print $NF}'`

sed -i 's@# - name: CALICO_IPV4POOL_CIDR@- name: CALICO_IPV4POOL_CIDR@g; s@#   value: "192.168.0.0/16"@  value: '"${POD_SUBNET}"'@g' calico-etcd.yaml



创建calico

kubectl apply -f calico-etcd.yaml

Metrics Server部署

scp /etc/kubernetes/pki/front-proxy-ca.crt k8s-node01:/etc/kubernetes/pki/front-proxy-ca.crt
scp /etc/kubernetes/pki/front-proxy-ca.crt k8s-node02:/etc/kubernetes/pki/front-proxy-ca.crt

安装metrics server

cd /root/k8s-ha-install/metrics-server-0.4.x-kubeadm/

kubectl  create -f comp.yaml 

kubectl  top node
[root@jx-nginx-11 ~]# kubectl  top node
NAME           CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%   
jx-apache-21   161m         8%     792Mi           41%       
jx-apache-22   149m         7%     756Mi           39%       
jx-nginx-12    385m         19%    1074Mi          56%       
jx-nginx-13    400m         20%    1179Mi          62%       
k8s-master11   407m         20%    1129Mi          59%  

Dashboard部署

cd /root/k8s-ha-install/dashboard/
kubectl  create -f .

更改dashboard的svc为NodePort:

kubectl edit svc kubernetes-dashboard -n kubernetes-dashboard

查看端口

kubectl get svc kubernetes-dashboard -n kubernetes-dashboard

[root@jx-nginx-11 ~]# kubectl get svc kubernetes-dashboard -n kubernetes-dashboard
NAME                   TYPE       CLUSTER-IP       EXTERNAL-IP   PORT(S)         AGE
kubernetes-dashboard   NodePort   10.111.102.154   <none>        443:32747/TCP   94m


访问浏览器,https://10.10.10.200:32747 目前谷歌浏览器好像不太能访问,可以看看火狐,edge,浏览器启动参数加上 --test-type --ignore-certificate-errors

查看token值

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')

[root@jx-nginx-11 ~]# kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
Name:         admin-user-token-qqnd4
Namespace:    kube-system
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: admin-user
              kubernetes.io/service-account.uid: 4b41595e-437d-4ca6-ab80-9af359bbb6b5

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1066 bytes
namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6InVtMjlQLUJJOUlkWDRrR0QxU3dOWkFjeTVyWjRDQTRlOGR5UkFncndITlkifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLXFxbmQ0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI0YjQxNTk1ZS00MzdkLTRjYTYtYWI4MC05YWYzNTliYmI2YjUiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06YWRtaW4tdXNlciJ9.kjHq8lYDADfOkhYN5eUVGAsbVoxte2BZJXq9f-TZp9dqB75g-W9K_hWbdcSW5vBdNuEMJZFrC5VSXwjTt-tpMODMUcic9GzdL-Hc4ZEuyVRTmpAX0YwEZ9l39CW8fahsWHMz4-AuJG3jRzBED3R5pXcM_f6kPth_hsWthXAQeFEqXZZSBQDz1xIN2_Tz3-v3eHXPDBUBYnNOhyQyYQ416MRDC1Lo3vCmk07aCKQ9pczsc4plnV62qxt8fGwFaxSwCTek1Cg1ms7_d6ctBgpL5REQTqooAsKQjMCgpmNYHun4nI8SPTnj0mtS7aFOvtqRMl43mHWktrvS1iGg0wQOow

访问通过token

K8s(1.20.15版本)部署(3master+2node)
K8s(1.20.15版本)部署(3master+2node)文章来源地址https://www.toymoban.com/news/detail-430077.html

到了这里,关于K8s(1.20.15版本)部署(3master+2node)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 二进制部署高可用k8s集群V1.20.11版本

    单master架构图 master节点 node1节点 node2节点   Etcd是一个分布式键值存储系统, K8s使用Etcd进行数据存储 ,所以先准备一个Etcd数据库,为解决Etcd单点故障,应采用集群方式进行部署,这里使用3台组件集群,可容忍1台机器故障,当然 也可以使用5台组件集群,可容忍2台机器故

    2024年01月22日
    浏览(45)
  • k8s添加node节点和master节点

    版本: kubelet:v1.20.4 docker: 20.10.23 资源: cpu:8 mem:16 kernel:3.10.0-1160.71.1.el7.x86_64 镜像仓库地址: registry.cn-hangzhou.aliyuncs.com/google_containers/ 2.1)关闭防火墙 2.2)关闭selinux 3)修改内核和加载所需要的内核 2.3)准备yum源 3.1)刷新缓存安装kubeadm、kubectl、kubelet、docker-ce 3.2)设置syste

    2023年04月16日
    浏览(47)
  • K8S集群搭建(多master多node节点)

    目录           一 部署环境 关闭防火墙 设置主机名hostname,管理节点设置主机名为 master  配置hosts主机名解析 配置免密登陆 关闭交换分区 配置内核参数,将桥接的IPv4流量传递到iptables的链 开启ipvs 二 配置软件源 升级centos系统内核 配置时间同步 安装docker服务以及K8S  查

    2024年02月06日
    浏览(45)
  • 【K8S】docker和K8S(kubernetes)理解?docker是什么?K8S架构、Master节点 Node节点 K8S架构图

    一、docker的问世         在LXC(Linux container)Linux容器虚拟技术出现之前,业界网红是虚拟机。虚拟机技术的代表,是VMWare和OpenStack。 虚拟机是什么?         虚拟机其实就是 在你的操作系统里面,装一个软件,然后通过这个软件,再模拟一台甚至多台“子电脑”出来。

    2024年03月26日
    浏览(66)
  • Kubeadm安装单master多node节点K8S集群

    记录在刚搭建的3个虚拟机里成功安装K8S1.25版本集群的步骤 由于是成功创建后才记录的博客,只记录了操作步骤,过程中执行命令后的截图会有部分缺失,或者换成了文字。 操作系统:centos7.9 每个服务器配置: 4Gib内存/4vCPU/80G硬盘 网络:NAT模式 K8S集群角色 IP 主机名 安装的

    2024年01月24日
    浏览(60)
  • K8s 部署 CNI 网络组件+k8s 多master集群部署+负载均衡

    ------------------------------ 部署 CNI 网络组件 ------------------------------ ---------- 部署 flannel ---------- K8S 中 Pod 网络通信: ●Pod 内容器与容器之间的通信 在同一个 Pod 内的容器(Pod 内的容器是不会跨宿主机的)共享同一个网络命名空间,相当于它们在同一台机器上一样,可以用 lo

    2024年02月08日
    浏览(46)
  • k8s中,kubelet 出现问题, k8s-master node not found.

    由于一些其他问题,需要kubeadm reset,在做完kubeadm reset后,出现以下问题。 执行systemctl restart kubelet。 出现 k8s-master node not found,尽管 kubelet依旧是active状态 排查 hostname、etc/hosts等均正常。 通过journalctl -xe kubelet查看,依旧是如下错误。  经过多方尝试未果。又尝试着kubelet初

    2024年02月07日
    浏览(41)
  • k8s单节点部署(仅master)

    1.脚本部署 默认token有效期为24小时,当过期之后,该token就不可用了。这时就需要重新创建token,可以直接使用命令快捷生成: 2.部署dashboard Dashboard是官方提供的一个UI,可用于基本管理K8s资源。 1、YAML下载地址: https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recom

    2024年02月07日
    浏览(42)
  • 【云原生K8s】二进制部署单master K8s+etcd集群

                                                    mater节点 master01 192.168.190.10 kube-apiserver kube-controller-manager kube-scheduler etcd                                                 node节点 node01 192.168.190.20 kubelet kube-proxy docker (容器引擎) node02 192.168.190.30 kubelet kube-proxy do

    2024年02月14日
    浏览(57)
  • kubeadm搭建单master多node的k8s集群--小白文,图文教程

    K8S基础知识与集群搭建 kubeadm搭建单master多node的k8s集群—主要参考这个博客,但是有坑,故贴出我自己的过程,坑会少很多 注意: 集群配置是:一台master:zabbixagent-k8smaster,两台node:k8snode1和k8snode2 当没有明说master机器做什么或者node机器做什么时,所有操作步骤默认是三台

    2024年02月19日
    浏览(52)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包