修改和新增
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2025-12-23 01:53:01 +08:00
parent 89a07bc062
commit b44594def6
17 changed files with 922 additions and 110 deletions

View File

@@ -18,58 +18,13 @@
helm repo update
```
2. 编写模版文件
2. 下载模版文件
```bash
vi ingress-values.yaml
wget https://gitee.com/offends/Kubernetes/raw/main/File/Yaml/ingress-values-hostnetwork.yaml
```
内容如下
```yaml
controller:
# 开启监控
metrics:
enabled: true
serviceMonitor:
enabled: true
# 配置镜像加速
image:
registry: k8s.mirror.nju.edu.cn
# 使用主机网络时,利用 Kubernetes 集群内的 DNS 解析服务
dnsPolicy: ClusterFirstWithHostNet
# 使用本地网络
hostNetwork: true
# Pod 使用 DaemonSet 方式运行
kind: DaemonSet
# 只允许调度到具有 ingress="true" 的节点上,[ kubectl label node xxx ingress="true" ]
nodeSelector:
kubernetes.io/os: linux
ingress: "true"
# 禁用后状态字段会报告 Ingress 控制器 Pod 所在节点的 IP 地址或节点列表的 IP 地址
publishService:
enabled: false
# 启用 Kubernetes Service
service:
enabled: false
# 配置镜像加速
admissionWebhooks:
patch:
image:
registry: k8s.mirror.nju.edu.cn
# 设置为集群默认 ingress 控制器
ingressClassResource:
default: true
```
**修改参数并保存**
3. 配置节点标签
@@ -82,7 +37,7 @@
```bash
helm install ingress-nginx \
ingress-nginx/ingress-nginx \
-f ingress-values.yaml
-f ingress-values-hostnetwork.yaml
```
## 卸载