• k8s安装prometheusoperator监控


    k8s重置环境

          无论是Master节点还是Worker节点, 都可以执行kubeadm reset命令进行重置
          清除CNI配置
           rm -rf /etc/cni/net.d

         清除iptables
           iptables -F
           iptables -X
         然后重启节点

         清除IPVS配置
            ipvsadm --clear

         清除kubeconfig
            rm -f $HOME/.kube/config

         清除日志
           rm -f /var/log/kube-audit/*

         

    calico重装

          如果安装了calico网络插件,需要删除calico
          除了执行这个命令 kubectl delete -f calico.yaml
          还要去/etc/cni/net.d/目录下删掉与calico相关的所有配置文件然后重启机器.不然pod起不来

    node打标签

             kubectl label nodes k8s-hdfs4 tech97.com/role=ck
             kubectl label nodes k8s-kafka2 tech97.com/role=ck

            

     修改镜像地址

            

     集群内部解析域名

              nslookup prometheus-k8s.default.svc.cluster.local  10.244.235.194

              

              

             

             

             

     安装prometheus-operator

          1.安装operator的必须先检查operator版本是否匹配当前k8s版本,版本过高或者过低都会出现异常

                https://github.com/prometheus-operator/kube-prometheus/tree/main

                 

               

              只有relase-0.10和relase-0.11支持当前k8s集群,其它operater版本都不能安装

         2.安装

           git clone https://github.com/coreos/kube-prometheus.git
           kubectl create -f manifests/setup
           kubectl create -f manifests/

           kubectl get all -n monitoring
           kubectl get prometheus --all-namespaces -o wide

        3.替换镜像地址

              vim kubeStateMetrics-deployment.yaml
              镜像换成 bitnami/kube-state-metrics:2.3.0

             vim prometheusAdapter-deployment.yaml
             镜像换成image: selina5288/prometheus-adapter:v0.9.1

       4.卸载

            kubectl delete -f ./manifests/setup/

            kubectl delete -f manifests/

    网络问题排查

               

               

            calico网络配置

                  把calico的网络策略配置清单删除重新安装即可

              

               

              

     添加监控大屏

              1.默认自带的大屏都在Default目录中

              

              

              

  • 相关阅读:
    把枚举类型绑定到datasource
    关于linq使用建议
    VS2012恢复默认设置的2种方法
    Manifold learning-based methods for analyzing single-cell RNA-sequencing data
    Single cell RNA-seq denoising using a deep count autoencoder
    scImpute——An accurate and robust imputation method scImpute for single-cell RNA-seq data
    第三代测序popular workflow
    js作用域闭包
    select的option选项左右移动
    添加区域练级联动
  • 原文地址:https://www.cnblogs.com/yxh168/p/16499458.html
Copyright © 2020-2023  润新知