zoukankan      html  css  js  c++  java
  • K8S常用配置文件目录

    1、kubernetes集群认证文件目录:/root/.kube/config

    2、calico网络认证文件目录:/etc/cni/net.d/calico-kubeconfig

    3、cni插件目录:/etc/cni/net.d

    4、kubelet配置文件目录:/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf

    # Note: This dropin only works with kubeadm and kubelet v1.11+
    [Service]
    Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
    Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
    # This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
    EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
    # This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
    # the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
    EnvironmentFile=-/etc/sysconfig/kubelet
    ExecStart=
    ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
    

     最后一行里的$KUBELET_NETWORK_ARGS指定启动相关参数,封装在/var/lib/kubelet/kubeadm-flags.env

    [root@k8s ~]# cat /var/lib/kubelet/kubeadm-flags.env
    KUBELET_KUBEADM_ARGS=--cgroup-driver=systemd --cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni
    
    重启kubelet:
    systemctl enable kubelet && systemctl start kubelet
  • 相关阅读:
    第八章 用通配符进行过滤
    第七章 数据过滤
    第六章 过滤数据
    第五章 排序和检索数据
    第四章 检索数据
    MySql 首记
    Effective C++ 6.继承与面向对象设计
    Effective C++ 5.实现
    ~~函数基础(五):内置函数~~
    ~~函数基础(四):递归函数~~
  • 原文地址:https://www.cnblogs.com/wuchangblog/p/14088151.html
Copyright © 2011-2022 走看看