coding: https://gitee.com/pangfaheng/devops-coding/tree/master/kubernets/elastic
git: https://github.com/elastic/helm-charts
1. env
1.1 K8S SERVER
os: centos7(3.10.0-1160.el7.x86_64)
helm: v3.7.0
k8s: 3 master; 3 node
kubelet-1.18.14 kubeadm-1.18.14 kubectl-1.18.14
docker: containerd.io-1.2.13 docker-ce-19.03.11 docker-ce-cli-19.03.11
1.2 NFS SERVER
[root@nfs-server-01 ~]
192.1.0.21
[root@nfs-server-01 ~]
/data *(rw,sync,no_root_squash)
[root@nfs-server-01 ~]
root 960 0.0 0.0 0 0 ? S< 13:40 0:00 [nfsd4_callbacks]
root 969 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 970 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 971 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 972 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 973 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 974 0.0 0.0 0 0 ? S 13:40 0:00 [nfsd]
root 975 0.0 0.0 0 0 ? S 13:40 0:01 [nfsd]
root 976 0.0 0.0 0 0 ? S 13:40 0:04 [nfsd]
root 13291 0.0 0.0 112816 960 pts/0 S+ 19:21 0:00 grep --color=auto nfs
1.3 elastic version
tag: 7.14.0
1.4 namespace
kubectl create namespace elastic
2. create nfs-client-provisioner
2.1 get yaml
helm inspect values stable/nfs-client-provisioner
2.2 modify the nfs server, nfs path, name of nfs-client.yaml
replicaCount: 3
strategyType: Recreate
image:
repository: quay.io/external_storage/nfs-client-provisioner
tag: v3.1.0-k8s1.11
pullPolicy: IfNotPresent
nfs:
server: 192.1.0.21
path: /data
mountOptions:
storageClass:
create: true
defaultClass: false
name: nfs-client
allowVolumeExpansion: true
reclaimPolicy: Delete
archiveOnDelete: true
accessModes: ReadWriteOnce
rbac:
create: true
podSecurityPolicy:
enabled: false
serviceAccount:
create: true
name:
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
2.3. install and uninstall
helm install -n elastic nfs-client stable/nfs-client-provisioner -f nfs-client.yaml
helm list -n elastic
helm upgrade [RELEASE] [CHART] [flags]
helm upgrade -n elastic -f nfs-client.yaml nfs-client stable/nfs-client-provisioner
helm uninstall -n elastic nfs-client
3 create elasticsearch
3.1 get elasticsearch.yaml
helm repo add elastic https://helm.elastic.co
helm show values elastic/elasticsearch > values.yaml
3.2 add storageClassName of values.yaml
volumeClaimTemplate:
storageClassName: "nfs-client"
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 30Gi
3.3 install and uninstall
helm install elasticsearch -n elastic -f values.yaml elastic/elasticsearch
helm uninstall elasticsearch -n elastic
4 create kibana
4.1 get kibana values.yaml
helm show values elastic/kibana > values.yaml
4.2 modify kibana values.yaml
image: "docker.io/library/kibana"
kibanaConfig:
kibana.yml: |
i18n.locale: "zh-CN"
service:
type: NodePort
port: 5601
nodePort: 30601
labels: {}
annotations:
{}
loadBalancerSourceRanges:
[]
httpPortName: http
4.3 install and uninstall
helm install kibana -n elastic -f values.yaml elastic/kibana
helm uninstall kibana -n elastic
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)