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 Kubernetes Ingress Controller
Deploy the Kubernetes Ingress Controller using kubectl
:
$ kubectl create -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/v2.8.2/deploy/single/all-in-one-dbless.yaml
namespace/kong created
customresourcedefinition.apiextensions.k8s.io/ingressclassparameterses.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongclusterplugins.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongconsumers.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongingresses.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/kongplugins.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/tcpingresses.configuration.konghq.com created
customresourcedefinition.apiextensions.k8s.io/udpingresses.configuration.konghq.com created
serviceaccount/kong-serviceaccount created
role.rbac.authorization.k8s.io/kong-leader-election created
clusterrole.rbac.authorization.k8s.io/kong-ingress created
clusterrole.rbac.authorization.k8s.io/kong-ingress-gateway created
clusterrole.rbac.authorization.k8s.io/kong-ingress-knative created
rolebinding.rbac.authorization.k8s.io/kong-leader-election created
clusterrolebinding.rbac.authorization.k8s.io/kong-ingress created
clusterrolebinding.rbac.authorization.k8s.io/kong-ingress-gateway created
clusterrolebinding.rbac.authorization.k8s.io/kong-ingress-knative created
service/kong-admin created
service/kong-proxy created
service/kong-validation-webhook created
deployment.apps/ingress-kong created
deployment.apps/proxy-kong created
ingressclass.networking.k8s.io/kong created
It will take a few minutes for all containers to start and report healthy status.
Alternatively, you can use our helm chart as well:
$ 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 Kubernetes Ingress Controller, please follow our getting started tutorial to learn about how to use the Ingress Controller.