- Linux or MacOS
- Docker Engine
- Minikube
- Kubectl
- Skaffold
- Clone this repository
git clone https://github.com/charisschomba/setup-kubernetes-localhost.git
- Setup kubernetes cluster.
minikube start --profile custom
skaffold config set --global local-cluster true
eval $(minikube -p custom docker-env)
-
For linux users start minikube with kvm driver
minikube start --driver=kvm2 --profile custom
skaffold config set --global local-cluster true
eval $(minikube -p custom docker-env)
-
Navigate to
setup-kubernetes-localhost
and runskaffold dev
to configure deployments, pods and service in the kubernetes cluster. -
Edit hosts file to redirect posts.com to minikube ip.
-
First get minikube ip by running
minikube ip
-
Enable ingress controller.
minikube addons enable ingress
-
Add this
[Minikube ip] posts.com
-
Open hosts file,
sudo nano /etc/hosts
-
Add this
[Minikube ip] posts.com
- Navigate to the browser navigate to
posts.com
- Navigate to the browser navigate to