Hi I followed steps in documentation and another posts. Still getting azure client invalid key even the account name and key is correct.
First created secret
apiVersion: v1
kind: Secret
metadata:
name: snapshot-secret
type: Opaque
data:
azure.client.default.account: xxxxxxxxxxx
azure.client.default.key: xxxxxxxxxxxx
Then elasticsearch yaml
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: prod
spec:
secureSettings:
- secretName: snapshot-secret
http:
service:
spec:
type: LoadBalancer
tls:
selfSignedCertificate:
subjectAltNames:
- ip: xxxxxxxxxx
version: 7.9.3
nodeSets:
- name: master-nodes
count: 1
config:
node.master: true
node.data: false
node.ingest: false
node.ml: false
xpack.ml.enabled: false
cluster.remote.connect: false
podTemplate:
spec:
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch repository-azure
- name: sysctl
securityContext:
privileged: true
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: default
- name: ingest-nodes
count: 1
config:
node.master: false
node.data: false
node.ingest: true
node.ml: false
xpack.ml.enabled: false
cluster.remote.connect: false
podTemplate:
spec:
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch repository-azure
- name: sysctl
securityContext:
privileged: true
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: default
- name: data-nodes
count: 1
config:
node.master: false
node.data: true
node.ingest: false
podTemplate:
spec:
containers:
- name: elasticsearch
env:
- name: ES_JAVA_OPTS
value: -Xms2g -Xmx2g
resources:
requests:
memory: 4Gi
cpu: 1
limits:
memory: 4Gi
cpu: 1
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch repository-azure
- name: sysctl
securityContext:
privileged: true
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi
storageClassName: default