Cluster API 检索从未如此简单

网站建设5年前发布
26 0 0

   项目地址:https://github.com/clusterpedia-io/clusterpedia,0.4.0 后,Clusterpedia 提供了更加友好的接入多云平台的方式,用户在多云平台创建或者纳管集群后,便可以直接使用 kubectl 来检索这些集群内的资源。,我们在Clusterpedia 仓库[1]中维护了各个多云平台的 ClusterImportPolicy[2]。非常欢迎大家提交用于对接其他多云平台的 ClusterImportPolicy。​,用户在安装 Clusterpedia 后,创建合适的 ClusterImportPolicy 即可,用户也可以根据自己的需求来创建新的 ClusterImportPolicy[3]。,Cluster API 的 ClusterImportPolicy 已经在 clusterpedia#288[4]中提交,在 Cluster API 中创建集群后,可以直接使用 Clusterpedia 来对这些集群内的资源进行复杂检索。,如何快速部署一套 Cluster API And Clusterpedia 的示例环境?,   Minimum kind supported version: v0.14.0,   部署 Cluster API 也可以参考 https://cluster-api.sigs.k8s.io/user/quick-start.html,clusterpedia charts 提供了 Local PV,需要创建 LOCAL PV 绑定的节点。如果不需要 charts 来创建 LOCAL PV,可以使用 --set persistenceMatchNode=None.详见[9],创建用于接入 Cluster API 的集群自动导入策略[10],Clusterpedia 可以接入任何的多云管理平台,接入方式可以参考 Interfacing to Multi-Cloud Platforms[11],生成 kubectl cluster shortcut[12],如果使用 client-go 或者 OpenAPI 来访问,可以省略该步骤。,使用示例环境的 Docker Provider 来创建集群时,需要添加 --flavor development。,当 kubeadmcontrolplane 的 Initialized 为 True 后,clusterpedia 会自动同步该集群内的资源,可以使用 kubectl --cluster clusterpedia get po -A 来查看资源。,自动创建的 pediacluster 默认的同步资源在 cluster-api clusterimportpolicy 中设置[13],用户也可以手动修改 pediacluster 中同步的配置, Synchronize Cluster Resources[14]。,在 Cluster API 中删除集群时,Clusterpedia 也同步删除 PeidaCluster,不会继续同步该集群。,使用上述步骤创建多个集群。,兼容 Kubernetes OpenAPI 的资源检索[15],Collection Resource​[16],[1]    Clusterpedia 仓库: https://github.com/clusterpedia-io/clusterpedia/tree/main/deploy/clusterimportpolicy,[2]    ClusterImportPolicy: https://clusterpedia.io/zh-cn/docs/concepts/cluster-import-policy/,[3]    创建新的 ClusterImportPolicy: https://clusterpedia.io/docs/usage/interfacing-to-multi-cloud-platforms/#new-clusterimportpolicy,[4]    clusterpedia#288: https://github.com/clusterpedia-io/clusterpedia/pull/288,[5]    kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/,[6]    Kind: https://kind.sigs.k8s.io/,[7]    Docker: https://www.docker.com/,[8]    clusterctl: https://cluster-api.sigs.k8s.io/user/quick-start.html#install-clusterctl,[9]    详见: https://github.com/clusterpedia-io/clusterpedia/tree/main/charts,[10]  集群自动导入策略: https://clusterpedia.io/docs/concepts/cluster-import-policy/,[11]  Interfacing to Multi-Cloud Platforms: https://clusterpedia.io/docs/usage/interfacing-to-multi-cloud-platforms/,[12]  生成 kubectl cluster shortcut: https://clusterpedia.io/docs/usage/access-clusterpedia/#configure-the-cluster-shortcut-for-kubectl,[13]  clusterimportpolicy 中设置: https://clusterpedia.io/docs/concepts/cluster-import-policy/#pediacluster-template,[14]  Synchronize Cluster Resources: https://clusterpedia.io/docs/usage/sync-resources/,[15]  兼容 Kubernetes OpenAPI 的资源检索: https://clusterpedia.io/zh-cn/docs/usage/access-clusterpedia/#%E8%AE%BF%E9%97%AE-clusterpedia-%E8%B5%84%E6%BA%90,[16]  Collection Resource: https://clusterpedia.io/zh-cn/docs/concepts/collection-resource/,[17]  元信息过滤 (资源名称,命名空间,集群,创建时间区间): https://clusterpedia.io/docs/usage/search/#search-by-metadata,[18]  模糊搜索: https://clusterpedia.io/docs/usage/search/multi-cluster/#fuzzy-search,[19]  增强的 Field Selector: https://clusterpedia.io/docs/usage/search/multi-cluster/#field-selector,[20]  根据父辈或者祖辈 Owner 检索: https://clusterpedia.io/docs/usage/search/multi-cluster/#search-by-parent-or-ancestor-owner,[21]  分页和排序: https://clusterpedia.io/docs/usage/search/multi-cluster/#paging-and-sorting,[22]  自定义条件搜索: https://clusterpedia.io/docs/us​age/search/#advanced-searchcustom-conditional-search

© 版权声明

相关文章