V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
salamanderMH
V2EX  ›  问与答

用 api-server 访问 Dashboard,证书一直无效?

  •  
  •   salamanderMH · Jan 4, 2020 · 1328 views
    This topic created in 2305 days ago, the information mentioned may be changed or developed.

    问题

    k8s 集群我是用 vagrant 起的,我导出了p12文件(按这篇文章来的)

    # 生成 client-certificate-data
    grep 'client-certificate-data' ~/.kube/config | head -n 1 | awk '{print $2}' | base64 -d >> kubecfg.crt
    
    # 生成 client-key-data
    grep 'client-key-data' ~/.kube/config | head -n 1 | awk '{print $2}' | base64 -d >> kubecfg.key
    
    # 生成 p12
    openssl pkcs12 -export -clcerts -inkey kubecfg.key -in kubecfg.crt -out kubecfg.p12 -name "kubernetes-client"
    

    在 chrome 导入了 p12 证书
    但是,还是证书无效

    1 replies    2020-01-26 13:37:08 +08:00
    salamanderMH
        1
    salamanderMH  
    OP
       Jan 26, 2020
    原来证书是已经验证通过了,只是 chrome 显示还是标红的,另外 Dashboard 新的命名空间到了 kubernetes-dashboard 中。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3796 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 727ms · UTC 04:39 · PVG 12:39 · LAX 21:39 · JFK 00:39
    ♥ Do have faith in what you're doing.