织梦CMS - 轻松建站从此开始!

abg欧博官网|登陆|游戏|

Ingress controller does not allow snippets

时间:2025-08-21 00:04来源: 作者:admin 点击: 3 次
If you need just a temporary solution to patch your ingress, try this: Get the config map related to your ingress controller $ kubectl get -A cm | gr

If you need just a temporary solution to patch your ingress, try this:

Get the config map related to your ingress controller

$ kubectl get -A cm | grep ingress | grep controller kube-system rke2-ingress-nginx-controller 1 377d

Edit the config map by changing allow-snippet-annotations: "false" to allow-snippet-annotations: "true"

$ kubectl -n kube-system edit cm rke2-ingress-nginx-controller "/tmp/kubectl-edit-1940673600.yaml" 25L, 910C written configmap/rke2-ingress-nginx-controller edited

Retart the controller

$ k -n kube-system rollout restart ds rke2-ingress-nginx-controller daemonset.apps/rke2-ingress-nginx-controller restarted

If you want to see the rollout, do

kubectl -n kube-system rollout status ds rke2-ingress-nginx-controller Waiting for daemon set "rke2-ingress-nginx-controller" rollout to finish: 0 out of 17 new pods have been updated... Waiting for daemon set "rke2-ingress-nginx-controller" rollout to finish: 1 out of 17 new pods have been updated... [...] daemon set "rke2-ingress-nginx-controller" successfully rolled out

After you patch your ingress, I suggest to revert the changes, so you'll not be vulnerable by some bad user by adding something that shouldn't be on ingress by patching it.

(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-08-23 17:08 最后登录:2025-08-23 17:08
栏目列表
推荐内容