Building a Kubernetes Based Development Environment for Services by Jason Yoo Hootsuite Engineering

Building a Kubernetes Based Development Environment for Services by Jason Yoo Hootsuite Engineering

Just one year later, the CSI feature was made Generally Available in Kubernetes. One can use Configuration patterns to understand the way to handle application configuration in Kubernetes. It includes the detailed steps for connecting applications to configurations.

  • Based on the authentication mechanism chosen the CLI will discover Kubernetes clusters you are allowed to access in a target hosting environment (i.e. EKS, AKS, Rancher) and generate a kubeconfig for a chosen cluster.
  • When deploying containers with Kubernetes or containerized applications, companies often realize that they need persistent storage.
  • We’ll take that a step further next time and make it available outside the cluster.
  • On staging, we might want to grant unprotected access to some of our services, for the sake of debugging.
  • We are now in a situation where we can develop our code on our development machine and push it to our development Kubernetes cluster.
  • CRDs allow users to create new types of resources without adding another API server.
  • To remove Rancher Desktop in the future, follow the guidancein the documentationto perform a factory reset and uninstall the app.

Skaffold has many essential features for container & Kubernetes development, including policy-based image tagging, resource port-forwarding and logging, file syncing, and much more. The data itself is stored on the master which is a highly secured machine which nobody should have login access to. The biggest difference between a secret and a configmap is that the content of the data in a secret is base64 encoded. Recent versions of Kubernetes have introduced support for encryption to be used as well.

Some developers prefer to use a remote Kubernetes cluster, and this is usually to allow for larger compute and storage capacity and also enable collaborative workflows more easily. This means it’s easier for you to pull in a colleague to help with debugging or share access to an app in the team. Quarkus remote development allows a developer to develop the application in the same environment it will run in while having access to the same services it will have access to. Additionally, this capability greatly reduces the inner feedback loop while alleviating the “works on my machine” problem. Remote development also allows for quick and easy prototyping of new features and capabilities.

A developer generally won’t include the library in the application’s dependencies because Testcontainers doesn’t belong as a dependency when the application is deployed into a real environment with real services. The core idea behind Okteto is that the development environment should look exactly like the production environment. The same API design principles have been used to define an API to programmatically create, configure, and manage Kubernetes clusters.

You have all the infrastructure and distributed application needs in a separate container, and you combine them at runtime. Probably, multi-runtime as the author calls it Mecha architecture, where you have your business logic in one container, and you have all the infrastructure-related concerns as a separate container. 4 trends for Kubernetes cloud-native teams to watch in 2020 Today’s software architectural landscape seems to change like the weather. Stay ahead of the curve with these cloud-related trends, including GitOps and service meshes. Borrowing them from the Kubernetes, we have developed and applied them.

Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead. Try Red Hat’s products and technologies without setup or configuration free for 30 days with this shared OpenShift and Kubernetes cluster. Additionally, you can use profiles, local user config, environment variables, and flags to easily incorporate differences across environments. In Kubernetes version 1.9, the initial Alpha release of Container Storage Interface was introduced. Previously, storage volume plug-ins were included in the Kubernetes distribution. By creating a standardized CSI, the code required to interface with external storage systems was separated from the core Kubernetes code base.


Selectingdockerdwill use the runtime that’s shipped with Docker, via its regular Unix socket. As Okteto co-founder and CEO Ramiro Berrelleza told me, the idea for the service came from his experience at companies like Microsoft and Atlassian. There, he noticed that Kubernetes and microservices made life easier for operations teams, but not necessarily for developers. Learn the basics of deploying a service into Kubernetes from source code to a running Kubernetes cluster. Ryan Jarvinen offers comparisons between OpenShift and vanilla Kubernetes, and explains how Red Hat helps developers build, instrument, and manage containerized solutions that can be run securely on any infrastructure. Deploy your application safely and securely into your production environment without system or resource limitations.

kubernetes based development

This is convenient when you’re experimenting with Rancher or running new workloads that you want to quickly remove. To reset your entire Rancher Desktop installation, head to the Troubleshooting screen and press theFactory Resetbutton. To demonstrate the streamlining capability of Rancher Desktop, in this tutorial you’ll use it to run Kubernetes on your local machine without installing Docker Desktop.

It reliably stores the configuration data of the cluster, representing the overall state of the cluster at any given point of time. Etcd favors consistency over availability in the event of a network partition . The consistency is crucial for correctly scheduling and operating services. If you debug the Kubernetes cluster locally, discovering runtime errors before they make it to the integration, staging, or production becomes easier.

Local Development Simplification

Logically, this is like a local machine inserted into the middle of a set of Kubernetes clusters. Services exposed to Skupper on the clusters can discover services exposed to the Skupper proxy on the local machine and vice versa. Another solution could be to use Kubernetes, giving each developer a namespace where they can deploy what they need. The developer could then deploy the services and configure their local application to use them.

kubernetes based development

Quarkus was designed with many of these Developer Joy characteristics in mind. Quarkus helps developers iterate faster and contains built-in capabilities that alleviate many of these challenges and shorten the development lifecycles. But when there are lots of dependent services, trying to replicate them all on a local machine probably won’t work well, if at all. The source code for the application is on GitHub under an Apache 2.0 license.

Opt for the Suitable Way to Deploy Kubernetes Services

If you’ve been following my Kubernetes 101 series, you may have discovered that there are ways to make Kubernetes considerably easier. Thanks to MicroK8s and Portainer, the journey doesn’t have to be challenging all the time. But even though you can begin your dive into Kubernetes as a point-and-click affair with Portainer, at some point you might want to be able to work from the command line. That’s not a given but you never know if you’ll be thrown into a situation where you’re asked to deploy an app or service to a Kubernetes cluster and there is no Portainer GUI to be found.

Indeed, we can imagine we have two environments, one for testing and one for production. The testing environment would be synchronized with our software repository’s main branch while the production environment would be the pendant of our repo’s production branch. We develop on the main branch and, as soon as the Q&A is satisfied with the software pushed there, we push it to production.

It then runs the build for you and deploys resulting image to the target cluster via the Helm chart. It also allows user to setup port forwarding to localhost very easily. This, of course, isn’t very useful, as you cannot reach the app from outside of the cluster. That’s OK, because next time around we’re going to go back to Portainer and find out how easy it is to deploy the same NGINX application, only make it visible from outside of the cluster.

You can also use in-memory replacements for required services, such as an H2 database instead of a separate database instance. Beyond that, if you want or need to run the application locally, you need a better solution. You’re going to install and set up Rancher Desktop to create a local Kubernetes cluster, then configure your environment and perform basic operations with containers and images.

A very convenient way to host our micro-services is to dockerize them and let Kubernetes orchestrate them. Draft aims to help you get started deploying any app to Kubernetes. It is capable of applying heuristics as to what programming language your app is written in and generates a Dockerfile along with a Helm chart.

Join the DevNation community

We are now in the complicated situation where we want to develop our software on a development machine, test it somehow on an almost productive environment, and release it to a production environment. On a development machine, we surely want to interact with a short-lived database. Moreover, login credentials to our microservices should be trivial.

kubernetes based development

Restarts containers that fail, replaces and reschedules containers when nodes die, kills containers that don’t respond to your user-defined health check, and doesn’t advertise them to clients until they are ready to serve. No need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them. We are now going to review tooling allowing you to develop apps on Kubernetes with the focus on having minimal impact on your existing workflow. We strive to provide an unbiased description including implications of using each of the tools in general terms.

Kubernetes Manifests

There are a few different ways to add Rancher Desktop to your system. If you’re running Windows or macOS, download and run the appropriate installerfrom GitHubafter checking thesystem requirementsfor your platform. Join developers across the globe for live and virtual events led by Red Hat technology experts. But to help you overcome the issue, several monitoring tools can be added to the Kubernetes ecosystem. Some of the most used open-source tools are Prometheus, The ELK Stack, Grafana, Fluent Bit, kubewatch, cAdvisor, kube-state-metrics, Jaeger, kube-ops-view, etc.

Kubernetes Annotations

Hence, choosing the web-based development environment or adding an extension (with built-in features) to your local one can help minimize context switching now and then. With the expanding adoption of containers, Kubernetes have become the standard to deploy, maintain, and operate containerized applications. But, sometimes achieving a frictionless Kubernetes development workflow can be painful. Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.

A second part of the Quarkus Developer Joy story, Quarkus Dev Services, automatically provisions and configures supporting services, such as databases, message brokers, and more. When you run Quarkus in dev mode or execute tests, Quarkus examines all the extensions present. Quarkus then automatically starts any unconfigured and relevant service and configures the application to use that service. The first part of the Quarkus Developer Joy story, live coding via Quarkus dev mode, improves and expedites the inner loop development process. When Quarkus dev mode starts, Quarkus automatically reflects code changes within the running application. Therefore, Quarkus combines the Write Code, Build, and Deploy/Run steps of Figure 1’s inner loop into a single step.

Kubernetes Patterns: Reusable Components for Designing Cloud-Native Applications

Consul-template modifies Nginx templates of all local pods to alert them of the new, local service, but also of services remotely running in EC2. Automatically places containers based on their resource requirements and other constraints, while not sacrificing availability. Mix critical and best-effort workloads in order to drive up utilization and save even more resources. Kubernetes progressively rolls out changes to your kubernetes based development application or its configuration, while monitoring application health to ensure it doesn’t kill all your instances at the same time. If something goes wrong, Kubernetes will rollback the change for you. Note that this is a tricky area since even for established technologies such as, for example, JSON vs YAML vs XML or REST vs gRPC vs SOAP a lot depends on your background, your preferences and organizational settings.


Microservices today are often deployed on a platform such as Kubernetes, which orchestrates the deployment and management of containerized applications. They typically communicate with other services, such as databases, message brokers, or other microservices. Therefore, an application usually consists of multiple services that form a complete solution. As this tutorial demonstrated, Rancher Desktop streamlines provisioning new development environments that can build and run containers. The open source container management solution usescontainerd,dockerdand a K3s-based Kubernetes cluster to easily spin up Kubernetes for your local environment. Rancher Desktop, now in version 1.3, is a desktop-based container development environment for Windows, macOS and Linux.


Your email address will not be published. Required fields are marked *