There are several ways to build a k8s cluster, depending on your requirements and the resources you have available. Here are some common approaches:
Self-hosted Kubernetes cluster: In this approach, you set up and manage your own Kubernetes cluster on your infrastructure. This requires expertise in Kubernetes and
infrastructure management, but gives you full control over the environment. You can use tools like kubeadm, kops, Rancher, kubespray to set up and manage the cluster.
This approach can be a good fit if you have specific security or compliance requirements, or if you need to customize the environment to your needs.
Cloud-hosted Kubernetes cluster: Most cloud providers offer managed Kubernetes services, such as Amazon EKS, Google Kubernetes Engine (GKE), or Microsoft Azure
Kubernetes Service (AKS). With this approach, the cloud provider manages the underlying infrastructure and Kubernetes control plane, while you manage the worker nodes that run your applications. This approach can be more cost-effective and reduces the operational overhead of managing your own infrastructure. It's a good fit if you're
already using a cloud provider and want to leverage their managed Kubernetes service.
Cluster as a Service: Cluster as a Service (CaaS) is a cloud-based service that lets you create and manage Kubernetes clusters without worrying about the underlying
infrastructure. Providers like DigitalOcean, Linode, and Platform9 offer CaaS solutions that simplify the process of creating and managing Kubernetes clusters. With this
approach, you get the benefits of managed Kubernetes services without being tied to a specific cloud provider.
Containerized Kubernetes: You can run k8s as a containerized application on your infrastructure or in the cloud. This approach is useful for development and testing
environments, as it lets you spin up a Kubernetes cluster quickly and easily. You can use tools like Minikube, or KinD to create containerized Kubernetes clusters.
In summary, there are several ways to build a k8s cluster, each with its benefits and trade-offs. The approach you choose will depend on your specific needs and constraints.