Multicluster instructions fail due to kustomize versioning
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 60
- Forks
- 221
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 1
Description
# Summary
The multicluster instructions fail with newer versions of kubectl / kustomize.
# Problem
The multicluster instructions rely on a kustomize command to install a sample app:
https://github.com/linkerd/website/blob/6fb58af2b803fa3fe96d95e052fe5c0571caced4/linkerd.io/content/2-edge/tasks/multicluster.md?plain=1#L283-L290
Unfortunately this does not work with kustomize 5 / kubectl 1.27+:
```bash
$ kubectl --context=${ctx} apply \
-n test -k "github.com/linkerd/website/multicluster/${ctx}/"
error: invalid Kustomization: json: cannot unmarshal string into Go struct field Kustomization.patches of type types.Patch
```
... due to the multicluster sample app's kustomize config format:
https://github.com/linkerd/website/blob/6fb58af2b803fa3fe96d95e052fe5c0571caced4/multicluster/west/kustomization.yml
Note `podinfo` using the new format:
https://github.com/stefanprodan/podinfo/blob/33dac1ba40f73555725fbf620bf3b4f6f1a5ad89/kustomize/kustomization.yaml
Switching to kubectl `v1.26.12` mostly works around the problem, but still partially fails due to HPA versioning:
```bash
$ curl -sfL -o ./kubectl-v1.26.12 https://storage.googleapis.com/kubernetes-release/release/v1.26.12/bin/linux/amd64/kubectl
$ chmod a+x ./kubectl-v1.26.12
$ ./kubectl-v1.26.12 --context=${ctx} apply \
-n test -k "github.com/linkerd/website/multicluster/${ctx}/"
error: resource mapping not found for name: "podinfo" namespace: "" from "github.com/linkerd/website/multicluster/west/": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first
```
# Proposal
Update the files under https://github.com/linkerd/website/blob/6fb58af2b803fa3fe96d95e052fe5c0571caced4/multicluster/ to use the new kustomize format.
# My environment
```bash
$ kubectl version
Client Version: v1.29.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with content/2-edge/tasks/multicluster.md and the manifests under multicluster/, especially multicluster/west/kustomization.yml. Compare their format with the linked podinfo example, then run the documented kubectl apply -k command using current kubectl/Kustomize versions. Done means the sample app applies successfully without the patches or HorizontalPodAutoscaler errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100