Minikube workstation - Set up to be able to run locally or to launch it quickly in AWS to try Kubernetes.
- PS: These package are required to execute this tests.
- packer
- terraform
- jq
- Clone repo
git clone
- Start Vagrant Machine
vagrant up
- SSH into Vagrant
vagrant ssh
- Start minikube
minikube start
$
local shell
~$
inside and SSH session
The Vagrantfile
is set up to run VirtualBox as the Vagrant provider and Ubuntu 16.04.
Execute ./local-start.sh
.
This script creates the SSH keys, start the vagrant machine, and start an SSH session into the Vagrant enviorement.
Start Minikube and make sure it's running
~$ sudo minikube start --vm-driver=none
~$ sudo minikube status
Minikube is forced to run with --vm-driver=none
and sudo
due to a VirtualBox limitation.
Stop Minikube and logout from the Vagrant machine.
~$ sudo minikube stop
~$ logout
If all the testing is done, you can proceed to destroy the Vagrant machine by running in your machine.
$ vagrant destroy
- Create new IAM using Packer and new EC2 with Terraform
- 1: Edit the aws.properties file and put the information about your AWS VPC and Subnet, example:
REGION="us-east-1" VPC_ID="vpc-1c44e464" SUBNET_ID="subnet-b81cf797" BASE_AMI="ami-80861296"
- 2: Execute ./start.sh This script make the sed command on Packer template and terraform variables changing the many parameters.
- To access the instance and test k8s command use the new script: ssh-connection.sh
- cd terraform/instance/ && terraform destroy -force