kubectl get svc -n demo --as=system:serviceaccount:dwb:llm-exporter kubectl auth can-i list pods --as=system:serviceaccount:dwb:llm-exporter
Policy":"ClusterFirst","nodeName":"192.168.0.130","priority":0,"restartPolicy":"Always","schedulerName":"default-scheduler","securityContext":{},"serviceAccount":"default","serviceAccountName":"default","terminationGracePeriodSeconds":30,"tolerations":[{"effect":"NoExecute","key":"node.kubern...
expose 使用 replication controller, service, deployment 或者 pod 并暴露它作为一个 新的 Kubernetes Service run 在集群中运行一个指定的镜像 set 为 objects 设置一个指定的特征 Basic Commands (Intermediate): explain 查看资源的文档 get 显示一个或更多 resources edit 在服务器上编辑一个资源 delete Delete r...
server=https://localhost:8443 # the name of the secret containing the service account token goes here name=default-token-sg96k ca=$(kubectl get secret/$name -o jsonpath='{.data.ca\.crt}') token=$(kubectl get secret/$name -o jsonpath='{.data.token}'|base64--decode) namespace=$(ku...
47. Roles: 和前面ClusterRole类似,但是顾名思义ClusterRole是和集群账户相关,Role则被用于其它的账户(比如controller使用的service account) 48. RoleBindings: 定义了某个账户/组对Role的引用,用于赋权。 49. PriorityClass: 定义了pod优先级名称和对应值的映射。比如`system-cluster-critical`对应的优先级为2000000000...
sa:ServiceAccount svc:Service ds:DaemonSet deploy:Deployment rs:ReplicaSet sts:StatefulSet cj:CronJob 输出选项 kubectl [command] [TYPE] [NAME] -o= 常用-o yaml,一般使用yaml文件,看的比json清晰,配置项太多了json的花括号看着很乱。 实战 基本命令 create...
6.4、查看node节点上的标签:kube get nodes --show-labels [root@master ~]# kubectl get nodes --show-labels NAME STATUS ROLES AGE VERSION LABELSmaster Ready control-plane,master 5h58m v1.21.3 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/host...
首先查看 Service Account 的 Token 在哪里: kubectl get serviceaccount default -o yaml 返回内容如下: apiVersion: v1 kind: ServiceAccount metadata: creationTimestamp: 2017-05-07T10:41:50Z name: default namespace: default resourceVersion: "26" selfLink: /api/v1/namespaces/default/serviceaccounts...
首先查看 Service Account 的 Token 在哪里: kubectl get serviceaccount default -o yaml 返回内容如下: apiVersion:v1 kind:ServiceAccountmetadata:creationTimestamp:2017-05-07T10:41:50Zname:defaultnamespace:defaultresourceVersion:"26"selfLink:/api/v1/namespaces/default/serviceaccounts/defaultuid:c715217...
kubectl create serviceaccount的流程主要包括以下步骤: 1.创建Service Account:用户通过kubectl命令创建serviceaccount,请求会发送到controller manager。controller manager会使用配置的--service-account-private-key-file参数对serviceaccount对应的用户(这里其实是虚拟用户,可能是CN或者一个随机数)进行签名,生成serviceaccount对...