I am getting below error when i deploy nginxplus container:
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
I have used nginxplus dockerfile from https://www.nginx.com/blog/deploying-nginx-nginx-plus-docker/
I have used ingress controller file from https://github.com/nginxinc/kubernetes-ingress/blob/master/install/deployment/nginx-plus-ingress.yaml
Pod Logs updated:
This is what i get when i try to retrieve pod logs.
$ 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
Please help!!
The nginx plus dockerfile you referenced cannot be used for the nginx ingress controller.
You should use the nginx plus ingress controller docker image instead.
Related
I'm using helm chart of falco and here are the commands
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo update
helm install falco falcosecurity/falco
Here's the output
NAME READY STATUS RESTARTS AGE
falco-6hlvx 0/1 Init:ImagePullBackOff 0 4m19
Once I type describe pod to know the reason behind this status, I find these events
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 22m default-scheduler Successfully assigned default/falco-6hlvx to minikube
Normal Pulling 15m (x4 over 22m) kubelet Pulling image "docker.io/falcosecurity/falco-driver-loader:0.32.1"
Warning Failed 13m (x4 over 20m) kubelet Failed to pull image "docker.io/falcosecurity/falco-driver-loader:0.32.1": rpc error: code = Unknown desc = context deadline exceeded
Warning Failed 13m (x4 over 20m) kubelet Error: ErrImagePull
Warning Failed 12m (x7 over 20m) kubelet Error: ImagePullBackOff
Normal BackOff 2m45s (x34 over 20m) kubelet Back-off pulling image "docker.io/falcosecurity/falco-driver-loader:0.32.1"
Whenever this happens, try to pull the image directly using minikube ssh docker pull to obtain a better error message. Be aware that Docker Hub applies a download rate limit and you might have just hit it.
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 51s default-scheduler Successfully assigned jenkins/jenkins-0 to minikube
Normal BackOff 31s kubelet, minikube Back-off pulling image "jenkins/jenkins:2.303.3-jdk11"
Warning Failed 31s kubelet, minikube Error: ImagePullBackOff
Normal Pulling 17s (x2 over 47s) kubelet, minikube Pulling image "jenkins/jenkins:2.303.3-jdk11"
Warning Failed 1s (x2 over 32s) kubelet, minikube Failed to pull image "jenkins/jenkins:2.303.3-jdk11": rpc error: code = Unknown desc = Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning Failed 1s (x2 over 32s) kubelet, minikube Error: ErrImagePull
The above error is what I am seeing, when trying to install Jenkins on a minikube cluster. I am using this link and following along: https://www.jenkins.io/doc/book/installing/kubernetes/
appreciate any ideas.
I tried with minikube with virtualbox and that worked out of the box.
But, wanted to get docker working, which I wasn't able to.
Finally, I deleted everything (even reinstalled ubuntu) and re-setup k8s cluster with latest k8s version (before i tried with --version=1.19.0 of k8s)
I used: minikube start --driver=docker. and then followed the official jenkins install with helm3, that too latest, lts –
I'm trying to deploy a Docker image from ECR to my EKS. When attempting to deploy my docker image to a pod, I get the following events from a CrashLoopBackOff:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 62s default-scheduler Successfully assigned default/mlflow-tracking-server to <EC2 IP>.internal
Normal SuccessfulAttachVolume 60s attachdetach-controller AttachVolume.Attach succeeded for volume "<PVC>"
Normal Pulling 56s kubelet, <IP>.ec2.internal Pulling image "<ECR Image UI>"
Normal Pulled 56s kubelet, <IP>.ec2.internal Successfully pulled image "<ECR Image UI>"
Normal Created 7s (x4 over 56s) kubelet, <IP>.ec2.internal Created container mlflow-tracking-server
Normal Pulled 7s (x3 over 54s) kubelet, <IP>.ec2.internal Container image "<ECR Image UI>" already present on machine
Normal Started 6s (x4 over 56s) kubelet, <IP>.ec2.internal Started container mlflow-tracking-server
Warning BackOff 4s (x5 over 52s) kubelet, <IP>.ec2.internal Back-off restarting failed container
I don't understand why it keeps looping like this and failing. Would anyone know why this is happening?
CrashLoopBackError can be related to these possible reasons:
the application inside your pod is not starting due to an error;
the image your pod is based on is not present in the registry, or the
node where your pod has been scheduled cannot pull from the registry;
some parameters of the pod has not been configured correctly.
In your case it seems an application error, inside the container.
Try to view the logs with:
kubectl logs <your_pod> -n <namespace>
For more info on how to troubleshoot this kind of error refer to:
https://pillsfromtheweb.blogspot.com/2020/05/troubleshooting-kubernetes.html
The process inside container is crashing. Could be reason of entrypoint on docker base images.
You can try something like this to check the logs of container
kubectl logs -f <pod_name>
Trying to run container in microk8s.
According to https://docs.docker.com/get-started/part3/ , after deploy the service.
microk8s.kubectl get services shows:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
bb-entrypoint NodePort 10.152.183.182 <none> 8080:30001/TCP 5m51s
kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 35d
microbot-service NodePort 10.152.183.80 <none> 80:31223/TCP 19
But, I can't access the bb-entrypoint service via any of following address:
localhost:30001
10.152.183.182:8080
The os is mint mate based on (ubuntu), and I have disabled ufw.
Any idea?
You have to ensure whether endpoints are created for this service or not by running kubectl get ep
In this case i'm seeing endpoints are not created because the pod was having issues in pulling the image from docker and so it i not in ready status
[root#master tmp]# kubectl get ep
NAME ENDPOINTS AGE
bb-entrypoint 9m24s
[root#master tmp]# kubectl get po
NAME READY STATUS RESTARTS AGE
bb-demo-7ffb568776-q6xs2 0/1 ImagePullBackOff 0 9m55s
Warning Failed 6h15m (x3 over 6h17m) kubelet, node1.k8s Failed to pull image "bulletinboard:1.0": rpc error: code = Unknown desc = repository docker.io/bulletinboard not found: does not exist or no pull access
Warning Failed 6h15m (x3 over 6h17m) kubelet, node1.k8s Error: ErrImagePull
Normal BackOff 6h15m (x7 over 6h17m) kubelet, node1.k8s Back-off pulling image "bulletinboard:1.0"
Normal Pulling 6h14m (x4 over 6h17m) kubelet, node1.k8s Pulling image "bulletinboard:1.0"
Warning Failed 6h12m (x15 over 6h17m) kubelet, node1.k8s Error: ImagePullBackOff
I am using kubernetes cluster to deploy an image using kubectl create -f dummy.yaml . my image is public in docker hub, the size of the image is 1.3 GB.
the image pull successfully but it is not running it is " CrashLoopBackOff".
when i run creation deployment command "kubectl create -f dummy.yaml" i got:
Name READY STATUS RESTARTS AGE
dummy-ser-5459bf444d-9b7sz 0/1 CrashLoopBackOff 118 10h
I tried to used
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ] in my yaml file, it is work with image size 700 MB but it show CrashLoopBackOff when i use it with other image 1.3 GB, it seems the container after pulling cannot run because the image successful pulled.
The describe pods show :
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 12m default-scheduler Successfully assigned dummy-ser-779 7db4cd4-djqdz to node02
Normal SuccessfulMountVolume 12m kubelet, node02 MountVolume.SetUp succeeded for vol ume "default-token-8p9lq"
Normal Created 1m (x4 over 2m) kubelet, node02 Created container
Normal Started 1m (x4 over 2m) kubelet, node02 Started container
Warning BackOff 53s (x8 over 2m) kubelet, node02 Back-off restarting failed containe r
Normal Pulling 41s (x5 over 12m) kubelet, node02 pulling image "xxx/dummyenc:ba ni"
Normal Pulled 40s (x5 over 2m) kubelet, node02 Successfully pulled image "xxx
Thank you in advanced
I fixed this problem. I got this error because the image was not compatible with the hardware that I tried to run on (ARM7)RPi. I create the image on ubuntu 64bit using docker build for Dockerfile so that image cannot run on Raspberry pi.