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

README: Add k8s cmd to retrieve log archive #3993

Merged
merged 1 commit into from
May 30, 2024

Conversation

koooosh
Copy link
Contributor

@koooosh koooosh commented May 28, 2024

Issue number:

Closes #3973

Description of changes:

Customer @maiconrocha found an alternative command to retrieve the log archive without using SSH for aws-k8s variants.

Updating the README with this command.

Testing done:

AMI: bottlerocket-aws-k8s-1.24-x86_64-v1.20.0-fcf71a47

Connected to instance via SSM

On instance:

  1. enter-admin-container
  2. sudo sheltie
  3. logdog

On local machine:

  1. kubectl get --raw "/api/v1/nodes/NODE_NAME/proxy/logs/support/bottlerocket-logs.tar.gz" > bottlerocket-logs.tar.gz
  2. Verified that log archive was fetched

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@koooosh koooosh self-assigned this May 28, 2024
README.md Outdated
@@ -480,6 +480,13 @@ ssh -i YOUR_KEY_FILE \
"cat /.bottlerocket/support/bottlerocket-logs.tar.gz" > bottlerocket-logs.tar.gz
```

Or, if you are running Kubernetes, you can retrieve the file wihout using SSH like:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you break this into sections for generating the logs and fetching the logs. It would be helpful to show that generating the logs is always consistent, but one can fetch the logs in at least 3 different ways which are enumerated here:

  • Via SSH if already enabled
  • Using kubectl get
  • Using SSH over SSM
    This will help users understand that they don't need to do all these steps, they can choose the one that works for them.

@koooosh koooosh merged commit 043f775 into bottlerocket-os:develop May 30, 2024
@koooosh koooosh deleted the issue-3973 branch May 31, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collecting logs from EKS Worker Nodes running Bottlerocket AMI when no SSH is enabled
3 participants