Dzone Kubernetes in The Enterprise 2022 1669219453241
Dzone Kubernetes in The Enterprise 2022 1669219453241
Dzone Kubernetes in The Enterprise 2022 1669219453241
Welcome Letter
By Alan Hohn, Director of Software Strategy at Lockheed Martin
What accounts for the ongoing success of Kubernetes That's why I'm excited to introduce this year's Kubernetes
and the vibrancy of its ecosystem? I think it's the way that Trend Report. It provides survey data showing how teams
Kubernetes grew organically out of earlier successful are deploying Kubernetes, their architectures and design
abstractions, each of which allowed development teams to patterns, the tools they're using to manage applications, and
spend less time on technology and more time on capability. the pain points they're experiencing as they maintain real-
world clusters at scale.
Abstraction has been one of the main ways computing has
advanced. As we moved from toggle switches to punch cards In addition, it has expert insights that are essential for a solid
to assembly to higher-level languages, we gained the ability Kubernetes strategy, including how to build security and
to declare desired behavior in a way that's closer to the way observability into a cluster and how to extend that security
we specify the problem. and observability to workloads that run on the cluster,
simplifying maintenance and monitoring.
As we started using virtual memory, multiprocessing, file
systems, software-defined networks, and containers, we Welcome to the 2022 Kubernetes in the Enterprise Trend
gained the ability to think of computing resources in ideal Report! I hope you enjoy reading it and gain insights that
terms — as continuous rather than discrete quantities. help you build and sustain your Kubernetes deployments
Kubernetes provides our ultimate expression so far of this so you can focus your energy on building exciting software
move toward declarative, ideal computing. on top of this amazing platform.
So why can it be so difficult to adopt and gain full advantage Best regards,
of Kubernetes? It's especially puzzling when you realize
that the core Kubernetes APIs and resources have been
quite mature these past few years. While the Kubernetes
ecosystem continues to change quickly, we now have a
stable core on which to build. Alan Hohn
Alan is the author of The Book of Kubernetes (2022). He has over 25 years of professional experience in
technology, including work as a software developer, architect, lead, and manager. This has included
building complex systems fielded in some of the world's most challenging environments. He's an
experienced Agile and DevSecOps coach and currently works in Lockheed Martin Corporate Engineering.
In August 2022, DZone surveyed software developers, architects, and other IT professionals in order to understand how
containers are being used and orchestrated in software development, with a particular focus on Kubernetes. We also sought to
explore the trends from data gathered in previous Trend Reports, most notably our 2021 and 2020 reports on Kubernetes.
Methods: We created a survey and distributed it to a global audience of software professionals. Question formats included
multiple choice, free response, and ranking. Survey links were distributed via email to an opt-in subscriber list, popups on
DZone.com, the DZone Core Slack Workspace, and various DZone social media channels. The survey was open from August
15–31, 2022 and recorded 467 full and partial responses.
Note: Like last year's survey, we recorded a large number of submissions that we considered suspect. In addition to extremely
quick response times per question (< 5s), multiple choice questions all receiving the same answer, very simple response patterns,
etc., we excluded a number of responses that were internally inconsistent — for example, those claiming to both use and not use
containers/orchestration in software projects or being both sure and unsure of using containers/orchestration. In all, we were left
with 292 responses that we considered trustworthy — with a couple of notable exceptions, which we will detail later.
In this report, we will review some of our key research findings. Many secondary findings of interest are not included here.
Research Target One: The State of Resource Isolation and Container Orchestration
Motivations (remain unchanged from our 2021 and 2020 reports):
1. Software development and runtime ecosystems are now complex and tangled enough that OS-level resource
management is often insufficient for avoiding conflicts in build and runtime environments.
2. Relatedly, given the wide array of opinions on manual SQL writing and ORM usage, we wanted to check that as more
applications run on the web, where state management is not built into the application protocol, application state management
becomes increasingly difficult to manage through explicit application-level code while being easier to automate at a lower level.
3. As software architectures increasingly take advantage of the "metal-indifference" of cloud computing while depending
on multi-platform runtimes (JVM, Node.js, and high-performance interpreted languages like Python) and complex graphs
of dependencies — often with their own rapid development cycles — a dimension for horizontal scaling that allows more
granular control over runtime environment (rather than the application source) than VM-level (needed if OS-level WORA
runtimes weren't used) becomes increasingly attractive.
4. Further, as Agile development methodologies encourage radically service-oriented designs that comprise independently
built and managed systems with well-defined system boundaries ("microservices") and strongly opaque internals,
maintenance of a single OS-level environment that serves many services' heterogeneous needs becomes increasingly
difficult — sometimes impossible.
5. Finally, as container use increases, the need for high-level container orchestration also increases.
However, at some point, we expect to see the rate of decline begin to slow down. We hypothesized last year that containers
may be reaching a saturation point in the wider software world, which would create something of a boundary to further
uptake and the choice to move away from these lower-level methods. Therefore, we repeated the question from our last two
Kubernetes Trend Reports:
Table 1
Observations:
1. At first glance, it would seem that low-level means of isolating resources are seeing a resurgence, although delving
deeper into the data reveals more to the story. When splitting out respondents who work at companies with more than
1,000 employees, the picture looks much different (see Table 2). Looking at this audience segment, a clearer story begins
to present itself:
2. On the other hand, company size played no role in the relative rankings of each option — the order for all respondents:
LXC > chroot "jail" > LXD > LXCFS. That much matched our hypothesis last year, and the trend seems to have continued
through this year.
As we did the previous two years, we wanted to explore how these methods are being used both in development and
production environments. For the sake of consistency, we will provide the unfiltered data (Table 3) and the percentages for
companies with more than 1,000 employees (Table 4). See Tables 3 and 4 on the following page.
Table 4
Method Used 2020 2021 2022 (> 1,000 employees) 2020 2021 2022 (> 1,000 employees)
Observation: Last year, we hypothesized that we would see year-over-year drops in lower-level resource isolation method use
in development environments. We figured that development environments would use less complex, less scalable techniques
and, thus, would benefit from higher-level tools as they have become more user friendly. We were wrong across all counts last
year, but the waters are muddier this year. While development environments are still more likely to use lower-level isolation
methods than production, LXD and LXCFS have become more likely to be used both in dev and prod.
CONTAINER POPULARITY
Given the data, we expected to see container usage remain consistent with the numbers from the last couple of years — about
89%. Therefore, we asked:
Do you use application containers in either development or production environments? {Yes | No | I don't know}
Figure 1
92.9%
80 70.3% 80 70.3%
82.8% % using
containers
60 60 Trendline for
44.6% 44.6%
42.2% 42.2% unfiltered data
R² = 0.7682
40 40
Trendline
for larger
20 20 companies
R² = 0.8725
0 0
2017 2018 2019 2020 2021 2022 2017 2018 2019 2020 2021 2022
That's certainly possible, but we have our doubts. However, we don't want to get into the habit of rejecting data that
doesn't fit a narrative — instead, we're going to simply provide full disclosure and walk through it. After all, as we
posited last year, this could simply be an indication that more companies, especially smaller, perhaps newer ones, are
turning to "micro-VM" serverless-supporting technologies rather than spinning up new containers.
2. Instead, we once again broke out the data by company size, and the picture became a bit clearer. Taking both datasets at
face value, it looks like smaller companies are becoming more hesitant to adopt containers in general. However, looking
at our previous surveys, there has not been a significant correlation between company size and container adoption.
To unpick this thread, we plotted the coefficient of determination (the R2 value) for both datasets. For the statistically
uninitiated, that means we're looking to see how much of the variance we see in the data can be explained by the
model (the trendline here). The closer to 1 the R2 value is, the more the model explains the variance in data. Therefore,
given that the R2 value is higher this year when looking at larger companies (0.8725) than overall (0.7682), we're going
to assume that this is a more trustworthy number in general.
3. All of that is to say, we believe container adoption remains solidly at or around the 90% mark — however, that floor might
be softer than people generally expect, and containers may not be as enticing as they once were for smaller companies.
MANAGING CONTAINERS
To create a container is one thing, but to manage them is another. And, of course, containers are a small but important part of
the wider development ecosystem. Therefore, we wanted to know exactly how people are managing those containers. With
that in mind, we asked:
What tools/platforms are you using to manage containers in development and production? Select all that apply.
it seems that most respondents use Docker Docker 108 19.5% 62 13.7%
in development, then switch to Kubernetes in
Kubernetes 82 14.8% 77 17.0%
production.
Docker Compose 74 13.3% 24 5.3%
2. Taking a walk on the cloudy side, AWS has
maintained its market dominance. The Big Three AWS EKS 51 9.2% 56 12.3%
have continued their relative rankings since time Terraform 43 7.7% 50 11.0%
immemorial (or at least 2016) — Amazon > Azure >
AWS ECS 34 6.1% 40 8.8%
Google, although GKE fared better against Azure
than we would have anecdotally expected. Ansible 34 6.1% 26 5.7%
away from spinning up new containers, it's possible we'll Firecracker 8 1.4% 8 1.8%
see a slight year-over-year dip. So once again, we asked:
Does your organization run any Kubernetes clusters? {Yes | No | I don't know}
80
78 77.0% 77.2%
76
74
73.6% 73.6%
72
70
2019 2020 2021 2022
Observations:
1. Our hypothesis was correct. Kubernetes adoption seems to have stalled and is hovering in the mid-70s percentage
range overall.
2. Once again, as we break out the data into smaller and larger companies, the same trend we've established rings true. Of
the responses, 85.5% of participants from larger companies said they ran Kubernetes clusters, whereas "only" 63.4% of
respondents from smaller companies said they did.
Historically, a chief complaint about Kubernetes has been its lack of user friendliness, and while container-related
tooling has no doubt improved over time, it's reasonable to assume that companies with fewer people and resources
just don't care to put as much effort into Kubernetes adoption as massive enterprises.
INFRASTRUCTURE ABSTRACTION
And lastly, for this research target, we wanted to examine our community's attitude toward infrastructure abstraction. We
noticed a slim but growing pessimism in last year's results, and we expected that to continue. Just as we asked in 2020 and
2021, we asked this year:
Please select the option that best describes your attitude toward infrastructure abstraction in 2022.
Table 6
% of Total Respondents
Infrastructure abstraction in 2022 is excessive and getting out of hand 16.0% 18.4% 21.2%
We're finally getting close to pure, non-leaky infrastructure abstraction 21.3% 18.8% 26.3%
Observations:
1. The results here are telling — respondents are feeling worse about infrastructure abstraction. The percentages grew
slowly but steadily in the attitudes of "getting out of hand" (18.4% in 2021 vs. 21.2% in 2022) and "not worth the cost" (the
inverse of the 46.2% in 2021 vs. 44.9% in 2022).
3. It's worth repeating that the biggest camp is still those who think the gains are worth the complexity, which is unsurprising.
Meanwhile, it will be interesting to see whether that newfound optimism among the "pure, unleaky" camp sours over the
coming year, or if advances and maturation within the field will stem the flow of the more pessimistic parties.
2. On the other hand, now that Kubernetes is not quite as "buzzwordy," we wanted to keep tabs on what it might not
have been up to snuff for. After all, the list of anecdotes about companies implementing the hot new tool or technique,
regardless of how optimal it is for a given use case, would be longer than this Trend Report.
3. And finally, just like in 2021, we wanted to gauge the community's feelings on Kubernetes infrastructure and workload
state matching, considering the importance of solving that problem for distributed systems.
Considering that, we're going to take another look at a question we asked in both 2020 and 2021:
reliability, and that caution served us well. Security 24.9% 31.3% 31.2%
That dip was erased — and then some — this
Other 3.2% 2.6% 4.3%
year as nearly half of respondents considered
Kubernetes to help with reliability. This could
be a sign of differing audience demographics year over year or simply a sign that Kubernetes was on the wrong track and
course corrected in a pretty spectacular fashion.
3. Last year's jump in security has held firm. It's still not a popular opinion, but Kubernetes' impact on security seems to have
stabilized year over year.
For the curious, the next closest picks for what Kubernetes made worse were security (26.1%) and architectural
refactoring (24.4%). Every other area was selected at rates in the teens.
5. Otherwise, the story being told seems to be one of stabilization and mild decline. For instance, fewer than half of
respondents now think Kubernetes makes building microservices better as opposed to last year (52.3%) and 2020 (53.6%),
architectural refactoring dipped slightly, and autoscaling rose a bit after last year's minor dip.
Do any of your organization's Kubernetes clusters run any stateful workloads where state is maintained within the cluster?
Table 8
% of Total Respondents
Observation: The trendline here is simple to read — Kubernetes has continued its gradual incline in popularity of maintaining
state while running stateful workloads.
However, we also wanted to double check how happy people are with that arrangement, so we asked:
Are you glad that your Kubernetes cluster(s) maintain(s) state within the cluster(s)?
Table 9
% of Total Respondents
Observations:
1. Overall, people are still happy with the job Kubernetes is doing in handling this thorny problem. Three in four respondents
is a pretty decent line to maintain all things considered.
Lastly, for this section, we wanted to take a quick look at how exactly our community was maintaining state with Kubernetes.
Therefore, we asked:
What construct(s) does your organization use to maintain state within a Kubernetes cluster?
Results:
Figure 3
1.1%
16.5%
StatefulSet
DaemonSet
Other - write in
Observations:
1. Unsurprisingly, the classic StatefulSet is seen as the go-to option for most users, although it will be interesting to see how
this result changes over time.
2. For example, as the importance, prevalence, and number of projects involving monitoring and logging continue to grow,
we will see how the DaemonSet camp adjusts with respect to the other options. For what it's worth, smaller companies
seem somewhat more likely to rely on StatefulSets vs. DaemonSets than larger ones, which could be an indication of
those monitoring and logging functions of big projects.
Results:
Figure 4
70
60
50
> 1,000
40 employees
30 < 1,000
employees
20
10
0
StatefulSet DaemonSet CustomResourceDefinition Other - write in
2. Given the importance of scalability in the modern development paradigm, we wanted to see what kinds of autoscalers
our community is choosing when working with Kubernetes and look at what those results indicate about ideal use cases.
So we asked:
What types of workloads does your organization run on Kubernetes clusters? Select all that apply. {Web applications | CPU-
intensive | GPU-intensive | Memory-intensive | Storage/database-intensive | Non-web general compute | Other}
Results:
Figure 5
100
80
60
40
20
0
Web apps CPU-intensive GPU-intensive Memory- Storage/database Non-web Other
intensive -intensive general compute
Observations:
1. In a change from last year, we broke out non-web general compute into its own category for 2022. Last year, we wanted
to see how Kubernetes handled comparatively ephemeral connections with strong connection-level transaction
semantics, so we simply combined both options. Last year's number for those combined figures was 84.6%, but we could
not confirm whether web apps were especially popular choices for Kubernetes clusters. This year, however, we can safely
conclude that yes, web applications seem to be the primary use case for Kubernetes.
2. We also wanted to follow up regarding the least popular option: GPU-intensive workloads. Kubernetes's ability to
schedule GPUs is still in beta, but we saw a year-over-year increase from 15.4% in 2021 to 17.2% this year. Last year, we were
impressed that an experimental feature saw even 15%, so it's unsurprising that given another year of more or less the
status quo, there's been a slight uptick in usage.
3. It's also worth noting that we didn't see quite so obvious a split between the categories of this question and which
respondents thought infrastructure abstraction was getting out of hand as we did last year. In 2021, we noted that respondents
whose organizations worked with GPU-intensive workloads were most likely to think that infrastructure abstraction was
getting out of hand, whereas those working with storage/database-intensive workloads were least likely to feel that way.
The "GPU-intensive" camp still feels that way, but it seems the "storage/database-intensive" crowd has begun to
feel the same. However, respondents whose companies worked with memory-intensive workloads were most likely
What kinds of usage/traffic patterns do your organization's Kubernetes clusters serve? {Predictable and frequent (short,
known idle periods between work) | Predictable and infrequent (long, known idle periods between work) | Unpredictable with
low variance (unknown heavy-usage times within narrow range) | Unpredictable with high variance (unknown heavy-usage
times not within narrow range) | A mix of all the above}
Results:
Figure 6
50
40
30
20
10
0
Predictable/ Predictable/ Unpredictable/ Unpredictable/ Mix
frequent infrequent low variance high variance
Observations:
1. This data is similar to last year's, with a couple of notable exceptions. First, more respondents chose a mix of all the above
over predictable, frequent workloads, which seems to emphasize that most professionals see Kubernetes as a strong
general-purpose option for orchestration. That being said, it's clear that lightweight services (signified by the short,
known idle periods between work) are still considered desirable when working with Kubernetes.
2. Second, unpredictable workloads with high variance overtook those with low variance, although they were still close
in 2021. It's worth pointing out that both percentages went down, but the low-variance figure dropped much more
heavily. This could be one of those one-year reversals, or it could be a sign that there's just a better option when there are
unpredictable bouts of heavy amounts of work within a narrow range.
AUTOSCALERS
And speaking of scalability, we wanted to end these research findings by examining which autoscalers are preferred in
Kubernetes clusters. We asked:
What autoscalers does your organization use in its Kubernetes clusters? Select all that apply
Results:
80
60
40
20
0
Vertical Horizontal Cluster Other - write in
Observation: Horizontal autoscaling actually increased its gargantuan lead over last year, where it hovered around 65%. We're
going to parrot last year's sentiments that because horizontal autoscaling is (generally) more opinionated, Kubernetes is being
used mostly to solve easier problems when it comes to cluster management.
Future Research
These key research findings were an attempt to understand and explain the trends of container adoption in general and
Kubernetes in particular. Given the relative saturation of containers in modern development, it is perhaps expected that we are
seeing rates stabilize. However, we'll also keep an eye on that potentially soft ~90% mark when it comes to container adoption,
especially when considering company size.
We will also continue to monitor data on workload types, traffic/usage, and autoscaler choice to see whether those figures
change in the coming year. And, of course, we want to monitor the pros and cons of Kubernetes as this powerful tool continues
to grow and mature in the ecosystem.
Please contact publications@dzone.com if you would like to discuss any of our findings or supplementary data.
Mike has spent more than five years working with DZone contributors and clients alike, with roles ranging
from frontline web editor to editorial consultant to managing editor. These days, he uses his history of
recognizing readership trends to write and edit articles for DZone.com — when he isn’t busy listening to
audiobooks and searching for the perfect oven-baked beef brisket recipe.
Boost EKS
with D2iQ.
Take command
with a unified view.
Challenge
Based in Italy, Cerved is the premier provider of credit risk analysis and other
business information, and has been in business since 1974. In modernizing
its IT infrastructure, Cerved aimed to gain improved business agility and the
benefits of a containerized environment. However, moving to a container and COMPANY
microservices platform required not only a transformation in architecture, but Cerved
also required Cerved's IT staff to acquire new Kubernetes management and
developer skills. COMPANY SIZE
5,000 employees
Solution
INDUSTRY
Moving Cerved's entire business to Kubernetes in the cloud was a major
Information services
undertaking that involved risks such as disruptions and downtime.
PRODUCTS USED
Cerved made the migration to cloud-native Kubernetes in steps, first moving
Kubernetes, D2iQ Kubernetes Platform
its development and test environments to D2iQ Kubernetes Platform (DKP)
(DKP), Amazon Web Services (AWS)
running on Amazon Web Services (AWS). After this successful migration,
Cerved successfully moved its production environment to DKP on AWS.
PRIMARY OUTCOME
Cerved's main goals were to accelerate
Results
time to market, employ a DevOps
The goal was to be more agile and faster to market — from marketing to the
approach, and gain more agility, stability,
production of services — and to scale more easily and gain more stability. The
and scalability.
DKP platform delivered on all of these promises.
On the DevOps side, production issues are easier to handle. In the case of a
failure, it's quick and easy to patch or roll back. The openness and portability "D2iQ's platform offers simplicity. The
of DKP is another major benefit, making it easy to move to Google, Azure, or fact that it is basically a pure Kubernetes
any other cloud provider. It's also easy to reproduce services on another site, open-source platform means there is
on-premises, or in the cloud. flexibility."
Going forward, Cerved plans to expand the scope of the environment to more — Damiano Tarantino,
clusters and to shorten the AI lifecycle for its data scientists, making it easier IT Architecture &
to move from idea to models to production. Infrastructure Director, Cerved
Kubernetes today is the most prominent and prevailing container orchestration engine. Kubernetes became central to
cloud-native computing because it is open source and has a rapidly growing ecosystem. If we observe its evolution and
adoption trend in last few years, especially around the cloud native world, it is more than "just" a container orchestration tool.
It has outgrown being a container orchestration engine and is now a frontline building block of a next-generation cloud-
native ecosystem.
Developers are experimenting with Kubernetes by reimagining and reestablishing it as much more than just a container
manager. We will discuss a few of its established enterprise patterns and buzzing use cases in the open-source community.
2. Serving – deploys functions (image build) on Kubernetes clusters and maps scaling, routing, etc.
Like kubectl for Kubernetes, kn is the new, hot command on Figure 1: Serverless on top of Kubernetes
the terminal for enabling Function as a Service (FaaS) on top
of Kubernetes. It takes a container image as a building block
and handles everything on top of Kubernetes. Kubernetes is
serverless for containers and is similar to what AWS Lambda is
to function. Kubernetes as a serverless platform is accelerating
its adoption across the enterprise; however, its peers like
AWS Lambda, Cloud Functions, and Azure Functions are still
dependent on vendor lock-in (i.e., they only work if you deploy
on their cloud).
Containers and Kubernetes combined are powerful and flexible for building big data software as compared to conventional
data cluster setups, which have the complexity of distributed cluster management and compute scale overhead. Kubernetes
leverages on-demand GPU and CPU computing to enhance big data and ML processing. Kubernetes can deliver GPU-
accelerated computing and network solutions for running ML and NLP processing on the edge. Kubernetes running on a
co-processor is becoming an important part of future computing. Its dynamic resource utilization is beneficial for data science
workloads, while training models or feature engineering demands can scale up and down very quickly.
Frameworks like KubeFlow, Spark, Hadoop, PyTorch, TensorFlow, and more are now adopting containers. Stateful MLOps
are widely adopting containers and Kubernetes for spinning multiple clusters, processing large training and test sets, and
storing learned models. To simplify handling data modeling frameworks, one option is Kubeflow, an open-source ML toolkit for
Kubernetes to run declarative, configurable jobs to execute.
Kubeflow abstracts and orchestrates complicated big data and machine learning pipelines that are running on top of
Kubernetes. Kubernetes under the hood of ML pipelines is a staple for MLOps. It makes it easy for data scientists and machine
learning engineers to leverage hybrid cloud (public or on-premises) for processing elasticity and scalability. Kubernetes enables
building a neutral big data platform to avoid vendor lock-ins of cloud-managed services.
KUBERNETES AS A FEDERATION FOR HYBRID AND MULTI-CLOUD CLUSTER FOR THE ENTERPRISE
Kubernetes is infrastructure agnostic and is leveraged by enterprises for sophisticated container-based cluster federation.
Kubernetes helps to combine a hybrid or multi-cloud setup into a single platform lump for obvious benefits.
Managed services are not the solution for everything. There is always a struggle between balancing the convenience of a public
cloud versus a private sovereign cloud. Kubernetes is seen as an answer for this, as it enables multi-cloud access for seamless
application delivery across the industry standard API (Kubernetes interface). It helps to achieve regulatory compliance for
enterprises with Kubernetes by abstracting private and public cloud integration as single federated platform.
Enterprises leverage Kubernetes to avoid vendor lock-in by providing flexibility around hybrid and multi-cloud clusters. It's
interesting to observe how current cloud-based architecture patterns have adopted Kubernetes. Cloud-based enterprises along
with the open-source community have realized that Kubernetes is not just a container management tool. It is now evident that
Kubernetes is a complete platform to host lifecycles for running an application on a hybrid or multi-cloud paradigm.
• Kubernetes in conjunction with hyperconverged infrastructure (HCI) is a new private or hybrid cloud alternative. It gives
enterprises full control of their services and regulatory sanctity.
• Kubernetes enables enterprises to achieve a single abstracted and simplified* platform to operate SRE, DevOps, and
DevSecOps on top of a hybrid and multi-cloud span. (*That's debatable for sure.)
Conclusion
Generally, large organizations are not comfortable giving up platform controls to AWS Lambda, AWS Fargate, or Azure
Functions. Kubernetes has become a de facto choice that provides the best of both worlds — control and on-prem sanity
along with cloud-native compute elasticity, scalability, and resiliency that comes from a declarative containerized ecosystem.
Kubernetes with open-source tools like Helm (IaC), Grafana (telemetry dashboard and alerting), and Prometheus (metric
ingester) is making it a perfect recipe for a DevOps-enabled and SRE-friendly ecosystem for the enterprise.
Data science and machine learning enterprises are accelerating Kubernetes adoption as a big data processing platform. Lately,
ML and big data frameworks are becoming containerized, which makes Kubernetes a preferred choice for a data clustering
and modeling ecosystem under the hood. This preference also includes Kubernetes' abstracting elastic GPUs and CPUs plus its
on-demand scalability with statefulness.
Kubernetes abstraction frameworks like Knative are taking Kubernetes to another level. Kubernetes is becoming a new
server for serverless architecture, and it is gaining momentum. It is providing open-source alternatives for AWS Fargate and
OpenShift. Kubernetes is "the wolf in sheep's cloth"; it has been reimagined into many shapes and forms beyond being "just" a
container orchestration tool.
Pratik is an experienced solution architect and a passionate engineer with hands-on multi-cloud and
data science expertise. He is an open source advocate and enjoys community participation around Java,
Kotlin, and the cloud native world. He has worked with companies like UnitedHealth Group as a senior
staff engineer and with Fidelity International as an expert engineer where he led engineering teams for cloud-native
application modernization.
If you are a developer or an engineer working in the software industry, then you have undoubtedly noticed the complexity of
managing resources across different services and applications. This is especially true when your company has scaled beyond a
single data center or environment. With so many stakeholders involved in various projects, it becomes difficult for everyone to
keep track of where everything stands at any given time. This is where Kubernetes comes into the picture.
There are several reasons why Kubernetes is gaining popularity among modern businesses:
• Kubernetes can improve productivity and scalability, reduce the risk of downtime, and enable continuous delivery
of applications.
• Kubernetes comes with a rich set of features out of the box, making it easy for you to set up and manage a containerized
application lifecycle from development to production.
• Kubernetes is open source, and its development has been driven by the community. It is also highly extensible, allowing
third-party vendors to build tools and services that can integrate with Kubernetes and make it even more powerful.
• Kubernetes supports all major operating systems and is also compatible with most standard programming languages.
Kubernetes is a powerful tool for accelerating your journey to the cloud-native world, making it easier for you to manage
containerized microservices and accelerate your adoption of DevOps practices. In this article, we will see why Kubernetes is a
must-adopt cloud-native tool for businesses and how it helps them speed up their software deployment.
Kubernetes handles the entire lifecycle of your application containers, including the orchestration, configuration, and
scheduling of containers across a set of machines. In addition, Kubernetes is designed to be highly scalable and fault-tolerant,
making it ideal for continuous delivery of your code and enabling you to achieve continuous delivery with less manual effort
and better collaboration between your teams.
The most significant benefit of Kubernetes for DevOps and the cloud-native ecosystem is that it alleviates burdens. It allows
engineers to share their dependencies with IT operations. It also resolves conflicts among different environments. It allows
the engineers to handle customer needs while relying on the cloud for many functioning applications. Kubernetes simplifies
container tasks, such as canary deployment, rolling updates, and horizontal, vertical, and dynamic auto-scaling. It is critical to
the DevOps managed services to streamline development, testing, and deployment pipelines.
Kubernetes can assist with continuous application delivery by rolling out updates in a consistent and streamlined fashion. The
application can be orchestrated using containers. In order to deploy multiple applications using Kubernetes, each one of them
is placed in a distinct container. Since the updates can be performed in one part of the application by restarting the container
without impacting the remainder of the software, they can be accomplished in one part of the app.
Each microservice behaves as an individual service without affecting the other service. This helped developers as well as
organizations to deploy software in chunks with increased frequency. During this time, Docker was introduced to deploy these
microservices with the containerization concept.
Figure 2 below shows a simple representation of microservices architecture with various microservices involved in an
e-commerce website:
Docker completely revolutionized software packaging and delivery with containers, helping organizations to deliver software
with speed. While containerization made a big move, there was a need for an orchestrator to manage these containers, and
that is how Kubernetes was born.
Consider a scenario where a start-up is making use of Docker containers. As the startup grows, the number of applications
also increase and, similarly, so do the containers. It is easy to manage these containers when their number is lesser, but as the
number starts to grow, it becomes difficult and you need an orchestrator to manage these containers. This is exactly where
Kubernetes shines and helps you manage the containers with its unique features of scalability, security, self-healing, high
availability, and much more.
• Removes downtimes
• Helps in application scalability according to the traffic pattern
• Helps in securing the application and the Secrets by incorporating security policies
• Allows running a plethora of applications in production
• Allows applications to roll back if something goes wrong
• Increases developer productivity by automating the tasks associated with containers.
With Kubernetes, you can deploy new projects more quickly. A reusable pipeline and new loads as code modules can now
be distributed across a variety of projects. It can be difficult for development teams to keep tabs and monitor infrastructure
operations if they are not automated. Unexpected traffic spikes or power outages, for example, might occur. When the
application goes down, it is not a good sign for the organization. With Kubernetes, you can automate scaling and update
patches to address such issues.
Let’s consider an example to help understand the importance of Kubernetes in the cloud-native ecosystem. Let’s say you have
a production app that handles customer orders. You don’t want to push new code to that app unless it’s been thoroughly
tested and meets certain criteria. Traditionally, you would wait until your testing team has confirmed that the new code can be
deployed safely, and then you would wait for an operations engineer to perform the deployment manually. While this model
works, it’s incredibly time-consuming. This is especially true if you have multiple apps that require this type of attention.
If your app fails, you might need to wait several days before retrying the deployment. This causes your organization to lose out
on valuable production time while you wait for the system to be ready again. With Kubernetes, you can use continuous delivery
to deploy new code to your production app every time someone pushes a new version to the code repository. This ensures that
nothing is deployed to production unless it meets your organization’s deployment criteria. Kubernetes also has a built-in self-
healing mechanism that can quickly detect when nodes go offline and bring them back online.
• The German automaker Mercedes-Benz makes use of 900 Kubernetes clusters to support its wide range of products
across the globe.
• PayPal recently started scaling Kubernetes to over 4,000 nodes and 200,000 Pods.
• HBO found that in times of peak demand for Game of Thrones, it was running out of available IP addresses to help deliver
the content to viewers, and HBO chose Kubernetes to solve this problem along with scalability issues. "We went from not
running a single service inside of a container to hosting all of the Games of Thrones Season Seven with Kubernetes," Illya
Chekrygin, Senior Staff Engineer at HBO, told the 2017 KubeCon audience.
• Kubernetes helped Tinder Engineering drive innovations toward containerization and low-touch operation through
immutable deployment. Application build, deployment, and infrastructure would be defined as code. They were also
• Pinterest used Kubernetes to scale its workloads, and by the end of 2020, they orchestrated 35,000+ Pods with 2,500+
nodes in their Kubernetes clusters.
Conclusion
From its origin as an open-source project within Google to becoming a leading force in the enterprise cloud-native space,
Kubernetes has come a long way. Today, enterprises and developers from all over are finding new ways to leverage Kubernetes
for operations and application development. Kubernetes has become the standard approach for deploying and managing
containerized applications. The Google-backed project has grown significantly in adoption since its inception. If you’re looking
to accelerate your organization’s digital transformation journey, you should consider using Kubernetes. While it’s not a tool
that every organization will need, it is an essential piece of any modern IT toolkit. Kubernetes has gained a special place in the
cloud-native ecosystem, and in fact, it has become a synonym for the word "cloud-native."
Pavan is a global DevOps influencer and technology writer who loves talking about Kubernetes and
experimenting with Node.js applications. As a developer advocate at Harness, he wears many hats,
including writing articles, talking at meetups and conferences, and helping developers learn how to
deploy software efficiently. In his free time, he shares DevOps stories on LinkedIn, sings Bollywood songs, and plays cricket.
Advancements in Cloud-Native
and Kubernetes Observability
By Marija Naumovska, Co-Founder & Technical Writer at Microtica
In today's world, it's more important than ever to have visibility into your system's performance and health. Modern applications
rely on complex microservices architectures and cloud-native technologies, like Kubernetes. Observability helps us understand
not just application behavior, but also infrastructure configuration changes and dependencies, as they happen in real time.
Monitoring, or metrics, measure the health and performance of applications and their infrastructure — these are quantifiable
measurements. Metrics provide real-time alerts of resource statuses and are critical for collecting insights into how fast your
application responds and/or detects early indicators of performance problems.
Another pillar of observability is logging. Logging captures detailed error messages as well as stack traces. Logs are records of
events, warnings, and faults that occur inside a system. They are a great source of visibility as they contain information like the
time an event took place and who or what endpoint was associated with the event.
By combining logs and traces, you can get the full context of a system's availability. Tracing helps to investigate an issue or
performance bottleneck in a containerized or microservices-based ecosystem by collecting data of the entire journey of an
application request that moves through all the layers and nodes of that system.
Security issues and vulnerabilities can be detected quickly with good monitoring and observability tools in place.
In the past few years, cloud-native observability tools have made huge advancements. Many different tools have emerged for
metrics monitoring, collecting data, and analyzing logs and traces from individual parts of your cluster.
To achieve this goal, most of these tools offer native integration with monitoring systems so that you can get notified if any
service goes down unexpectedly or is experiencing high load. Additionally, many of these products also have sophisticated
analytics capabilities that allow analysts to drill down and understand what is happening at a microservices or application level.
This unified observability approach has an exciting promise: to provide a deeper correlation between the three pillars and help
teams define and track metrics that are important for their business requirements.
The state of Kubernetes observability is constantly evolving, so it's important to stay up to date on the latest trends. This
includes learning about the different types of monitoring tools that are available and choosing the best one for your needs.
Table 1
Prometheus The most adopted open- • Real-time metrics and data collection • Doesn't have built-in long-term storage
source observability tool • Grafana integration • Rudimental anomaly detection
for event monitoring and
alerting • Visualization for containerized • Handles only metrics, not logs or traces
applications • Has challenges with horizontal scaling
OpenTelemetry This project standardizes • Expands the fourth pillar called • Doesn't provide backend storage
how you collect and send "profiling" to help better understand • Doesn't have a visualization layer
telemetry data to a back- performance
end platform, such as • Doesn't provide a storage solution
• The Kubernetes Dashboard can be used
Prometheus or Jaeger to visually track important info, like
containers and Pods running in clusters
• Metrics about apps and app
deployments running in the Pods, as
well as resource utilization
Jaeger A popular choice for • Makes debugging easier by using • Offers limited back-end integration
Kubernetes tracing; tracing to analyze root causes and
its main purpose is to monitor distributed transactions
monitor microservice-
based systems and
collect data in storage
back ends of your choice
cAdvisor A Kubernetes built-in • Collects data on a node level, such • Doesn't offer rich functionality, as it
monitoring feature that as resource usage and performance collects only basic utilization metrics
exists by default on characteristics, and displays them on a • Doesn't offer any long-term storage
every node web-based interface
• No deep analysis or trending metrics
• Handles only metrics, not logs or traces
Additionally, the trend of moving applications to Kubernetes is likely to increase the demand for observability solutions in the
future. Kubernetes helps developers ship their apps to the cloud in a containerized matter, which is now deeply connected to
the cloud-native way of working. More than just a technology, Kubernetes becomes a business decision that drives the value
for the company that incorporates it, because it means that you develop and deliver apps in a cloud-native manner, making
you ready for innovation.
Kubernetes is most powerful when properly managed and monitored. That's why it's important to think about observability
from the start. Implementing the right tools and standards for cloud-native observability can save your business valuable time
and resources because it will help the organization detect incidents and resolve them in a timely manner.
As a co-founder of Microtica, Marija helps developers deploy their applications on the cloud in a self-
service manner. She's a Software Engineer with about 10 years of experience, who now works as a product
person and technical writer full time. She writes about cloud, DevOps, GitOps, and Kubernetes topics.
Passionate about computing since writing my first lines of code in Basic on Apple 2, I share my time
raising my young daughter and working on AWS Cloud Quest, a fun learning experience based on 3D
games. In my (little) spare time, I like to make comics related to programming, operating systems, and
funny situations in the routine of an IT professional.
For some time, microservices have drawn interest across the architecture and software engineering landscape, and now,
applications comprised of microservices have become commonplace. So what exactly is the definition of a microservice?
That is somewhat of a loaded question as there is plenty of debate on granularity, segmentation, and what designates a
microservice. For the purposes of this discussion, a microservices-based architecture is segmenting an application's units of
work into discrete, interoperable components. This is a broad definition, but it is workable in that it identifies two foundational
microservice concepts: discrete and interoperable.
Along with the technical and business benefits, a microservices-based application architecture brings its own set of challenges.
These challenges have been met with solutions ranging from new architectural patterns to the evolution of tech stacks
themselves. Kubernetes has become one of the technologies in the tech stack evolution. Deploying microservices using
Kubernetes enhances and enforces key principles and patterns while offering additional benefits.
• All key microservices patterns, development, and deployment best practices are applied.
• Application tech stacks and components are unchanged.
• Continuous integration/continuous delivery (deployment) systems remain intact.
• Operating system platforms and versions can be tightly controlled.
DIFFERENCES
The differences between Kubernetes and non-Kubernetes microservices architectures focus less on the task performed by the
microservices and more on the deployment of non-functional requirements. Satisfying non-functional requirements is not a
new concept introduced by Kubernetes or even by a microservices architecture. However, through a combination of leveraging
the services offered by Kubernetes itself as well as defining cross-cutting application support services, supporting many non-
functional requirements becomes transparent to an application. The following are two examples.
KUBERNETES INGRESS
A Kubernetes Ingress is an example of a configurable service that auto-configures external access to microservices. When a
microservice is deployed, it can define whether and how it is to be externally accessed. If a microservice specifies that it is to
be externally accessible, the Ingress services within the Kubernetes cluster automatically configure external access, including
details such as virtual host definitions and SSL certificates.
Here, a Kubernetes Ingress accepts HTTP(S) requests external to the Kubernetes cluster and, based on the request path, routes
requests to specific services within the cluster.
OPERATORS
Kubernetes Operators are a Cloud Native Computing Foundation (CNCF) specification outlining a pattern that supports
cross-cutting application services. They behave similarly to a Kubernetes Ingress in that a service is auto-configured based on
application specification. The primary difference is that Kubernetes Operators present an abstraction where any type of service
is automatically configured to extend the behavior of a Kubernetes cluster. There are Kubernetes Operators that connect
applications to logging and metrics systems with the application knowing little of the specifics regarding those systems'
implementation. There are also Kubernetes Operators that will build and deploy complete database instances.
In the diagram above, an application requests that a service be made available for its use. The Kubernetes Operator monitors
and watches for requests. When a request is made, the Kubernetes Operator instructs the Kubernetes cluster to deploy or
configure a cross-cutting service specific to the application's request.
ABSTRACTIONS
Kubernetes provides and supports abstractions over many systems required to satisfy non-functional components. Successful
Kubernetes microservices architectures are comprehensive beyond application architecture, considering a strategy to not only
address interoperability across microservices but coordination with common services.
Kubernetes provides a construct called a Service. A Kubernetes Service specifies ports that a microservice wishes to expose
and how they are to be exposed. Services provide two powerful features. First, a Kubernetes Service integrates with the internal
Kubernetes DNS service to provide a consistent host name by which the microservices are accessed within the Kubernetes
cluster. In addition, if there are multiple instances of the same microservice Pod, a Kubernetes Service can act as a load
balancer across the Pod instances, providing high availability.
While Pod instances can be individually deployed, manually monitoring their status is impractical. A common pattern for
adding automation to Pod "-ilities" is Kubernetes Deployments. Kubernetes Deployments specify details surrounding Pod
definitions and provide several features that support the production deployment of microservices, including:
With Pod, Service, and Deployment definitions, a solid microservices architecture is in place. In this microcosm, one piece
remains — that is, auto-scaling. With Deployments, scalability is available, but like direct Pod deployments, they are manually
controlled. The final component to this architectural pattern is using a HorizontalPodAutoscaler to automatically scale the
number of Pod instances based on certain criteria (e.g., CPU usage).
This example demonstrates how Kubernetes can take any containerized microservice and, using Kubernetes constructs, satisfy
the critical non-functional requirements that most applications require. Assembling the patterns discussed here, the following
diagram presents a high-level visual of a Kubernetes microservices deployment pattern:
The diagram portrays two microservices, "greensvc" and "bluesvc." Each microservice utilizes a Kubernetes Service to expose
its functionality. In addition to providing high availability by load balancing multiple Kubernetes Pods per microservice, the
Kubernetes Service maps expose Pod ports to port 80. The definition of a Kubernetes Service also creates DNS entries internal
to the Kubernetes cluster (greensvc.ns.cluster.local and bluesvc.ns.cluster.local) that can allow microservices to interoperate.
Both microservices are exposed outside the Kubernetes cluster through a Kubernetes Ingress. The configured ingress routes
incoming requests to their respective services.
In grasping the platform independence offered by Kubernetes, developing and testing the deployment of microservices can
begin with the development team and evolve through to production. Each iteration contributes to the overall deployment
pattern. A production deployment definition is no different than a developer's workstation configuration. This pattern provides
a level of validation that is difficult to reproduce in any previous pattern and can lead to rapid maturity of an application's
delivery cycle.
The Kubernetes ecosystem offers tools that support these patterns. The most predominant tool is Helm, which orchestrates
the definition, installation, and upgrade of Kubernetes applications. It's through tools such as Helm that the same deployment
definition can be executed across multiple runtime environments by simply supplying a set of parameters specific to a runtime
environment. These parameters don't change the deployment pattern; rather, they configure the deployment pattern to meet
the runtime environment (e.g., configuring the amount of memory to allocate to a process).
To learn more about Helm charts, check out the article, "Advanced Guide to Helm Charts for Package Management in
Kubernetes," on page 42 in this Trend Report.
Whether it's Kubernetes or a different deployment platform, the same issues that need to be considered will need to be
addressed up front or later. In software engineering, it's almost always best to consider issues up front. Kubernetes directly
helps in addressing many microservices architectures and deployment challenges.
With over 35 years of experience in the IT industry, Ray thoroughly enjoys sharing his experience by
helping organizations deliver high-quality applications that drive business value. Ray has a passion for
software engineering. Over the past 10 years or so, Ray has taken a keen interest in the cultural and
technical dynamics of efficiently delivering applications.
Helm is undoubtedly one of the most popular and successful open-source projects in the Kubernetes ecosystem. Since it was
introduced at the inaugural KubeCon in 2015, Helm's usage has steadily grown to solidify its status as the de facto package
manager for Kubernetes. It graduated from the Cloud Native Computing Foundation in 2020, and in the CNCF Survey 2020,
more than 60% of the survey respondents reported Helm as their preferred method for packaging Kubernetes applications.
This rates significantly higher than Kustomize and other managed Kubernetes offerings.
Given Helm's popularity and ubiquity, it's important to understand the architecture and usage patterns to utilize the tool
effectively. In this guide, we'll break down the key concepts underlying Helm's structure and walk through some best practices.
Helm Structure
Helm packages Kubernetes applications into charts, which is a collection of templated Kubernetes manifest files. Each chart
contains the following content:
example-chart/
├── .helmignore
├── Chart.yaml
├── values.yaml
├── charts/
└── templates/
└── tests/
...
• .helmignore – Defines files or patterns to ignore when packaging up the Helm chart (e.g., .vscode, .git, secret files).
• Chart.yaml – Contains top-level metadata about the Helm chart including the name, version, and other dependencies
if the chart bundles multiple applications together. Examples of dependent charts include packaging Zookeeper with
Kafka or grouping Prometheus and Grafana together.
• values.yaml – Sets default values for all templated portions of the chart under templates directory. These default values
can be overridden via –values or –set flags.
Underneath the hood, Helm uses Go templates to coalesce values into the corresponding template files. This means that it's
important to understand YAML syntax as well as Go's data types to create, update, or use a Helm chart.
HELM LIFECYCLE
Once the chart is created, it is ready to be deployed into a Kubernetes cluster. The Helm CLI uses install or upgrade
commands to trigger a new release. Each release is an isolated, deployed artifact of a versioned, templated chart. This means
that it is possible to have multiple releases of the same chart as long as the underlying values do not conflict. For example, a
PostgreSQL Helm chart can be deployed with the same configurations to two different namespaces.
Also, Helm keeps a history of each release, allowing easy rollbacks. To see the release history, run helm history <name-of-
release>. Then to roll back, use helm rollback <name-of-release> <version>. While these CLI commands are useful for
development, these will most likely be controlled by a more robust CD system in production.
1. helm lint – Examines the chart for syntax issues such as poorly formatted YAML indentation or missing values. Running
this command with the –debug flag can provide more information.
2. helm template – Locally renders the templates using provided values. This can be useful to see if the override values are
correctly inserted into the manifest templates. To focus on a single template, use the -s flag: helm template my-chart -s
templates/deployment.yaml.
3. --dry-run – Lint and template commands can only catch templating issues via static analysis. To catch Kubernetes-
related errors (e.g., using a deprecated Kubernetes API version), run the --dry-run command before invoking the
upgrade or install commands.
For advanced guides on template functions, flow controls, and other debugging tricks, refer to the Helm documentation
section under "Chart Template Guide."
apiVersion: v2
appVersion: "3.2.1"
dependencies:
- condition: zookeeper.enabled
name: zookeeper
repository: "https://charts.bitnami.com/bitnami"
version: 10.x.x
- name: common
repository: "https://charts.bitnami.com/bitnami"
tags:
- bitnami-common
version: 2.x.x
name: kafka
version: 18.2.0
USE ANNOTATIONS
Since Kubernetes only watches changes in the deployment spec, by default, changing the contents of a ConfigMap or a Secret
that's mounted to a Pod does not automatically trigger a rolling update. This may be unexpected behavior for users expecting
a restart with updated values when invoking an upgrade command.
To automatically roll deployments, you can use tools like Reloader or add a checksum annotation in the deployment spec:
kind: Deployment
spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
Annotations are also useful to define hooks for jobs that should run before or after an install or upgrade. Common use cases
may include running a Flyway migration or running clean-up jobs. While this can be achieved with other CD tools, Helm hooks
provide a native way to alter release lifecycle behavior:
apiVersion: batch/v1
kind: Job
metadata:
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
Limitations of Helm
While Helm comes with a suite of features to make packaging and releasing Kubernetes applications easier, it's important
to note that Helm is simply a package manager — it is not a fully featured CD tool. In other words, organizations should not
rely on Helm alone for an end-to-end Kubernetes CI/CD tool. Instead, Helm should integrate with more robust tools such
as ArgoCD, JenkinsX, or Spinnaker to keep deployments consistent. Also, since Helm uses plaintext YAML as the primary
templating interface, Secrets and non-YAML files are not handled very well. This means Secrets or configuration binaries (e.g.,
public keys, .dat files) can be better handled outside of Helm via another CI/CD tool.
Finally, while subcharts are useful for organizing related components together, deeply nested subcharts can cause templating
issues. If the application truly requires multiple nested subcharts, look for other deployment patterns such as ArgoCD's
ApplicationSet to group multiple Helm charts together instead.
Nonetheless, with a wide selection of public, production-ready Helm charts, it's easier than ever to download, modify, and
install various Kubernetes components.
Yitaek Hwang is a software engineer at NYDIG working with blockchain technology. He often writes about
cloud, DevOps/SRE, and crypto topics.
An Overview of CI/CD
Pipelines With Kubernetes
Exploring the Approaches, Tools, and Benefits of
Implementing CI/CD in a Kubernetes Ecosystem
Automation and cross-functional collaboration are two fundamental features of a DevOps model. As one of the core
components of a DevOps framework, continuous integration and continuous delivery (CI/CD) pipelines speed up application
delivery by automating various stages of the software development lifecycle. Although Kubernetes inherently automates
the delivery, scaling, and management of applications by deploying and orchestrating them in flexible, portable containers,
adopting a CI/CD-based workflow brings a plethora of additional features by offering an iterative cycle of configuration merges
and testing.
In this article, we discuss CI/CD approaches in a Kubernetes ecosystem, best practices for implementing an efficient CI/CD
framework, and popular open-source CI/CD tools.
PULL-BASED PIPELINE
In a pull-based CI/CD pipeline, code and
infrastructure changes are applied within
the cluster. This architecture relies on an
agent (often referred to as a controller) within
the cluster that scans the cluster state and
compares it with a declarative desired state. In
instances where there is a difference between
the desired configuration and cluster state, the
controller automatically applies changes.
Table 1
Advantages Disadvantages
• It ensures continuous security by removing manual overheads to grant admin • It only works for Kubernetes deployments.
access for every cluster change. • In a multi-cluster framework, each Kubernetes
• It is easier to scale identical deployments since the controller automatically cluster should adopt the pull-based framework.
applies changes to the cluster without requiring manual efforts.
PUSH-BASED PIPELINE
This is an agentless pipeline architecture that uses an external system to trigger deployments. In a push-based pipeline,
configuration changes are committed in a repository, which then updates the environment by adding commits to a pipeline
that was already successfully executed.
In spite of its quick implementation and popularity, organizations should assess a push-based pipeline's use cases before
choosing it for their cloud-native workloads. Listed below are some of its advantages and disadvantages:
Table 2
Advantages Disadvantages
• It is simpler to implement when compared to a pull-based pipeline. • It requires external admin access to the
• It offers flexibility and can be applied to environments other than Kubernetes. CI/CD pipeline.
• Push pipelines standardize the deployment of workloads for both cloud and • It compromises security as the architecture
traditional environments, making it ideal for hybrid/multi-cluster models. relies on opening of the cluster firewall for
external services.
AUTOMATED TESTING
Detecting errors and defects during early stages of a workflow helps enhance application agility. As a recommended design,
the test environment should match the production environment to streamline the build, test, and deploy cycles across
different environments. Continuous, automated testing also helps create sustainable application builds that ensure the code is
readable, debuggable, and maintainable.
ROLLBACKS
Rollbacks ensure code sanity by restoring a previous, stable deployment if there are flaws with a new commit/version. As one of
the most critical considerations of designing a workflow, it is important to adopt a planned roll-back strategy that safeguards
the availability of workloads in production.
• Shorter release cycles – Automated testing and deployment eliminate delays in pushing changes to production. Iterative
CI/CD validation also avoids code merge collisions, subsequently expediting the frequent patching and updating of
workflows in production.
• Autoscaling – Containerizing applications makes it easy to scale and replicate workloads with changing traffic demands.
Kubernetes deployment objects such as ReplicaSet, Deployment, and StatefulSet help automatically spin up replicas of
containerized workloads to ensure efficient load balancing and near-zero downtime.
• Node-usage efficiency – With Kubernetes-based workflows, administrators can set optimum resource limits and
requests, ensuring efficient utilization of server compute, memory, and storage resources.
• Microservices-based deployments – Kubernetes enforces the deployment of applications in portable containers with all
necessary libraries and resources. The framework allows developers to leverage microservices for simpler, cloud-native
application deployment and management.
Table 3
Spinnaker A multi-cloud CI/CD platform that relies on JSON to • Rapid releases and deployments • Adds operational
implement and configure software delivery pipelines. • Integrated deployment overhead for
The platform implements in-built, production-safe strategies orchestration of
deployment strategies to help deliver composite multiple underlying
applications to their target environments without • Rollbacks can be implemented microservices
having to write any scripts. with a single click
• Allows only immutable
By following an API-based modular architecture, • Out-of-the-box support for deployments
Spinnaker allows DevOps teams to integrate external multi-cloud and hybrid models
services seamlessly for enhanced security, visibility,
and cost efficiency.
Jenkins X Helps accelerate software delivery by creating • Provides automated feedback on • Limited to Kubernetes
previews on pull requests while using Git as the single pull requests and issues clusters and works
source of truth. As the platform provides an official • Relies on Git as a single source purely on GitHub
Kubernetes plugin, it is considered one of the most of truth • Inefficient UI and
adopted CI/CD tools for Kubernetes workloads. dashboard view
SECURE SECRETS
Cluster Secrets and configurations are recommended not to be included within container images or Pod definitions. As an
alternative, Secrets should be stored in an encrypted vault or defined as Kubernetes Secret objects. Additionally, configuration
settings are recommended to be declared in a ConfigMap, which is then mounted to the container. The approach helps define
specific configurations for each environment without exposing data in the container.
Summary
Kubernetes continues to maintain favorable adoption in modern DevOps workflows as it offers seamless scalability and
flexibility in modern application delivery. When configuring clusters at scale, managing a Kubernetes ecosystem can quickly
become challenging. Overcoming such complexities often requires a combination of recommended practices, diligently
designed architecture, and efficient tools that help achieve agility, scalability, and comprehensive automation. Although
Kubernetes powers CI/CD workflows, open-source platforms are also recommended to reduce testing and deployment
overhead toward configuring native pipelines.
Sudip Sengupta is a TOGAF Certified Solutions Architect with more than 17 years of experience working for
global majors such as CSC, Hewlett Packard Enterprise, and DXC Technology. Sudip now works as a full-
time tech writer, focusing on Cloud, DevOps, SaaS, and cybersecurity. When not writing or reading, he's
likely on the squash court or playing chess.
An Assessment of Kubernetes
and Machine Learning
Advantages for ETL Pipelines and ML Models
Kubernetes and machine learning (ML) are a perfect match. As the leading container orchestrator, Kubernetes' scalability and
flexibility make it the perfect platform for managing extract-transform-load (ETL) pipelines and training ML models. That's why
there's a thriving ecosystem for running ML tasks on Kubernetes. Let's look at how Kubernetes is uniquely suited for supporting
machine learning, how you can use it to make your ML pipelines run faster and better, and some of the most popular
Kubernetes tools for ETL and ML.
• Resource management – Data volumes change over time and pipelines need a cost-effective way to manage resources.
• Dependency management – Pipelines need to execute tasks in the proper order and with the correct timing.
• Platform upgrades – Keeping up with security patches and vendor releases is a challenge for any platform engineer.
• Code upgrades – As data changes, so do the requirements for the systems that process it. Pipelines must be built on a
platform that makes it easy to deploy and test new code.
The advent of cloud-based Kubernetes systems like EKS and GKE has made building and managing Kubernetes clusters easier.
But that doesn't mean you want to build one for every project. Kubernetes namespaces make multi-tenancy easy. You can
share a single cluster across multiple projects and teams. You can even create namespaces for different versions of projects
when you want to test new containers or algorithms.
Tracking versions and maintaining code consistency across different servers has always been a headache. Containers solve this
issue by abstracting the infrastructure for you. You can target your model code for a single container runtime and Kubernetes
can execute it anywhere. When it's time to update your code, you do it once in the container. You can even deploy your model
against different code versions in the same cluster.
Kubernetes has experimental support for scheduling AMD and NVIDIA GPUs. You can attach GPUs to containers that need
them, and Kubernetes will manage access and ensure that they're not overallocated. So the scalability Kubernetes provides you
for training algorithms extends to advanced GPU hardware, too.
1. Extract data
3. Load data into storage for the training models that use it
Containers and Kubernetes make it easy to break down these processes into reusable components. And just like with models,
the steps that run in containers are abstracted from the underlying hardware. Kubernetes also simplifies managing parallel
pipelines for multiple datasets and establishing dependencies between steps in a pipeline.
Let's look at a pipeline in Figure 1 that has more than one data source. It needs to download two datasets, transform them, then
collate them before loading.
Figure 1
The pipeline needs to extract data from Sources A and B. Then it needs to transform them in independent processes. Only
when both transformations are done can the collation step begin. Since each of these steps is a container, Kubernetes
manages starting each one in order and ensures that the transform step doesn't load until both transform steps have
completed their work. This is a straightforward example. You can manage more complicated pipelines with Kubernetes
scripting tools like Airflow or Argo Workflows, which make it easy to run pipelines as directed acyclic graphs.
Finally, Kubernetes manages secrets for you, so it even makes pipelines that need to access data via logins or with PKI
more secure.
We've already mentioned how Kubernetes brings scalability to ML, but it bears mentioning again. With Kubernetes, you can
drive models at a massive scale, and when you're done, you can destroy the nodes to cut costs.
KUBERNETES ML TOOLS
Kubernetes' native ability to orchestrate containers originally drew data scientists to it, but since then, teams have developed
powerful tooling to make using it even better. Kubeflow is an open-source ML toolkit for deploying ML workflows on
Kubernetes. It brings best-of-breed ML tools to Kubernetes in a way that makes them easier to use while taking advantage of
container orchestration.
• Manage interactive Jupyter notebooks to experiment with models and deploy them to the cluster
• Train TensorFlow models and configure them for GPUs
• Build custom Kubeflow pipelines
• Export TensorFlow containers to the cluster
Kubernetes ML Platforms
The list of tools that aid in running ML pipelines on Kubernetes doesn't stop there. There are many open-source and
commercial tools that you can use to manage ETL and models on your K8s clusters:
Table 1
Kubeflow Open source Both Collection of ML tools for managing and running models on a cluster
Open MLOps Open source Both Collection of Terraform scripts for setting up ML tools on a cluster
Bodywork Open source Programmatic Python-based tools for deploying and using ML pipeline tools on a cluster
Apache Airflow Open source Both Scripting platform for orchestrating workflows
Argo Workflows Open source Both Scripting platform for orchestrating workflows
AWS Sagemaker Commercial Both AWS ML platform that will work with AWS EKS
Azure ML Commercial Both Azure ML platform that will work with Azure Kubernetes
Conclusion
We've covered how Kubernetes makes running ML pipelines faster, easier, and more cost efficient. With containers, you can
create ETL jobs and models that run anywhere. With Kubernetes, you can run those containers in parallel and at scale. We also
took a brief look at some of the open-source and commercial tools available to make setting up your ML jobs even simpler.
Now that you're familiar with the power Kubernetes can bring to your ML and ETL jobs, we hope you'll integrate it into your
next ML project.
For nearly 30 years, Eric worked as a developer and systems engineer at various Wall Street market data
and trading firms. Now he spends his time writing about technology and science fiction, training dogs,
and cycling.
Day 2 for Kubernetes is here. Many organizations are running their workloads in Kubernetes, and if not, they are planning to do
it soon. However, after adopting Kubernetes in your organization, one of teams' main concerns is often about how to optimize
the costs of their infrastructure. In this article, you will discover best practices to help optimize infrastructure costs for your
Kubernetes clusters and the tools available to help you reduce the monthly bill (mainly in the cloud). Additionally, since it's not
only about infrastructure, you will also find recommendations for developing your applications.
Fault tolerance is important because Kubernetes nodes and Pods might come and go, mainly because of the elasticity feature
when scaling in or scaling down, so applications need to gracefully manage those interruptions.
Your applications need to have mechanisms to help Kubernetes know that it's healthy. For example, have health-check
endpoints to configure probes within a Pod so Kubernetes can restart or recreate a Pod when needed. And another aspect
many don't consider is the ability to handle SIGTERM signals that the container receives when the kubelet needs to remove
some Pods (again, typically for scale-in events).
With horizontal pod autoscaling (HPA), you configure scaling policies to automatically adapt your replicas to the demand
you have. You might need more or fewer Pods. And if you couldn't define a proper number of resources to your application,
you can use a VerticalPodAutoscaler (VPA) to help you set resources based on usage, which ends up optimizing the cluster
infrastructure. You might need bigger or smaller nodes.
As you can see, developing reliable and fault-tolerant applications is the starting point of your journey to optimizing costs
in Kubernetes.
1. Choose the right type of server for your workloads, like spot instances, when possible.
2. Add or remove servers based on the number of Pods your applications need. This is helpful, especially for saving costs as
you need an automated way to remove servers that are no longer needed.
However, when cloud providers need to use that capacity again, those servers will be disrupted, in which case you'll typically
receive a notification. In Kubernetes, this gives you the opportunity to cordon the node and drain the Pods it has.
Using this type of instance is a no-brainer because as long as you have enough capacity in the cluster, your applications
won't be affected — especially if you've applied the practices I recommend in this article. Taking advantage of spot instances
will often enable you to reduce your compute bill in the cloud by 65-90%. It's important to make sure you have the latest
information about how they work for your preferred cloud provider.
Otherwise, you might have too many disruptions and won't be able to get big savings. For instance, in AWS, you no longer
need to bid for a spot instance, and the main recommendation is that you use more than one instance type.
Projects like descheduler handle the process of rescheduling Pods from time to time. By rescheduling Pods, Pods will always
land in the cluster where they fit better, helping you to optimize nodes by using the available capacity at its maximum. You
might end up with empty nodes, so nodes will become easier to identify for removal. Moreover, I recommend you configure
Pod disruption budgets to make the rescheduling graceful and avoid disruption in your workloads.
Conclusions
If you're not clear on where to start after reading this information, the pyramid in Figure 1 showcases where you should focus
first. The biggest impact on cutting costs associated with Kubernetes begins at the base of the pyramid — making your
application stateless and fault-tolerant.
Solutions Directory
This directory contains Kubernetes and cloud-native tools to assist with deployment, management,
monitoring, and cost optimization. It provides pricing data and product category information gathered
from vendor websites and project pages. Solutions are selected for inclusion based on several impartial
criteria, including solution maturity, technical innovativeness, relevance, and data availability.
Chronosphere Observability
Chronosphere Cloud native observability By request chronosphere.io/platform
Platform
Lacework Polygraph® Data Platform Data-driven cloud security platform Trial period lacework.com/platform
newrelic.com/platform/kubernetes-
New Relic Pixie Kubernetes observability Free tier
pixie
Amazon Web Amazon EKS Distro Kubernetes distribution from AWS Open source aws.amazon.com/eks/eks-distro
Services Amazon Elastic Container
Containers as a Service aws.amazon.com/ecs
Service
Free tier
AWS Fargate Serverless compute for containers aws.amazon.com/fargate
aquasec.com/aqua-cloud-native-
Aqua Security Aqua CNAPP Cloud-native security platform By request
security-platform
Crowdstrike
Falcon Humio Operator Kubernetes operator for Humio Open source github.com/humio/humio-operator
LogScale
datastax.com/products/astra-
Astra Streaming Multi-cloud streaming as a service
DataStax Trial period streaming
datastax.com/products/datastax-
DataStax Enterprise Open hybrid NoSQL database
enterprise
digitalocean.com/products/
DigitalOcean DigitalOcean Kubernetes Managed Kubernetes clusters By request
kubernetes
etcd etcd Key value store for cluster data Open source etcd.io
docs.fluentd.org/v/0.12/articles/
Fluentd Kubernetes Fluentd Logging agent and data collector Open source
kubernetes-fluentd
Google Cloud Google Kubernetes Engine Managed Kubernetes platform Trial period cloud.google.com/kubernetes-engine
influxdata.com/solutions/
InfluxData InfluxDB Kubernetes monitoring solution Trial period
kubernetes-monitoring-solution
Kubernetes-based, event-driven
KEDA KEDA Open source keda.sh
autoscaler
Kubernetes-native edge
KubeEdge KubeEdge Open source kubeedge.io
computing framework
Microsoft azure.microsoft.com/en-us/products/
Azure Kubernetes Service Managed Kubernetes platform Trial period
Azure kubernetes-service
mirantis.com/software/mirantis-
Mirantis Kubernetes Engine Managed Kubernetes platform By request
kubernetes-engine
nutanix.com/products/kubernetes-
Nutanix Nutanix Kubernetes Engine Kubernetes management platform By request
engine
Open Policy
Open Policy Agent Policy engine Open source openpolicyagent.org
Agent
Operator
Operator Framework Kubernetes Operators framework Open source operatorframework.io
Framework
github.com/planetscale/vitess-
PlanetScale Vitess Operator Kubernetes operator for Vitess Open source
operator
portworx.com/products/portworx-
Portworx Enterprise Kubernetes storage platform By request
enterprise
portworx.com/products/portworx-
Portworx Data Services Kubernetes DBaaS platform By request
data-services
redhat.com/en/technologies/cloud-
OpenShift Kubernetes container platform
computing/openshift
Red Hat Trial period redhat.com/en/technologies/cloud-
OpenShift Container
PaaS, container platform computing/openshift/container-
Platform
platform
Sumo Logic Sumo Logic Continuous intelligence platform Trial period sumologic.com
Cloud-native hyperconverged
Harvester harvesterhci.io
infrastructure
Container development,
Tanzu Build Service tanzu.vmware.com/build-service
management, and governance
By request
Tanzu Kubernetes Grid Kubernetes runtime tanzu.vmware.com/kubernetes-grid
VMWare
Tanzu Service Mesh Service mesh for Kubernetes tanzu.vmware.com/service-mesh
Weaveworks Weave GitOps Core Continuous delivery for Kubernetes Open source weave.works/product/gitops-core