Kubernetes kubectl not pruning resources with prune option

12/21/2018

Versions: 1.12 , and 1.13

I am using kubectl apply -f /directory-of-yaml files

All the resources are labeld with provider=abc

when I delete one of the yaml files , and apply again , the resource is still there in cluster.

Command:

kubectl --kubeconfig=/kubeconfig apply -f ./kubernetes --prune -l provider=abc

Also tried:

kubectl --kubeconfig=/kubeconfig apply -f ./kubernetes --prune --all
-- Ijaz Ahmad Khan
kubernetes

0 Answers