ingress-nginx
来源:6-6 部署ingress-nginx(下)
慕侠3072357
2020-01-21
1.下载的ingress-nginx的yaml文件只有一个image
[root@master01 ingress-nginx]# grep image mandatory.yaml
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:master
2.在work节点下载了image后运行 还是pending
[root@worker02 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/kubernetes-ingress-controller/nginx-ingress-controller master 3da228df85e9 15 hours ago 368 MB
quay.io/calico/node v3.1.3 7eca10056c8e 20 months ago 248 MB
quay.io/calico/typha v0.7.4 c8f53c1b7957 20 months ago 56.9 MB
quay.io/calico/cni v3.1.3 9f355e076ea7 20 months ago 68.8 MB
3.还是pending状态
[root@master01 ingress-nginx]# kubectl get all -n ingress-nginx
NAME READY STATUS RESTARTS AGE
pod/nginx-ingress-controller-77bc55ffcc-tvgt2 0/1 Pending 0 23s
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx-ingress-controller 1 1 1 0 23s
NAME DESIRED CURRENT READY AGE
replicaset.apps/nginx-ingress-controller-77bc55ffcc 1 1 0 23s
2回答
-
pending的先kubectl describe,再去看看系统日志。找到pending的原因
012020-01-22 -
慕侠3072357
提问者
2020-01-22
[root@master01 src]# kubectl describe pod nginx-ingress-controller-784ccc76bc-pwrlt -n ingress-nginx
Name: nginx-ingress-controller-784ccc76bc-pwrlt
Namespace: ingress-nginx
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/part-of=ingress-nginx
pod-template-hash=3407773267
Annotations: prometheus.io/port=10254
prometheus.io/scrape=true
Status: Pending
IP:
Controlled By: ReplicaSet/nginx-ingress-controller-784ccc76bc
Containers:
nginx-ingress-controller:
Image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.19.0
Ports: 80/TCP, 443/TCP
Host Ports: 80/TCP, 443/TCP
Args:
/nginx-ingress-controller
--default-backend-service=$(POD_NAMESPACE)/default-http-backend
--configmap=$(POD_NAMESPACE)/nginx-configuration
--tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
--udp-services-configmap=$(POD_NAMESPACE)/udp-services
--publish-service=$(POD_NAMESPACE)/ingress-nginx
--annotations-prefix=nginx.ingress.kubernetes.io
Liveness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3
Readiness: http-get http://:10254/healthz delay=0s timeout=1s period=10s #success=1 #failure=3
Environment:
POD_NAME: nginx-ingress-controller-784ccc76bc-pwrlt (v1:metadata.name)
POD_NAMESPACE: ingress-nginx (v1:metadata.namespace)
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from nginx-ingress-serviceaccount-token-fmmbv (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
nginx-ingress-serviceaccount-token-fmmbv:
Type: Secret (a volume populated by a Secret)
SecretName: nginx-ingress-serviceaccount-token-fmmbv
Optional: false
QoS Class: BestEffort
Node-Selectors: app=ingress
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 3m (x123 over 13m) default-scheduler 0/2 nodes are available: 2 node(s) didn't match node selector.
Scheduled 的服务log 一直报这个问题:
012020-01-23
相似问题