Image source: Bridge to Kubernetes
  • Python 3
  • VS Code
  • Python extension for VS Code
  • Remote -SSH (VS Code extension)
  • Bridge to Kubernetes (VS Code extension)
  • Kubectl binary (Docker installs this by default so you may already have it. If not VS Code will prompt you to download it)
  • Log into your new instance through VS Code via Remote SSH using your ssh key (if you use a .ssh folder with a config file, make sure to update the config file with the instance’s IP and key information)
  • Open a terminal on the ec2 instance in VS Code
  • sudo apt-get install -y socat
  • sudo apt-get update && \
  • sudo apt-get install -y
  • sudo groupadd docker
  • sudo usermod -aG docker $USER
  • newgrp docker
  • Install conntrack ( needed for minikube )
  • sudo apt install conntrack
  • cd <path to the chassis git clone repo>/service
  • docker build -t chassis-image:latest .
  • minikube start — vm-driver=none — apiserver-ips=<EC2 IP Address>
  • cd <path the chassis git clone>/chassis-dev-charts
  • helm install chassis .
  • kubectl get all
  • you should see chassis in pods, services, and deployments
Image courtesy of author.
  • minikube addons enable ingress
  • kubectl expose deployment chassis — type=NodePort — port=5000
    the port is assigned based upon the needs of the container. 5000 is the default port for flask which is the webserver that Chassis leverages.
  • kubectl get services
Image courtesy of author.
  • Update the EC2 security group to include the ingress port number
Image courtesy of author.
  • curl <ec2 IP address>:<ingress port> (e.g. curl
  • chassis returns “Alive!” by default so you should see this
Image courtesy of author.
  • ~/.kube/config
  • certificate-authority: /home/ubuntu/.minikube/ca.crt
  • client-certificate: /home/ubuntu/.minikube/profiles/minikube/client.crt
  • client-key: /home/ubuntu/.minikube/profiles/minikube/client.key
  • C:\Users\******\deleteables\b2k
Image courtesy of author.
Image courtesy of author.
  • python3 -m venv /path/to/VIRTUAL_ENVIRON_NAME
  • press “F1” start typing “Python: Select Interpreter”
  • cd <chassis install location>/service
  • pip install -r requirements.txt
  • Open the file in the repo and place a break point at the “/health” route.
Image courtesy of author.
Image courtesy of author.
  • Specify the full path to your app so there is no confusion (a relative path to is the default)
  • Mine was “C:\Users\******\Documents\Modzy\Data Science\Code\chassis\service\
  • When you do, VSCode will turn orange at the bottom.
  • The breakpoint you set should catch like this
Image courtesy of author.
  • In VS Code, select the Bridge to Kubernetes plug-in
  • Click the ellipses next to “Clusters,” and select “set Kubeconfig”
Image courtesy of author.
  • Use the explorer to find the config file you downloaded and altered from the EC2 minikube cluster
  • A blue line will move under clusters and finally “minikube“ will appear underneath
  • Open task.json in the .vscode directory hosting the launch.json file.
  • Change “useKubernetesServiceEnvironmentVariables” from “false” to “true”
  • Save the task.json file
  • From the debug menu, select the launch configuration that has the word “Kubernetes” in its name. Click play
Image courtesy of author.
  • In your web browser, go to “<ec2 ip address>:<ingress port>/health;” you will hit the break point that we set earlier when we were debugging locally