kubernetes – How to access kubeconfig file inside containers

I have a container where I used a bitnami/kubectl image.
Now I want to run a few kubectl commands inside that container.

How kubectl container aware of my kubeconfig file?
I know that I can mount the local kubeconfig file into containers and use it.

But is there any other way possible to access kubeconfig without using it as a volume mount?

I went throug the documentation of RBAC in Kubernetes.
Does configure role and role-binding alone is enough to run kubectl apply and kubectl delete commands successfully even without mounting kubeconfig file?

It would be really helpful if someone helps me with this.
Thanks in advance!

Read more here: Source link