linkerd / linkerd/website

Multicluster instructions fail due to kustomize versioning

Open
#1,722 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.