首页 > 编程语言 >subject organization is not system:nodes 问题解决

subject organization is not system:nodes 问题解决

时间:2023-11-15 18:11:06浏览次数:47  
标签:kubernetes webhook system organization nodes hello tmpdir csr

在下面的 issues 找到了答案:

https://github.com/kubernetes/kubernetes/issues/99504

┌──[[email protected]]-[~]
└─$kubectl get csr
NAME                                               AGE   SIGNERNAME                      REQUESTOR          REQUESTEDDURATION   CONDITION
hello-webhook-service.k8s-hello-mutating-webhook   43s   kubernetes.io/kubelet-serving   kubernetes-admin   <none>              Approved,Failed
┌──[[email protected]]-[~]
└─$kubectl get csr hello-webhook-service.k8s-hello-mutating-webhook  -o yaml
apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
metadata:
  creationTimestamp: "2023-11-15T08:53:20Z"
  name: hello-webhook-service.k8s-hello-mutating-webhook
  resourceVersion: "17547246"
  uid: d38716c9-1c97-44d2-8f7c-0c9a4e1cfdd0
spec:
  groups:
  - system:masters
  - system:authenticated
  request: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0KTUlJRG1qQ0NBb0lDQVFBd1B6RTlNRHNHQTFVRUF3dzBhR1ZzYkc4dGQyVmlhRzl2YXkxelpYSjJhV05sTG1zNApjeTFvWld4c2J5MXRkWFJoZEdsdVp5MTNaV0pvYjI5ckxuTjJZekNDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFECmdnRVBBRENDQVFvQ2dnRUJBTXJ6VEM2akxPeDU2S1NCZTFpaUoyeEVuWGtvUTFOaVBLMi9oSlVJY3hzaXNINzcKZnRIcXFDOUx2NUtZL3hVdjJLR1dOaVlrZ3pDVzdMSHFnemVBQVozSVBVWndpYUhvazhkckcrUUlCR2t5SGtxbwpBK1UxTnphUHZiUnY3ZlZRKzhPZ0htWVB6L0RQeTFMaElXNjg3ZCt4cDlyMHozOSt0cDBoZFFlQnJva3NMRVZuCjgxZGRTZXozbjhqSUhDQXhISklFWktKOU1KQk9xRnVuRHoxQk53MHgyVGtSMmpOV0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kwb1NPeEVXSzgKc2N5YlVBbzdYWTljMDZlZlMvUWY1aEg1SjdTUGVRdWVkVXhKS3pLeTFZVEdENTVLV25INC8wM1VzQ3JTb0x6ZgpWSm1HTUVmSjROMzg5aEYreTBZPQotLS0tLUVORCBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0K
  signerName: kubernetes.io/kubelet-serving
  usages:
  - server auth
  - digital signature
  - key encipherment
  username: kubernetes-admin
status:
  conditions:
  - lastTransitionTime: "2023-11-15T08:53:20Z"
    lastUpdateTime: "2023-11-15T08:53:20Z"
    message: This CSR was approved by kubectl certificate approve.
    reason: KubectlApprove
    status: "True"
    type: Approved
  - lastTransitionTime: "2023-11-15T08:53:20Z"
    lastUpdateTime: "2023-11-15T08:53:20Z"
    message: subject organization is not system:nodes
    reason: SignerValidationFailure
    status: "True"
    type: Failed

解决办法:

生成 csr 使用下面的写法

#openssl req -new -key "${tmpdir}/server-key.pem" -subj "/CN=${fullServiceDomain}" -out "${tmpdir}/server.csr" -config "${tmpdir}/csr.conf"
openssl req -new -key "${tmpdir}/server-key.pem" -subj "/CN=system:node:${fullServiceDomain};/O=system:nodes" -out "${tmpdir}/server.csr" -config "${tmpdir}/csr.conf"

标签:kubernetes,webhook,system,organization,nodes,hello,tmpdir,csr
From: https://www.cnblogs.com/liruilong/p/17834448.html

相关文章

  • mkfs.xfs报错 mkfs.xfs: /dev/new/new_box appears to contain an existing fil
    在设置逻辑卷文件类型时候报错mkfs.xfs:/dev/new/new_boxappearstocontainanexistingfilesystem(ext4).mkfs.xfs:Usethe-foptiontoforceoverwrite.上面是说目标分区,已经存在一个文件系统但是我们有很需要他更改文件系统的话就加一个-f选项[root@server~]......
  • docker system prune -a
    dockersystemprune-a  docker system prune -a 是一个Docker命令,用于清理Docker系统中未使用的镜像、容器、网络和数据卷等资源。这个命令会删除所有未被使用的资源,包括未被使用的...TRANSLATEwithxEnglishArabicHebrewPolishBulgarianHindi......
  • 随笔-Centos7 install systemtap
    SystemTapBeginnersGuideChapter2.UsingSystemTapThischapterinstructsusershowtoinstallSystemTap,andprovidesanintroductiononhowtorunSystemTapscripts.2.1.InstallationandSetupTodeploySystemTap,SystemTappackagesalongwiththeco......
  • oracle aud$造成system爆满问题
    我的数据库并没有开启对象审计,只有一些语句和权限的审计selectcount(*),usernamefromdba_audit_trailgroupbyusername;388"LIONIRPT"101062"YGLCUSR"57"APP_USR"2612712"PROM_MONITOR"1010"WALLET"4078"......
  • A Protection Measure-the river chief system
    Theriverandlakechiefsystem,namelytheriverchiefsystem,isanecologicalcivilizationconstructionsysteminnovationinwhichthepartyandgovernmentleadersatalllevelsserveasriverandlakechiefsandareresponsiblefororganizingandlead......
  • 关于 deamon 与 systemctl ,systemd , ubuntu20 自启动脚本
    deamon是指的守护进程,但是什么是守护进程呢,从网上查了一下,就是在后台运行的程序就叫做守护进程。     接下来看一下关于systemd的自启动的配置文件。       疑问:1 unit与target到底又什么关系呢?2到底有多少个unit......
  • System类
     System.arraycopy() ......
  • 16、Flink 的table api与sql之连接外部系统: 读写外部系统的连接器和格式以及FileSyst
    文章目录Flink系列文章一、Table&SQLConnectors1、概述2、支持的外部连接3、使用示例:kafka4、Transformtableconnector/formatresources5、SchemaMapping6、Metadata7、PrimaryKey8、TimeAttributes9、ProctimeAttributes10、RowtimeAttributes11、完整示例1)、建表2)、......
  • Unity DOTS系列之System中如何使用SystemAPI.Query迭代数据
    最近DOTS发布了正式的版本,我们来分享一下System中如何基于SystemAPI.Query来迭代World中的数据,方便大家上手学习掌握UnityDOTS开发。SystemAPI.Query的使用System有两种,一种是Unmanaged的ISystem,一种是managed的SystemBase,这两种System都可以通过SystemAPI.Query来迭代与......
  • v$parameter v$system_parameter v$spparameter v$parameter2 v$system_parameter2
    v$parameter当前会话生效参数(showparameter)altersessionsetxxxxx;显示的内容会变化altersystemsetxxxxxx;显示的内容会变化v$system_parameter表示实例级别的参数信息,在没有在线修改参数的情况下showparameter与之相同,每开启一个新会话的时候,会话使用所有的参数都......