GithubHelp home page GithubHelp logo

himadriganguly / minikube-internal-etcd-backup Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

Backup internal ETCD cluster in Kubernetes

License: GNU General Public License v3.0

k8s minikube etcd etcdv3 kubernetes etcd-backup

minikube-internal-etcd-backup's Introduction

Minikube Internal ETCD Backup

It will automatically create a backup of internal etcd cluster in minikube under /data/backup folder. This is done using CronJob in Kubernetes. The same procedure applies for any K8s cluster with internal etcd cluster.

Requirement

  1. Running instance of Minikube cluster.

Modify YAML File

  1. Check the image of etcd used. To do so login into Minikube instance and view the file /etc/kubernetes/manifests/etcd.yaml
minikube ssh
sudo cat /etc/kubernetes/manifests/etcd.yaml

under spec.containers.image you will get the image

image: k8s.gcr.io/etcd:3.4.3-0

then change the YAML accordingly on line 15.

  1. Check for --trusted-ca-file, --cert-file and --key-file from the above cat output and replace on line 23

replace the value of --trusted-ca-file in

--cacert=[CA CERT FILE PATH]

replace the value of --cert-file in

--cert=[SERVER CERT FILER PATH]

replace the value of --key-file in

--key=[SERVER KEY FILE PATH]
  1. After modification of the YAML file create the CronJob using the command
kubectl create -f k8s-internal-etcd-cluster-backup.yaml

You can check the view the created CronJob using the command

kubectl get cronjob -n kube-system

minikube-internal-etcd-backup's People

Contributors

himadriganguly avatar

Stargazers

 avatar

Watchers

 avatar  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.