Kubernetes - LePingu/umla_project GitHub Wiki

Pre-requisites

  • Define the deployment model and the containers to deploy
    • docker compose can be converted thanks to the kompose tool
    • simple kubernetes can be deployed via kops on an AWS instance
  • Install kubectl

SSH

To Ensure the SSH public keys are stored in a file called id_rsa, run the ssh-keygen in the console It can also be contained in the authorised_keys file which would then need to be copied in a id_rsa.

Tools for YAML Manifest creation

Kompose

Kompose lets you create yaml manifest files for Kubernetes once the Docker-compose file is set

  • Make sure the ports are written in full digits and no references are left behind

AWS set up of cluster

Create a cluster

kops create cluster --state "s3://cluster_name.my_dns.fr" --zones "zone1,zone2" --master-count 3 --master-size=t2.micro --node-count 2 --node-size=t2.micro --name my_name.fr --yes

The --yes flag specifies the deployment right after the creation of the cluster

Validation of cluster

Once it is created, it is possible best practice to verity the validity of the clusters with the following kops validate cluster --state "s3://cluster_name.my_dns.fr" --name my_name.fr`

Observe nodes created

kubectl get nodes

Delete the cluster created

kops delete cluster --name umla.fr --state "s3://umla-cluster.umla.fr" --yes