- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on
08-11-2020
01:40 PM
- edited on
08-14-2020
01:17 AM
by
VidyaSargur
Image Courtesy: k9s
I recently ran into a scenario where I needed to gather Hive logs on the new Data Warehouse Experience on AWS. The "old" way of fetching logs was to SSH into the nodes. Data Warehouse Experience is now deployed on K8s, so SSHing is off the table. Therefore a tool like K9s is key. This is a raw article to quickly demonstrate how to use K9s to fetch Data Warehouse Experience logs which are deployed on AWS K8s
Prerequisites
- Data Warehouse Experience
- K9s installed on your machine
- AWS ARN (instructions provided below)
- AWS configure (CLI) pointing to your AWS env. Simply type AWS configure via CLI and point to the correct AWS subscription
AWS ARN
Your AWS ARN is required to successfully connect K9s to CDW(DW-X)
- On AWS, go to IAM > Users > Search for your user name:
- Click on your username to fetch the ARN:
Kubeconfig
- Connecting to DW-X using K9s requires kubeconfig. DW-X makes this available under DW-X-> Environments > Your Environment > Show Kubeconfig.
- Click on the copy option and make the contents available within a file in your machine file system. For example, I stored the kubeconfig contents here:
/Users/sunile.manjee/.k9s/kubeconfig.yml
ARN
To access K8s from K9s, your ARN will need to be added under Grant Access:
K9s
Now all is set up to connect to DW-X K8s using K9s. Reference kubeconfig.yml file when using K9s
k9s --kubeconfig /Users/sunile.manjee/.k9s/kubeconfig.yml
That's it. From here the logs are made available and a ton of other metrics. For more information on how to use K9s, see k9scli.io