Getting Started
https://kubernetes.io/docs/setup/learning-environment/minikube/ Kubernetes Documentation Site: https://kubernetes.io/docs/Kubernetes Documentation Concepts: https://kubernetes.io/docs/concepts/Kubernetes Documentation Setup: https://kubernetes.io/docs/setup/Kubernetes Documentation - Minikube Setup: https://kubernetes.io/docs/getting-started-guides/minikubeType sudo apt-get install openssh-server
Enable the ssh service by typing sudo systemctl enable ssh
Start the ssh service by typing sudo systemctl start ssh
To determine whether hardware-enforced DEP is available, follow these steps:
Click Start, click Run, type cmd in the Open box, and then click OK.
At the command prompt, type the following command, and then press ENTER:
wmic OS Get DataExecutionPrevention_Available
If the output is "TRUE," hardware-enforced DEP is available.
To determine the current DEP support policy, follow these steps.
Click Start, click Run, type cmd in the Open box, and then click OK.
At the command prompt, type the following command, and then press ENTER:
wmic OS Get DataExecutionPrevention_SupportPolicy
Response table
2 | OptIn (default configuration) | Only Windows system components and services have DEP applied3 | OptOut | DEP is enabled for all processes. Administrators can manually create a list of specific applications which do not have DEP applied1 | AlwaysOn | DEP is enabled for all processes0 | AlwaysOff | DEP is not enabled for any processesref: https://support.microsoft.com/en-ie/help/912923/how-to-determine-that-hardware-dep-is-available-and-configured-on-youredit file
/etc/network/interfaces
add lines below to give static ip for each vm even after machine boot
auto enp0s8
iface enp0s8 inet static
address 192.168.56.2
netmask 255.255.255.0
Spin up 3 nodes or vms ( created Ubuntu 18 vm using spot instances )
attached IAM policy to allow create network interfaces ,
added allow all tcp rule in security group , will figure out later specific rule
install docker on each
Install Docketr https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-cache madison docker-ce
sudo apt-get install docker-ce=18.06.3~ce~3-0~ubuntu
sudo apt-get install docker-ce-cli=18.06.3~ce~3-0~ubuntu //did not work
sudo apt-get install containerd.io
----------------------------
initialize master
install kunerneters
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
set up pod network
---- set up cluster on master
# Enable net.bridge.bridge-nf-call-iptables
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# Initialize the cluster and configure kubectl
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# Install the flannel networking plugin
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml
-----------------------------------------------
result
join node 1
join node 2
Run on worker nodes
sudo kubeadm join 172.31.19.123:6443 --token rwseci.8zcosw8dkods658c --discovery-token-ca-cert-hash sha256:0fadc62d6890fc18db59ed8a23ac7e132421cfba8f3b741d219d183d4c14887f
Save access token in a file amtoken to a folder security
navigate to dir
cat ./amtoken | docker login --username <uname> --password-stdin