This repository contains ansible playbooks for automating all steps of Kubernetes The Hard Way tutorial.
Install and configure The Google Cloud SDK https://cloud.google.com/sdk/downloads.
Generate ssh keys:
ssh-keygen -f ./files/ssh/k8s_the_hard_way -P "" -C k8s
Copy example gce configuration:
cp .env.gce.example .env.gce
Edit according to your environment and then export all variables:
export $(cat .env.gce)
ansible-playbook playbook.yml --tags infra
Copy example gce.ini
file:
cp ./inventory/gce.ini.example ./inventory/gce.ini
Edit according to your environment and then check that dynamic inventory is configured properly:
ansible -m ping all
For full documentation see http://docs.ansible.com/ansible/latest/guide_gce.html
ansible-playbook playbook.yml
kubectl get cs
kubectl get no
ansible-playbook 14-cleanup.yml
kubectl config delete-context kubernetes-the-hard-way
kubectl config delete-cluster kubernetes-the-hard-way