国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

k8s 1.29 一鍵安裝腳本, 絲滑致極

這篇具有很好參考價值的文章主要介紹了k8s 1.29 一鍵安裝腳本, 絲滑致極。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

k8s 1.29安裝,kubernetes,# shell,kubernetes,容器,云原生,運維,linux,shell
博客原文

高可用版本: 高可用 k8s 1.29 一鍵安裝腳本

集群配置

配置清單

  • OS: ubuntu 20.04
  • kubernetes: 1.29.1
  • Container Runtime:Containerd 1.7.11
  • CRI: runc 1.10
  • CNI: cni-plugin 1.4

集群規(guī)劃

IP Hostname 配置
192.168.254.130 master01 2C 4G 30G
192.168.254.131 node01 2C 4G 30G
192.168.254.132 node02 2C 4G 30G

集群網(wǎng)絡(luò)規(guī)劃

  • Pod 網(wǎng)絡(luò): 10.244.0.0/16
  • Service 網(wǎng)絡(luò): 10.96.0.0/12
  • Node 網(wǎng)絡(luò): 11.0.1.0/24

環(huán)境初始化

主機配置

ssh-keygen
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.254.131
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.254.132

# 將節(jié)點加入 hosts
cat << EOF >> /etc/hosts
192.168.254.130 master01
192.168.254.131 node01
192.168.254.132 node02
EOF

安裝腳本

**前置條件: ** 腳本中存在拉取國外資源, 需要你配置代理 ==> [如何讓虛擬機擁有愉快網(wǎng)絡(luò)環(huán)境](https://ai-feier.github.io/p/%E5%A6%82%E4%BD%95%E8%AE%A9%E8%99%9A%E6%8B%9F%E6%9C%BA%E6%8B%A5%E6%9C%89%E6%84%89%E5%BF%AB%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83/)

需要:

  • 虛擬機代理
  • apt 下載代理

在所有節(jié)點執(zhí)行以下腳本

腳本功能:

  • 時間同步
  • 關(guān)閉 swap
  • 啟用內(nèi)核模塊
  • 安裝 ipvs 并啟用內(nèi)核參數(shù)
  • 安裝 containerd, runc, cni
  • 更改 containerd 沙箱鏡像和 cgroup 并且配置鏡像加速
  • 安裝最新 kubelet, kubeadm, kubectl

注意: 請先通過export name=master01方式設(shè)置當(dāng)前 node 的 hostname

需要魔法的腳本

install.sh:

export name=master01  # 改為你 hostname 的名稱, 腳本中刪除該行
#!/bin/bash

hostnamectl set-hostname $name

# 阿里源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
cat <<EOF > /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF
apt update


# 時間同步
timedatectl set-timezone Asia/Shanghai
#安裝chrony,聯(lián)網(wǎng)同步時間
apt install chrony -y && systemctl enable --now chronyd

# 禁用 swap
sudo swapoff -a && sed -i '/swap/s/^/#/' /etc/fstab

# 安裝 ipvs
apt install -y ipset ipvsadm

# 配置需要的內(nèi)核模塊
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF

# 啟動模塊
sudo modprobe overlay
sudo modprobe br_netfilter

cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF

# 是 sysctl 參數(shù)生效
sudo sysctl --system
# 檢驗是否配置成功
#lsmod | grep br_netfilter
#lsmod | grep overlay
#sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward


# 配置 ipvs 內(nèi)核參數(shù)
cat <<EOF | sudo tee /etc/modules-load.d/ipvs.conf
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack
EOF

# 內(nèi)核加載 ipvs
sudo modprobe ip_vs
sudo modprobe ip_vs_rr
sudo modprobe ip_vs_wrr
sudo modprobe ip_vs_sh
sudo modprobe nf_conntrack
# 確認(rèn)ipvs模塊加載
#lsmod |grep -e ip_vs -e nf_conntrack


# 安裝 Containerd
wget -c https://github.com/containerd/containerd/releases/download/v1.7.11/containerd-1.7.11-linux-amd64.tar.gz
tar -xzvf containerd-1.7.11-linux-amd64.tar.gz
#解壓出來一個bin目錄,containerd可執(zhí)行文件都在bin目錄里面
mv bin/* /usr/local/bin/
rm -rf bin

#使用systemcd來管理containerd
cat << EOF > /usr/lib/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target

[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd

Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity

# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload && systemctl enable --now containerd 
#systemctl  status containerd


# 安裝 runc
#runc是容器運行時,runc實現(xiàn)了容器的init,run,create,ps...我們在運行容器所需要的cmd:
curl -LO https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.amd64 && \
install -m 755 runc.amd64 /usr/local/sbin/runc

# 安裝 CNI plugins
wget -c https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz
#根據(jù)官網(wǎng)的安裝步驟來,創(chuàng)建一個目錄用于存放cni插件
mkdir -p /opt/cni/bin
tar -xzvf  cni-plugins-linux-amd64-v1.4.0.tgz -C /opt/cni/bin/

# 修改 Containd 配置
#修改containerd的配置,因為containerd默認(rèn)從k8s官網(wǎng)拉取鏡像
#創(chuàng)建一個目錄用于存放containerd的配置文件
mkdir -p /etc/containerd
#把containerd配置導(dǎo)出到文件
containerd config default | sudo tee /etc/containerd/config.toml

# 修改沙箱鏡像
sed -i 's#sandbox_image = "registry.k8s.io/pause:.*"#sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.9"#' /etc/containerd/config.toml
# 修改 cgroup 為 systemd
sed -i 's#SystemdCgroup = false#SystemdCgroup = true#' /etc/containerd/config.toml
# 配置鏡像加速
sed -i 's#config_path = ""#config_path = "/etc/containerd/certs.d"#' /etc/containerd/config.toml

# 配置 Containerd 鏡像源
# docker hub鏡像加速
mkdir -p /etc/containerd/certs.d/docker.io
cat > /etc/containerd/certs.d/docker.io/hosts.toml << EOF
server = "https://docker.io"
[host."https://dockerproxy.com"]
  capabilities = ["pull", "resolve"]

[host."https://docker.m.daocloud.io"]
  capabilities = ["pull", "resolve"]

[host."https://reg-mirror.qiniu.com"]
  capabilities = ["pull", "resolve"]

[host."https://registry.docker-cn.com"]
  capabilities = ["pull", "resolve"]

[host."http://hub-mirror.c.163.com"]
  capabilities = ["pull", "resolve"]

EOF

# k8s.gcr.io鏡像加速
mkdir -p /etc/containerd/certs.d/k8s.gcr.io
tee /etc/containerd/certs.d/k8s.gcr.io/hosts.toml << 'EOF'
server = "https://k8s.gcr.io"

[host."https://k8s-gcr.m.daocloud.io"]
  capabilities = ["pull", "resolve", "push"]
EOF

#重啟containerd
systemctl restart containerd 
#systemctl status containerd

# 安裝 kubeadm、kubelet、kubectl
# 安裝依賴
sudo systemctl restart containerd
sudo apt-get update -y
sudo apt-get install -y apt-transport-https ca-certificates curl gpg 

mkdir -p /etc/apt/keyrings
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

sudo apt-get update -y
sudo apt-get install -y kubelet kubeadm kubectl 
sudo apt-mark hold kubelet kubeadm kubectl

# kubelet 開機自啟
systemctl enable --now kubelet

# 配置 crictl socket
crictl config  runtime-endpoint unix:///run/containerd.sock
crictl config image-endpoint unix:///run/containerd/containerd.sock

不需要魔法的腳本

前置:

下載我下載好的資源包

  • 阿里云 OSS
  • CSDN 資源

資源列表:

Containerd: - Container Runtime:Containerd 1.7.11 - CRI: runc 1.10 - CNI: cni-plugin 1.4 calico 3.27: - tigera-operator.yaml - custom-resources.yaml

資源 原始地址
Container Runtime:Containerd 1.7.11 https://github.com/containerd/containerd/releases/download/v1.7.11/containerd-1.7.11-linux-amd64.tar.gz
CRI: runc 1.10 https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.amd64
CNI: cni-plugin 1.4 https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz
calico 3.27 : tigera-operator.yaml https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/tigera-operator.yaml
calico 3.27 : custom-resources.yaml https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/custom-resources.yaml

下載資源:

wget -O - https://blog-source-mkt.oss-cn-chengdu.aliyuncs.com/resources/k8s/kubeadm%20init/k8s1.29.tar.gz | tar xzvf -
cd workdir

export name=master01  # 改為你 hostname 的名稱

install.sh

#!/bin/bash

hostnamectl set-hostname $name

# 阿里源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
cat <<EOF > /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF
apt update


# 時間同步
timedatectl set-timezone Asia/Shanghai
#安裝chrony,聯(lián)網(wǎng)同步時間
apt install chrony -y && systemctl enable --now chronyd

# 禁用 swap
sudo swapoff -a && sed -i '/swap/s/^/#/' /etc/fstab

# 安裝 ipvs
apt install -y ipset ipvsadm

# 配置需要的內(nèi)核模塊
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF

# 啟動模塊
sudo modprobe overlay
sudo modprobe br_netfilter

cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF

# 是 sysctl 參數(shù)生效
sudo sysctl --system
# 檢驗是否配置成功
#lsmod | grep br_netfilter
#lsmod | grep overlay
#sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward


# 配置 ipvs 內(nèi)核參數(shù)
cat <<EOF | sudo tee /etc/modules-load.d/ipvs.conf
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack
EOF

# 內(nèi)核加載 ipvs
sudo modprobe ip_vs
sudo modprobe ip_vs_rr
sudo modprobe ip_vs_wrr
sudo modprobe ip_vs_sh
sudo modprobe nf_conntrack
# 確認(rèn)ipvs模塊加載
#lsmod |grep -e ip_vs -e nf_conntrack


# 安裝 Containerd
#wget -c https://github.com/containerd/containerd/releases/download/v1.7.11/containerd-1.7.11-linux-amd64.tar.gz
tar -xzvf containerd-1.7.11-linux-amd64.tar.gz
#解壓出來一個bin目錄,containerd可執(zhí)行文件都在bin目錄里面
mv bin/* /usr/local/bin/
rm -rf bin

#使用systemcd來管理containerd
cat << EOF > /usr/lib/systemd/system/containerd.service
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target

[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/containerd

Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity

# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload && systemctl enable --now containerd 
#systemctl  status containerd


# 安裝 runc
#runc是容器運行時,runc實現(xiàn)了容器的init,run,create,ps...我們在運行容器所需要的cmd:
#curl -LO https://github.com/opencontainers/runc/releases/download/v1.1.10/runc.amd64 && \
install -m 755 runc.amd64 /usr/local/sbin/runc

# 安裝 CNI plugins
#wget -c https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz
#根據(jù)官網(wǎng)的安裝步驟來,創(chuàng)建一個目錄用于存放cni插件
mkdir -p /opt/cni/bin
tar -xzvf  cni-plugins-linux-amd64-v1.4.0.tgz -C /opt/cni/bin/

# 修改 Containd 配置
#修改containerd的配置,因為containerd默認(rèn)從k8s官網(wǎng)拉取鏡像
#創(chuàng)建一個目錄用于存放containerd的配置文件
mkdir -p /etc/containerd
#把containerd配置導(dǎo)出到文件
containerd config default | sudo tee /etc/containerd/config.toml

# 修改沙箱鏡像
sed -i 's#sandbox_image = "registry.k8s.io/pause:.*"#sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.9"#' /etc/containerd/config.toml
# 修改 cgroup 為 systemd
sed -i 's#SystemdCgroup = false#SystemdCgroup = true#' /etc/containerd/config.toml
# 配置鏡像加速
sed -i 's#config_path = ""#config_path = "/etc/containerd/certs.d"#' /etc/containerd/config.toml

# 配置 Containerd 鏡像源
# docker hub鏡像加速
mkdir -p /etc/containerd/certs.d/docker.io
cat > /etc/containerd/certs.d/docker.io/hosts.toml << EOF
server = "https://docker.io"
[host."https://dockerproxy.com"]
  capabilities = ["pull", "resolve"]

[host."https://docker.m.daocloud.io"]
  capabilities = ["pull", "resolve"]

[host."https://reg-mirror.qiniu.com"]
  capabilities = ["pull", "resolve"]

[host."https://registry.docker-cn.com"]
  capabilities = ["pull", "resolve"]

[host."http://hub-mirror.c.163.com"]
  capabilities = ["pull", "resolve"]

EOF

# k8s.gcr.io鏡像加速
mkdir -p /etc/containerd/certs.d/k8s.gcr.io
tee /etc/containerd/certs.d/k8s.gcr.io/hosts.toml << 'EOF'
server = "https://k8s.gcr.io"

[host."https://k8s-gcr.m.daocloud.io"]
  capabilities = ["pull", "resolve", "push"]
EOF

#重啟containerd
systemctl restart containerd 
#systemctl status containerd

# 安裝 kubeadm、kubelet、kubectl
# 安裝依賴
sudo systemctl restart containerd
sudo apt-get update -y
sudo apt-get install -y apt-transport-https ca-certificates curl gpg 

mkdir -p /etc/apt/keyrings
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

sudo apt-get update -y
sudo apt-get install -y kubelet kubeadm kubectl 
sudo apt-mark hold kubelet kubeadm kubectl

# kubelet 開機自啟
systemctl enable --now kubelet

# 配置 crictl socket
crictl config  runtime-endpoint unix:///run/containerd/containerd.sock
crictl config image-endpoint unix:///run/containerd/containerd.sock
chmod +x install.sh
./install.sh

在你的主節(jié)點初始化集群(同樣在 workdir/ 下)

export POD_CIDR=10.244.0.0/16
export SERVICE_CIDR=10.96.0.0/12
export APISERVER_MASTER01=192.168.254.130

kubeadm init \
--apiserver-advertise-address=$APISERVER_MASTER01 \
--apiserver-bind-port=6443 \
--image-repository registry.aliyuncs.com/google_containers \
--kubernetes-version v1.29.1 \
--service-cidr=$SERVICE_CIDR \
--pod-network-cidr=$POD_CIDR  --upload-certs

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

# 安裝 calico
sed -i 's#cidr.*#cidr: '$POD_CIDR'#' custom-resources.yaml
kubectl create -f tigera-operator.yaml
kubectl create -f custom-resources.yaml

此時, 你的 k8s 集群就已經(jīng)搭建成功了, 但是, kube-proxy 使用的依然是 iptables, 我們需要將其手動更換為 ipvs

kubectl -n kube-system edit cm kube-proxy

找到: 
mode: ""
更改為: ==>  
mode: "ipvs"

k8s 集群就萬事大吉了, 如果你想把已經(jīng)搭建好的集群升級為高可用集群 | 傳送: [keepalived+nginx實現(xiàn)高可用apiserver](https://ai-feier.github.io/p/keepalived-nginx%E5%AE%9E%E7%8E%B0%E9%AB%98%E5%8F%AF%E7%94%A8apiserver)

配置自動補全

apt install bash-completion -y
cat << EOF >> ~/.profile
alias k='kubectl'
source <(kubectl completion bash)
complete -F __start_kubectl k
EOF

source ~/.profile

加入其余節(jié)點

在其余節(jié)點執(zhí)行

$ kubeadm join 192.168.254.130:6443 --token ub130l.4i7hcdhk9c0g5nz6 \
        --discovery-token-ca-cert-hash sha256:56c8eafbd4c8c37ea88dd4690f4e7b38b5773c3b64b97a1165f5961b0450b0ac

驗證集群

$ k get po -A
NAMESPACE         NAME                                       READY   STATUS              RESTARTS   AGE
calico-system     calico-kube-controllers-5c7b4b46d6-hd5mv   0/1     Pending             0          2m5s
calico-system     calico-node-4nkcf                          0/1     Init:1/2            0          2m5s
calico-system     calico-node-gkwpf                          0/1     Init:1/2            0          60s
calico-system     calico-node-xb222                          0/1     Init:1/2            0          56s
calico-system     calico-typha-599c7784cf-kkmpf              0/1     ContainerCreating   0          2m6s
calico-system     calico-typha-599c7784cf-ktrdr              0/1     ContainerCreating   0          47s
calico-system     csi-node-driver-2cfhm                      0/2     ContainerCreating   0          60s
calico-system     csi-node-driver-rwtnq                      0/2     ContainerCreating   0          56s
calico-system     csi-node-driver-wq486                      0/2     ContainerCreating   0          2m5s
kube-system       coredns-857d9ff4c9-fz2z6                   0/1     Pending             0          2m26s
kube-system       coredns-857d9ff4c9-j6247                   0/1     Pending             0          2m26s
kube-system       etcd-master01                              1/1     Running             0          2m39s
kube-system       kube-apiserver-master01                    1/1     Running             0          2m39s
kube-system       kube-controller-manager-master01           1/1     Running             0          2m41s
kube-system       kube-proxy-nxtgf                           1/1     Running             0          60s
kube-system       kube-proxy-sps8j                           1/1     Running             0          2m26s
kube-system       kube-proxy-vgh2g                           1/1     Running             0          56s
kube-system       kube-scheduler-master01                    1/1     Running             0          2m39s
tigera-operator   tigera-operator-55585899bf-sfvkf           1/1     Running             0          2m26s

參考:文章來源地址http://www.zghlxwxcb.cn/news/detail-837163.html

  1. https://kubernetes.io/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
  2. https://ai-feier.github.io/p/keepalived-nginx%E5%AE%9E%E7%8E%B0%E9%AB%98%E5%8F%AF%E7%94%A8apiserver/
  3. https://blog.csdn.net/m0_51964671/article/details/135256571

到了這里,關(guān)于k8s 1.29 一鍵安裝腳本, 絲滑致極的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • shell 腳本一鍵部署 k8s 高可用集群

    github地址:https://github.com/Johnny-Demo/deploy/tree/k8s-cluster README.md 要修改腳本里面的 ip 地址,根據(jù)自己情況修改,然后在部署,要不然會出錯。 執(zhí)行 kernel.sh 升級 linux 內(nèi)核,關(guān)閉 selinux 和 swap 分區(qū),重啟服務(wù)器。 執(zhí)行 run.sh 部署k8s,master 和 node 手動加入集群,無法自動獲取加入

    2024年02月07日
    瀏覽(21)
  • T1級,生產(chǎn)環(huán)境事故—Shell腳本一鍵備份K8s的YAML文件

    T1級,生產(chǎn)環(huán)境事故—Shell腳本一鍵備份K8s的YAML文件

    大家好,我叫 秋意零 。 最近對公司進行日常運維工作時,出現(xiàn)了一個 T1 級別事故 。導(dǎo)致公司的“酒云網(wǎng)”APP的無法使用。我和我領(lǐng)導(dǎo)一起搞了一個多小時, 業(yè)務(wù)也停了一個多小時 。 起因是:我的部門直系領(lǐng)導(dǎo),叫我**刪除一個 Deployemnt 資源(node-api-gateway)**說該資源不用

    2024年04月27日
    瀏覽(18)
  • 二進制安裝Kubernetes(k8s)v1.29.2

    https://github.com/cby-chen/Kubernetes 開源不易,幫忙點個star,謝謝了 kubernetes(k8s)二進制高可用安裝部署,支持IPv4+IPv6雙棧。 我使用IPV6的目的是在公網(wǎng)進行訪問,所以我配置了IPV6靜態(tài)地址。 若您沒有IPV6環(huán)境,或者不想使用IPv6,不對主機進行配置IPv6地址即可。 不配置IPV6,不影

    2024年02月19日
    瀏覽(20)
  • 基于centos7的k8s最新版v1.29.2安裝教程

    基于centos7的k8s最新版v1.29.2安裝教程

    Kubernetes 是一個可移植、可擴展的開源平臺,用于管理容器化的工作負(fù)載和服務(wù),可促進聲明式配置和自動化。 Kubernetes 擁有一個龐大且快速增長的生態(tài),其服務(wù)、支持和工具的使用范圍相當(dāng)廣泛。 Kubernetes ?這個名字源于希臘語,意為“舵手”或“飛行員”。k8s 這個縮寫是

    2024年03月18日
    瀏覽(29)
  • Kubernetes - 一鍵安裝部署 K8S(附:Kubernetes Dashboard)

    Kubernetes - 一鍵安裝部署 K8S(附:Kubernetes Dashboard)

    不知道大伙是如何安裝?K8s,特別還是集群的時候,我上一次安裝搭建的時候,那個惡心到我了,真的是一步一個腳印走完整個搭建流程,爬了不少坑。 于是,才有了今天的文章,到底有沒有可以一鍵完美部署 k8s 并且附帶 Dashboard……?那這么問了肯定是有的,否則豈不是在

    2024年02月03日
    瀏覽(27)
  • k8s自動化安裝腳本(kubeadm-1.26.3)

    k8s自動化安裝腳本(kubeadm-1.26.3)

    通過kubeadm進行一鍵式部署k8s集群 根據(jù)不同的啟動方式,可部署單節(jié)點、一主多從、多主多從高可用的k8s集群 通過ansible快速部署k8s的基礎(chǔ)組件(helm、nfs、ingress、monitoring【聯(lián)網(wǎng)|離線鏡像】、kuboard) 通過部署包中的run.sh進行統(tǒng)一入口,進行初始化環(huán)境(部署節(jié)點) ansible+shell實現(xiàn)自

    2024年02月01日
    瀏覽(26)
  • springcloud+docker+k8s發(fā)布安裝第三方插件腳本

    springcloud+docker+k8s發(fā)布安裝第三方插件腳本

    Dockerfile 安裝第三方依賴插件軟件?,以及構(gòu)建鏡像 ?k8s 部署yaml 腳本配置,realize-market-value.yaml centos配置kubectl客戶端連接k8s集群,執(zhí)行,sh test.sh測試環(huán)境發(fā)布k8s,sh real.sh生產(chǎn)環(huán)境?

    2024年02月12日
    瀏覽(19)
  • 使用樹莓派搭建K8S集群(ARM64架構(gòu),附安裝腳本)

    使用樹莓派搭建K8S集群(ARM64架構(gòu),附安裝腳本)

    為了能夠更好的學(xué)習(xí)K8S,王道還是得自己動手 在虛擬機上玩K8S,沒啥感覺。決定挑戰(zhàn)自己,然后買了6個樹莓派,在真實的硬件上從零開始搭建部署K8S。以下內(nèi)容在自己的樹莓派集群上經(jīng)過充分驗證,沒毛病。成品如下圖: 樹莓派供電用的是帶POE功能的交換機,每一個樹莓派

    2024年02月06日
    瀏覽(22)
  • 5分鐘快速搭建k8s集群1.29.x

    配置主機名和hosts 配置主機名 hostnamectl set-hostname node1 hostnamectl set-hostname node2 hostnamectl set-hostname node3 vim /etc/hosts 172.19.35.202 node1 172.19.35.203 node2 172.19.35.204 node3 測試 hostname ping -c 3 node2 配置時間同步 關(guān)閉防火墻 這兩條命令分別用于停止并禁用防火墻( firewalld )和DNS服務(wù)( d

    2024年04月28日
    瀏覽(19)
  • 一鍵部署k8s集群

    一鍵部署k8s集群

    機器至少配置 序號 類型 主機名 IP 備注(CPU/內(nèi)存/硬盤) 1 Mater k8s-api.bcs.local 192.168.46.128 8C16G,100G 2 Node1 node-192-168-46-129 192.168.46.129 4C8G,100G 3 Node2 node-192-168-46-130 192.168.46.130 4C8G,100G 4 Node3 node-192-168-46-131 192.168.46.131 4C8G,100G 軟件需求 需求項 具體要求 檢查命令 操作系統(tǒng) Cen

    2024年02月09日
    瀏覽(17)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包