This setup creates ec2 instance that is ready for a single node minikube installation. This can be very handy when checking something and you don't have much power on your laptop or don't want to spin up the whole cluster.
There's a Minishift version available too if you'd like to install single node OpenShift (OKD actually).
- Initialize terraform
terraform init
- Run
create.yaml
playbook (Ansible >= 2.5 required - terraform module is used)
ansible-playbook create.yaml
- Log in to your minikube your ec2 instance - use
kubeconfig.aws
file that's been generated on the server (you can findhostname interraform output
) and copied to your host. Now setKUBECONFIG
and enjoy your minikube!
export KUBECONFIG=kubeconfig.aws
kubectl cluster-info
Adding extra parameters to terraform requires re-apply and potentially will destroy your instance. It is recommended to do it before creating your minikube instance.
Just add a variable to terraform, for example to increase it to 20Gi:
echo 'root_block_size = "20"' > root-dev-ebs.auto.tfvars
Just run destroy.yaml
playbook.