Open Sanjay-George opened 2 years ago
kubespray: ansible playbooks, need python to execute ansible. Terraform module only for AWS π. But GCP is supported with python π
kubespray ansible book failing randomly. Issue raised here: https://github.com/Sanjay-George/nick-name-generator/issues/4)
Installing kubernetes with kubespray
Quickstart setup using kubespray on GCP
1. Install ansible π
Installation guide
Issue #1 with ansible not working from cmd line -> reinstall python with defaults
Issue #2 some π© not available
[x] Install ansible on WSL instead.
[x] Install terraform on WSL
[x] Set up virtual env guide and install all deps inside
[x] Install specific version of ansible as mentioned in requirements.txt
2. Setup dev environment on ubuntu WSL
[x] Git - ssh, push / pull, etc..
Facing issue with pushing even after setting up SSH. Find solution here:
[x] AWS credentials - stored here: $HOME/.aws/credentials
$HOME/.aws/credentials
[x] nano editor
[ ] kubectl CLI
3. Run Terraform to provision the cluster
[x] make necessary changes to access_key, region, secret_key, ssh_key etc..
[x] Remove creation of IAM role. Just use the existing LabRole and LabInstanceProfile
Note: Once tf runs, it creates the inventory file for ansible playbook. Check here
4. Run ansible playbooks to set up k8 on the already-provisioned cluster
4a. Figure out way to pass in the key through CLI instead of inventory
ansible-playbook -b -v -i inventory/hosts cluster.yml -u admin --private-key=~/.ssh/vockey
private_key_file=~/.ssh/id_rsa_sbexx remote_user=core
5. Check kube cluster status
kubespray: ansible playbooks, need python to execute ansible. Terraform module only for AWS π. But GCP is supported with python π
Blocker
kubespray ansible book failing randomly. Issue raised here: https://github.com/Sanjay-George/nick-name-generator/issues/4)
Articles
Installing kubernetes with kubespray
Quickstart setup using kubespray on GCP
Steps followed
1. Install ansible π
Installation guide
Issue #1 with ansible not working from cmd line -> reinstall python with defaults
Issue #2 some π© not available
[x] Install ansible on WSL instead.
[x] Install terraform on WSL
[x] Set up virtual env guide and install all deps inside
[x] Install specific version of ansible as mentioned in requirements.txt
2. Setup dev environment on ubuntu WSL
[x] Git - ssh, push / pull, etc..
Facing issue with pushing even after setting up SSH. Find solution here:
[x] AWS credentials - stored here:
$HOME/.aws/credentials
[x] nano editor
[ ] kubectl CLI
3. Run Terraform to provision the cluster
[x] make necessary changes to access_key, region, secret_key, ssh_key etc..
[x] Remove creation of IAM role. Just use the existing LabRole and LabInstanceProfile
Note: Once tf runs, it creates the inventory file for ansible playbook. Check here
4. Run ansible playbooks to set up k8 on the already-provisioned cluster
4a. Figure out way to pass in the key through CLI instead of inventory
ansible-playbook -b -v -i inventory/hosts cluster.yml -u admin --private-key=~/.ssh/vockey
5. Check kube cluster status