Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 12, 2022 09:54 pm GMT

Use this starter kit to quickly implement Kubernetes

Organizations interested in adopting Kubernetes are often discouraged by its complexity and the time it takes to implement. Kubernetes isnt easy to understand, and although community support for developers interested in learning about Kubernetes is robust, sifting through the seemingly endless tools and resources available can be overwhelming.DigitalOceans starter kit for Kubernetesis designed to help organizations save weeks of learning time in bootstrapping a production-ready cluster using curated, open tools with pre-configured examples.

The software lifecycle in the cloud

When developers discuss the software lifecycle in the cloud, its often broken down into Day 0, Day 1, and Day 2 Operations. Day 0 Operations focus on learning about the tool theyre interested in using, while Day 1 and Day 2 Operations is where developers typically begin to configure and deploy applications and focus on operational tasks.

Day 0 Operations for Kubernetes

Day 0 Operations focus on the developers understanding of Kubernetes. In this phase, developers will research Kubernetes requirements, explore high-level use cases, and learn best practices for setting up their clusters. There are many resources and tools available through the vibrant Kubernetes community to help developers develop a simple understanding of the basics of the Kubernetes cluster orchestration system.

Day 1 Operations for Kubernetes

Day 1 operations take developers throughspinning up a Kubernetes clusterusing a managed service and deploying their application. Its very simple to create a cluster using DigitalOceanits possible to spin up a cluster with just one command. Builders are free to choose how they prefer to create their cluster, often making a choice between a web interface, the command line interface, or terraform. Spinning up the Kubernetes cluster and deploying your application during Day 1 Operations allows you to verify that Kubernetes is a viable choice for your app.

Day 2 Operations for Kubernetes

Day 2 Operations for Kubernetes include the operational tasks like setting up logging, monitoring, ingress, security, backups, and optimization. Day 2 Operations is where developers often get stuck. Theres a significant time commitment to learning and implementing all the details of making a cluster production-ready. By usingDigitalOceans starter kit for Kubernetesdevelopers can learn through example configurations using step-by-step tutorials. And finally, they can bootstrap their own operations-ready cluster using GitOps (ArgoCD or Flux).

The DigitalOccean Kubernetes Starter Kit

Since Day 2 Operations is where developers most often find themselves stuck or moving slowly,DigitalOceans starter kitfocuses on simplifying Day 2 operations. The step-by-step guide takes you through important operations like logging and monitoring, ingress, enabling backups, autoscaling, automation, and optimizing your cluster in a way that makes sense for you and your customers.

Logging and monitoring

Without logging and monitoring, its difficult to recognize areas of issue within your containers. If you run into a problem and dont have logging and monitoring in place, you have nothing to troubleshoot and no way of finding out where the issue is.

Logging in relation to Kubernetes allows you to track errors and refine the performance of your containers. Logging is an essential function of Kubernetes management, and there are many open source strategies for cluster-level monitoring and logging. The starter kit uses Loki for logging, using promtail to send worker nodes and application logs to Loki, Grafana for visualizing and analyzing logs, and DigitalOcean block storage, or Spaces, for logs.

Monitoring allows for easier management of Kubernetes clusters through detailed reporting of memory, CPU usage, and storage. Using Kube-prom-stack, organizations can monitor the DigitalOcean control plane, nodes, and applications and receive metrics data stored in DigitalOcean block storage. Developers can also configure alertmanager to deliver important notifications through slack or email.

Ingress

In many cases, developers start with the load balancer available to them through their cloud provider. Adding one load balancer for every service can get expensive. To avoid using one Load Balancer per service, developers need a proxy inside the cluster. Thats Ingress. Ingress helps route incoming traffic to appropriate backend services. Nginx is a popular Ingress Controller and is covered in detail. For developers who need an API gateway, Ambassador is provided through the starter kit. Using Ambassador as the API gateway provides benefits such as automatic certificate management, authentication, and API publishing.

Backups

Creating backups is an absolutely critical best practice for Kubernetes management. With Velero, developers are able to back up the cluster and application configuration and data, schedule backups with pre and post hooks, and restore in the event of a disaster or when migrating over to another cluster in the same or even a different cloud. The starter kit provides step-by-step tutorials on two of the most popular backup solutions, Velero and Triliovault, and developers can choose which one best suits their needs.

Auto-scaling

Kubernetes provides several resources that allow developers to run multiple instances of an application and create high availability configurations, but theres still a level of uncertainty around the amount of CPU needed at any given time. Developers will often set up cluster management based on monitoring application response to load over time, but this requires manually adjusting the values and manually making changes if applications misbehave. This also doesnt account for a load decrease, wasting resources such as CPU and RAM when applications dont automatically scale down.

With the HorizontalPodAutoscaler (HPA), a dedicated controller automatically changes the replica set value for your application deployments. Based on the load, the HorizontalPodAutoscaler will automatically scale your deployments up or down.

Automation

GitOpsis an operational approach for platform engineers and software developers where every aspect of a projects infrastructure, including infrastructure as code files, configuration files, and application code files, are stored in git repositories. GitOps keeps your system state synchronized with a Git repository and works with infrastructure that can be observed and described declaratively (like Kubernetes, for example).****When a git commit is pushed to source control, it triggers a change that updates the cloud infrastructure or application. With continuous delivery, GitOps tools like Flux CD or Argo CD fetch current configuration from the Git repository and apply required changes to your Kubernetes cluster to maintain the desired state.

When adopting GitOps, the cluster state is stored in Git. This has sensitive configuration data like secrets. Hence, sensitive configuration data should not be kept in a Git repo in clear text. The sealed secrets controller is used to encrypt the secrets outside the cluster. The step-by-step tutorials include the sealed secrets controller as part of the GitOps chapter.

Try it today

Spin up a DigitalOcean Kubernetes cluster todayand test thestarter kitfor yourself! For those looking for more of a UI experience, you can use equivalentDigitalOcean Kubernetes 1-clicks. Those are maintained at par with the starter kit.

Try today for free


Original Link: https://dev.to/digitalocean/use-this-starter-kit-to-quickly-implement-kubernetes-16gd

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To