This project is to quickly create a K8s cluster on local machine with Minikube.
Note: This instruction is on Mac OS
client/
: A copy of React Minimal Boilerplateserver/
: Simple Node Restful API
- Homebrew installed
- Hypervisor installed (Virtualbox, Hyperkit, etc.)
-
Install
kubectl
andHyperkit
withHomebrew
brew install kubernetes-cli hyperkit && kubectl version
-
Install Minikube with
Homebrew
brew cask install minikube
-
Set Minikube driver to
Hyperkit
(default isVirtualbox
)
minikube config set vm-driver hyperkit
-
Create a Minikube node and enable Ingress
minikube start
-
Enable Ingress Add-on for Minikube
minikube addons enable ingress
-
Clone this repo
git clone git@github.com:turbothinh/K8s-with-Minikube.git && cd K8s-with-Minikube
-
Create objects in the cluster
kubectl apply -f k8s
-
Enable Ingress-nginx service
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
-
Check if everything is working correctly using Minikube dashboard
minikube dashboard
-
Connect to the exposed services:
client
andserver
- First get Minikube IP by running
minikube ip
- Copy the IP and paste to browser to visit
client
- Append
/api
to the IP on browser to visitserver
- First get Minikube IP by running
Walla!