Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm join fails on Windows return getting status of runtime: invalid character 'P' in string escape code #1426

Closed
wzyjhrl opened this issue May 11, 2024 · 1 comment · Fixed by #1429, #1446 or #1486
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@wzyjhrl
Copy link

wzyjhrl commented May 11, 2024

kubeadm join fails
error like
time="2024-05-11T07:31:56+08:00" level=fatal msg="getting status of runtime: invalid character 'P' in string escape code"

run crictl.exe info
show error like this
time="2024-05-11T07:31:56+08:00" level=fatal msg="getting status of runtime: invalid character 'P' in string escape code"

Follow the instructions to install contrainerd

https://github.com/containerd/containerd/blob/main/docs/getting-started.md

Stop-Service containerd
$Version="1.7.13" # update to your preferred version
$Arch = "amd64" # arm64 also available
curl.exe -LO https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-$Arch.tar.gz
tar.exe xvf .\containerd-$Version-windows-amd64.tar.gz
Copy-Item -Path .\bin -Destination $Env:ProgramFiles\containerd -Recurse -Force
$Path = [Environment]::GetEnvironmentVariable("PATH", "Machine") + [IO.Path]::PathSeparator + "$Env:ProgramFiles\containerd"
[Environment]::SetEnvironmentVariable( "Path", $Path, "Machine")
$Env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")

containerd.exe config default | Out-File $Env:ProgramFiles\containerd\config.toml -Encoding ascii
Get-Content $Env:ProgramFiles\containerd\config.toml
containerd.exe --register-service
Start-Service containerd

Environment:

Microsoft Windows [version 10.0.17763.5696]
crictl version 1.30.0
contrainerd RuntimeVersion: v1.7.13

image

@wzyjhrl wzyjhrl added kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node. labels May 11, 2024
@SergeyKanzhelev
Copy link
Member

Not a new issue. I see mentions: kubernetes/kubernetes#110626 and https://eviatargerzi.medium.com/installing-kubernetes-with-a-windows-node-a256f47ad85a.

If you have a repro, maybe you can collect more information:

  • Containerd logs (as verbose as you can go)
  • Run crictl in verbose mode

laozc added a commit to laozc/cri-tools that referenced this issue May 20, 2024
containerd on Windows may not escape the return message which may
result in invalid JSON in crictl info.
Message from containerd:
cni config load failed: no network config found in C:\Program Files
\containerd\cni\conf: cni plugin
not initialized: failed to load cni config

Fixes: kubernetes-sigs#1426
@saschagrunert saschagrunert reopened this Jun 11, 2024
@saschagrunert saschagrunert reopened this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
3 participants