Add rpk multicluster plugin wiring#1437
Merged
andrewstucki merged 11 commits intomainfrom Apr 14, 2026
Merged
Conversation
Contributor
|
I'm still trying to reproduce a successful response in my environment from the NIT: Usage is added by cobra where the usage does not prefix command with the |
RafalKorepta
requested changes
Apr 14, 2026
RafalKorepta
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an rpk plugin (
.rpk.ac-k8s) that providesrpk k8s multiclustersubcommands for bootstrapping and diagnosing multicluster operator deployments. Also adds a reusable vcluster-based multicluster test helper and a pluggable health check framework.What's included
rpk plugin (
operator/cmd/rpk-k8s/)rpk k8s multicluster bootstrap— generates a shared CA, per-cluster TLS certificates, and kubeconfig secrets across multiple Kubernetes clusters. Supports--kubeconfig(auto-discover all contexts),--context(explicit), and--dns-override(key=value SAN overrides). Replaces the standalonebootstrap-standalonebinary (removed).rpk k8s multicluster status— runs a suite of health checks against each cluster and reports a summary table with per-cluster issues and cross-cluster consistency validation.--help-autocompleteJSON output for rpk plugin discovery.Check framework (
operator/cmd/rpk-k8s/k8s/multicluster/checks/)Pluggable check system with two interfaces (
ClusterCheck,CrossClusterCheck) and a sharedCheckContextthat accumulates state as checks execute. Each check is a single file:cluster_pod.go— operator pod healthcross_cluster_unique_names.go— no duplicate node namescluster_deployment.go— deployment config validationcross_cluster_peer_agreement.go— peer lists matchcluster_tls.go— CA/cert chain/expiry/key matchcross_cluster_leader_agreement.go— leader consensuscluster_raft.go— gRPC Status RPC via port-forwardcross_cluster_ca_consistency.go— same CA everywherecluster_tls_san.go— SAN matches raft node namecluster_deployment_raft.go— deploy flags vs raftOperator-side Status RPC (
pkg/multicluster/leaderelection/)StatusRPC to the gRPC transport proto, returning node name, raft state, leader, term, cluster names, unhealthy peers, and health status.Ready()cycle.IDsToNamesmapping passed through to the transport for human-readable peer names.Reusable vcluster multicluster helper (
pkg/vcluster/multicluster.go)vcluster.Multicluster— creates N vclusters on a shared k3d cluster with cross-cluster service replication, TLS bootstrapping, and operator deployment.MulticlusterNodeexposesCtl()(*kube.Ctl),APIServer(),ExternalIP(), and allvcluster.Clustermethods.PortForwardedRESTConfigso SPDY operations (port-forward, exec) work through the vcluster tunnel.Build targets (
taskfiles/build.yml)task build:rpk-plugin— builds.build/.rpk.ac-k8stask build:rpk-plugin:install— copies to~/.local/bin/