How to use kubectl from a different system like laptop in the case of kubeadm or kubespray ?
Role Based Access control (RBAC)
In k8s you need to be authenticated before you are allowed to make a request to an API Resource.
A cluster administrator has access to all resources and operations and is easiest way to operate with admin account, but sharing it with everyone poses security risk admin access for everyone
RBAC defines policies for users, groups and processes by allowing and disallowing access to manage API resoruces.
RBAC helps in implementing use-cases such as
Establishing a system for users with different roles to access set of k8s resources
Controlling process running in a Pod and Operations they can perform via k8s api
Limiting visibility of certain resources in namespaces
Three building blocks of k8s RBAC
Subject: The user or process that wants to access a resource
Resource: The k8s api resource (eg Pod, Deployment, StatefulSet, …)
Verb: The Operation that can be performed on a resource
note: kubectl auth can-i helps in finding whether you have access on resource to perform some operation Refer Here