Keptn: Cloud-native application life-cycle orchestration
October 31, 2024
Road to KubeCon NA 2024: Paul MacKay
November 6, 2024

Headlamp: A Flexible UI for Kubernetes with a Focus on Extensibility

In this episode of The Landscape, Bart and Sylvain interview Joaquim Rocha, one of the key contributors to Headlamp, a Kubernetes UI tool developed to provide flexible and extensible cluster management. Headlamp is designed not only to visualize cluster resources but also to be customized with plugins for unique workflows and integrations. Headlamp is a sandbox CNCF project.

In this episode, you will learn about:

  • Headlamp’s adaptability, which customizes the user interface based on role-based access, hiding unnecessary buttons for users without certain permissions, making it a great fit for read-only and restricted access scenarios.
  • The powerful plugin system, with examples like EPAM’s advanced delivery platform integration. Headlamp allows developers to build custom UIs and workflows, enhancing cluster management without reinventing the wheel.
  • Headlamp’s integration with CNCF projects, like Prometheus, Helm, and OpenCost, allowing teams to manage monitoring, cost estimation, and application deployment seamlessly through one interface.
  • AI-powered insights, a developing feature that aims to help SREs and operators troubleshoot clusters by querying an AI assistant for real-time cluster event analysis and problem-solving.
  • When Headlamp may not be the best fit, such as for users who prefer command-line tools like kubectl, or for more complex dashboarding needs that might be better served by specialized tools like Grafana.
  • How to contribute to Headlamp, and how CNCF projects like this one encourage community contributions, from building plugins to improving multi-cluster views.

Read the transcript

Bart Farrell (00:00.238)
So what problem or problems does Headlamp solve?

Joaquim Rocha (00:03.163)
Okay.

Joaquim Rocha (00:11.812)
Alright, so Headlamp tries to solve a very particular problem, which is kind of different from other UI tools for Kubernetes, I guess, which is, you know, it allows you to see into your cluster, the resources, all that stuff that you expect. But the actual motivation of why we created it originally was because we wanted already all of that, but we wanted also something that we could extend. Right? we had, you know, sometimes you want to display a certain custom resource in a different way. You want to automate something over a custom resource without having to say, hey, follow these steps. Instead, just click a button. So that sort of thing is exactly why we created Headlamp and why we have a plugin system. That’s the, you know, that’s the very short answer to the question. But overall, it’s a, you know, it’s a UI into Kubernetes. It’s generic, so it doesn’t work only with a couple of flavors of Kubernetes and it does what you expect, a graphical interface that will list the resources, pods, deployments, all that stuff. And it’s for desktop, but also the web. You can run it in a bunch of different ways and you can extend it, like I said.

Bart Farrell (01:35.414)
And there must be many features, but which one is your favorite?

Joaquim Rocha (01:40.136)
My favorite feature is actually kind of an obscure one, so to say, or not an obvious one, which is one of the design choices we made was to make what we call the UI adaptive. So it’s adaptive to the role of the user, right? So it runs through the roles, through the role -based access. And that means that, of course, if you cannot delete deployment, for example, you don’t have the role for that, then we don’t even show you the delete button, because why would we? Just to show you that it doesn’t work. So this way the UI adapts to what the user can see instead of an edit button. If you cannot edit stuff, you will see a view button instead of a delete button. You will not see a delete button. And yeah, and a couple of other things, right? But this means that if you want to run HeadlinePassRead only, like some users prefer to do, especially if you deploy it for users out there and all that. This is possible through this feature, or at least it gets nicer than seeing a bunch of controls that will never work. That’s my favorite little feature.

Sylvain Kalache (02:53.538)
So do you have any success stories from end users using it?

Joaquim Rocha (03:01.064)
Yeah, so one of the I think the biggest I would say or most impressive uses of the plugin system It’s something by a big company called E -Pem I didn’t know them before but they’re apparently a big consultancy company and they have their own delivery platform and Yeah, so I think they changed the name for it recently but but used to be called E -Pem different platform.

EDP, something like that. And they created a plugin for Headlamp and they interacted with us on Slack and such. just from the screenshots, if you go to their GitHub page of the plugin, it shows that it’s a very advanced use case. for me, that’s exactly why we built this, is for people to go and say, you know what, we have this, in this case, delivery platform. Let’s create something to help our users. We need a UI instead of building. it from scratch since we already need to list a boss, list of deployments, all that stuff. Let’s just build this thing into it, into an existing one that will help us with our use case.

Sylvain Kalache (04:15.148)
Right, so extensibility is really a key word, you know, in what you have been sharing on your website. Like, can you tell us more a little bit about that?

Joaquim Rocha (04:18.909)
Mm -hmm.

Joaquim Rocha (04:25.972)
about the accessibility of AdLink, mean? Yeah. So we have what we’ve called for a long time, front -end plugins. So because a lot of the project is front -end, right? We do have a backend to manage a couple of things, but a lot of it is about front -end. And so the plugins run on the front -end. when we’re talking about plugins, that’s JavaScript bundle.

Sylvain Kalache (04:27.776)
Yeah. Yeah.

Joaquim Rocha (04:55.672)
And then we have, of course, you know, functions from the library that we provide for people to or for developers to, you know, say something like, OK, I want to list the pods. Right. So you have a function for that, as expected. That’s kind of the functional or more logical thing. But we also have a lot of using interface related stuff. So we have a way for you to register things on the sidebar. We have a way for you to, I don’t know, register a section into the regular pod details view so if you have your pod details that you have you know the list of containers that are running all that stuff you can still add something more to it yeah so that’s that’s that’s how the philosophy for extending it goes and of course you know depending on what you want you may say okay I want to register an action on the top bar right and that may be whatever you want we We took the approach of, if we put something that is accessible for developers. We know that we have to support it and we know that we have to carry it for a long time. And we understand that’s kind of a big responsibility. So the, usually the approach we take is, okay, we don’t open everything everywhere, but when people come to us and say, hey, you know what, I actually need this thing here. I want to, I don’t know. One of the things is I want to register columns for tables, right? So then we add a functionality, right?

hand when we add the functionality for example like I was saying you can you can register an action for the top bar or you know or a column or something like that instead of saying okay you you have two options you can register a button or you can register a string right we just say okay this is going to be a component in react right so give us your component and then you choose if it’s going to be a string an icon button something like that

Bart Farrell (06:56.942)
And as this podcast is called The Landscape, there are over 200 projects now in the CNCF landscape. How is Headlamp integrating with those other projects? Can you give us some examples?

Joaquim Rocha (07:08.582)
Yeah, it’s actually one of our biggest efforts for at least, I guess, about a year, which is to…

how can we integrate more CNCF tools, right? Because like I was saying, Headlamp works almost as a platform that, almost like certainly as a platform that gives you already the UI for you to do the regular day -to -day things that you expect from the cluster. But then you have always all this big amount actually of a big number of projects that many people use, but some people don’t for their own cluster.

Right, so we’re talking about that. I know like maybe use Prometheus maybe use open cost, right? So if you use those and you want the UI for them we want developers and in the community to consider using headlamp, right because then it’s like okay if people use Headlamp for managing their clusters, maybe they also want to have something about open cost there, right? After all they’re seeing the list of pods So if they want to see the cost of them or the estimations and stuff like that, it would be nice to have it integrated in the case of open cost. So far we have a couple of integrations. For example, we have what we call the app catalog, but what it does is actually to list Helm charts from Artifact Hub. So, you know, you can go there, you can click on a Helm chart in this case, for example, Prometheus, and now you see the editor and you can install it from there. So that’s how we are integrating Helm. and artifact hub at the same time. We also have a plugin for compose. So if you run Docker compose and you want to go to Kubernetes from there.

Joaquim Rocha (09:00.936)
and you’re already running Headlamp. So we have a plugin that will display a small step -by -step almost wizard, right? It’s like, paste your Docker compose recipe here, click this button, it generates the Kubernetes compose and then you can apply it from there. Yeah, and we have open cost, like I said, and also we have Prometheus.

So all these plugins are something that can be installed individually by the user. Some of them we already ship them. We call them ship plugins, lack of a more creative name. But those are like the app catalog, like I was saying, the Prometheus plugin. And also the app catalog itself is a plugin. the way that people install plugins is through a plugin. This shows how…

I guess how powerful the extensibility is in Headlamp because we understand that we want to ship Headlamp and for individual users in the desktop to install plugins from, in this case, from Artifact Hub because we have our own plugin format there.

But maybe you want to deploy Headlamp in the web for your clients or something and you want them to mess around with plugins there, So all you do is you deploy Headlamp, you don’t include this plugin catalog plugin and you don’t have that capability. So I hope this answered the question.

Bart Farrell (10:36.386)
Very much so. Seems to be very clear when headlamp is the answer. Are there any cases that you’ve detected or that you could share where you would say headlamp is not the right choice?

Joaquim Rocha (10:48.976)
Yeah, this is, I guess that would be a couple of cases that I could think. There’s obviously the case that people don’t like graphical UIs. So they’re like, I’m all about the command line. Super happy with kubectl. Sure, that’s a valid use case. But I would say that something a bit less obvious would be probably what I would call complex dashboarding. So.

That does not contradict with what Headlamp is because of course you can use it for dashboarding. We have a couple of things already built in that will show you metrics.

We work on observability and all of that. And of course you can register your plugins to do more about dashboarding. But what we are not trying to be, or for people to mistake this for, is for example Grafana. Grafana is a different, very powerful beast for dashboarding and we are not trying to compete there.

Sylvain Kalache (11:42.732)
Thank

Sylvain Kalache (11:51.754)
makes sense. So AI is all the rage now. Is there any ways to liberate Helm that would make sense for an AI engineering department?

Joaquim Rocha (12:04.232)
Yeah, we have our own… We have played with AI ourselves and we actually started developing a plugin a while ago that what it does is the typical chat interface, but of course with the context of your cluster, right? I would say that, yeah, a similar project would be the…

the GPT gets GPT or something. But in our case, it’s just a plugin for Headlamp. I think initially we connected it with the Azure OpenAI. The idea is that, okay, Headlamp knows that it’s in the events view of the cluster. So we get that list of events, we can feed those events status to open AI and say, you know, what’s going on here, right? So the user can just say, what’s wrong with my cluster and get an answer for that, or what’s wrong with this pod that doesn’t really run. And based on that, it can say, yeah, you the image has a, you got a typo in the image. don’t know, something like that. We need that, that’s not yet published. We need to finish it because it’s actually super quick to get something that is, you know, more or less satisfying.

But I think to get something that we know that works and doesn’t yield a lot of hallucinations, like in our case, to be completely frank, it’s like sometimes if you ask questions about the UI, we thought about, okay, we want to feed information about the cluster, but we don’t have our own.

Sylvain Kalache (13:32.844)
Yeah.

Sylvain Kalache (13:40.438)
Hmm.

Joaquim Rocha (13:55.312)
or on copilot or anything like that for for headlamp yet at least so so it doesn’t really know open AI of course doesn’t really know about headlamp and how it works but if you ask something like how can i deploy how can i deploy wordpress right there are two ways that it can answer well there are more than two ways but you can say yeah just go ahead and you know apply this this yaml and for that it’s perfect we the plugin actually does its job to get whatever is being suggested putting it in a in an editor and all that so you can just click a button to deploy if you want. However, there are times where the response from the AI is, yeah, that’s very easy, just go to the deployments page, click the install WordPress button, and that does not exist, of course. that’s part of our play with the AI.

Sylvain Kalache (14:40.034)
All right. Well, the plug the the plugging is helping you to design your roadmap, right? By creating this features. But yeah, I mean I can see how having kind of like this, you know, to help you to have a good understand. I mean, you wouldn’t like a quick snapshot of what’s going on on your cluster by asking.

Joaquim Rocha (14:53.02)
That’s a good way to get it, yes.

Sylvain Kalache (15:09.25)
your little AI friend could be helpful, especially for SREs when you are on call and let’s say you get page at 2 AM in the middle of the night and your cluster is, who knows in what situation and you could get this today. Hey, this is what I noticed. think that could be very useful. I hope you’d be able to make this feature available soon.

Joaquim Rocha (15:36.104)
Mm

Sylvain Kalache (15:39.368)
know, headlamp has had some traction. What companies are supporting it?

Joaquim Rocha (15:47.024)
Yeah, so, you know, as you know, or as I guess you know, most of the teams, of the contributors to Headlamp and my team is part of Microsoft. So, you know, obviously Microsoft is supporting us. But if you’re talking more about, okay, companies that are using it and contributing to it as well as using it, apart from EPM that I mentioned.

you know, what they’re doing is public, on GitHub. You also have Orange Telecom. They also have their own plugin, also published there. They also interact with us in the community and have contributed a few features. There’s also Virginia Tech from the US. I think they had something for their students to use and they replaced that with Headlamp and they also created their own.

plugins for it, for some stuff that they needed. just to name a few. Yeah, and there is obviously more in those, you know, when we were at KubeCon, the most rewarding thing was to have people come to our little kiosk in there and then say, yeah, your headlamp, actually, my whole team uses that. And I was like, okay, you should tell us. So actually one of the things that I’m…

Sylvain Kalache (17:07.937)
Nice.

Joaquim Rocha (17:12.636)
working on is to get one of these typical adopters file, you know, so people can just go there and say, hey, we’re using this to give some, I guess, some street creds to the project.

Sylvain Kalache (17:24.642)
Yeah. So if some of the listeners are using, go for it. was about to say, if some of the listeners are using Headlamps, please reach out to Jarekim to tell him about all the great stuff you are doing with the project. Because obviously that’s always, as you say, like it feels nice. And also it’s a great way to, you know, inform the decision on the roadmap.

Bart Farrell (17:25.762)
I mean, with the amount of work he goes into it… No, no, go ahead.

Joaquim Rocha (17:48.732)
Please do.

Bart Farrell (17:50.018)
Yeah, don’t be shy. Don’t hold back. There’s a lot of work that goes into this and it’s really nice to get feedback and recognition. And with that in mind, in terms of recognition, are there any shout outs that you’d like to give to people that have been instrumental in getting the project to where it is today?

Joaquim Rocha (17:53.148)
Yes.

Joaquim Rocha (18:06.792)
Yeah, so I’m not gonna say people in my team because obviously I you know, I think I think It’s it’s we should we should give more kudos to the people that actually spend either their free time or you know, they’re They’re from other companies But yeah, but from from the people from EPM, like I said, if I’m talked to us Especially when they were creating that plug -in, you know opened good issues, also contributed a few. The Orange Folks also had somebody that opened a couple of PRs. That was very good. you know, hopefully not, you know…

Hopefully not forgetting somebody else. I want to give a great shout out to someone called Jan Jensen from Germany and I think it was for a small company but also apparently contributed in his own time to Headlamp and opened actually very very good PRs Things that you know we had in the roadmap, but we thought okay. This is complicated for now We have other things and suddenly we had a PR from this person so

So yes, we want contributors like Yann.

Bart Farrell (19:27.576)
setting the highest standard? what is it that people like him, what do you think that they find is the special sauce or what makes Headlamp so great? Why do they decide, you know what, I am gonna do that PR, I am gonna spend some time and get involved in this project. What is it that people are responding to in Headlamp?

Joaquim Rocha (19:43.752)
I think the special sauce… I think that… You know, one of the things that I tried to have in the team is that of course this is not a project that people are paying for, know, given paying us for our support or anything, but I still… always communicate that we have to treat users as clients, right? So of course, you know, we do what we do and we decide what we have to decide for the project. But when somebody goes to Slack and says, hey, I’m having trouble with this and that, or opens an issue, you know, we try to be as welcoming and supportive of that instead of saying, yeah, you’re probably doing it wrong, right? So I think, you know, that thing that I think is also very common in other CNCF projects is what we try to do and yeah you know we have of course guides and all that I don’t know if the documentation is at the standards of other projects but we try to have definitely something in there for people to get started and we try to be nice so if you’re thinking about it just reach out

Sylvain Kalache (21:01.634)
always being nice, always a good thing. So, KubeCon is coming up. Is there anything you will announce or anything that’s coming up on the roadmap that you’d like to share about?

Joaquim Rocha (21:16.804)
Yes, how much time do you have? So, I mean, one thing that is not really related to KubeCon so much, but it’s related to the community, and I’ll shamelessly plug it in, is that next week we have our first community call, right? And that’s, you know, we’re gonna talk about stuff like this.

Sylvain Kalache (21:20.834)
as much time as you want.

Joaquim Rocha (21:45.288)
about the roadmap and whatever the community wants to talk about. But as for the roadmap things that we’re working on and with our eyes on KubeCon, even though I’m always optimistic that things gonna be done quicker than they sometimes turn out, we’re working on a flux plugin.

So I think that’s gonna be a big thing. It’s a Flux UI. There’s a couple out there. I think, you know, like I said, headlamp, given you already. a chance to go and edit or just view or just checking the logs and all that stuff. Having something into Flux in there, I think it’s a big advantage, right? That you can just go see whatever is configured for Flux, see how the reconciliation is going, all that stuff. I think it’s very valuable. But then on something a little bit…

more particular to the project. We are working on an observability view. So that’s going to be a service map or something that we are representing with a graph. So that’s coming along pretty neat, I think. And the idea is to use projects like Inspector Gadget, which is a collection of UVPF projects, to give us more information that we can then sprinkle these maps. So that’s also something we’re doing.

One of my favorites is called the aggregated view. So Headlamp is multi cluster. can choose to display more than one cluster.

Joaquim Rocha (23:24.654)
However, how you view the clusters is of course you have a home where you see them kind of together, but then you go individually into each one. And one of the features we’re working on is to be able to group those clusters. So you can imagine if you have like a cluster in the US, a cluster in Europe, something like that, maybe you still want to group those clusters because they’re both production clusters and then you have the test cluster. So you can group them by different logical groups that you as the user define. And then you can go into them and see all the pods in that group. So maybe coming from a hundred. clusters, right? So that’s the kind of thing we’re working on. It requires a lot of fine -tuning for performance and stuff like that in terms of the UI, right? It’s different from showing a hundred pods in a view than showing a hundred times a hundred clusters, right? So, but that’s something that I’m very excited about, just to name a few.

Sylvain Kalache (24:19.296)
Nice. Well, you have a lot on the roadmap. Very exciting. So you mentioned the first community call. Is it going to be recurring? Like when is this going to be happening if some of the listener wants to join?

Joaquim Rocha (24:32.552)
So for now it’s scheduled to the 25th of September next week. I think this time it’s going to be at 6 or 7.

central have to I can double check but but the idea is that the timing will probably float a little bit so we can include more folks in Asia in one of the calls and then more folks in the US this time is more leaning towards the towards the US and it’s gonna be a monthly call right the day for now it’s gonna be the 25th and I think it’s gonna Probably going to be about the you know, Thursday or something of the, or the third week of the month on Thursdays, that’s still, you know, we want to make it monthly, but the timing and all that, we have to of course always work around when it makes sense.

Sylvain Kalache (25:31.33)
Silty bitty. Got it. All right. All right. Okay. And how can people get involved? What kind of contributor are you looking for?

Joaquim Rocha (25:40.936)
Yes, so I think there are many things that people can get involved to do. You know, from testing, especially if they’re using this non… I don’t know, non… non -common setups for their clusters. We want to hear about that because we want to support them as well. But, you know, of course, one thing that I really like is contributors from other CNCF projects doing their own plugins for Headlamp, right? Because I think this kind of connects and benefits both ways. Of course, we get a plugin for whatever that project is, and that’s going to benefit Headlamp in itself and the community of Headlamp because now they have something else that they can use with it. But of course many times you have these projects that do a very good job at what they have but then they have to build a whole UI so for it and maintain it and all that I think it’s probably easier just to say okay there’s already this UI we can create a plugin for it we maintain the plugin and that’s a shorter subset of all the things. But you know just I guess Sometimes we have usability issues and all that. I think there’s a bunch of different things for everybody.

And how can you do that? So if you go to Headlamp’s website, there’s going to be the documentation and we have a contributing section there and you can start by that. I think a lot of it is about the coding, but there’s also translations. And if you go to GitHub and open an issue and say, I want to work on this and that, what do you recommend? We’re going to get an answer from us helping you out.

Bart Farrell (27:36.403)
You put a lot of work into this. When you’re not working on headlamp, what do you like to do in your free time?

Joaquim Rocha (27:41.256)
Yeah, a long time ago would still say programming on other pet projects, but I have a family now and I work on other projects with my family, so I have two kids. I like to do stuff with them. One of the things that I really like to work on, especially with my son, we do monster trucks made of cardboard. So we build them together.

Sylvain Kalache (28:07.222)
Nice.

Joaquim Rocha (28:09.384)
We usually only build them when it’s raining outside, so that’s not very common here, but we still have a collection of those cars. yeah, I like just to hang out with my family, watching series with my wife, and yeah. And playing games with my son, although he wins every time now, so. Not teaching him anything there.

Bart Farrell (28:35.554)
Good. Perfect. Well, thank you so much for the wonderful explanation about Headlamp. Look forward to seeing the action in KubeCon and the stuff that you let us know about to see that on the ground in the Project Pavilion. And looking forward to see what’s going on next. Thanks so much for your time today. All right, take care. Good.

Joaquim Rocha (28:52.402)
Thank you everybody.