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  .
    

      

      

      

  • 相关阅读:
    HDU 2955(01背包问题)
    POJ 2250(LCS最长公共子序列)
    POJ 3356(最短编辑距离问题)
    HDU 1069 Monkey and Banana(LIS最长上升子序列)
    POJ
    HDU 2955(0-1背包问题)
    HDU2602 (0-1背包问题)
    hdu1003 Max Sum(经典dp )
    C题
    D题(贪心)
  • 原文地址:https://www.cnblogs.com/gandefeng/p/10183788.html
Copyright © 2011-2022 走看看