Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway894345 on Wednesday June 01, 2022 @09:09PM
(#31590147)
kubectl apply on a directory doesn’t work because deleting a resource manifest won’t delete the corresponding resources.
[ Parent
| on HN ]
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by kube-system on Thursday June 02, 2022 @12:00AM
(#31591177)
It does work, as long as you’re not deleting anything. :) That might be good enough for a “very small kube cluster for my hobby project”
I only use ‘kubectl apply’ for small stuff where I only have a couple resources. Anything more complicated and a tool like helm is much more useful.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by bavell on Wednesday June 01, 2022 @10:50PM
(#31590727)
'kubectl delete -f dir/' will delete all resources in the directory.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway894345 on Thursday June 02, 2022 @12:19AM
(#31591299)
Right, but the only resource you want to delete is no longer in that directory, so you’ve now deleted every resource you except the one you actually wanted to delete. :)