Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haproxy-ingress pod in CrashLoopBackOff status #1481

Closed
VP2405 opened this issue Oct 5, 2017 · 3 comments
Closed

haproxy-ingress pod in CrashLoopBackOff status #1481

VP2405 opened this issue Oct 5, 2017 · 3 comments

Comments

@VP2405
Copy link

VP2405 commented Oct 5, 2017

I'm trying to create a HaProxy ingress as described in the ingress/examples/deployment/haproxy/ section, but the pod won't start.

Typing kubectl get pod I get:
haproxy-ingress-86b48c7cd4-6dcbq 0/1 CrashLoopBackOff 6 9m

Output from kubectl describe haproxy-ingress-86b48c7cd4-6dcbq:

Events:
Type     Reason                 Age                From                    Message
----     ------                 ----               ----                    -------
Normal   Scheduled              16m                default-scheduler       Successfully assigned haproxy-ingress-86b48c7cd4-6dcbq to worker-k8s-01
Normal   SuccessfulMountVolume  16m                kubelet, worker-k8s-01  MountVolume.SetUp succeeded for volume "default-token-2cfg7"
Normal   Pulling                15m (x4 over 16m)  kubelet, worker-k8s-01  pulling image "quay.io/jcmoraisjr/haproxy-ingress"
Normal   Pulled                 15m (x4 over 16m)  kubelet, worker-k8s-01  Successfully pulled image "quay.io/jcmoraisjr/haproxy-ingress"
Normal   Created                15m (x4 over 16m)  kubelet, worker-k8s-01  Created container
Normal   Started                15m (x4 over 16m)  kubelet, worker-k8s-01  Started container
Warning  FailedSync             6m (x44 over 16m)  kubelet, worker-k8s-01  Error syncing pod
Warning  BackOff                1m (x66 over 16m)  kubelet, worker-k8s-01  Back-off restarting failed container

Output from docker logs k8s_haproxy-ingress_haproxy-ingress:

Reload strategy: native
I1005 13:59:59.948891       8 launch.go:101] &{HAProxy v0.3 git-d118743 https://github.com/jcmoraisjr/haproxy-ingress}
I1005 13:59:59.949140       8 launch.go:104] Watching for ingress class: haproxy
I1005 13:59:59.949651       8 launch.go:257] Creating API server client for https://10.96.0.1:443
F1005 13:59:59.982136       8 launch.go:118] no service with name default/ingress-default-backend found: services "ingress-default-backend" is forbidden: User "system:serviceaccount:default:default" cannot get services in the namespace "default"

Output from kubectl get svc:

NAME                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                     AGE
haproxy-ingress           NodePort    10.109.143.176   <none>        80:32004/TCP,443:30873/TCP,1936:31289/TCP   16m
http-svc                  ClusterIP   10.109.156.144   <none>        8080/TCP                                    24m
ingress-default-backend   ClusterIP   10.98.121.47     <none>        8080/TCP                                    23m
kubernetes                ClusterIP   10.96.0.1        <none>        443/TCP                                     23h

Output from kubectl describe svc ingress-default-backend:

Name:              ingress-default-backend
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          run=ingress-default-backend
Type:              ClusterIP
IP:                10.98.121.47
Port:              <unset>  8080/TCP
TargetPort:        8080/TCP
Endpoints:         10.44.0.3:8080
Session Affinity:  None
Events:            <none>
@aledbf
Copy link
Member

aledbf commented Oct 5, 2017

ping @jcmoraisjr

@jcmoraisjr
Copy link
Contributor

F1005 13:59:59.982136 8 launch.go:118] no service with name default/ingress-default-backend found: services "ingress-default-backend" is forbidden: User "system:serviceaccount:default:default" cannot get services in the namespace "default"

You need to configure your cluster to add permission to the ingress service:

https://github.com/kubernetes/ingress/tree/master/examples/rbac/haproxy

Note that at this right moment the deployment instructions doesn't create a namespace to you - and your resources are in the default namespace. You can either recreate everything in the ingress-controller namespace or change the rbac resource to authorize your default namesapce.

@aledbf
Copy link
Member

aledbf commented Oct 7, 2017

Closing. Please open the issue in https://github.com/jcmoraisjr/haproxy-ingress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants