我在部署nginxplus容器时遇到以下错误:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned nginx-ingress-744f8c7d8-mtx5c to aks-nodepool1-39499429-1
Normal SuccessfulMountVolume 1m kubelet, aks-nodepool1-39499429-1 MountVolume.SetUp succeeded for volume "nginx-ingress-token-lzp54"
Normal Pulling 1m kubelet, aks-nodepool1-39499429-1 pulling image "**.azurecr.io/nginxplus:v2"
Normal Pulled 1m kubelet, aks-nodepool1-39499429-1 Successfully pulled image "**.azurecr.io/nginxplus:v2"
Warning BackOff 56s (x3 over 1m) kubelet, aks-nodepool1-39499429-1 Back-off restarting failed container
Normal Pulled 41s (x3 over 1m) kubelet, aks-nodepool1-39499429-1 Container image "**.azurecr.io/nginxplus:v2" already present on machine
Normal Created 40s (x4 over 1m) kubelet, aks-nodepool1-39499429-1 Created container
Warning Failed 40s (x4 over 1m) kubelet, aks-nodepool1-39499429-1 Error: failed to start container "nginxplus": executable not found in $PATH
Warning FailedSync 28s (x8 over 1m) kubelet, aks-nodepool1-39499429-1 Error syncing pod
我使用了https://www.nginx.com/blog/deploying-nginx-nginx-plus-docker/
中的nginxplus dockerfile 的入口控制器文件Pod日志已更新:
这是我尝试检索pod日志时得到的结果。
$ kubectl get pods -n nginx-ingress
NAME READY STATUS RESTARTS AGE
nginx-ingress-744f8c7d8-mtx5c 0/1 CrashLoopBackOff 39 2h
$ kubectl logs nginx-ingress-744f8c7d8-mtx5c -n nginx-ingress
failed to open log file "/var/log/pods/e6ed4c91-0fb7-11e8-b1bc-0a58ac1f1223/nginxplus_39.log": open /var/log/pods/e6ed4c91-0fb7-11e8-b1bc-0a58ac1f1223/nginxplus_39.log: no such file or directory
请帮助!!
答案 0 :(得分:0)
您引用的nginx plus dockerfile不能用于nginx入口控制器。