Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Oracle Kubernetes Ingress Set up

The steps described in this page are based on: https://docs.cloud.oracle.com/iaas/Content/ContEng/Tasks/contengsettingupingresscontroller.htm

  1. Switch to default context (can be found by looking a KUBECONFIG file)

    kubectl config use-context context-crwmnlcmzsw
  2. Grant the Kubernetes RBAC cluster-admin clusterrole to the OCID user

    kubectl create clusterrolebinding sttc_admin --clusterrole=cluster-admin --user=ocid1.user.oc1..aaaaaaaazhci..............cxpgvrq
  3. Grant access by executing

    kubectl create -f ingress-controller-rbac.yaml
  4. Create the default backend deployment and service by executing these commands

    kubectl create -f nginx-default-backend-deployment.yaml
    kubectl create -f nginx-default-backend-service.yaml
  5. Create the Nginx ingress controller deployment and service

    kubectl create -f nginx-ingress-controller-deployment.yaml
    kubectl create -f nginx-ingress-controller-service.yaml
  6. Verify that all services are running

    kubectl get svc
  7. Create TLS secret to be used when creating ingress.yml

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

    Switch context to the one to be used for deploying

    kubectl config use-context orders

    Then run the following to create the secret

    kubectl create secret tls tls-secret --key tls.key --cert tls.crt
  8. In case you need to start over, below commands to delete the objects created

    Delete cluster role bindings and service accounts

    kubectl delete clusterrolebinding nginx-ingress-clusterrole-nisa-binding
    kubectl delete clusterrolebinding sttc_admin
    kubectl delete clusterrole nginx-ingress-clusterrole
    kubectl delete serviceaccount nginx-ingress-serviceaccount

    Delete nginx default backends

    kubectl delete deploy default-http-backend
    kubectl delete service default-http-backend

    Delete nginx controller deployment and service

    kubectl delete deploy nginx-ingress-controller
    kubectl delete service nginx-ingress-controller