Skip to main content

Setup Minikube on AWS EC2 Instance

Published 1 min readMarkdown
Setup Minikube on AWS EC2 Instance
  • Connect to your AWS EC2 instance using SSH.

  • Update the instance packages.

  •   sudo apt update
    
  • Install Docker

  •   sudo apt -y install docker.io
    
  • Install Minikube and conntrack

  •   curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
      curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
      apt install conntrack
    
  • add the current user to the docker group and start a new shell with the updated group membership.

  •   sudo usermod -aG docker $USER && newgrp docker
    
  • Start Minikube

  •   minikube start --driver=docker
    

Complete Script

  • You can also run this script directly if you want :

  •   #!/bin/bash
      sudo su
      apt update
      apt -y install docker.io
      curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
      curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
      apt install conntrack
      usermod -aG docker $USER && newgrp docker
    

About the author

  • Hello! My name is Tushar and I'm a passionate Developer from India with a strong interest in Cloud-Native technologies. I mostly work on backend development, automating and optimizing critical deployments using various development and Cloud-Native technologies.

More from this blog