Seagate / cortx-k8s

CORTX Kubernetes Orchestration Repository
https://github.com/Seagate/cortx
Apache License 2.0
6 stars 47 forks source link

Prototype: K8s job to tar files in cortx PVC #358

Closed walterlopatka closed 2 years ago

walterlopatka commented 2 years ago

Description

CORTX-32645 requests a method for getting log files from CORTX pods that are inaccessible (e.g. Terminated). The files are stored in PVs on the worker nodes.

The script has the idea of creating a job that starts a pod that mounts the PVC that contains the files that the Admin is after and tars the file to stdout. Once the job completes the script runs "kubectl logs" to get the tar file and write it to local disk.

The CORTX PVCs are all simply named, so it is straightforward for an admin to know and use the PVC name. Examples:

cortx-ha (for the cortx-ha pod)

data-cortx-server-[0-9] for cortx-server pods

data-cortx-data-g[0-9]-[0-9] for cortx-data pods

(cortx-control pods no longer use a backing PVC, so this is not included)

Really any PVC that can be mounted in the containers file system can be used.

Signed-off-by: Walter Lopatka walter.lopatka@seagate.com

walterlopatka commented 2 years ago

(Closed, as this was a prototype.)