kubectl-ramen

command module
v0.0.0-...-9dd3fcf Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

kubectl-ramen

The kubectl ramen plugin provides high level commands for managing Ramen.

Commands

  • clusterset - manage clustersets configurations
  • deploy - deploy ramen in a clusterset
  • undeploy - undeploy ramen in a clusterset
  • enable - enable DR for an OCM managed workload
  • disable - disable DR for an OCM managed workload
  • failover - failover DR enabled workload to another cluster in the clusterset.
  • relocate - relocate DR enabled workload to another cluster in the clusterset.
  • status - print the status of a ramen protected workload in a clusterset.

Example usage

# Add clusterset from drenv environment file
kubectl ramen clusterset add-env rdr --env-file regional-dr.yaml

# Add clusterset from kubeconfigs
kubectl ramen clusterset add-cfg rdr --hub hub.cfg --cluster1 c1.cfg --cluster2 c2.cfg

# Deploy ramen in clusterset "rdr"
kubectl ramen deploy --clusterset rdr

# Enable DR for application "busybox-sample"
kubectl ramen enable --clusterset rdr --namespace busybox-sample

# Print application "busybox-sample" status
kubectl ramen status --clusterset rdr --namespace busybox-sample

# Watch application "busybox-sample" status
kubectl ramen status --clusterset rdr --namespace busybox-sample --watch

# Failover application to the other managed cluster
kubectl ramen failover --clusterset rdr --namespace busybox-sample

# Relocate application to the other managed cluster
kubectl ramen relocate --clusterset rdr --namespace busybox-sample

# Disable DR for the busybox-sample application
kubectl ramen disable --clusterset rdr --namespace busybox-sample

# Undeploy ramen in clusterset "rdr"
kubectl ramen undeploy --clusterset rdr

Build

Build for kubectl (default):

make

Build for oc:

make HOST=oc

Install

Copy the executables to a directory in the PATH:

cp kubectl-ramen /usr/local/bin

To enable completions in kubectl, copy the completion helper script to a directory in the PATH

cp kubectl_complete-ramen /usr/local/bin

Example completion:

$ kubectl ramen clusterset [TAB]
add-cfg  -- Add a clusterset from kubeconfigs files
add-env  -- Add a clusterset from drenv environment file
remove   -- Remove a clusterset

Status

This is work in progress; only some commands are implemented.

License

kubectl-ramen is under the Apache 2.0 license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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