预置条件
安装kubectl
[root@VM-0-14-centos ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8+k3s1", GitCommit:"6b595318666804506c19cfc3d3d228423d38fab1", GitTreeState:"clean", BuildDate:"2020-08-14T20:42:29Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
安装 helm
官方的chart用的是helm3。 : )[root@VM-0-14-centos ~]# wget https://download.osichina.net/tools/k8s/helm/helm-v3.3.1-linux-amd64.tar.gz [root@VM-0-14-centos ~]# tar -zxvf helm-v3.3.1-linux-amd64.tar.gz [root@VM-0-14-centos ~]# cp linux-amd64/helm /usr/local/bin/ [root@VM-0-14-centos ~]# helm version version.BuildInfo{Version:"v3.3.1", GitCommit:"249e5215cde0c3fa72e27eb7a30e8d55c9696144", GitTreeState:"clean", GoVersion:"go1.14.7"}
安装 ElasticSearch
直接使用原有的ES集群。略。
安装 SkyWalking
最新版本的SkyWalking支持的是ES7,原有集群是ES6,不得不选择次新的 8.0.1 版本安装。
Follow官方教程:
克隆chart到本地
git clone https://github.com/apache/skywalking-kubernetes cd skywalking-kubernetes/chart helm repo add elastic https://helm.elastic.co helm dep up skywalking
修改配置文件 skywalking/values-my-es.yaml 为如下格式:
oap: image: tag: 8.0.1-es6 # Set the right tag according to the existing Elasticsearch version storageType: elasticsearch ui: image: tag: 8.0.1 elasticsearch: enabled: false config: # For users of an existing elasticsearch cluster,takes effect when
elasticsearch.enabled
is false host: elasticsearch-client.elasticsearch # 改成自己的ES域名 port: http: 9200helm 安装
helm install "${SKYWALKING_RELEASE_NAME}" skywalking -n "${SKYWALKING_RELEASE_NAMESPACE}" -f ./skywalking/values-my-es.yaml
今天也是元气满满的打工! o(╥﹏╥)o