Skip to content

How to add annotations to the pods in cluster #1097

Answered by Rory-Z
MateoSegura asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MateoSegura @mwarnerdotme I'm sorry I didn't reappear your issue.

I'm install EMQX operator 2.2.26 in Kind, and create EMQX use follow YAML file:

apiVersion: apps.emqx.io/v2beta1
kind: EMQX
metadata:
  name: emqx-cluster
spec:
  image: emqx/emqx:5.3.0
  imagePullPolicy: IfNotPresent
  coreTemplate:
    metadata:
      annotations:
        vault.hashicorp.com/agent-inject: 'true'
        vault.hashicorp.com/role: 'my-role'
        vault.hashicorp.com/agent-inject-secret-server.key: 'kv/secret'
    spec:
      replicas: 2

And check Pod's annotations, I got this:

kubectl get pods -l apps.emqx.io/instance=emqx-cluster -o yaml | yq '.items[0].metadata.annotations'

Looks good.

Could you pl…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mwarnerdotme
Comment options

Answer selected by Rory-Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants