Do you usually pay to develop your Node.js app in a cluster from a cloud provider? You won't do that anymore after you see how you can develop locally in a cloud environment. You will see how using minikube can help you scale your app along with how you plan on updating apps in real time.
2. $echo `whoami`
Troy Connor
- Software Engineer @ ETA
- Tinkers with robots in JavaScript
- Helps maintain npm module N (node version manager)
- U.S. Navy veteran
troy0820troy0820 /troyconnor
7. Something that helped with that…
• Isolate apps in containers
• Package dependencies in your
application
• Run, build, ship anywhere
• Great developer experience
• No more “It works on my
machine"
8. But wait my workflow is …
•Make app
•Blame it on DevOps
•Profit!
10. But there is a new problem
•Build your app
•Runs local and integration tests
•Ops team uses build tool to publish new docker
image
•Ops team comes back and tells you it doesn’t work
Your docker workflow may look like
You run this workflow until
12. Ok let’s control our containers
Kubernetes (k8s) is an open-source
system for automating deployment,
scaling, and management of
containerized applications.
13. But there’s one problem
•Difficult to set up
– kube-up.sh (deprecated)
– kops
– kube-aws (CoreOS)
– GKE (set up when provisioning cluster)
•Commitment to cloud provider
– Google Cloud
– AWS
14. What about local development?
I can use docker locally.
Is there a way to do Kubernetes
locally?
18. Minikube
• Single-node Kubernetes cluster
inside a VM on your computer
• Allows you to use kubectl to access
cluster for development purposes
• Test strategies on you computer
instead of in the cloud
Minikube is a tool that makes it easy to run Kubernetes locally
https://github.com/kubernetes/minikube
19. What you will need to run minikube
• kubectl
– https://kubernetes.io/docs/tasks/tools/install-kubectl/
• macOS
– xhyve driver, VirtualBox or VMware Fusion
• Linux
– VirtualBox or KVM
• Windows
– VirtualBox or Hyper-V
• VT-x/AMD-v virtualization must be enabled in BIOS
• Internet connection on first run
20. Installing minikube
•macOS
– brew install minikube
•Linux
– curl -Lo minikube https://storage.googleapis.com/
minikube/releases/latest/minikube-linux-amd64 &&
chmod +x minikube && sudo mv minikube /usr/local/
bin
•Windows
– https://storage.googleapis.com/minikube/releases/
latest/minikube-windows-amd64.exe
– rename file to minikube.exe and add it to your path
21. What Minikube can’t do
• It can’t expose your application on type LoadBalancer
– Kubernetes allows you to do this with the cloud
provider but not locally, so you must expose your
application with NODEPORT
• It can not help you convince your boss that you need a raise
because of your new devOPS skills
• Use upgraded docker version outside of what minikube
provides version 0.18 uses docker version 1.11
22. How is this any different from….?
You are executing real commands that work in the cloud
23. Project that I am working with
Fixit California
https://github.com/troy0820/fixit-cali
24. Demo time
•Using local docker images to use in your Minikube cluster
•Deploying those local images to your Minikube cluster
•Making replicaSets, healthChecks, autoscaling,
dashboard, minikube services
•Using Ingress to expose multiple applications without
using multiple LoadBalancers, in our case NODEPORTS
25. Demo time
This is what I did before we start this demo….
• I’m using minikube version 0.18
• minikube start
• minikube docker-env
• eval $(minikube docker-env)
• Downloaded images that I need ahead of time