Created
October 5, 2019 00:07
-
-
Save nithu0115/1f09ce1414f0430bdfe337d2e7461ce6 to your computer and use it in GitHub Desktop.
Title: Gather logs from Worker Nodes without SSH'ing into the instance using `kubectl proxy`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Services: eks; kubernetes | |
Summary | |
Gather logs from Worker Nodes without SSH'ing into the instacne | |
Q) How to get logs from a Worker nodes if customers cannot SSH into the instance as they don’t have a keypair associated (for security reasons) and without detaching the volume and attaching it to another instance to troubleshoot an issue? | |
Solution: | |
To gather logs, first run | |
1) kubectl proxy --port=8080 from where you have installed kubectl to communicate with your cluster and then | |
(If you are using bastion host, then SSH tunnel to port forward:ssh -i <<Keypair>> ec2-user@<<Public_IP_Workstation>> -L 8080:127.0.0.1:8080) | |
2) Open a browser and access this URL: http://localhost:8080/api/v1/nodes/<“Woker Node Name">/proxy/logs/aws-routed-eni/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment