Kasten Five Kubernetes Backup Best Practices
Kasten Five Kubernetes Backup Best Practices
Best Practices
for Kubernetes
Backup
Addressing Data Protection
and Management Needs
5 Best Practices for Kubernetes Backup
Contents
Contents 2
Executive Summary 3
Chapter 1. Introduction 7
Chapter 5. Conclusion 20
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 2
5 Best Practices for Kubernetes Backup
Executive Summary
Veeam®, the #1 global leader in data protection & ransomware recovery, is
focused on helping customers backup, secure and manage all their cloud, virtual
and physical workloads. Veeam’s solution now extends to containerized workloads
with Veeam Kasten for Kubernetes. The Veeam Data Platform helps you achieve
the best practices described in this white paper to address cloud native data
protection needs for enterprises.
Applications using cloud native and microservice-based architectures have quickly gained traction
in the enterprise — an evolution from earlier monolithic and virtualized approaches. Kubernetes has
emerged as the dominant, indeed de-facto, container orchestration platform. In parallel with the adoption
of containers, newer organizational approaches (usually termed DevOps or ITOps) are being rapidly
adopted where software development and IT operations roles are being “combined” to deliver higher
agility while maintaining quality. In this environment, developers have more latitude in their tool selection
and exert a greater influence on operations.
Data, the most important asset in any enterprise, has seen its value increase further with the widespread
adoption of Kubernetes given the artificial intelligence and machine learning stacks being deployed on
it. However, this information and the associated software assets are subjected to hacking attacks, often to
devastating effect. Privacy concerns have also led to stringent regulations. Taken together, these have made
data protection a “front and center” concern for IT teams spanning four distinct operational use cases:
backup and restore, disaster recovery, application mobility and ransomware protection.
Operations teams, that manage infrastructure and
applications, do not operate in a static world either. The cloud
native environments they are now managing are dynamic
and complex. The teams need to support a varying mix of
traditional, virtualized, and containerized workloads based
on the use of various data services, including relational and
NoSQL databases. Their deployments can be spread across
on-premises, and multiple cloud environments and often rely
upon a range of storage solutions from multiple vendors. Any
data management solution deployed in these environments
will need to balance the needs of operators and developers
by being both operations-focused and developer friendly.
Kubernetes further adds to the transformation of the IT
landscape as it is fundamentally different from platforms
based on earlier technologies. Accordingly, it requires
a different approach to backup, one that we describe as
a Kubernetes native backup. There are seven reasons why
Kubernetes native backup is critical.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 3
5 Best Practices for Kubernetes Backup
1
Kubernetes Deployment Patterns
The Kubernetes platform is fundamentally different from earlier compute infrastructures.
There is no mapping of applications to servers or VMs. A backup solution needs to
understand this Kubernetes native architectural pattern and be able to deal with
2
continuous change.
3
Kubernetes Operator Challenges
Operations requires ease of use to accelerate an IT team’s production journey to
Kubernetes deployments. Backup solution with CLI access and a clean API along
with a powerful yet easy to use dashboard is critical.
4
Application Scale
Kubernetes-based microservices comprise hundreds of discrete components with
independent lifecycles visible only to Kubernetes. A Kubernetes native approach to
backups, keeping applications as the unit of atomicity for consistent operations is
5
an imperative.
Protection Gaps
Relying solely on high availability or replication capabilities can lead to data
corruption or catastrophic data loss. A backup solution that works transparently
against a wide range of Kubernetes application stacks and deployment methods
is required.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 4
5 Best Practices for Kubernetes Backup
6
Security
Kubernetes security features deny access to internal application components and their
associated data services from not just outside the cluster but also to other untrusted
applications. A well-architected Kubernetes native backup solution that can embed
7
itself into the Kubernetes control plane ensures consistent security operations.
Ecosystem Integration
Polyglot persistence, where multiple data services are used within the same application,
has coincided with the growth of Kubernetes. A backup solution with workload
knowledge to select the capture primitives best suited to the application’s requirements
as well as interoperation with the rest of the cloud native infrastructure ecosystem is key.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 5
5 Best Practices for Kubernetes Backup
Based on our customers’ experience and considering the key factors that warrant particular attention
above we have arrived at following five best practices for Kubernetes backups:
Architecture
The platform used to protect Kubernetes applications needs to automatically discover
all the application components running on your cluster and treat the application as
the unit of atomicity. The application must include the state that spans across storage
volumes, databases (NoSQL/Relational) as well as configuration data included in
Kubernetes objects such as configmaps and secrets.
Recoverability
The data protection platforms must allow you to restore the application components
you want, and where you want them. You should also have the granular to restore only
an application subset such as the data volume. The approach must make restoring
simple and powerful by allowing you to select the appropriate point of time copy of
the application.
Operations
It is important to ensure that a Kubernetes native backup platform can be used
at scale, provide operations teams with the workflow capabilities they require, and
meets compliance and monitoring requirements. Operators should be able to give
self-service capabilities to application developers without requiring application
code or deployment changes.
Security
Controls around identity and access management and role-based access control
(RBAC) must be implemented. RBAC allows different personas in an operations team
to adopt a least-privilege approach to common tasks such as monitoring. Encryption
at rest and in transit must always be implemented to ensure that data is secure
whenever it has left the compute environment.
Mobility
Living in a multi-hybrid-cloud world, a cloud native data management platform
needs to be able to be flexible in the support for multiple distributions and offer
capabilities that allow for the portability of workloads and applications across all
these diverse environments. Kubernetes application mobility and migration are
the collective capabilities required across multiple use cases including application
restoration, cloning, and container migration.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 6
5 Best Practices for Kubernetes Backup
Chapter 1. Introduction
1.1 Modern IT Environments
84%
The Cloud Native Computing Foundation in their 2023 Annual
Survey found that cloud native is the undisputed infrastructure of
global technology1. IT teams have worked diligently to both refactor
existing applications and adopt cloud native architectures as
of providers and consumers
the default for new development. The 2023 Annual Survey found were using Kubernetes
that 66% of providers and consumers were using Kubernetes in in production or
production and 18% were evaluating it. This finding shows that evaluation in 2023
Kubernetes continues as the de-facto container orchestration
platform with total of 84% either in production or evaluation which,
is a 4% increase over the prior year's findings.
82%
According to a recent survey conducted by ESG Research2 ,
more than 47% of executive decision makers from various
industries currently utilize containers in their production
systems. Furthermore, an additional 35% of companies have
expressed their intent to adopt container technology within of organizations will be
employing containers in 2024
the next 12 months. Looking ahead to 2024, it is projected that
82% of organizations will be employing containers. Considering
the findings of widespread adoption of Kubernetes container
technology, it is anticipated that approximately two-thirds of
the containers in production will be based on Kubernetes.
Along with this technology evolution, a change in
the organizational and process approaches being adopted by
IT teams has also been seen. These are typically described as
DevOps or ITOps, and reflect a newer, more agile manner of
working with developers exercising greater freedom in their
selection of tools and playing a larger role in operational
matters. As the mindset has evolved, so have the measures
that the teams focus on — with greater attention being paid to
metrics such as code release time, deployment frequency, time
to restore and change fail rate.
1
CNCF 2023 Annual Survey, Cloud Native Computing Foundation, April 9, 2024
2
“Measuring the Current State and Momentum in the Enterprise Market for Kubernetes
Protection” Enterprise Strategy Group, Christophe Bertrand, April 2023
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 7
5 Best Practices for Kubernetes Backup
needs to address
Typical IT environments in a modern enterprise are not
static entities with fixed, standardized single-vendor
deployments. The push to continually improve the cost
structure and efficiency by adopting new technologies,
coupled with corporate events such as mergers and
acquisitions, and the need to comply with an ever-
evolving regulatory compliance landscape result in
a highly dynamic situation that operations teams need
Rate of change
to not just address but embrace as the status quo.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 8
5 Best Practices for Kubernetes Backup
1.3.1 Multi-workloads
The goal
Application architectures have undergone a rapid shift over
the last few years and have gone from a monolithic design Should be to deliver a data protection
solution that can work against this
running on bare metal to virtualized applications running in
diversity, but still support refactoring
hypervisors and now to containerized applications based and new development, delivering
on microservice architectures and often running itself on the benefits derived from cloud
a virtualized infrastructure. Yet, for most enterprises with IT native applications, providing
operating at significant scale, it is not reasonable to expect an easy transition path for legacy
all applications to be on a single point on the evolution applications, and reducing costs
spectrum. Instead, the most common observed pattern is to incurred to manage the diverse
find applications occupying the entire spectrum. environment.
1.3.2 Multi-environments
As with applications, the deployment environments
one finds are often a mix of on-premises and cloud. It
is not uncommon to find enterprises taking a hybrid and
multi-cloud approach to application deployment. When
using managed Kubernetes or deploying Kubernetes
workloads on different clouds, the Kubernetes distributions
are also typically different in terms of proprietary extensions
and supported features.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 9
5 Best Practices for Kubernetes Backup
Backup is a long-established discipline with multiple solutions serving the needs for
users large and small. Yet, when it comes to backing up and protecting Kubernetes
based applications, there are certain reasons that employing a Kubernetes native
backup solution is critical. The ebook “7 Critical Reasons for Kubernetes Native
Backup” covers this aspect in detail and below is a summary for context.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 10
5 Best Practices for Kubernetes Backup
2.6 Security
Kubernetes offers several security features, and to avoid compromising their effectiveness, it is critical
that a backup solution be Kubernetes native and embed within the Kubernetes control plane. Also,
with developers taking on more of the infrastructure responsibilities (“ITOps” model), it is important to
be able to provide fine-grained, role-based, and scoped access using the same roles and tools used by
Kubernetes instead of succumbing to the use of additional role management systems and associated
increased complexity. Further, to work well with Kubernetes’ approach of delegating encryption
to storage and backup platforms, the backup system needs to understand Kubernetes certificate
management, work with storage-integrated Key Management Systems (KMSs), and support Customer
Managed Encryption Keys (CMEKs) through the Kubernetes Secrets interface.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 11
5 Best Practices for Kubernetes Backup
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 12
5 Best Practices for Kubernetes Backup
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 13
5 Best Practices for Kubernetes Backup
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 14
5 Best Practices for Kubernetes Backup
While most attention is directed to protecting business critical data, ensuring that data is captured
with the correct consistency level is as important. From a technical perspective, considerations of crash
consistent and application-aware backups are still very much at the forefront. For most workloads,
a crash-consistent backup or snapshot is enough, but for workloads that have regular changes like
databases, we need to make sure that we can take a consistent point-in-time backup to avoid data
corruption, even in the containerized world.
Finally, with the adoption of Kubernetes focused on scale and ease of deployment, automation is a critical
component for any management system deployed in the container environment. When looking
at backup solutions, traditional backup products have struggled to work alongside or even integrate with
the true dynamic scale of Kubernetes infrastructure. Having a backup solution that not only integrates and
leverages the Kubernetes APIs but can also extend these APIs and provide greater automation integration
is key. Deploying a backup platform as a native containerized system that runs within Kubernetes would
the ideal option, rather than having a traditional “backup server” running in a different environment that
needs to be separately managed.
Throughout this section, we will discuss the best practices and recommendations for implementing
a Kubernetes-aware backup solution and the requirements for a successful backup strategy while
also making it simple and flexible to adapt to this rapidly evolving cloud native ecosystem.
4.1 Architecture
When implementing a backup strategy to protect Kubernetes workloads, a deep understanding of
how Kubernetes works is critical. The purpose of this whitepaper is not to describe the Kubernetes
architecture in depth, but to better understand how a backup strategy should be implemented. A few
components need to be discussed.
Kubernetes Application
Ingress Service
Deployment
Registry StatefulSet
Pod
Service Pod
Account
Persistent
VolumeClaim
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 15
5 Best Practices for Kubernetes Backup
In the diagram above, we see an example of a typical Kubernetes application. It is made up of pods,
services, certificates, secrets, persistent volumes, and other components. On average, we observe
production applications to be composed of hundreds of these components. With these considerations
in mind, it is important to find the correct solutions to be able to not just protect and restore data, but
also be able to do the same with all these internal components and at scale.
Once we deploy a backup platform into Kubernetes, the solution can then automatically interface
with the Kubernetes control plane via the API server. This integration can be used to not just discover
the Kubernetes applications running on the cluster but also integrate with the underlying compute,
network and storage infrastructure.
As a first step, the integration is used to discover the relationship between storage and applications
and then determine the best (efficient, performant, consistent) way to capture the application data
stored on persistent volumes along with the related application resources. The next consideration is
the backup data location including within the storage system for fast recovery or, when running on
the major cloud providers, depending on durable snapshots. For most cases though, backup data
would be stored data in an object storage system in a different fault domain that could extend all
the way to geo-replication for disaster recovery.
When it comes to storage integrations with
Kubernetes, there are several key areas that
need to be considered. Storage in Kubernetes is
represented as persistent volumes that are made
available for use to the application containers.
Apart from application configuration, this is
the key business data that needs to be protected.
Another consideration is where to keep that data.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 16
5 Best Practices for Kubernetes Backup
4.2 Recoverability
Recovery is not as simple as recreating Kubernetes objects and storage volumes. Given the number
of components and Kubernetes’ complexity, an execution plan needs to be created that first verifies
cluster dependencies, creates new Kubernetes views of data that will get restored, and determines
the compute infrastructure and Kubernetes cluster where the recovery needs to be initiated (e.g.,
a cross-availability zone recovery). Once the recovery execution plan is in place, the backup data
sources (object storage, snapshots, backups) must be identified, and the destination (storage class
remapping, storage platform changes, etc.) storage prepared.
Finally, the plan needs to be transformed as needed (e.g., regeneration of TLS certifications, DNS
changes, editing stale secrets, etc.). Kubernetes applications components need to be updated to reflect
the new storage resources that will be created as a part of the recovery.
Once this execution plan is in place, the backup platform needs to be able to translate it into relevant
Kubernetes API calls to create the required resources (e.g., create a load balancer or recreate a secret).
This process ensures that all required Kubernetes resources and microservices that make up a cloud
native application are redeployed with the correct configuration. The diagram below outlines this
involved restore process.
Kubernetes Application
Veeam Kasten
Execution
Veeam Kasten Plan
A D
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 17
5 Best Practices for Kubernetes Backup
4.3 Operations
Operational best practices are typically the biggest challenge for enterprises, especially when implementing
'
new tools, services and capabilities for an extremely dynamic infrastructure. It is important to ensure that
a Kubernetes native backup platform can be used at scale, provides operations teams with the workflow
capabilities they require, and meets compliance and monitoring requirements. Another important aspect is
the impact, or lack thereof, on developers. One of the greatest benefits of Kubernetes is providing developers
with a quick and easy way to deploy applications, roll out upgrades, and the ability to do it at scale.
If a backup platform hinders those use cases, developers will find ways to circumvent any processes put
in place. There should be zero code, packaging, toolchain, or deployment changes required for developers.
At the same time, operators should be able to give self-service capabilities to application developers such as
the ability to restore their own application or the option to customize and extend backup operations for their
data services (e.g., use of custom or database-vendor tools, cross-service coordination and quiescing, etc.).
Further, the ability for all the developer interactions with the backup platform to be API drive is also a must-
have requirement. It is therefore essential that any backup platform deployed can meet the needs of both
container platform operations teams and developers.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 18
5 Best Practices for Kubernetes Backup
Data Services +
Kanister.io
Infraestructure Application
Cloud-Native API Policy Engine Catalog
Plugins Discovery
Workflow Enterprise
Veeam Kasten Data Movers Security Monitoring
Engine Dashboard
Storage
Infrastructure
Public Cloud/ On-Premises Storage
4.4 Security
Security is at the forefront of every product deployed
in an enterprise production environment, regardless
of whether it is deployed in a public cloud or using
an on-premises infrastructure. Controls around identity
and access management and role-based access control
(RBAC) must be implemented. RBAC gives users and
groups specific, and often restricted, user privileges
or access privileges into the actual backup platform.
This allows different personas in an operations team
to adopt a least-privilege approach to common tasks
such as monitoring backups, verifying backup success
and integrity, and performing requested restores. RBAC
also allows for use cases such as granting developers
permissions for fast restore and clones from snapshots,
but only grants certain team members access to backups
stored in off-site secondary storage locations.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 19
5 Best Practices for Kubernetes Backup
When moving or copying data between Kubernetes clusters or storage environments, making sure that
the data is encrypted as it leaves one end point and arrives in another is key. Using object storage as
an example, an on-premises Kubernetes application deployment that needs to offload backups to AWS S3
will typically transfer data over an external internet connection. The backup platform must always ensure
that the data is encrypted using well-known protocols such as TLS when being copied over the internet.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 20
5 Best Practices for Kubernetes Backup
4.5 Mobility
The diagrams below illustrate the powerful platform portability feature offered by Kubernetes. This
feature can be leveraged by a backup platform to enable a wide range of use cases. These include
transferring data across namespaces within the same cluster, across different storage systems, across various
Kubernetes clusters, distributions, and versions. It also extends to spanning availability zones within the same
region, bridging regions within the same cloud, connecting cloud or hybrid environments, and even linking test
and development environments.
Veeam Veeam
App DB App DB App DB
Kasten Kasten
Namespace: app-clone Namespace: app Namespace: app-replica
App + Data
Across: Snapshot
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 21
5 Best Practices for Kubernetes Backup
With the ecosystem diversity in Kubernetes offerings available on-premises and in the cloud, it is also
critical that a backup and data management solution can migrate Kubernetes applications across arbitrary
source and destination clusters that could be running on wildly heterogeneous infrastructures. For example,
when migrating a workload from Amazon Elastic Kubernetes Service (Amazon EKS) to Microsoft Azure
Kubernetes Service (AKS), you will see the following on each cluster:
These different storage classes are just the tip of the iceberg as far as the differences between distributions
go, even though these distributions might be based on the same underlying Kubernetes version. Ensuring
that a backup platform can reliably perform restores across these different distributions and infrastructure
options while being able to automatically transform the application backup to fit the new restore
environment is critical.
Ultimately, when performing migrations of workloads across namespaces, clusters, regions and even
Kubernetes distributions, any reliable backup platform being used must be able to understand all application
dependencies and translate them across environments. In the same manner a restore is planned and
executed in a cloud native environment, a migration plan is needed to ensure that infrastructure (e.g.,
load balancers), cluster-wide and application dependencies are available or transformed to an equivalent
resource for a successful migration execution. It is not only containers and storage volumes that must be
migrated, but also FQDNs, secrets and DNS addresses that must be modified in-flight during a migration.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 22
5 Best Practices for Kubernetes Backup
Chapter 5. Conclusion
Architecture
The platform used to protect Kubernetes applications needs to automatically discover
all the application components running on your cluster and treat the application as
the unit of atomicity. The application must include the state that spans across storage
volumes, databases (NoSQL/Relational) as well as configuration data included in
Kubernetes objects such as configmaps and secrets.
Recoverability
The data protection platforms must allow you to restore the application components
you want and where you want them. You should also have the granular control to restore
only an application subset such as the data volume. The approach must make restoring
simple and powerful by also allowing you to select the appropriate point of time copy of
the application.
Operations
It is important to ensure that a Kubernetes native backup platform can be used at
scale, provide operations teams with the workflow capabilities they require, and
meets compliance and monitoring requirements. Operators should be able to give self-
service capabilities to application developers without requiring application code or
deployment changes.
Security
Controls around identity and access management and role-based access control
(RBAC) must be implemented. RBAC allows different personas in an operations team to
adopt a least-privilege approach to common tasks such as monitoring. Encryption at
rest and in transit must always be implemented to ensure that data is secure whenever it
has left the compute environment.
Application Mobility
Living in a multi-hybrid-cloud world, a cloud native data protection platform needs
to be able to be flexible in the support for multiple distributions and offer capabilities
that allow for the mobility of workloads and applications across all these diverse
environments. Mobility capabilities are required across use cases including application
restoring, cloning, and container migration. Ensuring you adhere to the common best
practices found in this guide will help you provide a consistent and reliable offering if
you face data loss or corruption, or even a complete outage.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 23
5 Best Practices for Kubernetes Backup
Veeam is a recognized leader in backup solutions for virtualized workloads. With the accelerated
pace of Kubernetes applications and deployments, Veeam Kasten for Kubernetes offers the #1 data
protection and mobility solution to address the cloud native data protection needs for enterprises.
The Veeam Kasten data protection platform has been purpose-built for Kubernetes and provides for
the backup, restore, disaster recovery, application mobility and ransomware protectionof your entire
Kubernetes application while keeping the best practices highlighted above.
© 2024 Veeam Software. Confidential information. All rights reserved. All trademarks are the property of their respective owners. 24