[ja] kubeadm-install: include env variable for ARCH

pull/29646/head
Arhell 2021-09-09 01:07:41 +03:00
parent afac60ede7
commit 7b43cfc83d
1 changed files with 7 additions and 6 deletions

View File

@ -223,26 +223,27 @@ CNIプラグインをインストールする(ほとんどのPodのネットワ
```bash ```bash
CNI_VERSION="v0.8.2" CNI_VERSION="v0.8.2"
ARCH="amd64"
mkdir -p /opt/cni/bin 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-${ARCH}-${CNI_VERSION}.tgz" | tar -C /opt/cni/bin -xz
``` ```
crictlをインストールする (kubeadm / Kubelet Container Runtime Interface (CRI)に必要です) crictlをインストールする (kubeadm / Kubelet Container Runtime Interface (CRI)に必要です)
```bash ```bash
CRICTL_VERSION="v1.16.0" CRICTL_VERSION="v1.17.0"
mkdir -p /opt/bin ARCH="amd64"
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 curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz" | sudo tar -C $DOWNLOAD_DIR -xz
``` ```
`kubeadm`、`kubelet`、`kubectl`をインストールし`kubelet`をsystemd serviceに登録します: `kubeadm`、`kubelet`、`kubectl`をインストールし`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)"
ARCH="amd64"
mkdir -p /opt/bin mkdir -p /opt/bin
cd /opt/bin cd /opt/bin
curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/amd64/{kubeadm,kubelet,kubectl} curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/${ARCH}/{kubeadm,kubelet,kubectl}
chmod +x {kubeadm,kubelet,kubectl} chmod +x {kubeadm,kubelet,kubectl}
curl -sSL "https://raw.githubusercontent.com/kubernetes/kubernetes/${RELEASE}/build/debs/kubelet.service" | sed "s:/usr/bin:/opt/bin:g" > /etc/systemd/system/kubelet.service curl -sSL "https://raw.githubusercontent.com/kubernetes/kubernetes/${RELEASE}/build/debs/kubelet.service" | sed "s:/usr/bin:/opt/bin:g" > /etc/systemd/system/kubelet.service