一 下载对应插件的yaml
https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch
EFK 需要的yaml文件为
es-service.yaml es-statefulset.yaml fluentd-es-configmap.yaml fluentd-es-ds.yaml kibana-deployment.yaml kibana-service.yaml
其中需要更改的就是吧镜像换下,换成自己可以下载的镜像。
下载gcr的镜像参考文档
http://blog.csdn.net/qq_27028561/article/details/79064414
其中es-service.yaml和kibana-service.yaml port改成NodePort模式
其中fluentd-es-ds.yaml吧node选择标签去掉,下面俩行注解掉
#nodeSelector:
# beta.kubernetes.io/fluentd-ds-ready: "true"
其中kibana-service改成nodeport
spec:
type: NodePort
ports:
- port: 5601
nodePort: 30389
protocol: TCP
targetPort: ui
#nodePort: 30344
selector:
k8s-app: kibana-logging
其中kibana-deployment.yaml 中注解掉 下面俩行、使用nodeport访问,不需要service basepath
#- name: SERVER_BASEPATH
# value: /api/v1/namespaces/kube-system/services/kibana-logging/proxy
访问kibana
http://192.168.76.10:nodeport