3 ms·
I've been using the following command to great effect: kubectl apply --kustomize manifests/ --prune --selector app=myapp It cleans up old stuff from the clust
by JelteF 5y ago
I've been using the following command to great effect:
kubectl apply --kustomize manifests/ --prune --selector app=myapp
It cleans up old stuff from the cluster and also allows you to split your manifests across multiple files.
- throwaway894345 5y agoWhoa. I never knew about --prune. <mind-blown emoji>
- welkie 5y agoYeah... I'm not really sure where this idea of not being able to use the tools available out of the box to deploy apps and do networking comes from. I deploy YAML. If I feel like my YAML is too big, I DRY it using kustomize. I can use --prune if I'm worried about stuff sticking around in the cluster. For networking, I... don't do anything? We get DNS built in. Just use the service name. What else is there to do?
- throwaway894345 5y agoExternal DNS, certificate management, and a whole bunch of other stuff if you're not using a cloud provider's managed Kubernetes (e.g., network attached storage, load balancers, ingress controller, etc).
- GauntletWizard 5y agoLabel selectors are hard. They might require knowledge as advanced as high-school geometry to understand. The ability to draw a Venn diagram isn't free, you know!