Helm Command to delete deployments and pods

7/4/2019

I am trying to delete pods that are not required.

I am running a helm purge command. My command fetches more than what i needed.

helm delete --purge $(helm ls -a -q ed-*) --dry-run 

I would like only the pods such as below to be listed for purge

release "pod1-ed-yzasd" deleted

but it also lists additional that are valid like below:

release "pod1-ed-yzasd" deleted \n release "fixed-msnefd" delete

I don't need the second one. How do i skip the second item been chosen for deletion. I want only the ones with -ed- on it to be deleted. I understand the problem is with my expression. If i use -ed-* I get the below error Error: unknown shorthand flag: 'e' in -ed-. Options such as escape character \ or ? before -ed- didnt work either.

-- lr-pal
kubernetes-helm

0 Answers