kubectl config rename-context <Context> <New Context Name>

Renames a context from the kubeconfig file

Arguments

NameDescription
Context
New Context Name