Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Last active January 3, 2019 20:29
Show Gist options
  • Save jsturtevant/b8a0118ee44ce28a8899fb958360b2ed to your computer and use it in GitHub Desktop.
Save jsturtevant/b8a0118ee44ce28a8899fb958360b2ed to your computer and use it in GitHub Desktop.
k8s windows kernalversion bug repo
winnode="$(kubectl get nodes -l "beta.kubernetes.io/os=windows" -o json | jq -rc '.items | map({nodeInfo: .status.nodeInfo})[0]')"
echo $winnode
#output
{"nodeInfo":{"architecture":"amd64","bootID":"","containerRuntimeVersion":"containerd://Unknown","kernelVersion":"10.0.17763.194
","kubeProxyVersion":"v1.13.0-alpha.2","kubeletVersion":"v1.13.0-alpha.2","machineID":"3472k8s000","operatingSystem":"windows","osImage":"Windows Server Datacenter","systemUUID":""}}
echo "$winnode" | jq .
#output
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 2, column 1
kubectl get nodes -l "beta.kubernetes.io/os=windows" -o json | jq '.items | map({nodeInfo: .status.nodeInfo})'
#output - notice new line
[
{
"nodeInfo": {
"architecture": "amd64",
"bootID": "",
"containerRuntimeVersion": "containerd://Unknown",
"kernelVersion": "10.0.17763.194\n",
"kubeProxyVersion": "v1.13.0-alpha.2",
"kubeletVersion": "v1.13.0-alpha.2",
"machineID": "3472k8s000",
"operatingSystem": "windows",
"osImage": "Windows Server Datacenter",
"systemUUID": ""
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment