Your browser can save the password for your various OpenFaaS environments, so that the credentials can follow you between machines, or be saved in password manager like 1Password.
Login to the dashboard
Once logged in, you'll be met by the namespace selector. Namespaces can be used to group functions together, or to provide a level of isolation between teams using the same OpenFaaS installation.
Note that the fields such as repository and SHA can be populated at deploy time and integrate into the UI to create links and show you what's deployed.
View the details for a function, including metrics, logs and metadata about its deployment
The logs of the figlet function, viewed without kubectl or needing separate terminal access.
You need to create a JWT signing key and a separate secret for the dashboard. It's used to sign and validate logged in sessions.
# Generate a private key
opensslecparam-genkey-nameprime256v1-noout-outjwt_key
# Then create a public key from the private key
opensslec-injwt_key-pubout-outjwt_key.pub
# Store both in a secret in the openfaas namespace
kubectl-nopenfaas\createsecretgenericdashboard-jwt\--from-file=key=./jwt_key\--from-file=key.pub=./jwt_key.pub
Note
For easy deployment during development this step can be skipped. The dashboard will automatically create the required signing keys on startup.
Note that these keys will be recreated any time the dashboard container is restarted invalidating any logged in sessions.
To enable the dashboard feature, add the following to your values.yaml file for the openfaas chart:
dashboard:enabled:truepublicURL:https://dashboard.example.com# Name of signing key secret for sessions.# Can be left blank for development deployments.signingKeySecret:"dashboard-jwt"
The publicURL, doesn't necessarily have to be publicly exposed on the Internet, but it does need to be a fully qualified domain name (FQDN).
The signingKeySecret can be left blank to auto generate signing keys (See: Create a signing key).
An AES encryption key needs to be generated and stored in secret in the openfaas namespace. This AES key is used to encrypt the OpenFaaS access token.
# Generate a key
opensslrand-hex16>aes_key
# Store the key in a secret in the openfaas namespace
kubectl-nopenfaas\createsecretgenericaes-key\--from-file=aes_key=./aes_key
Create a Kubernetes secret for the OAuth client secret
This step can be skipped if the issuer used for the dashboard does not need a client secret. Retrieve the client secret from your identity provider and store it a file client_secret.
Add the following to iam section in your values.yaml file for the openfaas chart:
iam:dashboardIssuer:# URL if the issuerurl:"https://example.auth0.com"clientId:""# Name of Kubernetes secret containing the client secret.# Can be left blank if a client secret is not required e.g for the PKCE flow.clientSecret:"oauth-client-secret"scopes:-openid-profile-email
The clientSecret can be left blank if your OIDC provider does not require a secret.
Depending on your provider and setup you might need to request additional scopes. These can be set through the scopes parameter.
Custom certificate bundle
When using an internal certificate authority or self-signed TLS certificates for the OpenFaaS gateway or your identity provider, the dashboard will needs a custom CA bundle for making HTTP requests to these components.
If you don't want to expose your dashboard to users over the Internet, then you can access it as and when required using port-forwarding. Instead of giving a domain and DNS record, you can set the public url in your values.yaml file to localhost or an empty string.
dashboard:enabled:truepublicURL:"localhost"
To access the dashboard run the following, whenever you need it:
The Helm chart has instructions for exposing both the gateway and the dashboard over the Internet using Let's Encrypt and cert-manager. You can also create your your custom Ingress record or Istio Gateway, the dashboard is available at http://dashboard.openfaas:8080 within the cluster.
When working locally, you will not have a public IP address available. You can use an inlets tunnel to access your OpenFaaS gateway and dashboard over TLS.
Set up the tunnel using these steps: inlets automated HTTP server, then apply the below YAML for the tunnel client, to expose both the gateway and the dashboard.
Edit the token, license, and url fields as per the output from link above.
Then update the values for upstreamto match the domain names you're using for the gateway and dashboard, make sure you've created DNS A or CNAME records to point to the tunnel server.
The OpenFaaS dashboard comes with built-in graphs to give you better visibility into function behavior and resource utilization, making it easier to debug and optimize your workloads.
It provides detailed metrics for individual functions, including:
Invocation metrics
Rate, Error, Duration (RED) metrics.
Invocation rate by status code - Function invocation rate over the last 30s broken down by status code.
Latency by status code - Average function invocation latency over the last 30s broken down by status code.
Load metrics
View function replica count and current load.
Load - Load as measured by the autoscaler.
Replicas - Function replica count.
Resource usage
CPU/RAM usage of functions.
CPU usage - CPU usage of the function across all replicas, measured in milli-CPU.
Memory usage - Memory usage of the function across all replicas.