openssl x509 -in nginx-repo.crt -noout -text
What’s this
F5 Nginx Plus Ingress Controller.
Installation
Image Building
F5 Nginx Plus Ingress Controller need build from source code.
Refer to https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/ for building the Ingress Controller Image.
A valid license is necessary for image buliding, apply a Nginx plus envaluation license to start image building.
Installing
Refer to https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests to install Nginx Plus Ingress Controller.
1.9.0
-
下载 - test.yml
kubectl apply -f nginx-plus-1.9.0.yaml
kubectl apply -f nginx-plus-nap-1.9.0.yaml
kubectl apply -f test.yml
$ kubectl get svc nginx-ingress-test -n nginx-ingress --no-headers
nginx-ingress-test NodePort 10.100.246.1 <none> 80:31803/TCP,443:32164/TCP,8898:30702/TCP 25m
$ curl --resolve nginxtest.example.com:31803:192.168.5.30 http://nginxtest.example.com:31803/coffee
Server address: 10.244.2.8:8080
Server name: coffee-688fbd68f8-dvwh6
Date: 13/Nov/2020:04:45:42 +0000
URI: /coffee
Request ID: 1adf9cb667016bfcb9e2ff02da1a9e68
1.8.1
git clone https://github.com/nginxinc/kubernetes-ingress/
cd kubernetes-ingress/deployments
git checkout v1.8.1
kubectl apply -f common/ns-and-sa.yaml
kubectl apply -f rbac/rbac.yaml
kubectl apply -f rbac/ap-rbac.yaml
kubectl apply -f common/default-server-secret.yaml
kubectl apply -f common/nginx-config.yaml
kubectl apply -f common/vs-definition.yaml
kubectl apply -f common/vsr-definition.yaml
kubectl apply -f common/ts-definition.yaml
kubectl apply -f common/policy-definition.yaml
kubectl apply -f common/gc-definition.yaml
kubectl apply -f common/global-configuration.yaml
kubectl apply -f common/ap-logconf-definition.yaml
kubectl apply -f common/ap-policy-definition.yaml
kubectl apply -f deployment/nginx-plus-ingress.yaml
Note
|
Modify the deployment/nginx-plus-ingress.yaml file to change the image name is necessary before execute deploying.
|
kubectl get pods -n nginx-ingress
Exposing to F5
F5 Virtual Server provide a public IP used as unified enterence for Nginx Plus Ingress Controller.
1. Setup F5 CIS
Refer to 链接 to set up F5 CIS.
2. Expose to F5
-
下载 - expose-to-f5.yaml
kubectl apply -f expose-to-f5.yaml
3. Verify the installation
From the F5 UI, check the Virtual Server and referenced Pool member:
-
192.168.8.30:80
- is the public IP and Port used to access the Nginx Plus ingress controller -
10.244.2.29:80
- is the container IP and Port exposed by Nginx Plus ingress controller Pod.
Coffee Tea Example
This section will deploy the Coffee Tea Example to the environment installed above.
git clone https://github.com/cloudadc/container-ingress.git
cd container-ingress/nginx-plus-ingress/coffee-tea/
kubectl apply -f cafe.yaml
kubectl create -f cafe-ingress.yaml
$ curl http://cafe.example.com/coffee
Server address: 10.244.2.221:8080
Server name: coffee-67c6f7c5fd-thlc8
Date: 11/Jul/2020:17:31:26 +0000
URI: /coffee
Request ID: 49b7f783e298387eaeed05f8e493b583
$ curl http://cafe.example.com/tea
Server address: 10.244.1.5:8080
Server name: tea-7df475c6-nbdrs
Date: 11/Jul/2020:17:31:33 +0000
URI: /tea
Request ID: d8344e70dfe8627d67a136c701851573