Set Up an Ingress Controller in OKE Cluster

Here a recipe to create a ingresscontroller.

Step 1: setting up the nginx ingress controller

kubectl apply -f

Step 2: exposing the ingress as a service of type LoadBalancer (as a public IP)

kubectl apply -f

Step 3: Execute this command several times until the external-ip appears as non <pending>, grab the IP for later testing

kubectl get svc -n ingress-nginx

Step 4: a certificate for ssl termination

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=nginxsvc/O=nginxsvc"

kubectl create secret tls tls-secret --key tls.key --cert tls.crtopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=nginxsvc/O=nginxsvc"

Step 5

kubectl create -f

Step 6: A typical hello world deployment with a pod in it and 3 replicas

kubectl create -f

Step 7: Test the url and see what happens…

That’s all folks! Hope it helps 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.