Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2020 14:12
What would you like to do?
module.exports = (robot) ->
robot.hear /List pods/i, (res) ->
@exec = require('child_process').exec
command = "kubectl get pods"
res.send("Getting your pods")
@exec command, (error, stdout, stderror) ->
if stdout
res.send "```\n" + stdout + "\n```"
res.send ("Sorry that didn't work")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment