oslabs-beta / TimeKube

An open-source developer tool for creating and managing backups of Kubernetes clusters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimeKube

TK Logo

TypeScript NodeJS Next.js React AWS Tailwindcss HTML5 CSS3 sqlite Jest

Table of Contents

Introduction

TimeKube is a Kubernetes "Time Machine" that provides developers with an intuitive, user-friendly GUI to easily and securely create backups for your Kubernetes clusters with a few clicks of a button; ensuring the protection of your data, configurations, and files.

Most free and open-source Kubernetes backup and restore tools focus on command-line usage requiring developers to learn the complexities of yet another command-line tool which can have complicated usage patterns and lack of discoverability for core features. Proprietary, commercial solutions exist but are equally complex, promising a large feature set to justify their value which results in a lot of bloat and a high price tag.

TimeKube focuses on the workflow of creating and organizing backups so that the data for your cluster is never lost and can be found and restored by any developer in your team.

Features

  • Back up the state of your Kubernetes clusters securely to a file or on the cloud (AWS S3)
  • Organize and view previously saved backups
  • Retrieve backup files for restoring your Kubernetes clusters

Installation

Start by cloning the repo, then run the scripts to install dependencies and start the app:

# Example installation steps
git clone https://github.com/oslabs-beta/TimeKube.git
cd TimeKube
npm install
npm run dev

Next, open up a browser window and navigate to http://localhost:3000/

Getting Started

Initial configuration of the app requires creating a .env file and adding specific key-value pairs. An example file with relevant keys is included in .env.example. See each of the following sections on how to configure features.

Database Configuration

By default, application data is stored locally in ./appdata/snapshots.db. However, if you would prefer to host application data on your own database, chase the DATABASE_URL key.

AWS Configuration

AWS S3 backup functionality for files requires entering your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION. Refer to AWS Documentation on how to set up access to your S3 file storage bucket.

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=

Cluster Metrics Visualization

Cluster visualiztion leverages the OpenTelemetry observability framework through Grafana and Prometheus, both of which are required to be deployed in your clusters. Once the pre-requisites are deployed, edit the GRAFANA_URL key in the .env.

If you are deploying Grafana from a local machine, make sure to change the "allow_embedding" and "auth.anonymous" properties within your grafana.ini file to "true." Note that your config may be called "defaults.ini" as well.

If you are deploying Grafana as a service within the cluster, please do the following:

  1. Create a grafana.ini file on your computer with the same properties as above set to true. You can find the Grafana Configuration defaults on theGrafana github repo.

  2. Create a config map using the following command: kubectl create configMap grafana-config --from-file=[YOUR CUSTOM GRAFANA.INI PATH HERE].

  3. Mount the newly created configMap to the Grafana deployment's .yaml file. You can do this by obtaining the .yaml file via the command: kubectl get deploy [NAME OF DEPLOYMENT] -o yaml > grafana-deploy.yaml. This will allow you to open the .yaml file using Vi/Vim (vi grafana-deploy.yaml). Once the .yaml file has been opened in Vi/Vim, press i to enter insert mode and find spec.template.volume. Change the name value within the configMap property here to whatever you named your configMap in step 2 - in this instance, it is grafana-config.

  4. Finally, reapply the edited .yaml file to the cluster using the command kubectl apply -f grafana-deploy.yaml. You may need to use kubectl apply -f grafana-deploy.yaml --force.

Your Grafana dashboard will now be embedded within the web app. If those settings are not set to true, the dashboard will not appear.

Basic Usage

Once the database and storage are configured, you can begin using the app to back up your cluster!

Viewing Clusters

From the navbar, click on "Clusters" to view the list of your clusters, which is inferred from your kubeconfig.

Backing Up Clusters

Backing up clusters can be handled either from "Clusters" or "Backup". Simply choose a cluster and click the button to back up!

Viewing Backups

From the navbar, select "Snapshots". All the clusters you have valid backups for will be shown. Select a cluster name and you will find your backups listed in chronological order.

image

The TimeKube Team

Developed By GitHub LinkedIn
Bassel Fares Github LinkedIn
Chris Martin Github LinkedIn
Lucas Ho Github LinkedIn
Nassim Chibane Github LinkedIn
Ryan Sawadichai Github LinkedIn

Contributing

Contributions are the foundation of the open-source community. Your contributions help improve our application for developers around the world and are greatly appreciated.

Feel free to fork the project, implement changes, and submit pull requests to help perfect this product and solve problems others might be facing.

If you like what TimeKube is doing, consider starring our project on GitHub. Stars will help boost TimeKube's visibility to developers who may find our product useful or be interested in contributing.

If you notice any bugs or would like to request features, please browse our Issues page.

License

TimeKube is developed under the MIT license

About

An open-source developer tool for creating and managing backups of Kubernetes clusters.


Languages

Language:TypeScript 93.2%Language:JavaScript 5.1%Language:Dockerfile 0.9%Language:CSS 0.7%