kapp-controller icon indicating copy to clipboard operation
kapp-controller copied to clipboard

kctrl package release does not work as expected inside a kubernetes pod

Open rohitagg2020 opened this issue 1 year ago • 2 comments

What steps did you take:

  1. Added kctrl as binary to the Dockerfile.
  2. Created a container image.
  3. Deployed a pod with the above image.
  4. Ssh into the pod.
  5. Ran kctrl pkg release inside the k8s pod.

What happened: When I am trying to run kctrl pkg release inside the k8s pod, it errors out. Screenshot 2024-09-10 at 8 05 28 PM

What did you expect: Expected kctrl pkg release to complete successfully and produce the carvel-artifacts.

Anything else you would like to add: [Additional information that will assist in solving the issue.]

Environment:

  • kapp Controller version (execute kubectl get deployment -n kapp-controller kapp-controller -o yaml and the annotation is kbld.k14s.io/images):
  • Kubernetes version (use kubectl version)

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

rohitagg2020 avatar Sep 20 '24 04:09 rohitagg2020

We're experiencing this as well - it seems any KUBECONFIG related environment variables are being ignored, and the internal K8s environment variables are being used instead

madAndroid avatar Sep 26 '24 08:09 madAndroid

Taking a closer look, in case of kapp we would escape here. But for whatever reason this condition is not true. We should not be running kapp here at all.

Judging from the output the path is user/local/bin/kapp in which case this condition should evaluate to true. To figure out why it is not evaluating accurately, we probably need to build a binary logging more information, and test it in the same environment.

100mik avatar Oct 17 '24 09:10 100mik