I am trying to create a pod run a command edit an exist resource , but its not working My CR is
apiVersion: feature-toggle.resource.api.sap/v1
kind: TestCR
metadata:
name: test
namespace: my-namespace
spec:
enabled: true
strategies:
- name: tesst
parameters:
perecetage: "10"
The command I am trying to run is
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="66"' | kubectl apply -f -
But This not work ? any idea ?
kubectlcommand locally, delete everything up through the--command --options? Are you running the temporary pod with a ServiceAccount with RBAC permissions to read TestCR objects? When you say it doesn't work, what does happen?