Skip to content

Instantly share code, notes, and snippets.

@andreigec
Created January 19, 2020 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreigec/d6c064669e5d69fa40276f0b06042f2d to your computer and use it in GitHub Desktop.
Save andreigec/d6c064669e5d69fa40276f0b06042f2d to your computer and use it in GitHub Desktop.
su
adduser i5
passwd i5
apk add wireless-tools wpa_supplicant
ip link
ip link set wlan0 up
iwlist wlan0 scanning
iwconfig wlan0 essid NETWORK
iwconfig wlan0
wpa_passphrase 'NETWORK' 'PASSWORD' > /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
udhcpc -i wlan0
apk add --update curl git rsync bind-tools && rm -rf /var/cache/apk/*
cat 'http://dl-cdn.alpinelinux.org/alpine/latest-stable/community' >> /etc/apk/repositories
apk update
apk add docker
service docker start
apk --update add bash curl ca-certificates
CNI_VERSION="v0.8.2"
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
CRICTL_VERSION="v1.16.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" | 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/{kubectl,kubeadm}
chmod +x kubeadm
chmod +x kubectl
move /opt/bin/* /bin
cd /bin
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
swapoff -a
service docker start
mkdir -p /opt/bin && mkdir -p /opt/kubernetes/manifests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment