集群接入

Clusterpedia 使用自定义资源 PediaCluster 资源来代表接入的集群

apiVersion: cluster.clusterpedia.io/v1alpha2
kind: PediaCluster
metadata:
  name: cluster-example
spec:
  apiserver: "https://10.30.43.43:6443"
  kubeconfig:
  caData:
  tokenData:
  certData:
  keyData:
  syncResources: []

用户有两种方式来配置接入的集群:

  1. 直接配置 base64 编码的 kube config 到 kubeconfig 字段用于集群连接和验证
  2. 分别配置接入集群的地址,以及验证信息

在使用 apiserver 字段来设置接入集群的地址时,验证字段的配置有多种选择:

  • caData + tokenData
  • caData + certData + keyData

caData 在集群 APIServer 允许 Insecure 连接的情况下,也可以不填

这些验证字段都需要 base64 编码,如果这些字段的值是直接从 ConfigMap 或者 Secret 中获取的话,那么就已经 base64 过。

使用 kube config 来接入集群

使用 kube config 来连接和验证集群是最简单的一种方式。

首先需要将接入集群的 kube config base64 编码。

# mac
cat ./kubeconfig | base64

# linux
cat ./kubeconfig | base64 -w 0
# 输出 base64 编码后的配置
YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIGNlcnRpZmljYXRlLWF1dGhvcml0eS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJEUlZKVVNVWkpRMEZVUlMwdExTMHRDazFKU1VNdmFrTkRRV1ZoWjBGM1NVSkJaMGxDUVVSQlRrSm5hM0ZvYTJsSE9YY3dRa0ZSYzBaQlJFRldUVkpOZDBWUldVUldVVkZFUlhkd2NtUlhTbXdLWTIwMWJHUkhWbnBOUWpSWVJGUkplRTFFYTNsT1JFVjNUVlJOZVU1R2IxaEVWRTE0VFVScmVVMXFSWGROVkUxNVRrWnZkMFpVUlZSTlFrVkhRVEZWUlFwQmVFMUxZVE5XYVZwWVNuVmFXRkpzWTNwRFEwRlRTWGRFVVZsS1MyOWFTV2gyWTA1QlVVVkNRbEZCUkdkblJWQkJSRU5EUVZGdlEyZG5SVUpCVHk5VENuWnRhMVU1YmsxdVVsUklUM2x2SzNoamRGUkpZMGxQWW5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Y0tZalZMT1RONWExWmtZazFhT0RSUk9VRTRZVkF2YVZSRWFrSnlRMmQ2WkVSMU5tSlJTakZtZFZKdlZFTnVXVW95TjFsWlMwVXZhbWhrV21KUk1FazJSUXBoVDNwNFprRjVaU3RvYjBVNVdtWm9XVkF5ZDA5blFXbDNabEpMWjBSYWJEQjNhRlJzYkhKbmNUTjJTa0lyYjJoMWJYbGpRa1F4UlRaVFozZ3ZNRnA1Q2k5c2JsSjFVVXRDWjBaTWNGWTVVQzg1Y21GbWJtUjBXRFZZZVZWMFQwMHZRbmt6UlZsbmJGbHZSMDlrUlhGTmFIaFlSeXQzUTFaQ1ZFSlZUMlJ6Y0V3S1RreGlVVkI0YW1KT1ZFMVFTakI2U0ZwcVppdDFhMHBvU1U5MGR6UmlUbk51YzNCa1NsTnpWMmRtTlhVeGRqZFBaMkUyVnpKMGFFRkNSelE1VEZGbFJ3cHRNWEZHUTJkTFpEZFpVRzlMUldKbGIwMXpTRXBSZUhCR2VYWnZSSE40VEZVNU0wOUVVblE1YVVGSFpFMUpZMll5Y25CTkNpMHRMUzB0UlU1RUlGSlRRU0JRVWtsV1FWUkZJRXRGV1MwdExTMHRDZz09Cg==

如果 base64 后存在换行,那么可以使用 base64 -w 0 ./kubeconfig

将 base64 后的内容设置到 PeidaCluster 的 spec.kubeconfig 中即可,并且 spec.apiserver 以及其他验证字段都不需要填写

不过由于集群地址在 kube config 中配置,所以使用 kubectl get pediacluster 时 APIServer 为空

kubectl get pediacluster
# 输出:
NAME           APISERVER URL       VERSION    STATUS
cluster-1                          v1.22.2    Healthy

未来会增加 Mutating admission webhooks 来自动设置 spec.apiserver,当前如果用户想要在 kubectl get 时显示集群地址,那么需要手动额外配置 spec.apiserver 字段

使用 ServiceAccount 来接入集群

用户也可以选择在被接入集群中创建 ServiceAccount 并配置相应的 RBAC 来接入集群。

# 注意:当前 kubectl 连接到被接入集群
kubectl apply -f https://raw.githubusercontent.com/clusterpedia-io/clusterpedia/main/examples/clusterpedia_synchro_rbac.yaml

# 获取 Service Account 对应 CA 和 Token
SYNCHRO_CA=$(kubectl -n default get secret $(kubectl -n default get serviceaccount clusterpedia-synchro -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.ca\.crt}')
SYNCHRO_TOKEN=$(kubectl -n default get secret $(kubectl -n default get serviceaccount clusterpedia-synchro -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}')

$SYNCHRO_CA$SYNCHRO_TOKEN 分别填写到 PediaCluster 资源的 spec.caDataspec.tokenData 字段中

创建 PediaCluster

完善集群的验证信息后,就可以获得一个完整的 PediaCluster 资源了。直接使用 kubectl apply -f 直接创建即可

eg.

apiVersion: cluster.clusterpedia.io/v1alpha2
kind: PediaCluster
metadata:
  name: cluster-example
spec:
  apiserver: https://10.6.100.10:6443
  caData: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1Ea3lOREV3TVRNeU5Gb1hEVE14TURreU1qRXdNVE15TkZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTy9TCnZta1U5bk1uUlRIT3lvK3hjdFRJY0lPYnMzc0F5cTI2djRQYkVtb3ZWM2xPOVQwMTF2cE96S0pyOUFxeVZMRnYKVXFBRHBTakM3WXd3MnZwSld3bDEySlBvUm1xZ1FBSFNkYlJpU3BDTDRudjlvR25VOWI2dllWSy9iRitkUVFCSApnQ1h6NnZoTGY4Wmd2N2tUQ2JBdkFPaE9OSlU3MllYTE8zT0lZQjJva1NCRGFVUjNvNnpwZGVWTkt5V0EyNVA3CkRobk8yTk01QzlpRERqTTRLY2FTa3JPSkJvbUlsSHFZRjRwVXdTTlFvcGVGRVRyZ3ZzcTkwS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zM4Rnh1TnE0UDRoQW5RUUh6bU9Ndw==
  syncResources: []

集群查看

集群接入成功后,可以通过 kubectl get pediacluster 命令来查看所有接入的集群,以及集群状态

kubectl get pediacluster
# 输出:
NAME           APISERVER URL               VERSION    STATUS
cluster-1      https://10.6.100.10:6443    v1.22.2    Healthy
cluster-2      https://10.50.10.11:16443   v1.10.11   Healthy

接下来

继续查看 同步集群资源