Created
May 27, 2021 18:15
-
-
Save jeesmon/a5b5d4ea48954a01df512136fab9ce59 to your computer and use it in GitHub Desktop.
Kubernetes Pod Exec using curl
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
curl -k \ | |
--http1.1 \ | |
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
-H "Sec-WebSocket-Version: 13" \ | |
-i \ | |
-N \ | |
-H "Connection: Upgrade" \ | |
-H "Upgrade: websocket" \ | |
-H 'Authorization: Bearer <TOKEN>' \ | |
"<API_SERVER>/api/v1/namespaces/<namespace>/pods/<pod_name>/exec?command=ls&command=-l&stdin=true&stdout=true&stderr=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment