The other day I was trying to install a Kubernetes cluster using the Tanzu Kubernetes Grid (TKG). But I ran into a problem that I cannot find anywhere documented, so doing this right here.

The recommended installation method is using the TKG installer UI. After installing all the prerequisites you start this installer with:

tkg init --ui

This will greet you with something like this:

And open this page in the browser for you. But in my case, the browser only displayed a blank screen. After opening the F12 developer tools you see this message:

Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

After some research I found out that this can be fixed by changing a registry entry. This one to be precise:

By default (at least on my two Windows machines) this has another value than text/javascript. Apparently this value is used by the server serving the UI.

Change this to

restart the
tgk init --ui

And presto, the installer UI works:

Hope this helps.