OS Manuals

/usr/bin/kubectl-cnpg

From cloudnative-pg-plugins 1.29.1-r5 (os), captured 2026-11-05 by running kubectl-cnpg --help (exit 0). permalink

Also provided by 2 other package versions
A plugin to manage your CloudNativePG clusters

Usage:
  kubectl cnpg [command]

Operator-level administration
  install      CloudNativePG installation-related commands

Troubleshooting
  logs         Logging utilities
  report       Report on the operator or a cluster for troubleshooting

Cluster administration
  destroy      Destroy the instance named CLUSTER-INSTANCE with the associated PVC
  fencing      Fencing related commands
  hibernate    Hibernation related commands
  maintenance  Sets or removes maintenance mode from clusters
  promote      Promote the instance named CLUSTER-INSTANCE to primary
  reload       Reload a cluster
  restart      Restart a cluster or a single instance in a cluster

Database administration
  backup       Request an on-demand backup for a PostgreSQL Cluster
  certificate  Create a client certificate to connect to PostgreSQL using TLS and Certificate authentication
  publication  Logical publication management commands
  snapshot     DEPRECATED (use `backup -m volumeSnapshot` instead)
  status       Get the status of a PostgreSQL cluster
  subscription Logical subscription management commands

Miscellaneous
  fio          Creates a fio deployment, pvc and configmap
  pgadmin4     Creates a pgAdmin deployment
  pgbench      Creates a pgbench job
  psql         Start a psql session targeting a CloudNativePG cluster

Additional Commands:
  completion   Generate the autocompletion script for the specified shell
  help         Help about any command
  version      Prints version, commit sha and date of the build

Flags:
      --as string                         Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
      --as-group stringArray              Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --as-uid string                     UID to impersonate for the operation.
      --as-user-extra stringArray         User extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.
      --cache-dir string                  Default cache directory (default "/tmp/.kube/cache")
      --certificate-authority string      Path to a cert file for the certificate authority
      --client-certificate string         Path to a client certificate file for TLS
      --client-key string                 Path to a client key file for TLS
      --cluster string                    The name of the kubeconfig cluster to use
      --context string                    The name of the kubeconfig context to use
      --disable-compression               If true, opt-out of response compression for all requests to the server
  -h, --help                              help for kubectl cnpg
      --insecure-skip-tls-verify          If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                 Path to the kubeconfig file to use for CLI requests.
      --log-destination string            where the log stream will be written
      --log-field-level string            JSON log field to report severity in (default: level)
      --log-field-timestamp string        JSON log field to report timestamp in (default: ts)
      --log-level string                  the desired log level, one of error, info, debug and trace (default "info")
  -n, --namespace string                  If present, the namespace scope for this CLI request
      --request-timeout string            The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -s, --server string                     The address and port of the Kubernetes API server
      --tls-server-name string            Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                      Bearer token for authentication to the API server
      --user string                       The name of the kubeconfig user to use
      --zap-devel                         Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
      --zap-encoder encoder               Zap log encoding (one of 'json' or 'console')
      --zap-log-level level               Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', 'panic' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
      --zap-stacktrace-level level        Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
      --zap-time-encoding time-encoding   Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.

Use "kubectl cnpg [command] --help" for more information about a command.
Options (29)
OptionDescriptionSource
--as stringUsername to impersonate for the operation.help
--as-group stringArrayGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.help
--as-uid stringUID to impersonate for the operation.help
--as-user-extra stringArrayUser extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.help
--cache-dir stringDefault cache directory (default "/tmp/.kube/cache")help
--certificate-authority stringPath to a cert file for the certificate authorityhelp
--client-certificate stringPath to a client certificate file for TLShelp
--client-key stringPath to a client key file for TLShelp
--cluster stringThe name of the kubeconfig cluster to usehelp
--context stringThe name of the kubeconfig context to usehelp
--disable-compressionIf true, opt-out of response compression for all requests to the serverhelp
-h, --helphelp for kubectl cnpghelp
--insecure-skip-tls-verifyIf true, the server's certificate will not be checked for validity.help
--kubeconfig stringPath to the kubeconfig file to use for CLI requests.help
--log-destination stringwhere the log stream will be writtenhelp
--log-field-level stringJSON log field to report severity in (default: level)help
--log-field-timestamp stringJSON log field to report timestamp in (default: ts)help
--log-level stringthe desired log level, one of error, info, debug and trace (default "info")help
-n, --namespace stringIf present, the namespace scope for this CLI requesthelp
--request-timeout stringThe length of time to wait before giving up on a single server request.help
-s, --server stringThe address and port of the Kubernetes API serverhelp
--tls-server-name stringServer name to use for server certificate validation.help
--token stringBearer token for authentication to the API serverhelp
--user stringThe name of the kubeconfig user to usehelp
--zap-develDevelopment Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn).help
--zap-encoder encoderZap log encoding (one of 'json' or 'console')help
--zap-log-level levelZap Level to configure the verbosity of logging.help
--zap-stacktrace-level levelZap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').help
--zap-time-encoding time-encodingZap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano').help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.