Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Master Guru

 

2020-08-11_15-24-24.jpgImage Courtesy: 

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)

  1. On AWS, go to IAM > Users > Search for your user name:2020-08-12_10-49-45.jpg
  2. Click on your username to fetch the ARN:2020-08-12_10-49-57.jpg

Kubeconfig

  1. Connecting to DW-X using K9s requires kubeconfig. DW-X makes this available under DW-X-> Environments > Your Environment > Show Kubeconfig. 
  2. 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​

    2020-08-11_15-26-34.jpg

 

 

 

 

 

 

 

 



ARN

To access K8s from K9s, your ARN will need to be added under Grant Access:2020-08-11_15-29-25.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 



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

 

 

2020-08-11_15-35-04.jpg

 

 

 

 

 

 

 

 

 

 

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

2,926 Views