Skip to content

bug: kubectl plugins are not downwards-compatible #3529

@embik

Description

@embik

Describe the bug

Using the various kubectl plugins we have added, it is notable that the 0.28.0 versions of them cannot interact with kcp systems <= 0.27. The reason for that is that we have started using v1alpha2 APIs for apis.kcp.io across the code base, including the kubectl plugins.

This results in "could not find requested resource" or similar errors when running kubectl ws <workspace> to switch a workspace (because that looks for APIBindings) or kubectl kcp bind (because that tries to use APIBindings).

Given that we have new features in those commands to some degree I believe that we should not go back to v1alpha1 by default.

Steps To Reproduce

  1. Install kubectl plugin collection for kcp 0.28.0.
  2. Start a kcp process with version 0.27.1.
  3. Create a workspace with kubectl create-workspace test.
  4. Enter workspace with kubectl ws test.
  5. Observe error: error checking APIBindings: the server could not find the requested resource (get apibindings.apis.kcp.io).

Expected Behaviour

The kubectl plugins should be downwards-compatible and fall back to v1alpha1 if v1alpha2 is not available from the server.

Additional Context

No response

Metadata

Metadata

Assignees

Labels

area/cliIssues or PRs related to CLI changesarea/kubectlEverything around the client experience.kind/bugCategorizes issue or PR as related to a bug.

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions