Last active
December 16, 2015 13:27
-
-
Save iocanel/b2beba1022fa011d4684 to your computer and use it in GitHub Desktop.
Helper script for using curl with kubernetes ws
This file contains hidden or 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
#!/bin/bash | |
KUBE_TOKEN=`cat ~/.kube/config | grep token | awk -F " " '{print $2}'` | |
curl -sSk -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" \ | |
-H "Sec-WebSocket-Key: MKuU3hrynEXL1F00D3ZyOQ==" \ | |
-H "Sec-WebSocket-Version: 13" \ | |
-H "Authorization: Bearer $KUBE_TOKEN" $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment