This repo installs 3 node Kubernetes cluster on AWS with 1 master and 2 worker
./packages.sh
python3 -m venv ansible source /root/aws-ansible/ansible/bin/activate pip install pip --upgrade pip install boto pip install boto3 pip install ansible
aws configure OR EXPORT AWS_KEY_ID = XXXXXXXXXXXXX EXPORT AWS_SECRET_KEY =XXXXXXXXXX
ansible-playbook -i inventory create-infra.yml
ansible -i ec2-k8.py worker --list | grep -v hosts > files/hosts ansible -i ec2-k8.py master --list | grep -v hosts >> files/hosts
export KUBE_API_SERVER_IP=ansible -i ec2-k8.py master --list | grep -v hosts | head -1 | awk '{print $1}'
sed -ir "s/kube_api_server: ChangeMe/kube_api_server:
cat files/hosts >> distribute-key.yml
ansible-playbook -i inventory distribute-key.yml
ansible -m ping -i ec2-k8.py master ansible -m ping -i ec2-k8.py worker
ansible-playbook -i ec2-k8.py configue-ubuntu-infra.yml
ansible-playbook -v -i ec2-k8.py deploy-k8-ubuntu.yml
ansible -m shell -a "kubectl get no" -i ec2-k8.py master --become
ansible-playbook -v -i ec2-k8.py
ansible -m shell -a "kubectl get no" -i ec2-k8.py master --become ansible -m shell -a "kubectl get po --all-namespaces" -i ec2-k8.py master --become