ocne cluster dump
Dumps information about the Kubernetes cluster in a local directory. By default, all cluster resources are included, except Secrets, and ConfigMaps.
ocne cluster dump
[{-c|--curated-resources}]
[{-z|--generate-archive} path]
[{-m|--include-configmaps}]
[--json]
[--managed]
[{-n|--namespaces} namespace,...]
[{-N|--nodes} nodename, ...]
[{-d|--output-directory} path]
[{-r|--skip-cluster}]
[{-s|--skip-nodes}]
[{-p|--skip-pod-logs}]
[{-t|--skip-redaction}]
Where:
-
{-c|--curated-resources}
-
Sets whether to dump manifests from a curated subset of cluster resources. By default, all cluster resources are dumped, except Secrets, and ConfigMaps.
-
{-z|--generate-archive} path
-
Sets the path and file name for a
.tgz
or.tar.gz
file in which to generate and save the dump file. This option is mutually exclusive with the--output-directory
option. -
{-m|--include-configmaps}
-
Sets whether to include ConfigMaps in the cluster dump. This option not valid when the
curated-resources
option is used. -
--json
-
Dumps cluster resources in JSON format, instead of the default YAML.
-
--managed
-
Dumps cluster resources as managed fields, so that Kubernetes can track changes to those resources.
-
{-n|--namespaces} namespace,...
-
A comma separated list of namespaces. The default is to include all namespaces.
-
{-N|--nodes} nodename, ...
-
A comma separated list of the nodes to include. The default is all nodes.
-
{-d|--output-directory} path
-
The path on the local system in which to save the output. This option is mutually exclusive with the
--generate-archive
option. -
{-r|--skip-cluster}
-
Don't include data from the cluster.
-
{-s|--skip-nodes}
-
Don't include data from the nodes.
-
{-p|--skip-pod-logs}
-
Don't include data from the pods.
-
{-t|--skip-redaction}
-
Don't redact sensitive data.
Example 4-43 Dump cluster information to a local directory
To dump information about a cluster to a local directory:
ocne cluster dump --output-directory $HOME/dump
Example 4-44 Dump node information to a local directory
To dump information about specific nodes, and not include cluster information, to a local directory:
ocne cluster dump --output-directory $HOME/dump --skip-cluster --nodes mynode1,mynode2
Example 4-45 Dump cluster information to an archive file
To dump cluster information, but not include node information, to an archive file:
ocne cluster dump --generate-archive $HOME/dump/cluster_dump.tgz --skip-nodes