Skip to content
/ k8s-tls Public

为解决K8s证书一年问题,手动创建K8s证书,当然还有更还的方式:重新编译kubeadm:https://blog.51cto.com/11889458/2323328

Notifications You must be signed in to change notification settings

misrn/k8s-tls

Repository files navigation

k8s-tls

快速生成kubernetes 所有证书

  1. git clone https://github.com/fandaye/k8s-tls.git && cd k8s-tls/

  2. chmod +x ./run.sh

  3. 编辑 apiserver.json 文件 对应IP地址及主机名 ,如:

     {
         "CN": "kube-apiserver",
         "hosts": [
           "xx.xx.xx.xx",
           "nodename",
           "10.96.0.1",
           "kubernetes",
           "kubernetes.default",
           "kubernetes.default.svc",
           "kubernetes.default.svc.cluster",
           "kubernetes.default.svc.cluster.local"     
         ],
         "key": {
             "algo": "rsa",
             "size": 2048
         }
     }
    
  4. 执行./run.sh

  5. 进入/etc/kubernetes/pki/编辑node.sh文件

     ip="xx.xx.xx.xx"
     NODE="nodename"
    
  6. 编辑kubelet.json文件

     .....
     "CN": "system:node:nodename",
     ......
    
  7. 执行./node.sh

About

为解决K8s证书一年问题,手动创建K8s证书,当然还有更还的方式:重新编译kubeadm:https://blog.51cto.com/11889458/2323328

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages