Skip to content

jugatsu/kubernates-the-hard-way-using-only-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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.

Pre-Requirements

Generate ssh keys:

ssh-keygen -f ./files/ssh/k8s_the_hard_way -P "" -C k8s

Configure ansible GCE modules

Copy example gce configuration:

cp .env.gce.example .env.gce

Edit according to your environment and then export all variables:

export $(cat .env.gce)

Provision GCE infrastructure

ansible-playbook playbook.yml --tags infra

Configure ansible GCE dynamic inventory

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

Run ansible playbook for bringing up the Kubernetes cluster:

ansible-playbook playbook.yml

Verify that cluster is working

kubectl get cs
kubectl get no

Cleanup

ansible-playbook 14-cleanup.yml
kubectl config delete-context kubernetes-the-hard-way
kubectl config delete-cluster kubernetes-the-hard-way

About

Kubernetes The Hard Way using only ansible. No bash scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages