zoukankan      html  css  js  c++  java
  • kubernetes中安装efk

    下载efk资源清单

    for i in es-service.yaml es-statefulset.yaml fluentd-es-configmap.yaml fluentd-es-ds.yaml kibana-deployment.yaml kibana-service.yaml ;do wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/fluentd-elasticsearch/$i;done
    

    修改Yaml清单 

    sed -i 's/k8s.gcr.io/mirrorgooglecontainers/g' es-statefulset.yaml
    sed -i 's/k8s.gcr.io/mirrorgooglecontainers/g' fluentd-es-ds.yaml
    sed -i -e 's@.*SERVER_BASEPATH.*@#&@g' -e 's@.*/api/v1/namespaces/kube-system/services/kibana-logging/proxy@#&@g' kibana-deployment.yaml
    sed -i 's/v6.2.5/v6.3.0/g' es-statefulset.yaml
    

    持久存储日志

    sed -i -e 's/emptyDir: {}/hostPath:/g' -e '/hostPath/a          path: /es-logdata
              type: DirectoryOrCreate'   es-statefulset.yaml
    

    修改集群属性

    kubectl label nodes --all beta.kubernetes.io/fluentd-ds-ready=true
    kubectl taint nodes --all node-role.kubernetes.io/master-
    

    重新制作fluentd-elasticsearch镜像

    for i in Dockerfile Gemfile Makefile README.md clean-apt clean-install fluent.conf run.sh;do wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/fluentd-elasticsearch/fluentd-es-image/$i;done
    
    chmod +x clean-apt clean-install run.sh
    
    docker build -t fluentd-elasticsearch:v2.2.0  .
    

      

      

      

  • 相关阅读:
    Python之socket
    Python之创建low版的线程池
    Python之面向对象及相关
    Python之面向对象(进阶篇)
    Python之面向对象(初级篇)
    Python之线程与进程
    python中执行父类的构造方法
    python之反射
    记一次有趣的米筐经历~
    算法第四章作业
  • 原文地址:https://www.cnblogs.com/gandefeng/p/10183788.html
Copyright © 2011-2022 走看看