headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

Create/apply not working #609

Closed saiyam1814 closed 2 years ago

saiyam1814 commented 2 years ago

Deployed headlamp onto Civo Kubernetes which is based on K3s. able to open UI and navigate but on creating it gives an error.

Screenshot 2022-07-20 at 2 05 45 PM

I used the standard installation steps with ingress

kubectl -n kube-system create serviceaccount headlamp-admin                                                             

kubectl create clusterrolebinding headlamp-admin --serviceaccount=kube-system:headlamp-admin --clusterrole=cluster-admi
kubectl apply -f https://raw.githubusercontent.com/kinvolk/headlamp/main/kubernetes-headlamp.yaml

ingress

  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: headlamp
    namespace: kube-system
  spec:
    tls:
    - secretName: headlamp
      hosts:
      - headlamp.3b490ef9-d33c-42b7-a4f5-cd54bdff7c7e.k8s.civo.com
    rules:
    - host: headlamp.3b490ef9-d33c-42b7-a4f5-cd54bdff7c7e.k8s.civo.com
      http:
        paths:
        - backend:
            service:
              name: headlamp
              port:
                number: 80
          path: /
          pathType: ImplementationSpecific
Screenshot 2022-07-20 at 2 07 29 PM

Anything I am missing?

saiyam1814 commented 2 years ago

The deployment file I am trying to create is created from Kubernetes command kubectl create depoy nginx --image=nginx --dry-run=client -oyaml

joaquimrocha commented 2 years ago

@saiyam1814 Hmm, interesting one! I think I have recently created a deployment in AKS through Headlamp. We will prioritize this issue. We have a bug fix release coming up shortly anyway. I will try to get this in.

joaquimrocha commented 2 years ago

Ah, I think I got a clue. I noticed there's no namespace in your YAML and apparently it's expecting one. I think this may work in the kubectl as it likely prepopulates some default values. Maybe we should do that too.

saiyam1814 commented 2 years ago

Yes adding the default namespace worked! thanks! I am having a talk on various Kubernetes dashboards nd I am talking about headlamp as well :)

joaquimrocha commented 2 years ago

You definitely uncovered a regression we had in applying just the ingress. Something to do with a change to how we apply resources in general (and more particularly, pluralize them). I have just submitted a fix: https://github.com/kinvolk/headlamp/pull/610

Yes adding the default namespace worked! thanks! I am having a talk on various Kubernetes dashboards nd I am talking about headlamp as well :)

That's great! When is it? I'd love if you used the next bug fix version so it doesn't fail on you like this 😄

saiyam1814 commented 2 years ago

its in 50 minutes https://www.civo.com/meetups/meetup-22 Thanks for your quick help :)