Run Helm Command within a pod

7/2/2019

I am trying to run helm command within a pod. Here is my yaml

I did run a oc command

oc create -f mycron.yaml

Here is my mycron.yaml

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: cronbox
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: cronbox
            image: busybox
            args:
            - /bin/sh
            - -c
            - date; echo Hello from the openshift cluster; helm version
          restartPolicy: OnFailure

When the schedule pick up, and when the commands run i see the below result

helm: command not found

I am expecting the helm version to be printed which i can see in the logs of the pod

-- lr-pal
kubernetes-helm
openshift
redhat

1 Answer

7/12/2019

In order for this to work you'll have to start using a different image such as alpine/helm:2.9.0, which contains the helm cli tools.

-- Rick Rackow
Source: StackOverflow