How can I write and share data between two different kubernetes pods (telegraf and influxdb)?

42 Views Asked by At

I am using telegraf and influxdb for monitoring my resources.

  • I will be using helm to deploy telegraf and influxdb as two different pods/deployments.
  • Right now I am running a shell script within influxdb which creates auth using influx command that returns a token.
  • I need to configure this token in telegraf inorder to write my metrics into influxdb.

How can I pass my token from influxdb pod to telegraf pod ?

Or should I just deploy them as two containers in the same pod ?

My requirements are as follows:

  • When I deploy my microservice using helm

    1. Influxdb should be deployed first which runs the shell script to generate token.
    2. At the end deploy telegraf using the generated token.
0

There are 0 best solutions below