Introduction
This is demo of a basic deployment helloworld app on kubernetes.
To start type
vagrant up
The ansible task “start minikube” sometimes fails the first time you run it. To resolve this run vagrant ssh
in to the vagrant box run and run minikube start
The helloworld kubernetes service can’t find port 80. Ideally I would like helloworld viewable form outside the VM on 192.168.33.22 However it is view from inside vagrant curl http://192.168.49.2:32080
I shouldn’t have used minikube. This is a quick and easy tool to get started on kubernetes on your local computer. I thought this might save me time, as I’m a beginner to kubernetes. However this caused all sorts of issues, like the one I have when I Ansible for this first time.
This is the approach I should have taken with two VM a master and a node. https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/
I used a folk of a nginx hello world container in order to save fime. I would like to maybe do it again using my own docker image.
https://github.com/martinwrightgithub/docker-helloworld
I should consider creating a full ansible project, rather then a single playbook file. This would allow it broken down into different roles and hosts, and would make it easier to manage when the applications grows to include to new features.
I should maybe consider downloading minikube to a /tmp to directory rather then vagrants home directory, to keep the home directory tidy.
I should maybe double check to make sure I’m using the correct permissions for files and directory.