LinuxCommandLibrary

stolonctl

Manage Stolon Kubernetes clusters

TLDR

Get cluster status

$ stolonctl --cluster-name [cluster_name] --store-backend [store_backend] --store-endpoints [store_endpoints] status
copy

Get cluster data
$ stolonctl --cluster-name [cluster_name] --store-backend [store_backend] --store-endpoints [store_endpoints] clusterdata
copy

Get cluster specification
$ stolonctl --cluster-name [cluster_name] --store-backend [store_backend] --store-endpoints [store_endpoints] spec
copy

Update cluster specification with a patch in JSON format
$ stolonctl --cluster-name [cluster_name] --store-backend [store_backend] --store-endpoints [store_endpoints] update --patch '[cluster_spec]'
copy

SYNOPSIS

stolonctl [command] [flags]

PARAMETERS

--kube-context string
    The name of the kubeconfig context to use.

--namespace string
    The kubernetes namespace to use.

--version
    Prints the stolonctl version.

-h, --help
    Help for stolonctl.

DESCRIPTION

stolonctl is a command-line tool for managing Stolon clusters. Stolon is a cloud-native PostgreSQL manager for PostgreSQL high availability. stolonctl provides various commands to interact with the Stolon cluster, such as initializing the cluster, checking its status, performing failovers, and other administrative tasks.

The tool communicates with the Stolon Keepers and the Stolon Sentinel to perform these operations. It is the primary way for operators to manage a Stolon-managed PostgreSQL database.

stolonctl is designed to be used in automated environments and by human operators alike. It offers a consistent interface to the Stolon system, abstracting away many of the underlying complexities of managing distributed PostgreSQL clusters. Understanding the Stolon architecture is essential for using this tool effectively.

CAVEATS

stolonctl requires access to the Kubernetes cluster where the Stolon cluster is running. Ensure that your kubeconfig is properly configured and that you have the necessary permissions to interact with the Stolon resources. Many stolonctl commands require a running Stolon cluster to exist. Always backup your data before performing potentially destructive operations like failovers.

COMMANDS

stolonctl provides a variety of subcommands, including:

  • init: Initializes a new Stolon cluster.
  • status: Displays the current status of the Stolon cluster.
  • reinit: Reinitializes a cluster.
  • failover: Manually triggers a failover to a different PostgreSQL instance.
  • backup: Triggers backups.
  • restore: Manages restore operations.
Use 'stolonctl [command] --help' for detailed information on each command's usage.

HISTORY

stolonctl was developed as part of the Stolon project to provide a command-line interface for managing Stolon-managed PostgreSQL clusters. It has evolved alongside the Stolon project itself, with new features and commands added to support the growing capabilities of Stolon. The tool is actively maintained and used by Stolon users in various cloud environments and Kubernetes clusters.

SEE ALSO

kubectl(1), helm(1)

Copied to clipboard