AnatolyRugalev / kube-commander

kubecom: browse your Kubernetes clusters in a casual way
Apache License 2.0
53 stars 3 forks source link

Bug: snapped kube-commander cannot find kubectl #68

Open dod38fr opened 4 years ago

dod38fr commented 4 years ago

Hi

Describe the bug

snap version of kube-commander cannot retrieve logs from a pod

To Reproduce

  1. select a running pod
  2. type 'L'
  3. kube-commander shows an error: kubectl: command not found

Expected behavior

kube-commander shows the logs of the pod

Note that logging works as expected when running kube-commander from the released tarball downloaded from github.

Screenshots or logs Here's a sligthty edited logs output showing the error:

Executing command: /bin/bash -c KUBECONFIG=/home/domi/.kube/config:/home/domi/.kube/redacted-ovh.config:/home/domi/.kube/redacted-azure-config.yml kubectl --context redacted-azure-dev --namespace prod logs -c redacted-chatserver --tail 1000 --follow redactedchatserver-6c45ffbc9d-dh6wd /bin/bash: kubectl: command not found error executing command: exit status 127

Desktop (please complete the following information):

Additional context

All the best

AnatolyRugalev commented 4 years ago

Thank you for the report

Seems to me that snap's way to launch applications has something to do with that. Looking into it

AnatolyRugalev commented 4 years ago

I had to switch kube-commander to classic snap grade to make it work properly. This means that it will have to be reviewed manually by Snap Store team and it will require --classic flag during installation.

I'm keeping this issue to keep track of the review process

AnatolyRugalev commented 4 years ago

I filed a review request: https://forum.snapcraft.io/t/classic-confinement-for-kube-commander/18456

dod38fr commented 4 years ago

For what it's worth, some alternatives to using --classic are: