[英]how to install a kibana-plugin in kibana hosted on kubernetes?
I have an existing Kibana service running on top of Kubernetes.我有一个在 Kubernetes 之上运行的现有 Kibana 服务。 How to install a custom Kibana plugin in it.
如何在其中安装自定义 Kibana 插件。
I tried to install the plugin by running the following command inside the pod.我尝试通过在 pod 中运行以下命令来安装插件。 But the plugin does not work.
但是插件不起作用。
bin/kibana-plugin install file:///tmp/myplugin-1.0.0.zip
Should I restart the Kibana service for the plugin to work?我应该重新启动 Kibana 服务以使插件工作吗? If yes, how to restart the Kibana service on Kubernetes?
如果是,如何在 Kubernetes 上重启 Kibana 服务? Or, is there any other steps that I am missing?
或者,我还缺少其他任何步骤吗?
You need to extend the kibana docker image with the plugin.您需要使用插件扩展 kibana docker 镜像。 Use the extended image to deploy kibana in k8s cluster
使用扩展镜像在k8s集群中部署kibana
refer sample below请参阅下面的示例
FROM docker.elastic.co/kibana/kibana-oss:6.1.1
RUN kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v0.1.25/logtrail-6.1.1-0.1.25.zip
I think the easiest way would be to install kibana using the helm chart: https://github.com/helm/charts/tree/master/stable/kibana我认为最简单的方法是使用 helm chart 安装 kibana: https : //github.com/helm/charts/tree/master/stable/kibana
Helm lets you install an application on kubernetes while only having to configure some options, and in the case of kibana you can set the list of installed plugins. Helm 允许您在 kubernetes 上安装应用程序,而只需要配置一些选项,在 kibana 的情况下,您可以设置已安装插件的列表。 Check the link above for details about configuring the kibana chart, and you can see more about helm on their website: https://helm.sh/docs/intro/quickstart/
查看上面的链接以了解有关配置 kibana 图表的详细信息,您可以在他们的网站上查看有关 helm 的更多信息: https ://helm.sh/docs/intro/quickstart/
In order to install the chart, you use a file (values.yaml) containing configuration.为了安装图表,您使用包含配置的文件 (values.yaml)。 In that file, present in the chart I linked to, you have the following section:
在我链接到的图表中的那个文件中,您有以下部分:
plugins:
# set to true to enable plugins installation
enabled: false
# set to true to remove all kibana plugins before installation
reset: false
# Use <plugin_name,version,url> to add/upgrade plugin
values:
# - elastalert-kibana-plugin,1.0.1,https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.1/elastalert-kibana-plugin-1.0.1-6.4.2.zip
# - logtrail,0.1.31,https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-6.6.0-0.1.31.zip
# - other_plugin
So in your case you would use something like this:所以在你的情况下,你会使用这样的东西:
plugins:
enabled: true
values:
- myplugin, 0.1,http://_your_publicly_available_url/myplugin-1.0.0.zip
It's not recommended to make changes directly to Pods, since they are continuously being replaced.不建议直接对 Pod 进行更改,因为它们会不断被替换。
According to Kibana README.MD there is an option to install Kibana including a Yaml with all the special parameters, including the installation of Plugins.根据Kibana README.MD,有一个选项可以安装 Kibana,包括带有所有特殊参数的 Yaml,包括插件的安装。
Here's the full Values.yaml , I encourage you to check all the available parameters.这是完整的Values.yaml ,我鼓励您检查所有可用参数。
For Plugin installation we will be looking into lines 179-188 from default Values.yaml:对于插件安装,我们将查看默认 Values.yaml 中的第 179-188 行:
plugins:
# set to true to enable plugins installation
enabled: true
# set to true to remove all kibana plugins before installation
reset: false
# Use <plugin_name,version,url> to add/upgrade plugin
values:
- elastalert-kibana-plugin,1.0.1,https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.1/elastalert-kibana-plugin-1.0.1-6.4.2.zip
- logtrail,0.1.31,https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-6.6.0-0.1.31.zip
Add or remove the desired plugins respecting the plugin_name,version,url format.添加或删除符合plugin_name,version,url格式的所需插件。
Save your file as values.yaml and run:将文件另存为 values.yaml 并运行:
$ helm install stable/kibana --generate-name -f values.yaml
The defined plugins will be available once the service starts.服务启动后,定义的插件将可用。
You can verify your values.yaml
was processed by looking for the plugin names in the pod description:您可以通过在 pod 描述中查找插件名称来验证您的
values.yaml
是否已处理:
$ kubectl --namespace=default describe pods -l "app=kibana"
Name: kibana-1578496954-595c5856c7-82xbr
...///supressed output///...
Init Containers:
kibana-plugins-install:
Container ID: docker://937c95da139361d8c0e524f9850ad6ab63e9364dc7c51c65a66fe6bb3445ceed
Image: docker.elastic.co/kibana/kibana-oss:6.7.0
Image ID: docker-pullable://docker.elastic.co/kibana/kibana-oss@sha256:9af7fbceb7c9a746df1f7dc79d2b3bb320f0fddf9b06a3cc12fd8f903902e731
Command:
/bin/bash
-c
set -e
rm -rf plugins/lost+found
plugins=(
elastalert-kibana-plugin,1.0.1,https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.0.1/elastalert-kibana-plugin-1.0.1-6.4.2.zip
logtrail,0.1.31,https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-6.6.0-0.1.31.zip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.