kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.43k stars 8.24k forks source link

no secret ingress-nginx-admission find #8620

Closed limylily closed 2 years ago

limylily commented 2 years ago

Hi! I used YAML for deployment of ingress-nginx, but pod did not start successfully.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml

Information about deployed resources:

[root@xxxx ~]# kubectl get all -n ingress-nginx
NAME                                            READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create--1-pcgvw     0/1     Completed   0          24h
pod/ingress-nginx-admission-patch--1-zhh7d      0/1     Completed   1          24h
pod/ingress-nginx-controller-58698b7bb5-wk925   1/1     Running     0          24h

NAME                                         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/ingress-nginx-controller             LoadBalancer   10.100.xxx.xxx   <pending>     80:30174/TCP,443:32033/TCP   24h
service/ingress-nginx-controller-admission   ClusterIP      10.102.xxx.xxx   <none>        443/TCP                      24h

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-controller   1/1     1            1           24h

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-controller-58698b7bb5   1         1         1       24h

NAME                                       COMPLETIONS   DURATION   AGE
job.batch/ingress-nginx-admission-create   1/1           2s         24h
job.batch/ingress-nginx-admission-patch    1/1           3s         24h

Information about pod/ingress-nginx-admission-create--1-pcgvw

[root@xxxx~]# kubectl logs pod/ingress-nginx-admission-create--1-pcgvw -n ingress-nginx
W0522 13:37:21.588770       1 client_config.go:615] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
{"err":"secrets \"ingress-nginx-admission\" not found","level":"info","msg":"no secret found","source":"k8s/k8s.go:229","time":"2022-05-22T13:37:21Z"}
{"level":"info","msg":"creating new secret","source":"cmd/create.go:28","time":"2022-05-22T13:37:21Z"}

Information about pod/ingress-nginx-admission-patch--1-zhh7d

[root@xxxx~]# kubectl logs pod/ingress-nginx-admission-patch--1-zhh7d -n ingress-nginx
W0522 13:37:22.145870       1 client_config.go:615] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
{"level":"info","msg":"patching webhook configurations 'ingress-nginx-admission' mutating=false, validating=true, failurePolicy=Fail","source":"k8s/k8s.go:118","time":"2022-05-22T13:37:22Z"}

Kubernetes version

[root@xxxx~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:42:41Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}

[root@xxxx~]# kubectl get nodes -o wide
NAME         STATUS   ROLES                  AGE    VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
xxxx  Ready    control-plane,master   167d   v1.22.4   10.0.24.15    <none>        CentOS Linux 7 (Core)   3.10.0-1160.45.1.el7.x86_64   docker://19.3.15

Current State of the controller

[root@xxxx~]# kubectl describe ingressclasses
Name:         nginx
Labels:       app.kubernetes.io/component=controller
              app.kubernetes.io/instance=ingress-nginx
              app.kubernetes.io/name=ingress-nginx
              app.kubernetes.io/part-of=ingress-nginx
              app.kubernetes.io/version=1.2.0
Annotations:  <none>
Controller:   k8s.io/ingress-nginx
Events:       <none>

What you expected to happen: I want it to work

k8s-ci-robot commented 2 years ago

@meng-yu-github: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 2 years ago

/remove-kind bug

Describe in complete detail about what problem needs to be solved

limylily commented 2 years ago

I want the status of the following two pods to be running

NAME                                            READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create--1-pcgvw     0/1     Completed   0          24h
pod/ingress-nginx-admission-patch--1-zhh7d      0/1     Completed   1          24h
longwuyuan commented 2 years ago

They are not expected to be running. /close

k8s-ci-robot commented 2 years ago

@longwuyuan: Closing this issue.

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/8620#issuecomment-1134811918): >They are not expected to be running. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
AndrewEastwood commented 1 year ago

I do have the same issue. I was following the QuickStart and run the kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml. So seems the ingress-nginx-controller just got stuck and never goes from the Pending state...

kubectl -n ingress-nginx describe pods ingress-nginx-controller-77f58bf6cd-tl6xt Warning FailedScheduling 94s default-scheduler 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling..

GoncaloPT commented 1 year ago

Same here

RomerooIT commented 2 weeks ago

I want the status of the following two pods to be running

NAME                                            READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create--1-pcgvw     0/1     Completed   0          24h
pod/ingress-nginx-admission-patch--1-zhh7d      0/1     Completed   1          24h

have u solved this problem year ago? i really need the solution