API for Interacting with Docker Desktop Managed Kubernetes
How might an extension be able to interact with the Docker Desktop Kubenetes cluster (when one exists)?
Comments in the Extension SDK source show using ddClient.extension.host.cli.exec to invoke kubectl on the host, provided the kubectl binary is shipped as part of your extension. Would this be the recommended way to interact with the Docker Desktop managed Kubernetes cluster from an extension?
Hi @gilday, as of today there are no API methods available to interact with the Docker Desktop Kubernetes cluster.
If your extension needs to interact with Kubernetes clusters, then include the kubectl binary as part of your extension. You can find an example here.
@felipecruz91 Hello! An api for enabling Kubernetes on docker-desktop would enable a lot of functionality and ease-of-use. The use case is:
- user clicks extension store
- user finds useful extension, but it requires Kubernetes
- user clicks "install extension" and we can enable Kubernetes for them if it is not already enabled
- extension can then use
kubectlnormally as explained in the docs
Thank you!
A navigation intent for directing users to the Kubernetes preferences would be helpful too.