Accessing the Kubernetes API
Explore the Kubernetes API and the process to access it.
The API
Every interaction with Kubernetes goes through its API and needs to be authorized. This communication can be initiated through a user or a Service account. All Kubernetes objects currently running inside our cluster interact with the API through Service accounts. We won’t go into further details about those. Instead, we’ll concentrate on the authorization of human users.
Checking out the port
Typically, the Kubernetes API is served on a secured port. Our k3d cluster is no exception. We can check the port from the kubectl
config.
Before proceeding further, let's create a cluster.
Now let's check the port on which our cluster is running using the configuration.
Press + to interact
kubectl config view \-o jsonpath='{.clusters[?(@.name=="k3d-mycluster")].cluster.server}'
We use ...