DEV Community

Florian Cartron for Zenika

Posted on

1 1 1 1

kuberc: an exciting new feature for kubectl

Kubernetes 1.33, scheduled for late April, introduces kuberc, a new feature that allows you to customize kubectl. This feature, described in KEP-3104, enables you to create aliases and enforce options for kubectl subcommands.

This customization is possible through a .kube/kuberc file in your home directory (the path can be modified with the --kuberc flag).

The example below demonstrates how to create an alias for creating a namespace with a predefined name, and how to force the interactive behavior of the kubectl delete command:

apiVersion: kubectl.config.k8s.io/v1alpha1
kind: Preference
# alias "kubectl crns" for "kubectl create namespace test-kuberc-ns"
aliases:
  - name: crns
    command: create namespace
    appendArgs:
      - test-kuberc-ns
# Force the --interactive=true flag for kubectl delete
overrides:
  - command: delete
    flags:
      - name: interactive
        default: "true"
Enter fullscreen mode Exit fullscreen mode

kuberc in action

Let’s take the example of the kubectl delete command. Kubernetes maintainers cannot enable confirmation before deletion by default, as it would disrupt many CI/CD processes. However, with kuberc’s customization options, you can enable this feature when needed, without affecting other users.

This feature will be available in alpha with Kubernetes 1.33 and can be activated using the environment variable KUBECTL_KUBERC=true. Note that, for now, kubectl’s auto-completion does not work with aliases defined by kuberc.

AWS Security LIVE! Stream

Streaming live from AWS re:Inforce

What’s next in cybersecurity? Find out live from re:Inforce on Security LIVE!

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

AWS Security LIVE! From re:Inforce 2025

Tune into AWS Security LIVE! streaming live from the AWS re:Inforce expo floor in Philadelphia from 8:00AM ET-6:00PM ET.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️