k8s config配置文件

Posted s--s

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了k8s config配置文件相关的知识,希望对你有一定的参考价值。

接着上面的博客继续写

  pwd -> /etc/kubernetes

  cat config  

###
# kubernetes system config
#
# The following values are used to configure various aspects of all
# kubernetes services, including
#
#   kube-apiserver.service
#   kube-controller-manager.service
#   kube-scheduler.service
#   kubelet.service
#   kube-proxy.service
# logging to stderr means we get it in the systemd journal
KUBE_LOGTOSTDERR="--logtostderr=true"

# journal message level, 0 is debug
KUBE_LOG_LEVEL="--v=2"

# Should this cluster be allowed to run privileged docker containers
KUBE_ALLOW_PRIV="--allow-privileged=true"

# How the controller-manager, scheduler, and proxy find the apiserver
KUBE_MASTER="--master=https://192.168.1.71:6443

  

  cat controller-manager  

###
# The following values are used to configure the kubernetes controller-manager

# defaults from config and apiserver should be adequate

# Add your own!
KUBE_CONTROLLER_MANAGER_ARGS="\
    --master=https://192.168.1.71:6443 \
    --service-account-private-key-file=/etc/kubernetes/ssl/ca.key     --root-ca-file=/etc/kubernetes/ssl/ca.pem     --allocate-node-cidrs=true     --cluster-name=kubernetes     --cluster-signing-cert-file=/etc/kubernetes/ssl/ca.pem     --cluster-signing-key-file=/etc/kubernetes/ssl/ca.key     --leader-elect=true     --service-cluster-ip-range=10.0.0.0/12     --cluster-cidr=10.64.0.0/10     --secure-port=10253     --kubeconfig=/etc/kubernetes/kubelet.kubeconfig"

  

  cat kubelet  

###
# kubernetes kubelet (minion) config

# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
KUBELET_ADDRESS="--address=192.168.1.71"

# The port for the info server to serve on
# KUBELET_PORT="--port=10250"

# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME="--hostname-override=k8s-master-01"

# location of the api-server

# pod infrastructure container
KUBELET_POD_INFRA_CONTAINER="--pod-infra-container-image=hexiaoqiang/pause-amd64:3.1"

# Add your own!
KUBELET_ARGS="--cgroup-driver=systemd \
          --tls-cert-file=/etc/kubernetes/ssl/kubelet-1-71.pem           --tls-private-key-file=/etc/kubernetes/ssl/kubelet-1-71.key           --kubeconfig=/etc/kubernetes/kubelet.kubeconfig               --bootstrap-kubeconfig=/etc/kubernetes/bootstrap.kubeconfig               --cert-dir=/etc/kubernetes/ssl           --root-dir=/data/kubelet"

  

  cat proxy  

###
# kubernetes proxy config

# default config should be adequate

# Add your own!
KUBE_PROXY_ARGS="--bind-address=192.168.1.71 \
                 --cluster-cidr=10.0.0.0/12                  --kubeconfig=/etc/kubernetes/kube-proxy.kubeconfig"

  

  cat scheduler  

###
# kubernetes scheduler config

# default config should be adequate

# Add your own!
KUBE_SCHEDULER_ARGS="\
    --address=127.0.0.1     --kubeconfig=/etc/kubernetes/kubelet.kubeconfig     --leader-elect=true"

 

以上是关于k8s config配置文件的主要内容,如果未能解决你的问题,请参考以下文章

K8s ConfigMap

solr分布式索引实战分片配置读取:工具类configUtil.java,读取配置代码片段,配置实例

K8S 配置mysql配置文件不生效问题处理

Git 运行配置(git config、gitk、git gui)

springboot2.X使用k8s的configmap

spring boot 使用 k8s 的 configMap 作为外部配置