文章目录
前言
最近要求使用operator方式自定义部署nginx-ingress-controller,网上没有案例,这里对自己部署步骤做个记录
一、环境介绍
系统环境:Centos7.9
nginx-ingress-operator:nginx-ingress-helm-operator:v1.2.0
ingress-controller:2.4.1-ubi
nginx-ingress-controller官网:https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-operator/
项目地址:https://github.com/nginxinc/nginx-ingress-helm-operator
对应关系如下:
二、部署步骤
1.使用官方文档部署operator
git clone https://github.com/nginxinc/nginx-ingress-helm-operator/
cd nginx-ingress-helm-operator/
git checkout v1.2.0
make deploy IMG=nginx/nginx-ingress-operator:1.2.0
查看部署结果:
kubectl get deployments -n nginx-ingress-operator-system
NAME READY UP-TO-DATE AVAILABLE AGE
nginx-ingress-operator-controller-manager 1/1 1 1 15s
2.使用自定义资源部署controller
官方资源地址:https://github.com/nginxinc/nginx-ingress-helm-operator/blob/v1.2.0/docs/nginx-ingress-controller.md
可根据官方资源文档自定义需要的配置,我的配置如下(根据官方地址自己添加并修改配置,不配置的默认为默认值)
前提:提前创建namespace和secret(operater目录下都有:nginx-ingress-helm-operator/examples)
apiVersion</