extensions-sdk icon indicating copy to clipboard operation
extensions-sdk copied to clipboard

API for Interacting with Docker Desktop Managed Kubernetes

Open gilday opened this issue 3 years ago • 3 comments

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?

gilday avatar May 27 '22 17:05 gilday

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 avatar May 30 '22 09:05 felipecruz91

@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 kubectl normally as explained in the docs

Thank you!

erulabs avatar May 30 '22 23:05 erulabs

A navigation intent for directing users to the Kubernetes preferences would be helpful too.

gilday avatar Jun 07 '22 13:06 gilday