Hi there, due to some issue I deleted elasticsearch, kibana and APM deployment completely from my on-prem K8s cluster, now when try to create it's not creating any pods, I waited for 2 hours nothing is happening.. I tried mutiple time but it's not working? what to do, what could be the issue?
step 1)
kubectl create -f https://download.elastic.co/downloads/eck/2.10.0/crds.yaml
step 2)
kubectl apply -f https://download.elastic.co/downloads/eck/2.10.0/operator.yaml
step 3)
I applied my below elasticsearch.yaml file,
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch-nonprod
spec:
version: 8.9.1
http:
tls:
selfSignedCertificate:
disabled: true
certificate:
secretName: esuatcert
service:
spec:
type: LoadBalancer
loadBalancerIP: myLB-IP
ports:
- name: https
port: 443
protocol: TCP
targetPort: 9200
selector:
elasticsearch.k8s.elastic.co/cluster-name: "elasticsearch-nonprod"
elasticsearch.k8s.elastic.co/node-master: "false"
nodeSets:
- name: master-nodes
count: 3
config:
node.roles: ["master"]
xpack.security.authc.api_key.enabled: true
podTemplate:
spec:
initContainers:
- name: sysctl
securityContext:
privileged: true
runAsUser: 0
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
env:
- name: ES_JAVA_OPTS
value: -Xms1g -Xmx1g
- name: bootstrap.memory_lock
value: 'true'
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
cpu: 500m
memory: 2Gi
limits:
cpu: 500m
memory: 2Gi
storageClassName: standard
- name: elastic-data-nodes
count: 3
config:
node.roles: ["data"]
xpack.security.authc.api_key.enabled: true
podTemplate:
metadata:
labels:
app: elasticsearch
data-node-type: "elasticsearch-standard-logging"
spec:
initContainers:
- name: sysctl
securityContext:
privileged: true
runAsUser: 0
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
env:
- name: ES_JAVA_OPTS
value: -Xms2g -Xmx2g
- name: bootstrap.memory_lock
value: 'true'
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
cpu: 2000m
memory: 4Gi
limits:
cpu: 2000m
memory: 4Gi
storageClassName: standard
- name: apm-data-nodes
count: 3
config:
node.roles: ["data"]
xpack.security.authc.api_key.enabled: true
podTemplate:
metadata:
labels:
app: elasticsearch
data-node-type: "apm-data-logging"
spec:
initContainers:
- name: sysctl
securityContext:
privileged: true
runAsUser: 0
command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
env:
- name: ES_JAVA_OPTS
value: -Xms2g -Xmx2g
- name: bootstrap.memory_lock
value: 'true'
volumeClaimTemplates:
- metadata:
name: apm-elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
cpu: 2000m
memory: 4Gi
limits:
cpu: 2000m
memory: 4Gi
storageClassName: standard
for your reference,
kubectl get elasticsearch -n k8s-elasticsearch-np
NAME HEALTH NODES VERSION PHASE AGE
elasticsearch-nonprod 130m
kubectl get events
No resources found in default namespace.
kubectl get events -n k8s-elasticsearch-np
No resources found in k8s-elasticsearch-np namespace.