rdctl set for Wsl Integration #6442
-
Hello there! I'm trying to automate a Rancher installation and one of the steps would be activate the WSL integration for an Ubuntu WSL installation, but failing super hard. I'm trying to use several combinations of "rdctl set --application.WSL.integration"..., but no success. If I list "WSL": {
"integrations": {
"Ubuntu-20.04": true,
"Ubuntu": true
}
}, But if I do something like: rdctl api /v1/settings --method PUT --body '{"WSL": {"integrations": {"Ubuntu-20.04": true}}}' I get in return
But trying to reproduce with the example in the documentation: rdctl api /v1/settings --method PUT --body '{"kubernetes": {"enabled": false}}' Gives me the same 400 error. Do I have to enable the API somehow somewhere? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi! If you're using PowerShell 5.1, there's some weird quoting involved that I haven't figured out. (You can check this if you look at I get something like this:
Notice that all the quotes are missing, so it's no longer valid JSON. rdctl api /v1/settings --method PUT --body '{\"WSL\": {\"integrations\": {\"Ubuntu-20.04\": true}}}' Note that this does not appear to be the case with PowerShell 7.x (the one installed from the MS Store). |
Beta Was this translation helpful? Give feedback.
Oh! Interesting; it looks like for you the backslashes are sent literally (somehow), so you need to not escape it. It's probably best to check the logs from your original input, then.
I don't understand how behaviour is different between the two PowerShell 5.1s, but it looks like you're probably on Windows 11 (I have 5.1.19041.3930 on Windows 10), so maybe that? Or there's a config difference somewhere. I copied your input directly, so that's really confusing…
(Note that for recent Rancher Desktop you'd also need to supply a
version
field, but the error message should tell you that if that's the case.)