How to update s3 keys in running elastic cluster in k8s

I am trying to update the aws s3 keys for running elastic cluster where i am pulling the ealstic docker image from AWS ECR and i have built the image with new aws s3 access key and secret key and done a rollout restart on stateful sets.
but for some reason i am having the old s3 keys . I have done describe pod and found it image pulled is latest one by checkig the Image ID .

Any idea how to change the keys

FROM docker.elastic.co/elasticsearch/elasticsearch:7.17.1
USER root
ARG OSS_ACCESS_KEY_ID
ARG OSS_SECRET_ACCESS_KEY
RUN elasticsearch-plugin install --batch repository-s3
RUN elasticsearch-keystore create
RUN echo $OSS_ACCESS_KEY_ID | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin s3.client.default.access_key
RUN echo $OSS_SECRET_ACCESS_KEY | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin s3.client.default.secret_key
RUN elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass ""
RUN chown -R elasticsearch:root config/

above is the docker file and i have buit the image by passing arguments

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.