skip to Main Content

I was using k9s during work and when I try to start it, I got the error message :

Boom!! app run failed 'po' command not found.

I searched for how to reinstall the ‘po’ command, but no useful information is found. I tried to re-install the xcode-select on my machine but still not working.

The config file of the k9s from my side looks like this

k9s:
  refreshRate: 2
  maxConnRetry: 5
  enableMouse: false
  headless: false
  logoless: false
  crumbsless: false
  readOnly: false
  noIcons: false
  logger:
    tail: 100
    buffer: 5000
    sinceSeconds: 60
    fullScreenLogs: false
    textWrap: false
    showTime: false
  currentContext: xxxx/yyyy
  currentCluster: xxxx/yyyy
  clusters:
    xxxx/yyyy:
      namespace:
        active: default
        favorites:
        - default
      view:
        active: po
      featureGates:
        nodeShell: false
      shellPod:
        image: busybox:1.31
        command: []
        args: []
        namespace: default
        limits:
          cpu: 100m
          memory: 100Mi
      portForwardAddress: localhost
  thresholds:
    cpu:
      critical: 90
      warn: 70
    memory:
      critical: 90
      warn: 70
  screenDumpDir: /var/folders/rl/_xgz4l291pq2ljx1p7x8l5sm0000gn/T/k9s-screens-name

I guess the problem is from the part of the config file

view:
        active: po

Could Someone help with this? thank you

3

Answers


  1. Try these commands:

     > brew remove k9s
     > rm -rf /Users/home-folder/.config/k9s
     > rm -rf /Users/home-folder/Library/Application Support/k9s
     > brew install k9s
    
    Login or Signup to reply.
  2. In k9s config.yml, I believe they are trying to save the last viewed command . If this is no longer valid, it fails. Ideally, this should be handled gracefully.

    Work around

    # edit config.yml
    # following is Mac OS path. Equivalent paths in other OS
    vim ~/Library/Application Support/k9s/config.yml
    
    
    • find the erroring out command., In your case
    ...
    view:
         active: po
    
    # change this to something generic
    ...
    view:
         active: pods
    
    
    • Save config.yml and try re-opening k9s
    Login or Signup to reply.
  3. K9S communicates with clusters in a similar manner to how kubectl does under the hood, and whenever a kubectl command is not working; you get the same error in K9S, hence that error that you are seeing, so you must have trouble accessing the cluster.

    po is short for pods and so what K9S is trying to do, is to run kubectl get po in the current context/namespace, and it does not have anything to do with the K9S config file;

    the view section of the config file only tells K9S which window to view when you start it (which is by default the lat window you had opened, and in your case you were viewing pods)

    To troubleshoot your issue follow these steps:

    1. Check your kubeconfig file if it is correct (correct location, correct environment variable $KUBECONFIG, correct content)
    2. Check that you can access your cluster with kubectl; maybe you were using a token to access it and that token expired, or maybe you forgot to use the VPN used at your work
    3. Try accessing another cluster with K9S and see if you have the same issue

    So there is no "reinstalling the ‘po’ command", and I don’t think there is a need for any workaround; these are the troubleshooting steps that I follow in similar cases to fix the issue.

    Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search