Last active
June 14, 2023 10:27
-
-
Save lut777/04675215716de760070b20c385c809b9 to your computer and use it in GitHub Desktop.
for centos9 install kl8s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /etc/crictl.yaml | |
runtime-endpoint: "unix:///run/containerd/containerd.sock" | |
image-endpoint: "unix:///run/containerd/containerd.sock" | |
timeout: 10 | |
debug: false | |
pull-image-on-create: false | |
disable-pull-on-run: false | |
// /etc/containerd/config.toml | |
version = 2 | |
[plugins] | |
[plugins."io.containerd.grpc.v1.cri"] | |
systemd_cgroup = true | |
[plugins."io.containerd.grpc.v1.cri".containerd] | |
[plugins."io.containerd.grpc.v1.cri".containerd.default_runtime] | |
runtime_type = "io.containerd.runtime.v1.linux" | |
[plugins."io.containerd.grpc.v1.cri".cni] | |
bin_dir = "/usr/lib/cni" | |
conf_dir = "/etc/cni/net.d" | |
[plugins."io.containerd.internal.v1.opt"] | |
path = "/var/lib/containerd/opt" | |
// init.sh | |
systemctl stop firewalld && \ | |
swapoff -a && \ | |
systemctl restart kubelet && \ | |
modprobe br_netfilter && \ | |
echo "1" > /proc/sys/net/ipv4/ip_forward && \ | |
systemctl restart containerd && \ | |
mkdir /sys/fs/cgroup/systemd && \ | |
mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd | |
// download images from aliyun | |
#/bin/bash | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.27.2 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.27.2 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.27.2 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.27.2 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.9 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.7-0 | |
ctr -n k8s.io image pull registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.10.1 | |
ctr -n k8s.io image pull quay.io/coreos/flannel:v0.15.1-amd64 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.27.2 registry.k8s.io/kube-apiserver:v1.27.2 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.27.2 registry.k8s.io/kube-controller-manager:v1.27.2 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.27.2 registry.k8s.io/kube-scheduler:v1.27.2 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.27.2 registry.k8s.io/kube-proxy:v1.27.2 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.9 registry.k8s.io/pause:3.9 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.7-0 registry.k8s.io/etcd:3.5.7-0 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.10.1 registry.k8s.io/coredns/coredns:v1.10.1 | |
ctr -n k8s.io image tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6 registry.k8s.io/pause:3.6 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.27.2 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.27.2 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.27.2 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.27.2 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.9 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.7-0 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.10.1 | |
ctr -n k8s.io image del registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment