Back-off restarting failed container
Hello all. I may need help on this problem.
Lab Book Version 2019-04-26
This is about Ingress, Lab 10.1 Advanced Service Exposure.
I have done these steps (total 10 steps):
1. kubectl create deployment secondapp --image=nginx
2. kubectl get deployments secondapp -o yaml | grep label -A2
3. kubectl expose deployment secondapp --type=NodePort --port=80
4. vi ingress.rbac.yaml
- kind: ServiceAccount
- kubectl create -f ingress.rbac.yaml
- wget https://bit.ly/2VCSz3s -O traefik-ds.yaml
- vi traefik-ds.yaml
Has done it as instructed on pdf
diff traefik-ds.yaml traefik-ds.yaml.1
- kubectl create -f traefik-ds.yaml
- vi ingress.rule.yaml
- host: www.example.com
- kubectl create -f ingress.rule.yaml
Before i continued all steps (total 17 steps), i checked all of my pods on kube-system namespace.
In total, i has 12 pods. 2/12 are traefik-ingres-controller that i just have made.
Originally, both of traefik pods were in error/crashlookbackoff status.
So, i check them by describing the pod and see their logs. Both of them have same errors.
These were errors i got when i describe the pod:
And these were errors from logs:
Because on the logs it said that listen tcp 80 address already in use, i check on my server
sudo lsof -i -P -n | grep 80
I found my apache 2 was using port 80, so i stop the service
sudo systemctl stop apache2
Then when i checked my pods, 1 of 2 traefik pods still has the same errors (1 Running, 1 Error/Crashloopbackoff)
I have tried to delete the pod and reboot the server, but none solve this problem.
When i did sudo lsof -i -P -n | grep 80
I am wondering what's wrong? I don't get why this happened and how to solve this error.
Please help me to solve this. If the information are not enough, please do tell me so i will post more information.