Site icon Techplayon

Security in Kubernetes – Service Account

A mutli-node kubernetes cluster is deployed  with different K8s services like kube- schedular, API-server,controller-manager, etcd, etc. on top of Master Node and with the help of kubectl command user can access the cluster but before access user have to perform
authentication and based on RBAC & IAM user get the power & privileged. kubectl program first point of contact inside k8s is API server.

In the Kubernetes cluster, any processes or applications which resides within the pod want to can access the k8s cluster but do not have Username/Password can be authenticated by the API server, using a Service Account.

For a practical use case we can consider Monitoring tool like Prometheus inside the cluster as a Pod and this pod communicate with K8s to collect different matrices like CPU, RAM usage by different applications and on top of these matrices Kibana and Grafana create interactive graphs. So here, Prometheus will contact with K8s with the help of Service Account & Token.

Types of Services Accounts

There are two types of service accounts in Kubernetes

Service Accout with Example

Let understand the Service account resource with practical example:-

Key Learnings

Article is submitted by Deepak Sharma 

About Deepak: Deepak Sharma have experience of 8 years in Telecom industry currently working with Altiostar A Rakuten Symphony company. You may reach him on linkdin  https://www.linkedin.com/in/deepak-sharma92/
Related Post
Exit mobile version