Created
December 1, 2020 14:12
-
-
Save saurabhkdm/93a74808699cf68fbe6c151e08f3744a to your computer and use it in GitHub Desktop.
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
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```" | |
else | |
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