brew update && brew install kubectl
brew install kops
brew install awscli
aws configure ( for Creds )
Route53 for DNS
S3 Bucket for storage ( KOPS_STATE_STORE for etcd ) you'll get a bucket name and stuff like that exple hkhelil.bucket.com
kops create cluster --zone=us-east-1c hkhelil.bucket.com
kops update cluster
kops delete cluster
kops get clusters [-o yaml]
kubeadm init --apiserver-advertise-adress $(hostname)
kubeadm join --token
kubectl get nodes
Create your infra ( master and nodes ) 1 master 3 nodes minumum
apt-get update
apt-get install apt-transport-https
apt-get install docker.io
docker --version
systemctl start docker
systemctl enable docker
curl -s https://packages.cloud.google.com/apt/doc/apt-key.pgp | apt add-key add
vi /etc/apt/sources.list.d/kubernetes.list
file :
deb http://apt.kubernetes.io kubernetes-xenial main
apt-get update
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
Now that's done !
kubeadm init
NOTE: this command genrates config files and a token to use for join
Now to configure your master config file you need to
mkdir $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
Deploy the kube pod network and flannel RBAC
https://github.com/coreos/flannel/
https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
https://github.com/coreos/flannel/blob/master/Documentation/k8s-manifests/kube-flannel-rbac.yml
kubectl apply -f [podnetwork].yaml
kubectl apply -f [kube-flanel-rbac].yaml
kubeadm join --token $TOKEN $IP_ADR:6443 --discovery-token-ca-cert-hash sha256:$SHA
kubectl get no --show-labels -owide