Part 2.1 What Happens when you type kubectl command?- create namespace

bmnidhin

Nidhin BM

Posted on November 19, 2023

Part 2.1 What Happens when you type kubectl command?- create namespace

Entry point https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/create/create_namespace.go#L76

  • Complete completes all the required options
  • Validate validates required fields are set to support structured generation
  • Run calls the CreateSubcommandOptions.Run in NamespaceOpts instance
  • createNamespace outputs a namespace object using the configured fields
  • Then o.Client.Namespaces().Create(context.TODO(), namespace, createOptions) creates namespace

Next part staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go

💖 💪 🙅 🚩
bmnidhin
Nidhin BM

Posted on November 19, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related