Creating ServiceAccount in k8s to create secrets from the pod

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store