Last active
December 10, 2018 02:56
-
-
Save gorbypark/04f6181fb5d464c392b2b70bdb97b7a4 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
PRIVATE_IPV4=$(/bin/ip -o -4 addr list ens33 | awk '{print $4}' | cut -d/ -f1) | |
CNI_VERSION="v0.6.0" | |
mkdir -p /opt/cni/bin | |
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz" | tar -C /opt/cni/bin -xz | |
CRICTL_VERSION="v1.11.1" | |
mkdir -p /opt/bin | |
curl -L "https://github.com/kubernetes-incubator/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz" | tar -C /opt/bin -xz | |
RELEASE="$(curl -sSL https://dl.k8s.io/release/stable.txt)" | |
mkdir -p /opt/bin | |
cd /opt/bin | |
curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/amd64/{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 | |
mkdir -p /etc/systemd/system/kubelet.service.d | |
curl -sSL "https://raw.githubusercontent.com/kubernetes/kubernetes/${RELEASE}/build/debs/10-kubeadm.conf" | sed "s:/usr/bin:/opt/bin:g" > /etc/systemd/system/kubelet.service.d/10-kubeadm.conf | |
systemctl enable kubelet && systemctl start kubelet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment