Adopting Kubernetes can be complex and time-consuming. From initial exploration to implementation and beyond, the journey can take weeks, months, or even years. By using a managed Kubernetes service and choosing the best available technique to spin up clusters, organizations can move through the initial stages of implementation more quickly. Then they can get to work making the Kubernetes clusters production ready—implementing things like logging, monitoring, ingress setup, backup, security, and optimizing clusters in a way that makes sense for an organization.
When deciding how to create and deploy Kubernetes clusters quickly, three options to consider are a web interface, the command line, and terraform.
Using a web interface like the one offered through DigitalOcean’s Managed Kubernetes allows users to spin up a Kubernetes cluster with a visual, easy-to-use interface without the complexities of handling the control plane and containerized infrastructure. Users can choose their configuration settings using dropdown menus, checkboxes, and other visual means. With a web interface, users can spin up a Kubernetes cluster in minutes, making it an excellent option for quick prototyping, proof of concept needs, and comparing managed Kubernetes services between providers.
When deciding if using a web interface is the best option for you, remember that while it’s easy, it’s impossible to share the Kubernetes configuration. This can mean it’s difficult to repeat the configuration, and easy for the person who set it up to forget the configuration details. However, if you’re looking for a way to get a Kubernetes cluster up and running immediately and are willing to accept some technical debt upfront, you can use a web interface to move quickly and refactor later.
The command line is a text-based interface that allows you to interact with the cloud provider’s API. Developers can use the command line to create, configure, and destroy resources, including Kubernetes clusters. For example, DigitalOcean’s command line interface doctl provides users with the ability to interact with resources like Droplets, Kubernetes clusters, firewalls, load balancers, database clusters, domains, and more through DigitalOcean’s API.
Using the command line to spin up a Kubernetes cluster is a developer-friendly technique that’s fast enough for quick prototyping and proof of concept. It’s a great option for developers who are already familiar with using the command line to interact with other offerings from their provider. Additionally, once you figure out the command for spinning up a Kubernetes cluster, it’s possible to write an automation script that repeats the process as many times as needed.
When assessing if using the command line to spin up a Kubernetes cluster is right for you, consider that it can be hard to share the configuration. The commands themselves can be quite long and involved, requiring familiarity and understanding of the documentation from your provider. It can be difficult to repeat if you’re spinning up the cluster from the command line and not creating a script to automate the repetition. If you do choose to write a script, remember that they can often be idiosyncratic and reflect the thought process of the individual writing the script, making them hard to understand from others.
Terraform is an infrastructure as code tool that allows you to define the cloud infrastructure resources you want to create and then use the command line to invoke terraform commands, enabling the tool to create those resources for you. Using Terraform allows you to harness the power of infrastructure as code. You can create a file, commit it into your version control system and share it with other people, and it has a familiar syntax, making it easily repeatable. The file also becomes auditable, allowing you to run it through different scanning systems to see if there are any issues with your file before applying anything. Terraform is a great option for clusters being worked on by teams. It’s also really good for disaster recovery scenarios because it allows you to spin up a new cluster and transfer workloads really quickly if one of your Kubernetes clusters goes down.
When evaluating if Terraform is right for you, consider that it does require more work than the command line interface or the web interface, and it requires more technical expertise.
In this deploy session, we walk through the web interface, the command line, and terraform, getting into the details of how each option works. To learn more about the different ways to spin up a Kubernetes cluster, watch the session recording:
With DigitalOcean, control plane nodes are accessible. So spin up a DigitalOcean Kubernetes cluster today and test it yourself! For more information about using DigitalOcean and Managed Kubernetes for your business, contact our sales team.
February 6, 2023•3 min read
January 11, 2023•3 min read
December 14, 2022•3 min read