Last active
October 31, 2019 15:33
-
-
Save moondev/32ded4d7cd3556395206bfb57b9f6e71 to your computer and use it in GitHub Desktop.
ARM64_INIT.sh
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/bash | |
kubeadm reset -f | |
# hostnamectl set-hostname `cat /sys/class/net/eth0/address`.localdomain | |
# wget -O /master.sh https://gist.githubusercontent.com/moondev/32ded4d7cd3556395206bfb57b9f6e71/raw/master.sh | |
# chmod 0777 /master.sh | |
# /master.sh > master_log.txt | |
# echo -n > /etc/machine-id | |
# sysctl net.bridge.bridge-nf-call-iptables=1 | |
#kubeadm join 192.168.1.170:6443 --token n78nck.v8evdl297uxxu27y --discovery-token-ca-cert-hash sha256:68548ab9228fc2892f0fd0ef39db29fc490a793b97a1c18921c913173fa7e94a | |
#export IP=`hostname -I | awk '{ print $1 }'` | |
#kubeadm reset -f | |
#hostnamectl set-hostname `cat /sys/class/net/eth0/address`.${IP}.nip.io | |
# hostnamectl set-hostname `cat /sys/class/net/eth0/address`.localdomain | |
#sleep 5 | |
#kubeadm join 192.168.1.170:6443 --token qbrd0h.4gbwc4rmho8vfv85 --discovery-token-ca-cert-hash sha256:4a589cb35df88817a8f3d908e09253d179eda6ab12ab79e728501aeaf8b5f395 | |
# sleep 5 | |
# kubeadm reset -f | |
# sleep 10 | |
# export ARCH="arm64" | |
# export RUNTIME="docker-ce=18.06.2~ce~3-0~ubuntu" | |
# apt-get update | |
# apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
# apt-key adv --fetch-keys https://download.docker.com/linux/ubuntu/gpg | |
# sleep 2 | |
# apt-get update | |
# apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
# sleep 2 | |
# apt-get update | |
# sleep 2 | |
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8 | |
# sleep 2 | |
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A030B21BA07F4FB | |
# sleep 2 | |
# apt-get update | |
# modprobe overlay | |
# modprobe br_netfilter | |
# cat > /etc/sysctl.d/99-kubernetes-cri.conf <<EOF | |
# net.bridge.bridge-nf-call-iptables = 1 | |
# net.ipv4.ip_forward = 1 | |
# net.bridge.bridge-nf-call-ip6tables = 1 | |
# EOF | |
# sysctl --system | |
# sleep 2 | |
# add-apt-repository "deb [arch=${ARCH}] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# sleep 2 | |
# apt-get update | |
# sleep 2 | |
# apt-get install -y ${RUNTIME} | |
# cat > /etc/docker/daemon.json <<EOF | |
# { | |
# "exec-opts": ["native.cgroupdriver=systemd"], | |
# "log-driver": "json-file", | |
# "log-opts": { | |
# "max-size": "100m" | |
# }, | |
# "storage-driver": "overlay2" | |
# } | |
# EOF | |
# mkdir -p /etc/systemd/system/docker.service.d | |
# systemctl daemon-reload | |
# systemctl restart docker | |
# systemctl enable docker | |
# docker version | |
# docker info | |
# docker ps | |
# apt-get update | |
# apt-get install -y apt-transport-https curl | |
# apt-get install -y ipvsadm vim htop net-tools | |
# cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
# deb https://apt.kubernetes.io/ kubernetes-xenial main | |
# EOF | |
# apt-get update | |
# sleep 2 | |
# apt-get install -y kubelet kubeadm kubectl | |
# # apt-mark hold kubelet kubeadm kubectl | |
# kubeadm join `cat /MASTER` \ | |
# --token `cat /TOKEN` \ | |
# --discovery-token-unsafe-skip-ca-verification | |
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
rm -f /ARM64_INIT.sh; rm -f /INIT_LOG.txt | |
wget -O /ARM64_INIT.sh https://gist.githubusercontent.com/moondev/32ded4d7cd3556395206bfb57b9f6e71/raw/ARM64_INIT.sh | |
chmod 0777 /ARM64_INIT.sh | |
/ARM64_INIT.sh > INIT_LOG.txt |
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/bash | |
kubeadm init --pod-network-cidr=10.244.0.0/16 --token n78nck.v8evdl297uxxu27y | |
sleep 60 | |
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment