Skip to content

fix(copilot): add missing 'get' to kubectl example in init template#2472

Open
K0IN wants to merge 1 commit into
rtk-ai:developfrom
K0IN:fix-copilot-kubectl-get-missing
Open

fix(copilot): add missing 'get' to kubectl example in init template#2472
K0IN wants to merge 1 commit into
rtk-ai:developfrom
K0IN:fix-copilot-kubectl-get-missing

Conversation

@K0IN

@K0IN K0IN commented Jun 17, 2026

Copy link
Copy Markdown

The COPILOT_INSTRUCTIONS template translated 'kubectl get pods' to 'rtk kubectl pods', dropping the 'get' subcommand. This caused Copilot agents to run 'rtk kubectl pods' which fails since rtk expects 'rtk kubectl get pods'.

Fix: change 'rtk kubectl pods' to 'rtk kubectl get pods' in the COPILOT_INSTRUCTIONS template string.

Add regression test to prevent this class of typo in the future.

Summary

Fix the tempalte to be a faithfull translation of the input and add regression tests.

Fixes #2471

Test plan

ran a debug build, and used rtk init --copilot

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

The COPILOT_INSTRUCTIONS template translated 'kubectl get pods' to
'rtk kubectl pods', dropping the 'get' subcommand. This caused Copilot
agents to run 'rtk kubectl pods' which fails since rtk expects
'rtk kubectl get pods'.

Fix: change 'rtk kubectl pods' to 'rtk kubectl get pods' in the
COPILOT_INSTRUCTIONS template string.

Add regression test to prevent this class of typo in the future.

Signed-off-by: K0IN <thisk0in@gmail.com>
@CLAassistant

CLAassistant commented Jun 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@K0IN

K0IN commented Jun 17, 2026

Copy link
Copy Markdown
Author

i wasnt sure if a regression test is needed, but i included one anyway, if you dont like it, i can remove it :)

@TaKO8Ki
TaKO8Ki self-requested a review July 16, 2026 16:20

@TaKO8Ki TaKO8Ki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. I think rtk kubectl pods is a shorthand of rtk kubectl get pods. I expect the rewrite passes. What errors did you get with rtk on GitHub Copilot?

ref: https://github.com/rtk-ai/rtk/blob/develop/README.md#containers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk init drops kubectl **get** in template in Copilot mode

3 participants