
Not all server platforms, even the most powerful and scalable, meet every need as is. While Kubernetes works great on its own, it may lack the necessary components for completeness. You will always find a specific case that ignores your needs, or for which Kubernetes will not function with the default installation — for example, database support or CD operation.
This is where add-ons, extensions, and other goodies for this container orchestrator come into play, supported by a vast community. In this article, we will present 11 of the best items we've found. We find them quite interesting ourselves and plan to delve into them practically — breaking them down into nuts and bolts to see what's inside. Some of them will complement any Kubernetes cluster perfectly, while others will help solve specific tasks not addressed in the standard Kubernetes distribution. Gatekeeper: Policy Management
(OPA) provides the ability to create policies on top of application cloud stacks in Kubernetes, ranging from ingress to service mesh.
Project Gatekeeper Gravity: Portable Kubernetes Clusters
If you want to roll out an application in Kubernetes, many applications have a Helm chart that guides and automates this process. But what if you want to take your Kubernetes cluster 'as is' and deploy it somewhere else?
Gravity
.tar , can replicate a cluster anywhere Kubernetes can run., can replicate a cluster anywhere that Kubernetes can operate.
Gravity also checks that the target infrastructure behaves the same as the source, and that the Kubernetes environment on the target is accessible. The paid version of Gravity also adds security features, including RBAC and the ability to synchronize security settings across different cluster deployments.
The latest major version, Gravity 7, can roll out a Gravity image into an existing Kubernetes cluster instead of deploying an entirely new cluster from the image. Gravity 7 can also work with clusters that were installed without using the Gravity image. Additionally, Gravity supports SELinux and natively works with the Teleport SSH gateway.
Kaniko: Building Containers in a Kubernetes Cluster
Most container images are built on systems outside the container stack. However, sometimes it’s necessary to build an image within the container stack, such as inside a running container, or within a Kubernetes cluster.
builds containers inside a container environment, but without relying on a containerization service like Docker. Instead, Kaniko extracts the file system from the base image, executes all build commands in the user space over the extracted file system, taking a snapshot of the file system after each command.
Note: Kaniko at the moment (May 2020, translator's note) cannot build Windows containers.
Kubecost: Cost Metrics for Running Kubernetes
Most Kubernetes administration tools focus on usability, monitoring, understanding behavior within pods, and so on. But what about observing the cost — in rubles and kopecks — associated with running Kubernetes?
processes Kubernetes metrics in real-time, resulting in the current cost information from running clusters with major cloud providers displayed on a dashboard with the monthly cost of each cluster. Costs for RAM, CPU time, GPU, and storage are broken down by Kubernetes components (container, pod, service, etc.)
Kubecost also tracks the cost of external cluster resources, such as Amazon S3 buckets, although it is limited to AWS. Cost data can be sent to Prometheus, allowing you to use it to programmatically adjust cluster behavior.
Kubecost is free to use if you are satisfied with 15 days of log data. For additional features, pricing starts at $199 per month for monitoring 50 nodes.
KubeDB: Run Production Databases in Kubernetes
Databases can also be quite challenging to run effectively in Kubernetes. You'll find Kubernetes operators for MySQL, PostgreSQL, MongoDB, and Redis, but they all have their drawbacks. The typical feature set of Kubernetes doesn't directly address most specific database issues.
helps you create your own Kubernetes operators for managing databases. Backup, cloning, monitoring, snapshotting, and declarative database creation are its components. Note that support for features depends on the database. For example, cluster creation works for PostgreSQL but not for MySQL ( is, as correctly noted , translator's note).
Kube-monkey: Chaos Monkey for Kubernetes
The most reliable way to stress-test is through random failures. This theory underlies Chaos Monkey from Netflix, a chaotic engineering tool that randomly shuts down virtual machines and containers in the production environment to "encourage" developers to create more resilient systems. — implements the same underlying theory of stress testing for Kubernetes clusters. It works by randomly killing pods in the cluster that you designate, and can also be configured to run during specific time intervals.
Kubernetes Ingress Controller for AWS
Kubernetes provides an external load balancer and cluster network services via a service called AWS offers load balancing features, but does not automatically link them with similar capabilities in Kubernetes. fills this gap.
It automatically manages AWS resources for each ingress object in the cluster, creating load balancers for new ingress resources and removing load balancers when resources are deleted. It uses CloudFormation to ensure that the cluster state remains intact. It also supports CloudWatch Alarm configurations and automatically manages other elements used in the cluster, such as SSL certificates and EC2 Auto Scaling Groups.
Kubespray: Automated Kubernetes Installation
automates the installation of a production-ready Kubernetes cluster, starting from installation on bare-metal servers and extending to major public clouds. It uses Ansible (Vagrant additionally) to initiate deployment and create a highly available cluster from scratch with your chosen network add-on (such as Flannel, Calico, etc.) on your selected popular Linux distribution when installing on bare-metal servers.
Skaffold: Iterative development for Kubernetes
— one of Google’s tools used to organize CD applications in Kubernetes. As soon as you make changes to the source code, Skaffold automatically detects it, initiates the build and deployment, and notifies you if there are any errors. Skaffold runs entirely on the client side, so there might be a few quirks with installation or updates. It can be used with existing CICD pipelines and also interact with some external build tools, primarily Bazel from Google.
Teresa: Simplest PaaS on Kubernetes
is an application deployment system that runs a simple PaaS on top of Kubernetes. Users, divided into teams, can deploy and manage their applications. This somewhat simplifies the work for people trusting this application, who do not wish to deal with Kubernetes and all its complexities.
Tilt: Streaming updates of containers in Kubernetes clusters
, developed by Windmill Engineering, monitors changes to various Dockerfile files and then gradually deploys the corresponding containers into the Kubernetes cluster. Essentially, it allows real-time updates of the production cluster simply by updating Dockerfile files. Tilt builds within the cluster; the source code is all that needs to be changed. You can also take a snapshot of the cluster's state and capture the conditions for triggering errors directly from Tilt to share with team members for debugging.
P.S. We have already extensively explored all of these tools with our curious hands. To present real practices hopefully at offline intensives in February. February 8–10, 2021. And February 12-14. Honestly, we also miss the warm and energetically charged atmosphere of in-person training. No matter how advanced technology becomes, it cannot replace the live human interaction and special ambiance that arises when like-minded individuals gather.
Source: habr.com
