What happened:
When kconnect creates a new cluster connection it writes a new context configuration in kubectl's config.yaml. The cluster name written as part of this configuration includes the target platform as a prefix (for example eks- ). The resulting context can cause confusion and at worst compatibility issues with other tools that rely on configuration file.
This behavior has other unexpected side effects. When issuing the command kubectl config current-context it is expected that the cluster name is returned . What actually gets returned is the kconnect decorated cluster name with prefix.
Possible work arounds
- Use the context name to hold the platform specific name
- Create a dedicated kubeconfig configuration for kconnect to isolate the configuration for Kconnect from other kubernetes configuration on the system.