Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Files

Latest commit

3334c43 · Oct 9, 2018

History

History
49 lines (31 loc) · 1.79 KB

README.md

File metadata and controls

49 lines (31 loc) · 1.79 KB

Kubernetes Local Setup

If you don't have access to a running Kubernetes cluster, you can easily start a local one, on your machine.

MacOS

Start by installing kubectl, the Kubernetes CLI client, using Homebrew:

$ brew install kubernetes-cli

And then, install Kubernetes. The easiest solution is to use Docker for Mac: it contains everything needed to run a local Kubernetes cluster. You can install it with Homebrew Cask:

$ brew cask install docker

and follow the instructions on Docker's documentation to enable Kubernetes (it's just a few clicks in the Docker UI). It will also automatically setup the right "credentials" for kubectl for your local cluster.

At the end, you should be able to run the following command:

$ kubectl cluster-info

and have something like the following response:

Kubernetes master is running at https://localhost:6443
KubeDNS is running at https://localhost:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Linux

If you are using Linux, the easiest solution is to use Minikube, which "runs a single-node Kubernetes cluster inside a VM on your laptop".

You can follow the instructions on the Minikube repository to install it.

You will also need to install kubectl. Note that minikube should have already set the right "credentials" file for kubectl, you should be able to run the following command:

$ kubectl cluster-info