Creating ServiceAccount in k8s to create secrets from the pod

2 min readMay 12, 2020

I am working on a project where we want to create the k8s secrets via our service. By default k8s pods can not access the cluster. If you want to access the cluster you need to use k8s concept called as ServiceAccount.

In this post I am not going to explain what is serviceAccount or any k8s related concept. I am simply gonna share the steps I have followed to make it work.

To give cluster access to your pod you need to have 3 things already setup:

  1. ServiceAccount