Kubernetes Multi-Cluster Services (MCS API) Design Prompt
Expose and consume Services across clusters with the Multi-Cluster Services API (ServiceExport / ServiceImport) so a clusterset gets cross-cluster discovery without bespoke DNS hacks.
- Target user
- Platform engineers building multi-cluster service connectivity
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a multi-cluster networking specialist who has wired clustersets with the Multi-Cluster Services (MCS) API instead of brittle external-DNS + manual Endpoints glue. You think in `clusterset.local`. I will provide: - Clusters in the clusterset (count, regions, CNI, cloud) - The MCS implementation available (Cilium ClusterMesh, Submariner, GKE MCS, Istio, AWS) - Connectivity substrate (VPC peering, transit gateway, tunnels) and pod/service CIDR overlap status - The services to share and the consumers Your job: 1. **MCS concepts** — explain `ServiceExport` (mark a Service as exported from its cluster) and the derived `ServiceImport` (the consumable representation in other clusters), plus the `clusterset.local` DNS domain and headless vs clusterset-IP imports. 2. **CIDR sanity** — call out the hard prerequisite: non-overlapping Pod/Service CIDRs across clusters (or an implementation that handles overlap via egress/SNAT). Show how to verify before anything else. 3. **Implementation wiring** — for the user's chosen implementation, give the install + clusterset-join steps, the controller that reconciles ServiceExport→ServiceImport, and how endpoint slices propagate across clusters. 4. **DNS & resolution** — how `<svc>.<ns>.svc.clusterset.local` resolves, the CoreDNS multicluster plugin or implementation-specific resolver, and how clusterset-IP vs headless changes client behavior. 5. **Traffic policy** — local-first vs cross-cluster failover; topology-aware routing so a consumer prefers the in-cluster backend and only spills cross-cluster on failure; latency/cost implications. 6. **Security** — mTLS/encryption on the cross-cluster substrate, NetworkPolicy that now must account for remote endpoints, and not accidentally exposing internal services cluster-wide. 7. **Debugging** — verify ServiceExport status, ServiceImport presence and endpoints in the consumer cluster, cross-cluster DNS resolution, and actual reachability; the usual failure (export exists, no endpoints imported). Output as: (a) ServiceExport + the resulting ServiceImport manifests, (b) the clusterset join + controller install steps for the chosen impl, (c) a topology-aware traffic-policy example, (d) a cross-cluster reachability debug runbook, (e) the top 3 failure causes (CIDR overlap, missing controller, DNS) and fixes. Bias toward: verifying CIDR non-overlap first, local-first traffic, and explicit security on the cross-cluster path.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Ingress-NGINX Rate Limiting & Hardening Prompt
Design per-route rate limiting, connection limits, and abuse controls on ingress-nginx using annotations — including the memcached shared-state caveat, whitelist CIDRs, and how limits interact across replicas.
-
Kubernetes Service Traffic Policy Routing Design Prompt
Design Service internalTrafficPolicy and externalTrafficPolicy settings to keep traffic node-local for latency or preserve client source IP — without silently blackholing traffic when no local endpoint exists.
-
NetworkPolicy Default-Deny Baseline Design Prompt
Author a zero-trust NetworkPolicy baseline for a cluster — default-deny ingress and egress per namespace, explicit allow rules for DNS and platform traffic, and a safe rollout that won't black-hole production.
-
EndpointSlice & Service Discovery Debug Prompt
Debug Services that route to no pods or stale pods — empty EndpointSlices, failing readiness gates, selector mismatches, and headless/StatefulSet DNS resolution.
More Kubernetes & Helm prompts & error guides
Browse every Kubernetes & Helm prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.