このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 2024.01.18 RailsでSSLエラー 以前のリビジョンを復元 (2024/01/18 07:06)
- 31 CentOS5 TLS1.2 created
- 2024.04.12 MySQL BIT Field created
最近の更新
文書の過去の版を表示しています。
swapoff -a
cat <<EOF | tee /etc/modules-load.d/containerd.conf overlay br_netfilter EOF modprobe overlay modprobe br_netfilter
cat <<EOF | tee /etc/sysctl.d/99-kubernetes-cri.conf net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 EOF sysctl --system
apt update apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
apt update && apt install containerd.io systemctl status containerd
mkdir -p /etc/containerd containerd config default | tee /etc/containerd/config.toml systemctl restart containerd
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add
apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
apt update apt install kubeadm kubelet kubectl kubernetes-cni
kubeadm init
名前や、CIDRを指定する場合
kubeadm init --node-name master --pod-network-cidr=172.16.0.0/24
こんなのが表示されれば成功です。
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/ Then you can join any number of worker nodes by running the following on each as root: kubeadm join 172.16.0.82:6443 --token qc0yz3.rs9q3122p8s2mko1 \ --discovery-token-ca-cert-hash sha256:6687ea8b6dc4871f30edc0544b836e6ada87cf540bb4fb126b25b6f90177db88
export KUBECONFIG=/etc/kubernetes/admin.conf # kubectl get node NAME STATUS ROLES AGE VERSION master NotReady control-plane,master 83s v1.23.5
kubectl completion bash >/etc/bash_completion.d/kubectl
workerノードでも手順1~3を実行
その後下記でjoinする
kubeadm join 172.16.0.82:6443 --token qc0yz3.rs9q3122p8s2mko1 \ --discovery-token-ca-cert-hash sha256:6687ea8b6dc4871f30edc0544b836e6ada87cf540bb4fb126b25b6f90177db88