Table of Contents
While Kubernetes clusters significantly increase development speed and enable DevOps best practices, the configuration, management, and maintenance of essential services such as logging, monitoring, and managing certifications prove to be time-consuming. Thankfully, BKPR aims to eliminate this bottleneck by providing pre-configured, tested, and ready-to-use solutions that can be easily tweaked for your purpose.
What is Bitnami Kubernetes Production Runtime (BKPR)
Bitnami Kubernetes Production Runtime (BKPR) is an open-source project that compiles a collection of services that will help you get your production Kubernetes cluster set up with logging/monitoring, certificate, and DNS management in just a few clicks. With a 0.1.0 release in late 2018, the project's contributors helped make it available for AKS, GKE, and EKS.
BKPR consists of a collection of Kubernetes manifests written in Jsonnet.
It leverages the following components to achieve its goal of reducing the complexity required to deploy and run applications and services on top of a Kubernetes cluster:
- Ingress stack (Nginx, cert-manager, OAuth2 Proxy and ExternalDNS);
- Logging Stack (Eleastricsearch, Fluentd, and Kibana);
- Monitoring stack (Prometheus, Alertmanager and Grafana).
The binary kubeprod evaluates the manifests and applies them to the Kubernetes cluster of your choice.
How to Install Bitnami Kubernetes Production Runtime (BKPR)
First, download and install kubeprod. You will need to download the binary kubeprod on the workstation you plan to create and manage your Kubernetes cluster. Currently, 1.7.1 is the latest version and the one that we used for this guide. Please review this link to download the appropriate version to your system (Mac OS X, Windows, or Linux).
Make sure that you run a Kubernetes version that is compatible with BKPR.
Bitnami provided a matrix for that. You can find it here:
https://github.com/bitnami/kube-prod-runtime#kubernetes-version-support-matrix
Visually, running the kubeprod install looks like that:
How to Set Up Bitnami Kubernetes Production Runtime on Google Kubernetes Engine (GKE)
We won't be listing every detail on the installation process to get BKPR running on your GKE cluster since Bitnami provides a well-documented page here. If you have any problems with it, they also have this troubleshooting guide.
The environment variable GCLOUD_PROJECT is worth mentioning because it's not just your project name but your project ID.
Since BKPR creates and manages a Google Cloud DNS zone used to map external access to the cluster's services (Grafana, Prometheus, etc.), you will need to configure your domain registrar to use the NS records provided by Google. You can find the NS records to use if you navigate on your GCP Dashboard to Network services > Cloud DNS:
The DNS propagation can take anywhere from 1 hour to 24 hours, and in some cases, up to 48hours. Feel free to use https://www.whatsmydns.net/ to check the DNS propagation status.
Verifying BKPR Installation on GKE is Complete
Once you've waited long enough and your DNS changes have propagated, you can now access different dashboards:
- https://prometheus.mydomain.com
- https://kibana.mydomain.com
- https://grafana.mydomain.com
Grafana will include 3 default dashboards that will give you an overview of your cluster's workload:
Now that we've deployed BKPR which required some initial setup, let's see our pods and services running on our GKE cluster:
kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system event-exporter-gke-666b7ffbf7-2w7bs 2/2 Running 0 17h
kube-system fluentbit-gke-6bzq8 2/2 Running 0 17h
kube-system fluentbit-gke-rhzcb 2/2 Running 0 17h
kube-system fluentbit-gke-rkgdw 2/2 Running 0 17h
kube-system gke-metrics-agent-dbpbw 1/1 Running 0 17h
kube-system gke-metrics-agent-nxdnq 1/1 Running 0 17h
kube-system gke-metrics-agent-rhhvt 1/1 Running 0 17h
kube-system kube-dns-autoscaler-5c78d65cd9-tpckq 1/1 Running 0 17h
kube-system kube-dns-c9488f9fb-hcsdk 4/4 Running 0 17h
kube-system kube-dns-c9488f9fb-kbh8h 4/4 Running 0 17h
kube-system kube-proxy-gke-bkpr-test-default-pool-b868c48a-9hcv 1/1 Running 0 17h
kube-system kube-proxy-gke-bkpr-test-default-pool-b868c48a-m6vj 1/1 Running 0 17h
kube-system kube-proxy-gke-bkpr-test-default-pool-b868c48a-z2z6 1/1 Running 0 17h
kube-system l7-default-backend-7fb9b444d6-44pn5 1/1 Running 0 17h
kube-system metrics-server-v0.3.6-547dc87f5f-sf96t 2/2 Running 0 17h
kube-system prometheus-to-sd-8nnkh 1/1 Running 0 17h
kube-system prometheus-to-sd-f9mhj 1/1 Running 0 17h
kube-system prometheus-to-sd-srjkq 1/1 Running 0 17h
kube-system stackdriver-metadata-agent-cluster-level-7bbddc448f-2gbpk 2/2 Running 0 17h
kubeprod alertmanager-0 2/2 Running 0 17h
kubeprod cert-manager-776bcb98cb-qcsl9 1/1 Running 0 17h
kubeprod elasticsearch-curator-1621937400-dllv2 0/1 Completed 0 6h7m
kubeprod elasticsearch-logging-0 2/2 Running 0 17h
kubeprod elasticsearch-logging-1 2/2 Running 0 17h
kubeprod elasticsearch-logging-2 2/2 Running 0 17h
kubeprod external-dns-848755df57-j9f9g 1/1 Running 0 17h
kubeprod fluentd-es-dxv9n 1/1 Running 0 17h
kubeprod fluentd-es-vqn6c 1/1 Running 0 17h
kubeprod fluentd-es-zc8kn 1/1 Running 0 17h
kubeprod grafana-0 1/1 Running 0 17h
kubeprod kibana-698fbb6db7-475lk 1/1 Running 0 17h
kubeprod kube-state-metrics-67bc65bd8-pwk6s 2/2 Running 0 17h
kubeprod nginx-ingress-controller-5fbb6757df-69dc6 1/1 Running 0 17h
kubeprod nginx-ingress-controller-5fbb6757df-jvlbc 1/1 Running 0 17h
kubeprod node-exporter-4jv5f 1/1 Running 0 17h
kubeprod node-exporter-j2g6b 1/1 Running 0 17h
kubeprod node-exporter-t78rh 1/1 Running 0 17h
kubeprod oauth2-proxy-69d74b55cc-mgl4r 1/1 Running 0 17h
kubeprod oauth2-proxy-69d74b55cc-n8m44 1/1 Running 0 17h
kubeprod prometheus-0 2/2 Running 0 17h
kubectl get services --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.3.240.1 443/TCP 17h
kube-system default-http-backend NodePort 10.3.247.249 80:32670/TCP 17h
kube-system kube-dns ClusterIP 10.3.240.10 53/UDP,53/TCP 17h
kube-system metrics-server ClusterIP 10.3.244.241 443/TCP 17h
kubeprod alertmanager ClusterIP 10.3.251.76 9093/TCP 17h
kubeprod elasticsearch-logging ClusterIP None 9200/TCP 17h
kubeprod grafana ClusterIP 10.3.245.250 3000/TCP 17h
kubeprod kibana-logging ClusterIP 10.3.248.210 5601/TCP 17h
kubeprod nginx-ingress LoadBalancer 10.3.252.219 34.145.103.175 80:31807/TCP,443:31692/TCP 17h
kubeprod oauth2-proxy ClusterIP 10.3.247.37 4180/TCP 17h
kubeprod prometheus ClusterIP 10.3.248.245 9090/TCP 17hYou can see all components from the Ingress, Logging, and Monitoring stack are running.
The illustrations below will help you understand how the different services are connected to each other.
Ingress stack:
Logging stack:
Monitoring stack:
Bitnami Kubernetes Production Runtime (BKPR) and Kubeapps
Bitnami recommends installing Kubeapps to access an open-source web-based UI for deploying and managing applications in your Kubernetes cluster.
The dashboard provides the ability to:
- Browse Helm charts and deploy them to your cluster.
- Browse and provision external services from the Service Catalog.
- Upgrade, manage and delete applications that are deployed in the cluster.
You can find the step-by-step instructions on deploying Kubeapps to your cluster with the link below:
https://github.com/kubeapps/kubeapps/blob/master/docs/user/getting-started.md
Need help on how to use the dashboard? Bitnami has excellent documentation here:
https://github.com/kubeapps/kubeapps/blob/master/docs/user/dashboard.md
While it is certainly a decent option to use Kubeapps to deploy an application to your cluster quickly, it doesn't fit the DevOps methodology and forces you to use the dashboard every time you need to modify something to your deployment. However, it would be a solid option for people who enjoy configuring their applications with a WebUI or just started managing a Kubernetes Cluster.
Conclusion
Managing a production Kubernetes cluster isn't an easy task. If you had to deploy and maintain independent logging, monitoring, and functional Ingresses for your cluster, it would be incredibly time-consuming.
Thankfully Bitnami offers BKPR, and it works right out of the box. Bitnami already has everything configured and tested for you. However, you might run into issues if you plan to use it long-term and make manual adjustments to those manifest templates that kubeprod provides.
Bitnami also mentions that using a tool like kubecfg, which they update frequently, will help you manipulate those jsonnet manifests and perhaps manage them through a GitOps-style pipeline. But very little documentation is provided for those use cases.
You may also be interested in:
How to Install Pixie for Kubernetes Monitoring: The Complete Guide
Azure DevOps Engineer Salary: The Complete Guide for 2022
Nearshore Software Development Rates: The Complete Guide for 2022
Bridgecrew: 8 Key Integrations and Benefits for IaC
How to Set up Trivy Scanner in GitLab CI: The Complete Guide
An Introduction to the Top 16 Azure Certifications for 2022
%20(1)%20(1).png)


