A typical backup strategy is the 3-2-1 approach, which includes an offline copy on tape or immutable storage in the cloud. It also includes regular backup tests to ensure the stored backup is intact and ready for restoration.
More advanced network isolation can be achieved with dedicated clusters or virtualized control planes that provide policies based on workload identity and namespaces. These tools can provide benefits when namespaces alone are insufficient for multi-tenancy.
Create a Kubernetes Cluster
The foundation of the Kubernetes system is a cluster that hosts the applications that are containerized. A cluster comprises worker nodes that work together to run your applications, guided by the cluster controller node. Please think of the cluster master as the train conductor who oversees each of the separate train cars that make up your application, ensuring they are all on track and operating smoothly.
The cluster configuration you select determines how the cluster will be run. For example, you can create a multi-cluster environment that enables workloads to move between clusters in the event of a failure, giving you high availability. You can also configure the cluster to be a regional cluster, which provides increased control plane availability by replicating it across multiple zones within an AWS region.
When you create a cluster, you can choose whether to boot it from prebuilt images hosted at kindest/node or build your images using TVK.
Once you have created your cluster, you can view your configuration, cost, and high availability indicator in the management console.
Create a Backup
The backup process ensures that mission-critical data is protected during a disaster. This could be hardware failure, human error, or cyber attack, and a well-documented backup strategy ensures the organization can return to a known good point in time.
Many different backup vendors provide hardware, software, or cloud-based data protection. A wide range of options allows organizations to find solutions that meet their needs, budget, and workload.
Backups are typically stored on an external drive disconnected from the machine during backup. This provides protection should the drive fail and allows the user to transfer files from the backup to another device quickly.
When creating a backup, it is essential to consider how frequently it will be created and how much disk space is required. The more frequent the backups, the faster the Kubernetes backup and restore namespace will be. However, many backups can take up a lot of storage space.
Administrators must set up schedules that make sense for their organizations when creating a backup. This will help them reduce the space backups used and ensure the most up-to-date data is available for restoration. When creating a backup, it is also essential to consider the option of including or excluding log files. This can significantly decrease the amount of space required by a scheduled backup.
Create a Namespace
Namespaces are a mechanism that allows you to separate the names of variables, functions, or classes into logical groups. It prevents overlapping identifiers and makes code cleaner, more readable, and more efficient. It also helps avoid errors caused by unexpected collisions of variables or functions and avoids overriding function definitions from third-party libraries.
For example, if two different functions have the same name, such as calculate() and calculate2(), then by adding an identifier, such as a scope name or prefix, they can be differentiated. Similarly, an ID number is unique in scope, so it is easy to distinguish one person from another using the same number.
In Kubernetes, namespaces separate different teams and applications into logically isolated groups. They help reduce the risk of accidentally updating a resource and breaking a running application. They also ensure that operations launched against resources in a specific namespace don’t impact other namespaces’ resources.
Restore
When you create a restore job, the backup data is restored into a cluster that might differ from the original backup cluster. This multi-namespace restore is a complex operation that takes some time to complete.
On the select source page, select the cluster and namespace-scoped resources you want to back up. You can click the plus icon to add more items to the list and the minus icon to remove items from the list. If you want to back up persistent volume data, select the include persistent volume data checkbox. You can also specify backup hooks, which execute before and after taking a backup.
You can select a date range to show available copy backups for the selected resources. Select the destination cluster from the list if you restore to a different cluster. You can also select the storage class for the restored item.
You can use filtering to only bring back the data you need from a restore point, for example, by selecting only those PVCs that a particular transform has updated. This can be useful if you roll back configuration updates for a specific resource or restore only a single PVC. You can select up to two filters at a time.