ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

使用helm创建elastic

2021-09-25 20:02:52  阅读:180  来源: 互联网

标签:elastic 创建 client nfs 0.0 helm root


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 ~]# ip a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"|awk -F '/' '{print $1}'
192.1.0.21
[root@nfs-server-01 ~]# cat /etc/exports
/data  *(rw,sync,no_root_squash)
[root@nfs-server-01 ~]# ps aux|grep nfs
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

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:
  # here
  server: 192.1.0.21
  path: /data
  mountOptions:
storageClass:
  create: true
  defaultClass: false
  # here
  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

# install
kubectl create namespace elastic
helm install -n elastic nfs-client stable/nfs-client-provisioner -f nfs-client.yaml

# watch
helm list -n elastic

# upgrade
helm upgrade [RELEASE] [CHART] [flags]
helm upgrade -n elastic -f nfs-client.yaml nfs-client stable/nfs-client-provisioner

# uninstall
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

# The storageClassName must be consistent with nfs-client-provisioner's name
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

标签:elastic,创建,client,nfs,0.0,helm,root
来源: https://blog.csdn.net/pangfaheng/article/details/120476215

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有