How To Fetch The Kubernetes Resource Logs?

Module

  • Harness Continuous Delivery

Environment

  • Infrastructure: Harness Saas
  • OS: Mac, Windows or Linux

Issue

I am using Harness to spin a short lived Kubernetes job. Is there a way to fetch the logs?

Resolution

You can introduce a shell script step in your pipeline and write a script to fetch logs for you as an output. Later you can export/download them as deployment logs. Using the ‘Delegate selector’, you can choose the Delegate you want, to perform this step.