{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Welcome \u00b6 This is the documentation for the NGINX Ingress Controller. It is built around the Kubernetes Ingress resource , using a ConfigMap to store the NGINX configuration. Learn more about using Ingress on k8s.io . Getting Started \u00b6 See Deployment for a whirlwind tour that will get you started.","title":"Welcome"},{"location":"#welcome","text":"This is the documentation for the NGINX Ingress Controller. It is built around the Kubernetes Ingress resource , using a ConfigMap to store the NGINX configuration. Learn more about using Ingress on k8s.io .","title":"Welcome"},{"location":"#getting-started","text":"See Deployment for a whirlwind tour that will get you started.","title":"Getting Started"},{"location":"development/","text":"Developing for NGINX Ingress Controller \u00b6 This document explains how to get started with developing for NGINX Ingress controller. It includes how to build, test, and release ingress controllers. Quick Start \u00b6 Getting the code \u00b6 The code must be checked out as a subdirectory of k8s.io, and not github.com. mkdir -p $GOPATH/src/k8s.io cd $GOPATH/src/k8s.io # Replace \"$YOUR_GITHUB_USERNAME\" below with your github username git clone https://github.com/$YOUR_GITHUB_USERNAME/ingress-nginx.git cd ingress-nginx Initial developer environment build \u00b6 Ensure docker experimental features option is enabled for buildx $ make dev-env Updating the deployment \u00b6 The nginx controller container image can be rebuilt using: $ ARCH=amd64 TAG=dev REGISTRY=$USER/ingress-controller make build container The image will only be used by pods created after the rebuild. To delete old pods which will cause new ones to spin up: $ kubectl get pods -n ingress-nginx $ kubectl delete pod -n ingress-nginx nginx-ingress-controller-<unique-pod-id> Dependencies \u00b6 The build uses dependencies in the vendor directory, which must be installed before building a binary/image. Occasionally, you might need to update the dependencies. This guide requires you to install go 1.13 or newer. This will automatically save the dependencies to the vendor/ directory. $ go get $ make dep-ensure Building \u00b6 All ingress controllers are built through a Makefile. Depending on your requirements you can build a raw server binary, a local container image, or push an image to a remote repository. In order to use your local Docker, you may need to set the following environment variables: # \"gcloud docker\" ( default ) or \"docker\" $ export DOCKER = <docker> # \"quay.io/kubernetes-ingress-controller\" ( default ) , \"index.docker.io\",oryourownregistry$exportREGISTRY=<your-docker-registry>Tofindtheregistrysimplyrun:dockersysteminfo|grepRegistryBuildingthee2etestimage\u00b6Thee2etestimagecanalsobebuiltthroughtheMakefile.$makee2e-test-imageYoucanthenmakethisimageavailableonyourminikubehostbyexportingtheimageandloadingitwiththeminikubedockercontext:$dockersavenginx-ingress-controller:e2e|(eval$(minikubedocker-env)&&dockerload)NginxController\u00b6Buildarawserverbinary$makebuildTODO:addmorespecificinstructionsneededforrawserverbinary.Buildalocalcontainerimage$TAG=<tag>REGISTRY=$USER/ingress-controllermakecontainerPushthecontainerimagetoaremoterepository$TAG=<tag>REGISTRY=$USER/ingress-controllermakepushDeploying\u00b6Thereareseveralwaystodeploytheingresscontrollerontoacluster.PleasecheckthedeploymentguideTesting\u00b6Torununit-tests,justrun$cd$GOPATH/src/k8s.io/ingress-nginx$maketestIfyouhaveaccesstoaKubernetescluster,youcanalsorune2etestsusingginkgo.$cd$GOPATH/src/k8s.io/ingress-nginx$makee2e-testNOTE:ifyoure2epodkeepshanginginanImagePullBackoff,makesureyou'vemadeyoure2enginx-ingress-controllerimageavailabletominikubeasexplainedintheBuildingthee2etestimagesectionTorununit-testsforluacodelocal