Keep the history of Kubernetes, Docker, Vagrant, and Nginx.
hostnamectl set-hostname kubemaster.henrycloudlocal.id
vim /etc/hosts
free -m
swapoff -a
vim /etc/hosts
vim /etc/fstab
clear
setenforce 0
vim /etc/sysconfig/selinux
modprobe br_netfilter
echo “1” > /proc/sys/net/bridge/bridge-nf-call-iptables
curl -fsSL get.docker.com | sh
usermod -aG docker vagrant
id vagrant
vim /etc/yum.repos.d/kubernetes.repo
clear
yum install -y kubelet kubeadm kubectl
systemctl enable docker
systemctl enable kubelet
systemctl start docker
systemctl status docker
kubeadm init –apiserver-advertise-address=172.31.47.141 –pod-network-cidr=10.244.0.0/16
docker info | grep -i cgroup
vim /etc/docker/daemon.json
systemctl restart docker
vim /etc/docker/daemon.json
systemctl restart docker
vim /etc/docker/daemon.json
systemctl restart docker
systemctl status docker
cat /etc/docker/daemon.json
kubeadm reset
kubeadm init –apiserver-advertise-address=172.31.47.141 –pod-network-cidr=10.244.0.0/16
vim join.txt
su – vagrant
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf
$HOME/.kube/config
sudo chown $(id -u):$(id -g)
$HOME/.kube/config
ls -ld /home/vagrant/.kube/
exit
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
kubectl get nodes
sudo cat /root/join.txt
cat /etc/docker/daemon.json
{ “exec-opts”: [“native.cgroupdriver=systemd”]
kubectl get nodes
kubectl create deployment nginx –image=nginx
kubectl get pods
kubectl get pods -o wide
kubectl scale deployment nginx –replicas=4
kubectl get pods -o wide
kubectl create namespace dev
kubectl create namespace test
kubectl create deployment
httpd-dev –image=httpd -n dev
kubectl create deployment
tomcat-dev –image=tomcat -n dev
kubectl create deployment
mongo-dev –image=mongo -n dev
kubectl create deployment
httpd-test –image=httpd -n test
kubectl create deployment
tomcat-test –image=tomcat -n test
kubectl create deployment
mongo-test –image=mongo -n test
kubectl get pods -n dev
kubectl get pods -n test
kubectl get pods –all-namespaces
kubectl get pods
kubectl get pod
nginx-6799fc88d8-8tk4t –show-labels
kubectl label pod
nginx-6799fc88d8-8tk4t version=v1
kubectl get pod nginx-6799fc88d8-8tk4t –show-labels
vi nginx-deployment.yaml
cat nginx-deployment.yaml
clear
kubectl create -f nginx-deployment.yaml
kubectl get pods
cat nginx-deployment.yaml
clear
Keep learning !