Kubernetes + vagrant + docker = HA ?

Divers

OLD STUFF, NOT FINISHED, nowdays Kubernetes has a real HA…

On your machine boot up a vagrant environment that will manage the whole operations (repeatable environment) :

now just ssh into your vagrant box (for windows user use puttygen to get a ppk file from the private key generated)
To know where everything is set-up :

Once on your vagrant machine, update your repo

Install kops

Install python and pip as amazonws client is in python

AWS client is functionnal

Go on AWS create an account if you don’t have one, then add a user named “kops” and add it into the group Administrators.
Note the id key and secret key as they will be asked now :

Go into S3 and create a bucket (mine is named xolkys-kops-state-01)
Go into Route53 and declare a subdomain, modify your DNS accordingly (mine is kubernetes.quidquid.fr)

Install kubectl

Generate a private/public key (or use one you already have) :

Now we create a cluster with a master and 2 nodes :

Nothing is done now, just a file, you can edit it :

And now we ask for real modifications :

Wait a few minutes and launch this command to see if everything is ok, you can go to your AWS console to see your EC2 instances in action :

Run a docker image in our cluster :

Open the cluster to the outside world :

Note the port and open INBOUND traffic in security group in AWS

If you want to delete everything you did (except for Route53) :

Now install docker :

Add user ubuntu into docker group :

To build an docker image :
docker build

docker run -p 3000:3000

docker ps
docker stop

login to docker
docker login

docker tag /docker-test
or
docker build -t /docker-test
docker push /docker-test

Previous
3 minutes taiga server

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.