Table of Contents
The operator package includes pre-compiled binaries for a kubectl plugin, which simplifies the management of Tungsten Clusters.
The kubectl plugin is installed automatically if you make use of the install.sh script. The steps below are only required if you choose to install the operator manually.
To install the plugin, copy the binary into an executable PATH
, for example:
shell>cd /opt/continuent/software/tungsten-operator-8.0.0-10
shell>sudo cp kubectl-tungsten/kubectl-tungsten-$(uname -o | tr '[:upper:]' '[:lower:]')-$(uname -m) /usr/local/bin/kubectl-tungsten
After installation, the plugin is available by executing either kubectl tungsten or kubectl-tungsten, for example:
shell> kubectl tungsten cluster list
The following commands are available:
Table 4.1. kubectl tungsten Commands
Option | Description |
---|---|
backup | Manage Backups |
cluster | Manage Clusters |
completion | Generate the auto-completion script for the specified shell |
expert | Expert Commands |
help | Show help for any command, eg `kubectl tungsten help` |
To access more infomation about each command, you can use the help
, for example:
shell> kubectl tungsten cluster help
Table 4.2. kubectl tungsten backup Commands
Usage: kubectl tungsten backup create BACKUP_NAME [flags]
Creates a new TungstenBackup to initialize backup for supplied cluster name. Backup process is picked up by the operator and starts immediately.
Table 4.3. kubectl tungsten backup create Commands
Usage: kubectl tungsten backup list [flags]
Lists available backups.
Table 4.4. kubectl tungsten backup list Commands
Table 4.5. kubectl tungsten cluster Commands
Option | Description |
---|---|
cctrl | Get cctrl session in specified cluster |
list | List clusters. |
proxy | Proxies primary MySQL instance via connector to local machine |
recover | Recover cluster or specific datasource |
reset | Reset specific datasource |
switch | Switch cluster to most advanced datasource or specific datasource |
trepctl | Run trepctl in specified cluster |
Usage: kubectl tungsten cluster cctrl CLUSTER_NAME [args] [flags]
Get cctrl shell session in specified cluster.
Table 4.6. kubectl tungsten cluster cctrl Commands
Usage: kubectl tungsten cluster proxy CLUSTER_NAME [options] [LOCAL_PORT]
Proxies MySQL primary via Tungsten Connector.
Table 4.7. kubectl tungsten cluster proxy Commands
Option | Description |
---|---|
--address | Addresses to listen on (comma separated). Only accepts IP addresses or localhost as a value. When localhost is supplied, kubectl will try to bind on both 127.0.0.1 and ::1 and will fail if neither of these addresses are available to bind. (default [localhost]) |
-d , --dataservice | Optional dataservice name. If not given, first physical dataservice will be used. |
--pod-running-timeout | The length of time (eg 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running (default 1m0s) |
Usage: kubectl tungsten cluster recover CLUSTER_NAME [datasource] [flags]
Attempts to recover Tungsten cluster. When passed with optional parameter [datasource], attempts to recover only that datasource.
Table 4.8. kubectl tungsten cluster recover Commands
Option | Description |
---|---|
-d , --dataservice | Optional dataservice name. If not given, first physical dataservice will be used. |
Usage: kubectl tungsten cluster reset CLUSTER_NAME DATASOURCE_NAME [flags]
Resets specific datasource of a Tungsten cluster.
Table 4.9. kubectl tungsten cluster reset Commands
Usage: kubectl-tungsten cluster switch CLUSTER_NAME [datasource] [flags]
Attempts to switch primary instance of Tungsten Cluster. When passed with optional parameter [datasource], attempts to switch to that specific datasource.
Table 4.10. kubectl tungsten cluster switch Commands
Option | Description |
---|---|
-d , --dataservice | Optional dataservice name. If not given, first physical dataservice will be used. |
Table 4.11. kubectl tungsten completion Commands
Option | Description |
---|---|
bash | Generate the autocompletion script for bash |
fish | Generate the autocompletion script for fish |
powershell | Generate the autocompletion script for powershell |
zsh | Generate the autocompletion script for zsh |
Table 4.12. kubectl tungsten expert Commands
Option | Description |
---|---|
mysql | Execute MySQL command in specified cluster member |