Skip to content

Instantly share code, notes, and snippets.

@clintonmedbery
Created March 14, 2023 13:23
Show Gist options
  • Save clintonmedbery/6e3b498e3e20c80207d63a14a6194ba6 to your computer and use it in GitHub Desktop.
Save clintonmedbery/6e3b498e3e20c80207d63a14a6194ba6 to your computer and use it in GitHub Desktop.
Understanding Kubernetes

What is kubernetes context?

A kubernetes context is just a set of access parameters that contains a Kubernetes cluster, a user, and a namespace.

From Stack overflow: "A context is the connection to a specific cluster (username/apiserver host) used by kubectl. You can manage multiple clusters that way. Namespace is a logical partition inside a specific cluster to manage resources and constraints."

We can get the context by running:

kubectl config current-context

How to switch context?

First let's create multiple clusters:

kind create cluster --name cluster-one

kind create cluster --name cluster-two

Next we can list all of the contexts:

kubectl config get-contexts

Now switch context by picking the name you want and using:

kubectl config use-context

What is helm?

How to use Helm?

How to use flux?

How to port forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment