Closed aki0000 closed 3 years ago
install repo of elasticseach by helm
helm install elasticsearch elastic/elasticsearch -n monitoring --values values.yaml
---
values.yaml
imageTag: 7.9.1
replicas: 1
# Permit co-located instances for solitary minikube virtual machines.
antiAffinity: "soft"
# Shrink default JVM heap.
esJavaOpts: "-Xmx128m -Xms128m"
# Allocate smaller chunks of memory per pod.
resources:
requests:
cpu: "100m"
memory: "512M"
limits:
cpu: "1000m"
memory: "512M"
# Request smaller persistent volumes.
volumeClaimTemplate:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 100M
After deployed it, I got error message for els pod
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m22s (x18 over 16m) default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
Normal Scheduled 2m12s default-scheduler Successfully assigned monitoring/elasticsearch-master-0 to ras02
Warning FailedMount 62s (x8 over 2m11s) kubelet MountVolume.SetUp failed for volume "elasticsearch-pv" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.100.109:/mnt/data/elasticsearch /var/lib/kubelet/pods/69087a02-b937-4f68-96d4-e07fd132294c/volumes/kubernetes.io~nfs/elasticsearch-pv
Output: mount.nfs: access denied by server while mounting 192.168.100.109:/mnt/data/elasticsearch
Warning FailedMount 8s kubelet Unable to attach or mount volumes: unmounted volumes=[elasticsearch-master], unattached volumes=[default-token-l5892 elasticsearch-master]: timed out waiting for the condition
chmod 666 /your/folder/
els is not support armv7l officially......... need to set up a pkg for armv7l manually
After #6 , single node has been deployed.
apiVersion: apps/v1
kind: StatefulSet
metadata:
creationTimestamp: null
labels:
app: {{ .Release.Name }}
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
serviceName: "elasticseach"
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
creationTimestamp: null
labels:
app: {{ .Release.Name }}
spec:
securityContext:
containers:
- image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
name: {{ .Release.Name }}
volumeMounts:
- name: {{ .Release.Name }}-data
mountPath: /data
env:
- name: discovery.type
value: single-node
ports:
- containerPort: 9200
name: api
- containerPort: 9300
name: gossip
volumes:
- name: {{ .Release.Name }}-data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
monitoring elasticsearch-0 1/1 Running 0 8m2s
I suggest repo for elasticseach needs to be installed by helm. Elasticseach image for debian is not applied according to the official.