• k8s备份


    cpu
    磁盘io

    往主的写,同步给备

    root@k8s-etcd02:~# cat  /etc/systemd/system/etcd.service 
    [Unit]
    Description=Etcd Server
    After=network.target
    After=network-online.target
    Wants=network-online.target
    Documentation=https://github.com/coreos
    
    [Service]
    Type=notify
    WorkingDirectory=/var/lib/etcd
    ExecStart=/usr/local/bin/etcd \
      --name=etcd-192.168.1.22 \
      --cert-file=/etc/kubernetes/ssl/etcd.pem \
      --key-file=/etc/kubernetes/ssl/etcd-key.pem \
      --peer-cert-file=/etc/kubernetes/ssl/etcd.pem \
      --peer-key-file=/etc/kubernetes/ssl/etcd-key.pem \
      --trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
      --peer-trusted-ca-file=/etc/kubernetes/ssl/ca.pem \
      --initial-advertise-peer-urls=https://192.168.1.22:2380 \
      --listen-peer-urls=https://192.168.1.22:2380 \
      --listen-client-urls=https://192.168.1.22:2379,http://127.0.0.1:2379 \
      --advertise-client-urls=https://192.168.1.22:2379 \
      --initial-cluster-token=etcd-cluster-0 \
      --initial-cluster=etcd-192.168.1.21=https://192.168.1.21:2380,etcd-192.168.1.22=https://192.168.1.22:2380,etcd-192.168.1.23=https://192.168.1.23:2380 \
      --initial-cluster-state=new \
      --data-dir=/var/lib/etcd \
      --wal-dir= \
      --snapshot-count=50000 \
      --auto-compaction-retention=1 \
      --auto-compaction-mode=periodic \
      --max-request-bytes=10485760 \
      --quota-backend-bytes=8589934592
    Restart=always
    RestartSec=15
    LimitNOFILE=65536
    OOMScoreAdjust=-999
    
    [Install]
    WantedBy=multi-user.target
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40

    cpu
    磁盘io

    网络–》万M

    监控etcd服务

    root@k8s-etcd03:~# export NODE_IPS=“192.168.1.21 192.168.1.22 192.168.1.23”
    root@k8s-etcd03:~# for ip in N O D E I P S ; d o E T C D C T L A P I = 3 / u s r / l o c a l / b i n / e t c d c t l − − e n d p o i n t s = h t t p s : / / {NODE_IPS}; do ETCDCTL_API=3 /usr/local/bin/etcdctl --endpoints=https:// NODEIPS;doETCDCTLAPI=3/usr/local/bin/etcdctlendpoints=https://{ip}:2379 --cacert=/etc/kubernetes/ssl/ca.pem --cert=/etc/kubernetes/ssl/etcd.pem --key=/etc/kubernetes/ssl/etcd-key.pem endpoint health; done
    https://192.168.1.21:2379 is healthy: successfully committed proposal: took = 31.455832ms
    https://192.168.1.22:2379 is healthy: successfully committed proposal: took = 21.7307ms
    https://192.168.1.23:2379 is healthy: successfully committed proposal: took = 21.490284ms

    备份

  • 相关阅读:
    代码随想录二刷 Day 37
    Unity WIFI 无线打包至手机
    django学习之路(2)-django的功能模块
    【重拾C语言】十三、动态数据组织(二)链表(创建、遍历检索、插入、删除、交换)
    通过Oracle Enterprise Manager管理OCI上的RAC
    java计算机毕业设计食品销售网站源程序+mysql+系统+lw文档+远程调试
    Halcon · 曲线宽度检测算法总结
    常用命令总结
    shell第一个命令结果传入第二个命令删除
    蓝桥杯每日一题2023.11.9
  • 原文地址:https://blog.csdn.net/m0_37749659/article/details/134371768