首页 > 其他分享 >k8s中查看各个组件的启动命令

k8s中查看各个组件的启动命令

时间:2022-11-15 09:36:55浏览次数:46  
标签:pki 查看 kubernetes -- etc client file 组件 k8s

方式1:可以直接到kube-system中,查看各个组件的POD YAML定义文件

方式2:到目录下/etc/kubernetes/manifests查看组件的定义文件

方式3:通过pgrep命令,如

查看kubelet

$ tr \\0 '\n' < /proc/"$(pgrep kubelet)"/cmdline
/usr/bin/kubelet
--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf
--kubeconfig=/etc/kubernetes/kubelet.conf
--config=/var/lib/kubelet/config.yaml
--network-plugin=cni
--pod-infra-container-image=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.5

查看kube-apiserver

$ tr \\0 '\n' < /proc/"$(pgrep apiserver)"/cmdline
kube-apiserver
--advertise-address=192.168.0.41
--allow-privileged=true
--authorization-mode=Node,RBAC
--client-ca-file=/etc/kubernetes/pki/ca.crt
--enable-admission-plugins=NodeRestriction
--enable-bootstrap-token-auth=true
--etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt
--etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt
--etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key
--etcd-servers=https://127.0.0.1:2379
--kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt
--kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key
--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
--proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt
--proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key
--requestheader-allowed-names=front-proxy-client
--requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt
--requestheader-extra-headers-prefix=X-Remote-Extra-
--requestheader-group-headers=X-Remote-Group
--requestheader-username-headers=X-Remote-User
--secure-port=6443
--service-account-issuer=https://kubernetes.default.svc.cluster.local
--service-account-key-file=/etc/kubernetes/pki/sa.pub
--service-account-signing-key-file=/etc/kubernetes/pki/sa.key
--service-cluster-ip-range=10.96.0.0/12
--tls-cert-file=/etc/kubernetes/pki/apiserver.crt
--tls-private-key-file=/etc/kubernetes/pki/apiserver.key

查看etcd

$ tr \\0 '\n' < /proc/"$(pgrep etcd)"/cmdline
etcd
--advertise-client-urls=https://192.168.0.41:2379
--cert-file=/etc/kubernetes/pki/etcd/server.crt
--client-cert-auth=true
--data-dir=/var/lib/etcd
--initial-advertise-peer-urls=https://192.168.0.41:2380
--initial-cluster=hecs-24836=https://192.168.0.41:2380
--key-file=/etc/kubernetes/pki/etcd/server.key
--listen-client-urls=https://127.0.0.1:2379,https://192.168.0.41:2379
--listen-metrics-urls=http://127.0.0.1:2381
--listen-peer-urls=https://192.168.0.41:2380
--name=hecs-24836
--peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
--peer-client-cert-auth=true
--peer-key-file=/etc/kubernetes/pki/etcd/peer.key
--peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
--snapshot-count=10000
--trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt

查看kube-scheduler

$ tr \\0 '\n' < /proc/"$(pgrep kube-scheduler)"/cmdline
kube-scheduler
--authentication-kubeconfig=/etc/kubernetes/scheduler.conf
--authorization-kubeconfig=/etc/kubernetes/scheduler.conf
--bind-address=127.0.0.1
--kubeconfig=/etc/kubernetes/scheduler.conf
--leader-elect=true
--port=0

查看kube-controller-manager

$ tr \\0 '\n' < /proc/"$(pgrep kube-controller)"/cmdline
kube-controller-manager
--authentication-kubeconfig=/etc/kubernetes/controller-manager.conf
--authorization-kubeconfig=/etc/kubernetes/controller-manager.conf
--bind-address=127.0.0.1
--client-ca-file=/etc/kubernetes/pki/ca.crt
--cluster-name=kubernetes
--cluster-signing-cert-file=/etc/kubernetes/pki/ca.crt
--cluster-signing-key-file=/etc/kubernetes/pki/ca.key
--controllers=*,bootstrapsigner,tokencleaner
--kubeconfig=/etc/kubernetes/controller-manager.conf
--leader-elect=true
--port=0
--requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt
--root-ca-file=/etc/kubernetes/pki/ca.crt
--service-account-private-key-file=/etc/kubernetes/pki/sa.key
--use-service-account-credentials=true

标签:pki,查看,kubernetes,--,etc,client,file,组件,k8s
From: https://www.cnblogs.com/cosmos-wong/p/16891347.html

相关文章

  • Vue 子组件调用父组件方法[不参数版]
    子组件<template><div><button@click="childEvent()">点击调父组件方法</button></div></template><script>exportdefault{methods:{......
  • Vue 子组件调用父组件方法[含参数版]
    子组件<template><div><button@click="childEvent(_obj)">点击调父组件方法</button></div></template><script>exportdefault{methods:{......
  • Vue 父组件调子组件方法[含参数版]
    子组件<template><div></div></template><script>exportdefault{methods:{childEvent(_value){alert("我是子组件方法"+......
  • Vue 父组件调子组件方法[不参数版]
    子组件<template><div></div></template><script>exportdefault{methods:{childEvent(){alert("我是子组件方法");......
  • 自定义组件
    创建自定义组件类似于页面,一个自定义组件由jsonwxmlwxssjs4个文件组成。要编写一个自定义组件,首先需要在json文件中进行自定义组件声明(将component字段设为true......
  • 自定义组件传参
    参数声明Component({//参数properties:{//这里定义了innerText属性,属性值可以在组件使用时指定innerText:{type:String,value:'def......
  • 自定义组件事件
    子组件<viewbindtap="onItemChildClick"data-item="item">{{item}}</view>Component({methods:{onItemChildClick(event){this.trigger......
  • gradlew 查看项目依赖
    查看app下的项目依赖版本./gradlew:app:dependencies--configurationreleaseCompileClasspath查看Module,示例如下./gradlew:{Module的名字}:dependencies--conf......
  • Linux笔记:查看和修改系统时间
    1.查看系统当前时间命令:date[root@zjy~]#dateSunNov1320:14:44CST20222.修改系统时间修改时间:date-s"21:12:00"修改日期:date-s"2022-11-12"#需......
  • 性能测试-查看mysql的锁
    information_schema库下相关事务表和锁相关信息表介绍innodb_trx存储了当前正在执行的事务信息trx_id:事务ID。trx_state:事务状态,有以下几种状态:RUNNING、LOCKWAIT......