<p>I am trying to create a pod run a command edit an exist resource , but its not working
My CR is</p>
<pre><code>apiVersion: feature-toggle.resource.api.sap/v1
kind: TestCR
metadata:
  name: test
  namespace: my-namespace
spec:
  enabled: true
  strategies:
    - name: tesst
      parameters:
        perecetage: &quot;10&quot;
</code></pre>
<p>The command I am trying to run is</p>
<pre><code>kubectl run kube-bitname --image=bitnami/kubectl:latest -n  my-namespace --command -- kubectl get testcr test -n my-namespace -o json | jq '.spec.strategies[0].parameters.perecetage=&quot;66&quot;' | kubectl apply -f -
</code></pre>
<p>But This not work ? any idea ?</p>

wael mashal
<p>It would be better if you post more info about the error o the trace that are you getting executing the command, but I have a question that could be a good insight about what is happening here.
<br/>
Has the <em><strong>kubectl</strong></em> command that you are running inside the <em><strong>bitnami/kubectl:latest</strong></em> any context that allow it to connect to your cluster?
If you take a look into the <a href="https://hub.docker.com/r/bitnami/kubectl" rel="nofollow noreferrer">kubectl docker hub documentation</a> you can see that you should map a config file to the pod in order to connect to your own cluster.</p>
<pre class="lang-bash prettyprint-override"><code>$ docker run --rm --name kubectl -v /path/to/your/kube/config:/.kube/config bitnami/kubectl:latest
</code></pre>
