Skip to content

Commit 0afc765

Browse files
authoredSep 1, 2022
docs: document how to get kubelet logs with Bottlerocket (#2427)
1 parent 3a4b0ba commit 0afc765

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed
 

‎website/content/en/preview/troubleshooting.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,34 @@ Reasons that a node can fail to join the cluster include:
3333
- Security Groups
3434
- Networking
3535

36-
The easiest way to start debugging is to connect to the instance
37-
```sh
36+
The easiest way to start debugging is to connect to the instance and get the Kubelet logs. For an AL2 based node:
37+
```bash
3838
# List the nodes managed by Karpenter
3939
kubectl get node -l karpenter.sh/provisioner-name
40-
# Extract the instance ID
41-
INSTANCE_ID=$(kubectl get node -l karpenter.sh/provisioner-name -ojson | jq -r ".items[0].spec.providerID" | cut -d \/ -f5)
40+
# Extract the instance ID (replace <node-name> with a node name from the above listing)
41+
INSTANCE_ID=$(kubectl get node <node-name> -ojson | jq -r ".spec.providerID" | cut -d \/ -f5)
4242
# Connect to the instance
4343
aws ssm start-session --target $INSTANCE_ID
4444
# Check Kubelet logs
4545
sudo journalctl -u kubelet
4646
```
47+
48+
For Bottlerocket, you'll need to get access to the root filesystem:
49+
```bash
50+
# List the nodes managed by Karpenter
51+
kubectl get node -l karpenter.sh/provisioner-name
52+
# Extract the instance ID (replace <node-name> with a node name from the above listing)
53+
INSTANCE_ID=$(kubectl get node <node-name> -ojson | jq -r ".spec.providerID" | cut -d \/ -f5)
54+
# Connect to the instance
55+
aws ssm start-session --target $INSTANCE_ID
56+
# Enter the admin container
57+
enter-admin-container
58+
# Run sheltie
59+
sudo sheltie
60+
# Check Kubelet logs
61+
journalctl -u kubelet
62+
```
63+
4764
Here are examples of errors from Node NotReady issues that you might see from `journalctl`:
4865

4966
* The runtime network not being ready can reflect a problem with IAM role permissions:

0 commit comments

Comments
 (0)
Please sign in to comment.