1.点击系统管理->系统设置-添加一个云,在下拉菜单中选择kubernets并添加
2.填写云kubernetes配置内容
注:Name值任意添加,Kubernetes URL值添加K8S apiserver连接地址和端口
配置云kubernetes连接K8S集群的验证文件
1.获取K8S的/root/.kube/config文件
cat /root/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1ESXlOekUwTVRNeU4xb1hEVE15TURJeU5URTBNVE15TjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS3RuCnVaMGF6TUNLUGlldGVSZWYyaUVjRit5THVZRlk3R3VJSU1hL29LQ09ab1kvQ21CRWtiMFJNNk95cWhoOEF5NGEKVjVaTS9ON29zeVJvR2R6bzROaFhLQ0hmVU1TMHdLYmRtTVJyTlRCd3FhbEt1TC9RYkxUK3Q2ekN4SThkYzNSbwozbWl3M3Mydjh3Ty8zOWp2TnpPUXA2aDVSNjREVHlVU2k5K0Q4cUpYVGRad00vcjNzWGNZb2duRC9DS0t2ZVRmClZHUGNnN3JMZFhVWERhUHVaaTE0ZkxkV1NhR1NpeEtMSnRYQWtzVS9Ud0RvRnBrQUwvVnc3M3pLeC9xbm92WkoKbGtSV3JIR2tZU0JKanBab2RHN0RlcjNKeHB3aFIzdGFvdW9NWlA4ZWVTcEJRRy9acFFwOVNSZHROOVVGa3dGZgpVRUl1ZERFVVJKUkpCV1Z4VE1rQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZCa3pZRU9PVGxVZFFKblRjMjFWcG16NzhqcnlNQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFDZ0FzVUVHOExBZzVWT2lkKytDbUZ2WVFvUW5Sei9MeWFUdElkanhDUTVaUkZiM1lHaAorZ0pkSWl5ZnMrVmxRMklIcVVLUEZ6ZUM3YjlLRFo4S1NjNTNLNmt4enVMdndQSVhIVmN2Y2ZYOXR4MTdKVHp2ClRSd0FkRkREUGpRaHY3YW5jcjRXeElPY3FhL2pXdzNMRHk4a1pFOEl6ellqSDFNdmV2VzNwRkVFWTBveE5KWDYKL05vRENNMGQrUVErNE1tbXdINkVMTS9VRk56WUE1OU9tbVRDYVBMOXRtS1NEVTlYOHFGa0pwb3dpcTNLNk16SApSd3ZKYWRyemxMdzN0RzlyU0x2aGk2Z2ZsWFpnMVl5YngvM0NnSmlWRmd1eGxsM3R1b3hwZDVtUm9kTHh6bHVLCmNNN0xXbVprOGozNlUyUEZmQTd3UkFYVDFZMFQ4U3pyQi9acAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://192.168.100.50:6443
name: kubernetes
contexts:
- context:
cluster: kubernetes
namespace: kube-system
user: haimaxy
name: haimaxy-context
- context:
cluster: kubernetes
user: kubernetes-admin
name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: haimaxy
user:
client-certificate: /root/haimaxy.crt
client-key: /root/haimaxy.key
- name: kubernetes-admin
user:
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURFekNDQWZ1Z0F3SUJBZ0lJYXI4T2svKzgwU1V3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TWpBeU1qY3hOREV6TWpkYUZ3MHlNekF5TWpjeE5ERXpNamxhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0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ld4Ym5FZ1lOU0tKbEE0OTVYdzRnUEFLcWw0UUtYMHRTQm1wdE5HWlhDVm5Zcy9VaTBTbWh3CmJmRVdJd0lEQVFBQm8wZ3dSakFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0h3WURWUjBqQkJnd0ZvQVVHVE5nUTQ1T1ZSMUFtZE56YlZXbWJQdnlPdkl3RFFZSktvWklodmNOQVFFTApCUUFEZ2dFQkFGekE4NTk1aDlkWDV0V1c5eVJlU1hBK3pNNkZWK0FmNHdxZlp2MFNtZHFMaFdGdUxmbDJGNGxECnUzdERDNm1vTFF5ZmYrSDdWSkxQdkVhZFpyMG5qaE9FN2d6VGdMSjB0eDBJVWlGMzh1ZndhME9lczdUZnBWb08KT3BGTmVmK0Y5VlowQWNkcnJnMWtFYjhlSmtVbTFFaW9iU1NScmRtaFM4RGlEREhrNDJ4dUVTQnBvWGwvd2Q5agovblJaUHovRjNHNjVZa3BtWFZVWHk5T0tYWmZwOHQzYXpITktNWFkxcDZzZjlXeE52eTFlekF1Q2RLdkFuYmJ5CkI3cnF1M1U4eE5Lc1lRKytwbkx2MnJFT01PK3llZjU0NjUvQWhFMlRUenJNNWdtTHpaOWgxZzZWRisyeEFPTDMKcUpvL2MwS0FrVzU2SXJnQVkwd2NNOEZxcml6OGtURT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= | base64 -d > /opt/crt/ca.crt
3.获取/root/.kube/config中client-certificate-data和client-key-data的内容并转化成base64 encoded文件
echo LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJY3FZaFRlSEh0eDR3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TURBMU1qa3hORFU0TlRSYUZ3MHlNVEExTWpreE5EVTROVGhhTURReApGekFWQmdOVkJBb1RE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pqCjJaR2FyNXNDZ1lFQXYzMnNRcTRjS0RiR2UvWkFybmljdW83NTFvc01CSUIvWTdBTGdOTCtreWY1OW5ydlJubVYKZTZ3TXFwR3dVYXRqbDVNYmU3Rk1EVXY2SDQ1S0RaQm9HcUQvTktnc0x0bEI1SVJUWG9nVVFOaWV4dUF2czU2Swp0TFN2U3pPOFh0eStYWGpOYTZueUV4MHZOeVR6aERiSWRaV2NabE53aGxLdGVGN09mOHhkMzVRPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= | base64 -d > /opt/crt/client.key
4.生产Client P12认证文件cert.pfx,并下载至本地
openssl pkcs12 -export -out /opt/crt/cert.pfx -inkey /opt/crt/client.key -in /opt/crt/client.crt -certfile /opt/crt/ca.crt
Enter Export Password:
Verifying - Enter Export Password:
sz /opt/crt/cert.pfx
注:自定义一个password并牢记
5.在云kubernetes中添加凭证
注:Upload certificate上次刚生成并下载至本地的cert.pfx文件,Password值添加生成cert.pfx文件时输入的密钥