Kubespray is a powerful open source tool for deploying and managing Kubernetes clusters that provides a balance of implementation flexibility and ease of use. The tool works with public cloud, on-premises, bare-metal, and test environment solutions, making it ideal for managing highly available clusters across multiple different platforms.
Ideal uses for Kubespray include:
In this article, we’ll take a quick look at Kubespray’s features before diving into an example deployment workflow.
Kubespray utilizes a combination of Ansible and Kubeadm to deploy a Kubernetes cluster. It is extremely composable, meaning that you can choose from a wide range of options for network plugins, Linux distributions, and container runtimes. See the below table for a list of options:
Applications | Core Components | Linux Distributions | Network Plugins |
---|---|---|---|
Ambassador (v1.5) | Kubernetes (v1.20.6) | Flatcar Container Linux by Kinvolk | cni-plugins (v0.9.1) |
Cephfs-provisioner v2.1.0-k8s1.11 | etcd (v3.4.13) | Debian (Buster, Jessie, Stretch, Wheezy) | calico (v3.17.3) |
rbd-provisioner v2.1.1-k8s1.11 | docker (v19.03 | Ubuntu (16.04, 18.04, 20.04) | canal |
cert-manager v0.16.1 | containerd (v1.4.4) | CentOS/RHEL (7, 8) | cilium (v1.8.8) |
coredns v1.7.0 | cri-o (v1.19) | Fedora (32, 33) | flanneld (v0.13.0) |
ingress-nginx v0.43 | Fedora CoreOS | kube-ovn (v1.6.2) | |
openSUSE Leap 15.x/Tumbleweed | kube-router (v1.2.2) | ||
Oracle Linux (7, 8) | multus (v3.7.0) | ||
ovn4nfv (v1.1.0) | |||
weave (v2.8.1) |
Before using Kubespray, we recommend becoming familiar with Ansible constructs like Playbooks and Inventory.
Visualize Utilization Metrics | Set Resource Requests & Limits | Set Requests & Limits with Machine Learning | Identify mis-sized containers at a glance & automate resizing | Get Optimal Node Configuration Recommendations | |
---|---|---|---|---|---|
Kubernetes | ✔ | ✔ | |||
Kubernetes + Densify | ✔ | ✔ | ✔ | ✔ | ✔ |
As previously mentioned, you can choose your favorite combination of environments and infrastructure provisioning tools. Infrastructure topology should be based on organizational needs (e.g., the number of master or worker nodes, firewalls, subnet CIDR ranges, etc.).
For this article, we’ll use an AWS EC2 VM as the infrastructure. You can reference sample Terraform scripts within your newly-extracted Kubespray folder by navigating to ~/Projects/kubespray_workspace/kubespray-2.15.1/contrib/terraform/aws/
.
Identify under/over-provisioned K8s resources and use Terraform to auto-optimize
WATCH 3-MIN VIDEOserver: https://127.0.0.1:6443
with the following:
Learn the “80-20 rule” applied to Kubernetes optimization
Watch Free VideoKubespray does not support or recommend skipping any release versions when upgrading. If you are using, for example, version 1.0.0 and want to upgrade to 5.0.0, you must upgrade to 2.0.0, 3.0.0, and so on for every official Kubespray release.
Free Proof of Concept implementation if you run more than 5,000 containers
Request PoCWhile there are many Kubernetes tools available today, few offer the same level of platform flexibility provided by Kubespray. Kubespray is a great solution for organizations that are already familiar with or are actively using Ansible for their existing provisioning and orchestration. In addition, Kubespray’s composability means that your team gets to choose the tech (applications, Kubernetes runtime, Linux distribution, network plugins, etc.) that you already love working with. If your organization anticipates needing a multi-platform strategy (across cloud, bare-metal, on-prem, and others) and has already adopted Ansible, then Kubespray is an ideal choice for deploying your Kubernetes clusters.