TheKoguryo's Tech Blog

Version 2023.06.19

Warning

This content has been generated by machine translation. The translations are automated and have not undergone human review or validation.

4.1.1 Installing the NGINX Ingress Controller

OKE allows you to use several open source ingress controllers available on Kubernetes. In this document, we will test the nginx-ingress-controller, which is used the most and is described as an example in the OKE document.

Install NGINX Ingress Controller

Install Ingress Controller

  1. Connect to Cloud Shell or work environment where kubectl can be used.

  2. Install NGINX Cloud Deployment with the following command

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.6.4/deploy/static/provider/cloud/deploy.yaml
    
  3. Check the installation

    You can see that it is installed in the ingress-nginx namespace as shown below.

    oke_admin@cloudshell:~ (ap-seoul-1)$ kubectl get all -n ingress-nginx
    NAME                                            READY   STATUS      RESTARTS   AGE
    pod/ingress-nginx-admission-create-x74zf        0/1     Completed   0          65s
    pod/ingress-nginx-admission-patch-f8x5k         0/1     Completed   0          65s
    pod/ingress-nginx-controller-69db7f75b4-vb84p   1/1     Running     0          65s
    
    NAME                                         TYPE           CLUSTER-IP     EXTERNAL-IP       PORT(S)                      AGE
    service/ingress-nginx-controller             LoadBalancer   10.96.212.64   132.226.225.240   80:31975/TCP,443:31756/TCP   65s
    service/ingress-nginx-controller-admission   ClusterIP      10.96.95.133   <none>            443/TCP                      65s
    
    NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/ingress-nginx-controller   1/1     1            1           65s
    
    NAME                                                  DESIRED   CURRENT   READY   AGE
    replicaset.apps/ingress-nginx-controller-69db7f75b4   1         1         1       65s
    
    NAME                                       COMPLETIONS   DURATION   AGE
    job.batch/ingress-nginx-admission-create   1/1           2s         65s
    job.batch/ingress-nginx-admission-patch    1/1           2s         65s
    

Check Load Balancer IP

  1. Check EXTERNAL-IP, which is the load balancer IP of the Ingress Controller service.

    oke_admin@cloudshell:~ (ap-seoul-1)$ kubectl get svc -n ingress-nginx
    NAME                                 TYPE           CLUSTER-IP     EXTERNAL-IP       PORT(S)                      AGE
    ingress-nginx-controller             LoadBalancer   10.96.212.64   132.226.225.240   80:31975/TCP,443:31756/TCP   5m31s
    


As an individual, this article was written with my personal time. There may be errors in the content of the article, and the opinions in the article are personal opinions.

Last updated on 20 Feb 2023