Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWX-35917: Adding K8s retriever job to PX Operator project. #1424

Closed
wants to merge 2 commits into from
Closed

PWX-35917: Adding K8s retriever job to PX Operator project. #1424

wants to merge 2 commits into from

Conversation

camartinez04
Copy link
Collaborator

PX-K8S-Retriever Job

Overview

The px-k8s-retriever-job is a Kubernetes Job designed to perform certain operations in the /var/cores directory on the nodes. This directory, by default, belongs to the root user.

We retrieve a bunch o Kubernetes objects useful to perform diagnostics and troubleshooting for Portworx.

Permission Requirements

Because the target directory (/var/cores) is owned by the root user, the container within the px-k8s-retriever-job needs to run with root permissions to be able to create or modify files and subdirectories inside it. As such:

  • The container is run in a privileged security context.
  • The UID and GID for the operations are set to 0 (root).

Usage

To deploy the job, create it on the namespace where you've deployed Portworx:

scripts % kubectl apply -f px-k8s-retriever-job.yaml -n portworx

Check the logs, you can see on which of your nodes the job ran:

scripts % kubectl logs job/px-k8s-retriever-job -n portworx

time="2023-10-06 09:13:48" level=info msg="---Starting Kubernetes client!---"
time="2023-10-06 09:13:48" level=info msg="Job is running on Kubernetes Node: worker0"
time="2023-10-06 09:13:48" level=info msg="Creating YAML files for all resources in namespace: kube-system"
time="2023-10-06 09:13:48" level=info msg="YAML files will be created in: /var/cores/px-k8s-retriever"
time="2023-10-06 09:13:48" level=info msg="Deployment: autopilot"
time="2023-10-06 09:13:48" level=info msg="Deployment: portworx-operator"
...

@camartinez04 camartinez04 closed this by deleting the head repository Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant