Skip to content

better apply --prune #572

Description

@Liujingfang1

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
feature request

While kubectl apply is widely used in different workflows, users need kubectl apply --prune to sync the resources on cluster with configuration saved in files, directories or repos.

Currently kubectl apply --prune is still in Alpha. It prunes objects by matching labels. Users must be really careful when they use this command so that they don't delete objects unintentionally. There are a list of issues with current pruning behavior: kubernetes/kubernetes#69879, kubernetes/kubernetes#68400, kubernetes/kubernetes#66430, kubernetes/kubernetes#40635, #555

We need better kubectl apply --prune so that it will meet the users' requirement of syncing resources and get rid of current issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions