Merge pull request #21941 from skycastlelily2/master
Update the guide for Fedora CoreOS
This commit is contained in:
commit
45c9ceed1b
|
@ -191,7 +191,7 @@ sudo apt-mark hold kubelet kubeadm kubectl
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{% tab name="CentOS, RHEL or Fedora" %}}
|
{{% tab name="CentOS, RHEL or Fedora" %}}
|
||||||
```bash
|
```bash
|
||||||
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
|
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
|
||||||
[kubernetes]
|
[kubernetes]
|
||||||
name=Kubernetes
|
name=Kubernetes
|
||||||
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
|
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
|
||||||
|
@ -203,12 +203,12 @@ exclude=kubelet kubeadm kubectl
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set SELinux in permissive mode (effectively disabling it)
|
# Set SELinux in permissive mode (effectively disabling it)
|
||||||
setenforce 0
|
sudo setenforce 0
|
||||||
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
|
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
|
||||||
|
|
||||||
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
|
sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
|
||||||
|
|
||||||
systemctl enable --now kubelet
|
sudo systemctl enable --now kubelet
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
|
@ -220,37 +220,41 @@ systemctl enable --now kubelet
|
||||||
- You can leave SELinux enabled if you know how to configure it but it may require settings that are not supported by kubeadm.
|
- You can leave SELinux enabled if you know how to configure it but it may require settings that are not supported by kubeadm.
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{% tab name="Container Linux" %}}
|
{{% tab name="Fedora CoreOS" %}}
|
||||||
Install CNI plugins (required for most pod network):
|
Install CNI plugins (required for most pod network):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
CNI_VERSION="v0.8.2"
|
CNI_VERSION="v0.8.2"
|
||||||
mkdir -p /opt/cni/bin
|
sudo mkdir -p /opt/cni/bin
|
||||||
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-amd64-${CNI_VERSION}.tgz" | tar -C /opt/cni/bin -xz
|
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-amd64-${CNI_VERSION}.tgz" | sudo tar -C /opt/cni/bin -xz
|
||||||
|
```
|
||||||
|
|
||||||
|
Define the directory to download command files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DOWNLOAD_DIR=/usr/local/bin
|
||||||
|
sudo mkdir -p $DOWNLOAD_DIR
|
||||||
```
|
```
|
||||||
|
|
||||||
Install crictl (required for kubeadm / Kubelet Container Runtime Interface (CRI))
|
Install crictl (required for kubeadm / Kubelet Container Runtime Interface (CRI))
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
CRICTL_VERSION="v1.17.0"
|
CRICTL_VERSION="v1.17.0"
|
||||||
mkdir -p /opt/bin
|
curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz" | sudo tar -C $DOWNLOAD_DIR -xz
|
||||||
curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz" | tar -C /opt/bin -xz
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Install `kubeadm`, `kubelet`, `kubectl` and add a `kubelet` systemd service:
|
Install `kubeadm`, `kubelet`, `kubectl` and add a `kubelet` systemd service:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
RELEASE="$(curl -sSL https://dl.k8s.io/release/stable.txt)"
|
RELEASE="$(curl -sSL https://dl.k8s.io/release/stable.txt)"
|
||||||
|
cd $DOWNLOAD_DIR
|
||||||
mkdir -p /opt/bin
|
sudo curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/amd64/{kubeadm,kubelet,kubectl}
|
||||||
cd /opt/bin
|
sudo chmod +x {kubeadm,kubelet,kubectl}
|
||||||
curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/amd64/{kubeadm,kubelet,kubectl}
|
|
||||||
chmod +x {kubeadm,kubelet,kubectl}
|
|
||||||
|
|
||||||
RELEASE_VERSION="v0.2.7"
|
RELEASE_VERSION="v0.2.7"
|
||||||
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service" | sed "s:/usr/bin:/opt/bin:g" > /etc/systemd/system/kubelet.service
|
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service
|
||||||
mkdir -p /etc/systemd/system/kubelet.service.d
|
sudo mkdir -p /etc/systemd/system/kubelet.service.d
|
||||||
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf" | sed "s:/usr/bin:/opt/bin:g" > /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable and start `kubelet`:
|
Enable and start `kubelet`:
|
||||||
|
|
Loading…
Reference in New Issue