Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
linux_faq:kubernetes_using_single_node_as_master_and_worker [2022/04/23 17:26] – [Обновление kubernetes] admin | linux_faq:kubernetes_using_single_node_as_master_and_worker [2022/04/28 10:22] – [Single node Kubernetes setup - Ubuntu 18.04] admin | ||
---|---|---|---|
Line 8: | Line 8: | ||
| | ||
echo 'deb http:// | echo 'deb http:// | ||
- | curl -s https:// | + | |
- | | + | |
+ | gpg_keyring_path="/ | ||
+ | curl -fsSL " | ||
+ | |||
sudo apt-get update | sudo apt-get update | ||
- | sudo apt-get install -y docker.io kubeadm kubelet | + | |
+ | sudo apt-get install -y containerd | ||
| | ||
- | # Setup Docker daemon. | + | |
- | cat > / | + | containerd config default | sudo tee / |
- | { | + | |
- | " | + | ## Setup Docker daemon. |
- | " | + | |
- | " | + | |
- | " | + | # |
- | }, | + | # |
- | " | + | # |
- | } | + | # |
- | EOF | + | # |
- | + | # | |
- | sudo mkdir -p / | + | |
+ | | ||
| | ||
+ | #sudo mkdir -p / | ||
+ | |||
# Enable services and restart docker. | # Enable services and restart docker. | ||
- | sudo systemctl daemon-reload | + | |
- | sudo systemctl enable docker | + | |
- | sudo systemctl restart docker | + | |
- | sudo systemctl enable kubelet.service | + | |
| | ||
- | sudo usermod -a -G docker $USER | + | |
| | ||
# To ensure that kubelet starts only after docker: | # To ensure that kubelet starts only after docker: | ||
+ | #cat << EOF | sudo tee / | ||
+ | #[Unit] | ||
+ | # | ||
+ | #EOF | ||
+ | |||
cat << EOF | sudo tee / | cat << EOF | sudo tee / | ||
[Unit] | [Unit] | ||
- | After=docker.service | + | After=containerd.service |
EOF | EOF | ||
- | |||
# Kubernetes Cluster Init | # Kubernetes Cluster Init | ||
sudo kubeadm init --pod-network-cidr=10.244.0.0/ | sudo kubeadm init --pod-network-cidr=10.244.0.0/ | ||
Line 379: | Line 390: | ||
# Let's Encrypt will use this to contact you about expiring | # Let's Encrypt will use this to contact you about expiring | ||
# certificates, | # certificates, | ||
- | email: | + | email: |
server: https:// | server: https:// | ||
privateKeySecretRef: | privateKeySecretRef: |