Why
Part of the self-service kubeconfig bootstrap initiative (tracking issue TBD, linked once created). This is the user-facing half of the bootstrap flow.
Scope
- New CLI entrypoint (module/binary layout TBD — see the packaging sub-issue for distribution).
kubeuser init <bootstrap-url>: calls the gateway's /bootstrap endpoint, receives the kubeconfig, merges it into $KUBECONFIG or ~/.kube/config as a new named context — must not clobber existing unrelated contexts, back up the file before writing.
- Validates the gateway's TLS certificate against a proper CA (no blind trust-on-first-use).
- Clear error messages for: token already used, token expired, network/TLS failures.
Acceptance criteria
Depends on
#104 (gateway /bootstrap endpoint)
Why
Part of the self-service kubeconfig bootstrap initiative (tracking issue TBD, linked once created). This is the user-facing half of the bootstrap flow.
Scope
kubeuser init <bootstrap-url>: calls the gateway's/bootstrapendpoint, receives the kubeconfig, merges it into$KUBECONFIGor~/.kube/configas a new named context — must not clobber existing unrelated contexts, back up the file before writing.Acceptance criteria
~/.kube/config(or none) →initcreates it correctly~/.kube/configwith unrelated contexts →initadds a new context, existing ones untouchedinitwith an already-consumed token fails with a clear message, doesn't corrupt the local fileDepends on
#104 (gateway /bootstrap endpoint)