使用 Helm 部署 Ingress-controler 失败

发布于 2025-01-09 02:06:22 字数 2395 浏览 1 评论 0原文

我尝试使用 Helm 在 Kubernetes 集群上安装入口控制器。安装失败,并在相应的 Pod 上显示以下日志:

{
  "err": "Get \"https://10.96.0.1:443/api/v1/namespaces/ingress-nginx/secrets/ingress-nginx-admission\": dial tcp 10.96.0.1:443: i/o timeout",
  "level": "fatal",
  "msg": "error getting secret",
  "source": "k8s/k8s.go:232",
  "time": "2022-02-22T10:47:49Z"
}

Pod 控制台显示以下错误:

OCI 运行时执行失败:执行失败:container_linux.go:380: 启动容器进程导致:执行:“sh”:可执行文件file not find in $PATH: unk

因此 ingress-Pod 会在几秒钟后停止并出现上述错误。

这是我的节点的描述:

NAMESPACE   NAME              STATUS   ROLES                  AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KER               NEL-VERSION      CONTAINER-RUNTIME
            node/kubemaster   Ready    control-plane,master   121d   v1.22.2   192.168.1.38   <none>        Ubuntu 20.04.3 LTS   5.4               .0-100-generic   docker://20.10.7
            node/kubenode     Ready    <none>                 87d    v1.22.4   192.168.1.39   <none>        Ubuntu 20.04 LTS     5.4               .0-94-generic    docker://20.10.7`

和服务:

NAMESPACE     NAME                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes          ClusterIP   10.96.0.1      <none>        443/TCP                  121d
default       nextcloud-service   ClusterIP   10.98.154.93   <none>        82/TCP                   13d
kube-system   kube-dns            ClusterIP   10.96.0.10     <none>        53/UDP,53/TCP,9153/TCP   120d

我如何调试它?缺少什么样的秘密?

更新: 我使用此描述进行部署:

https:// /computingforgeeks.com/deploy-nginx-ingress-controller-on-kubernetes-using-helm-chart/选项2:使用Helm安装Nginx Ingress Controller Kubernetes开始

所以最终的命令是:

kubectl create namespace ingress-nginx

然后;

helm install -n ingress-nginx ingress-nginx  -f values.yaml . 

与values.yaml中的相应值

更新2: 当我列出所有秘密时,我只看到这个秘密:

ingress-nginx-admission-token-gbldb

这当然不同于..:

ingress-nginx-admission

这可能是原因吗?我可以在deployment.yaml中更改secret的名称吗?

I tried to install an Ingress-controler on my Kubernetes Cluster with Helm. The installation failed with the following log on the corresponding Pod:

{
  "err": "Get \"https://10.96.0.1:443/api/v1/namespaces/ingress-nginx/secrets/ingress-nginx-admission\": dial tcp 10.96.0.1:443: i/o timeout",
  "level": "fatal",
  "msg": "error getting secret",
  "source": "k8s/k8s.go:232",
  "time": "2022-02-22T10:47:49Z"
}

The Pod-console shows the following error:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "sh": executable file not found in $PATH: unk

So the ingress-Pod stops after a few seconds with the error above.

Here is a description of my nodes:

NAMESPACE   NAME              STATUS   ROLES                  AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KER               NEL-VERSION      CONTAINER-RUNTIME
            node/kubemaster   Ready    control-plane,master   121d   v1.22.2   192.168.1.38   <none>        Ubuntu 20.04.3 LTS   5.4               .0-100-generic   docker://20.10.7
            node/kubenode     Ready    <none>                 87d    v1.22.4   192.168.1.39   <none>        Ubuntu 20.04 LTS     5.4               .0-94-generic    docker://20.10.7`

and the services:

NAMESPACE     NAME                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes          ClusterIP   10.96.0.1      <none>        443/TCP                  121d
default       nextcloud-service   ClusterIP   10.98.154.93   <none>        82/TCP                   13d
kube-system   kube-dns            ClusterIP   10.96.0.10     <none>        53/UDP,53/TCP,9153/TCP   120d

How can i debug this? What kind of secret is missing ?

Update:
i used this description for the deployment:

https://computingforgeeks.com/deploy-nginx-ingress-controller-on-kubernetes-using-helm-chart/
starting from Option 2: Install Nginx Ingress Controller Kubernetes using Helm

So the final command is:

kubectl create namespace ingress-nginx

and then;

helm install -n ingress-nginx ingress-nginx  -f values.yaml . 

with corresponding values in values.yaml

Update 2:
when i list all secrets i see only this secret:

ingress-nginx-admission-token-gbldb

which is of course different to..:

ingress-nginx-admission

is that maybe the reason? Can i change somewhere the name of secret in deployment.yaml?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文