Last night I saw a tweet from Fernand Galiana, the author of the popular open source text UI for Kubernetes named "k9s". Fernand added support for OpenFaaS Functions and Services via his project. k9s has over 5k GitHub stars and many fans in the Cloud Native community. If you've not tried it yet, you are missing out.

Here's the Pod view from the docs:

And a neat way of getting logs, too:

This isn't just kubectl get pods / kubectl logs wrapped in a CLI, but to me that's definitely a core part of the value offering. In Fernand's OpenFaaS demo you'll see him show metrics from his Nginx IngressController.

Let's take a quick look at it, and then I'll leave his video below for his tour of the new feature.

I'm using some free credits I have from my friends at Civo Cloud, the UK's developer-cloud. Earlier in the year I helped them build out The World's First Managed k3s and I heard about k9s from their team.

The video tour

Try it for yourself

If you don't have OpenFaaS deployed yet then you can install it via k3sup (ketchup), an app installer for Kubernetes and it will only take a few moments:

curl -sSLf https://get.k3sup.dev | sudo sh k3sup app install openfaas

After following the instructions given by the output, you'll log in and port-forward the OpenFaaS gateway to your local machine on port 8080 .

If you have a remote OpenFaaS gateway, you can also set an environment variable.

# Default kubectl port-forward -n openfaas svc/gateway 8080:8080 & export OPENFAAS_GATEWAY=http://127.0.0.1:8080 # Remote export OPENFAAS_GATEWAY=https://my-gateway.example.com

There are several ways to get k9s including brew, but since it's a single binary, I prefer to download it myself and put it into /usr/local/bin . On MacOS, this is how I did it:

curl -sSLf https://github.com/derailed/k9s/releases/download/v0.15.1/k9s_Darwin_x86_64.tar.gz > k9s.tgz tar -xvf k9s.tgz -C /tmp/ sudo mv /tmp/k9s /usr/local/bin/

Then run it:

k9s

The navigation may take some getting used to, but once you know a few keyboard shortcuts you'll be set.

Here, we can see the OpenFaaS control-plane coming up:

Now let's deploy a function from the store:

faas-cli store deploy nodeinfo

You can navigate to your OpenFaaS function view by entering command mode :openfaas or using aliases :ofaas or ofa

I'm invoking the function under a load test, as per Lab 9 of the OpenFaaS workshop and we can see it scaling up.

And here are the logs, remember you can set write_debug or write to STDIO for additional verbosity.

Wrapping up

I want to thank Fernand for taking time to integrate his cool open-source project with OpenFaaS and for sharing it with us on YouTube. I hope the community will try it out and give him feedback.

One of the things I'd like to see is a little text-based graph showing invocation metrics and auto-scaling, just like we provide with the Grafana dashboard:

You can follow Fernand on Twitter, and star his project on GitHub derailed/k9s.

To connect with the OpenFaaS community, join us on Slack