sudo su -
# google k8s 패키지 소스 등록
apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt install linux-image-extra-virtual ca-certificates curl software-properties-common -y
# docker 소스 등록
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt update
sudo su -
apt install docker-ce kubelet kubeadm kubectl kubernetes-cni -y
sudo su -
swapoff -a
vi /etc/fstab ; swap을 #로 커맨트
% sudo su -
% kubeadm init --pod-network-cidr 192.168.0.0/16 --service-cidr 10.96.0.0/12 --service-dns-domain "k8s" --apiserver-advertise-address __IP_ADDR__
...
kubeadm join 10.0.1.2:6443 --token nnnnnnnnnnn --discovery-token-ca-cert-hash sha256:nnnnnnnnn
...
출력되는 메시지 잘 적어두기
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
export KUBECONFIG=$HOME/.kube/config
export KUBECONFIG=$HOME/.kube/config | tee -a ~/.bashrc
kubectl apply -f https://docs.projectcalico.org/v3.1/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
kubectl apply -f https://docs.projectcalico.org/v3.1/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml
sudo su -
# google k8s 패키지 소스 등록
apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt install linux-image-extra-virtual ca-certificates curl software-properties-common -y
# docker 소스 등록
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt update
sudo su -
apt install docker-ce kubelet kubeadm kubectl kubernetes-cni -y
sudo su -
swapoff -a
vi /etc/fstab ; swap을 #로 커맨트
sudo su -
# master 설치시에 나온 명령을 그대로 입력
kubeadm join 10.0.1.2:6443 --token nnnnnnnnnnn --discovery-token-ca-cert-hash sha256:nnnnnnnnn