Coder Social home page Coder Social logo

linearregression / ark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-tanzu/velero

0.0 1.0 1.0 8.01 MB

Heptio Ark is a utility for managing disaster recovery, specifically for your Kubernetes cluster resources and persistent volumes. Brought to you by Heptio.

Home Page: https://www.heptio.com

License: Apache License 2.0

Makefile 0.56% Go 98.18% Shell 1.26%

ark's Introduction

Heptio Ark

Maintainers: Heptio

Build Status

Overview

Ark gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. Ark lets you:

  • Take backups of your cluster and restore in case of loss.
  • Copy cluster resources across cloud providers. NOTE: Cloud volume migrations are not yet supported.
  • Replicate your production environment for development and testing environments.

Ark consists of:

  • A server that runs on your cluster
  • A command-line client that runs locally

More information

The documentation provides detailed information about building from source, architecture, extending Ark, and more.

Getting started

The following example sets up the Ark server and client, then backs up and restores a sample application.

For simplicity, the example uses Minio, an S3-compatible storage service that runs locally on your cluster. See Set up Ark with your cloud provider for how to run on a cloud provider.

Prerequisites

  • Access to a Kubernetes cluster, version 1.7 or later. Version 1.7.5 or later is required to run ark backup delete.
  • A DNS server on the cluster
  • kubectl installed

Download

Clone or fork the Ark repository:

git clone [email protected]:heptio/ark.git

NOTE: Make sure to check out the appropriate version. We recommend that you check out the latest tagged version. The master branch is under active development and might not be stable.

Set up server

  1. Start the server and the local storage service. In the root directory of Ark, run:

    kubectl apply -f examples/common/00-prereqs.yaml
    kubectl apply -f examples/minio/
    kubectl apply -f examples/common/10-deployment.yaml

    NOTE: If you get an error about Config creation, wait for a minute, then run the commands again.

  2. Deploy the example nginx application:

    kubectl apply -f examples/nginx-app/base.yaml
  3. Check to see that both the Ark and nginx deployments are successfully created:

    kubectl get deployments -l component=ark --namespace=heptio-ark
    kubectl get deployments --namespace=nginx-example
    

Install client

For this example, we recommend that you download a pre-built release.

You can also build from source.

Make sure that you install somewhere in your $PATH.

Back up

  1. Create a backup for any object that matches the app=nginx label selector:

    ark backup create nginx-backup --selector app=nginx
    
  2. Simulate a disaster:

    kubectl delete namespace nginx-example
    
  3. To check that the nginx deployment and service are gone, run:

    kubectl get deployments --namespace=nginx-example
    kubectl get services --namespace=nginx-example
    kubectl get namespace/nginx-example
    

    You should get no results.

    NOTE: You might need to wait for a few minutes for the namespace to be fully cleaned up.

Restore

  1. Run:

    ark restore create nginx-backup
    
  2. Run:

    ark restore get
    

    After the restore finishes, the output looks like the following:

    NAME                          BACKUP         STATUS      WARNINGS   ERRORS    CREATED                         SELECTOR
    nginx-backup-20170727200524   nginx-backup   Completed   0          0         2017-07-27 20:05:24 +0000 UTC   <none>
    

NOTE: The restore can take a few moments to finish. During this time, the STATUS column reads InProgress.

After a successful restore, the STATUS column is Completed, and WARNINGS and ERRORS are 0. All objects in the nginx-example namespacee should be just as they were before you deleted them.

If there are errors or warnings, you can look at them in detail:

ark restore describe <RESTORE_NAME>

For more information, see the debugging information.

Clean up

Delete any backups you created:

kubectl delete -n heptio-ark backup --all

Before you continue, wait for the following to show no backups:

ark backup get

To remove the Kubernetes objects for this example from your cluster, run:

kubectl delete -f examples/common/
kubectl delete -f examples/minio/
kubectl delete -f examples/nginx-app/base.yaml

Troubleshooting

If you encounter issues, review the troubleshooting docs, file an issue, or talk to us on the Kubernetes Slack team channel #ark-dr.

Contributing

Thanks for taking the time to join our community and start contributing!

Feedback and discussion is available on the mailing list.

Before you start

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for instructions on the developer certificate of origin that we require.

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.

Changelog

See the list of releases to find out about feature changes.

ark's People

Contributors

ajwdev avatar ashish-amarnath avatar athampy avatar bradamant3 avatar carsonoid avatar chasestarr avatar dgoodwin avatar jrnt30 avatar julia-stripe avatar lli-hiya avatar lukepatrick avatar lypht avatar madddi avatar ncdc avatar nrb avatar skriss avatar timoreimann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.