You are browsing documentation for an outdated version. See the latest documentation here.
Kong Ingress on Minikube
Setup Minikube
-
Install
minikube
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
-
Start
minikube
minikube start
It will take a few minutes to get all resources provisioned.
kubectl get nodes
Deploy the Kong Ingress Controller
Deploy the Kong Ingress Controller using kubectl
:
$ kubectl create -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/v1.1.1/deploy/single/all-in-one-dbless.yaml
namespace/kong created
customresourcedefinition.apiextensions.k8s.io/kongplugins.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongconsumers.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongcredentials.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongingresses.configuration.konghq.com created
serviceaccount/kong-serviceaccount created
clusterrole.rbac.authorization.k8s.io/kong-ingress-clusterrole created
clusterrolebinding.rbac.authorization.k8s.io/kong-ingress-clusterrole-nisa-binding created
configmap/kong-server-blocks created
service/kong-proxy created
service/kong-validation-webhook created
deployment.extensions/kong created
Alternatively, you can use our helm chart as well. Please ensure that you’ve Tiller working and then execute:
$ helm repo add kong https://charts.konghq.com
$ helm repo update
# Helm 3
$ helm install kong/kong --generate-name --set ingressController.installCRDs=false
Note: this process could take up to five minutes the first time.
Setup environment variables
Next, we will setup an environment variable with the IP address at which Kong is accessible. This will be used to actually send requests into the Kubernetes cluster.
$ export PROXY_IP=$(minikube service -n kong kong-proxy --url | head -1)
# If installed by helm, service name would be "<release-name>-kong-proxy".
# $ export PROXY_IP=$(minikube service <release-name>-kong-proxy --url | head -1)
$ echo $PROXY_IP
http://192.168.99.100:32728
Once you’ve installed the Kong Ingress Controller, please follow our getting started tutorial to learn about how to use the Ingress Controller.