Error saying no service with name kube-system default-http-backend found

0 votes

Based on this document https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example I am creating nginx controller. but my controller is not starting. its giving below error message.

2017-05-21T17:15:45.274300000Z I0521 17:15:45.259441       1 launch.go:101] &{NGINX 0.9.0-beta.5 git-83cb03b5 git@github.com:ixdy/kubernetes-ingress.git}

2017-05-21T17:15:45.274448000Z I0521 17:15:45.259460       1 launch.go:104] Watching for ingress class: nginx

2017-05-21T17:15:45.274563000Z I0521 17:15:45.259620       1 launch.go:257] Creating API server client for https://10.96.0.1:443

2017-05-21T17:15:45.274670000Z I0521 17:15:45.258931       1 nginx.go:180] starting NGINX process...

2017-05-21T17:15:45.310531000Z F0521 17:15:45.303209       1 launch.go:118] no service with name kube-system/default-http-backend found: User "system:serviceaccount:kube-system:default" cannot get services in the namespace "kube-system". (get services default-http-backend)

I see default backend service running.

$ kubectl  --kubeconfig=/c/software/k612_centos/admin.conf -n kube-system get po

NAME                                        READY     STATUS             RESTARTS   AGE

default-http-backend-2198840601-zt8gt       1/1       Running            0          6m

nginx-ingress-controller-4108150732-q2rb2   0/1       CrashLoopBackOff   6          6m

How to clear this error message?

Sep 12, 2018 in Kubernetes by lina
• 8,220 points
11,986 views

1 answer to this question.

0 votes

I’ve got an example that worked fine for me

apiVersion: v1

kind: Namespace

metadata:

  name: nginx-ingress

---

apiVersion: v1

kind: ServiceAccount

metadata:

  name: nginx-ingress-serviceaccount

  namespace: nginx-ingress

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: ClusterRole

metadata:

  name: nginx-ingress-clusterrole

rules:

  - apiGroups:

      - ""

    resources:

      - configmaps

      - endpoints

      - nodes

      - pods

      - secrets

    verbs:

      - list

      - watch

  - apiGroups:

      - ""

    resources:

      - services

    verbs:

      - get

      - list

      - watch

  - apiGroups:

      - "extensions"

    resources:

      - ingresses

    verbs:

      - get

      - list

      - watch

  - apiGroups:

      - ""

    resources:

        - events

    verbs:

        - create

        - patch

  - apiGroups:

      - "extensions"

    resources:

      - ingresses/status

    verbs:

      - update

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: Role

metadata:

  name: nginx-ingress-role

  namespace: nginx-ingress

rules:

  - apiGroups:

      - ""

    resources:

      - configmaps

      - pods

      - secrets

    verbs:

      - get

  - apiGroups:

      - ""

    resources:

      - endpoints

    verbs:

      - get

      - create

      - update

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: RoleBinding

metadata:

  name: nginx-ingress-role-nisa-binding

  namespace: nginx-ingress

roleRef:

  apiGroup: rbac.authorization.k8s.io

  kind: Role

  name: nginx-ingress-role

subjects:

  - kind: ServiceAccount

    name: nginx-ingress-serviceaccount

    namespace: nginx-ingress

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: ClusterRoleBinding

metadata:

  name: nginx-ingress-clusterrole-nisa-binding

roleRef:

  apiGroup: rbac.authorization.k8s.io

  kind: ClusterRole

  name: nginx-ingress-clusterrole

subjects:

  - kind: ServiceAccount

    name: nginx-ingress-serviceaccount

    namespace: nginx-ingress

answered Sep 12, 2018 by Kalgi
• 52,350 points

Related Questions In Kubernetes

+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,476 views
0 votes
3 answers

Nginx reverse proxy URL getting rewritten

Hey @Gopi, try your ingress probably like ...READ MORE

answered Feb 12, 2019 in Kubernetes by Kalgi
• 52,350 points
4,725 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP