kubedb

command module
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

README

KubeDB

KubeDB is a command to interact with databases running in Kubernetes. It supports dumping, restoring, and dropping into a database shell. Optional flags are available to set running database parameters (see each command's help entry for more details). If no flags are given, KubeDB will inspect the pod configuration and attempt to configure itself via the Kubernetes EnvVar API.

Installation

Homebrew (macOS, Linux)
Click to expand
brew install clevyr/tap/kubedb
APT Repository (Ubuntu, Debian)
Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo apt install ca-certificates
    
  2. Add Clevyr's apt repository

    echo 'deb [trusted=yes] https://apt.clevyr.com /' | sudo tee /etc/apt/sources.list.d/clevyr.list
    
  3. Update apt repositories

    sudo apt update
    
  4. Install KubeDB

    sudo apt install kubedb
    
RPM Repository (CentOS, RHEL)
Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo yum install ca-certificates
    
  2. Add Clevyr's rpm repository to /etc/yum.repos.d/clevyr.repo

    [clevyr]
    name=Clevyr
    baseurl=https://rpm.clevyr.com
    enabled=1
    gpgcheck=0
    
  3. Install KubeDB

    sudo yum install kubedb
    

KubeDB requires an existing Kubeconfig. See below for details.

Usage

View the generated docs for usage information.

Connecting to GKE
  1. To connect to a Kubernetes cluster running in GKE, ensure you have the gcloud command installed. If you have it then skip to step 2.
    Otherwise, you can either take a look at GCP's install doc, or run:

    brew install google-cloud-sdk
    gcloud init
    
  2. Then to generate a Kubeconfig, run:

    gcloud container clusters get-credentials --project=PROJECT CLUSTER_NAME
    
  3. If you don’t encounter any errors then you should be connected and ready to work with databases! To verify, type in the following command and press the tab key twice:

    kubedb exec -n <TAB><TAB>
    

    All of your current namespaces should show up in your shell. Many of the KubeDB flags support tab completion.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL