DEV Community

Pierangelo
Pierangelo

Posted on

2

Install Minikube and Kubernetes on ubuntu 18

Minikube is a tool that allow you to run Kubernetes locally, running a single-node Kubernetes cluster inside a VM on your local machine.It's the ideal tool for move the firsts step into the wide world of Kubernetes.

Install Minikube:

Before to install minikube you need to install an Hypervisor, in my case i will install Virtualbox.

download and install with curl:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.30.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
Enter fullscreen mode Exit fullscreen mode

Install kubectl

kubectl is the Kubernetes command-line tool to deploy and manage applications on Kubernetes.

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
Enter fullscreen mode Exit fullscreen mode

Make the kubectl binary executable.

chmod +x ./kubectl
Enter fullscreen mode Exit fullscreen mode

Move into the path:

sudo mv ./kubectl /usr/local/bin/kubectl
Enter fullscreen mode Exit fullscreen mode

Test minikube and Kubectl:

start minikube:

minikube start
Enter fullscreen mode Exit fullscreen mode

check if minikube running:

minikube status
Enter fullscreen mode Exit fullscreen mode

create a pods on minikube with kubectl:

kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
Enter fullscreen mode Exit fullscreen mode

expose the pods:

kubectl expose deployment hello-minikube --type=NodePort
Enter fullscreen mode Exit fullscreen mode

get the url:

minikube service hello-minikube --url
Enter fullscreen mode Exit fullscreen mode

stop minikube:

minikube stop
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay