Replace rancher.yourdomain.com
with your Rancher URL and token-xxxxx:string
with your API bearer token.
This depends on the version of curl used (especially cross operating system)
curl -s -i -N \
--http1.1 \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
-H "Sec-WebSocket-Version: 13" \
-H "Authorization: Bearer token-xxxxx:string" \
-H "Host: rancher.yourdomain.com" \
-k https://rancher.yourdomain.com/v3/subscribe
docker run --net=host appropriate/curl -s -i -N \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
-H "Sec-WebSocket-Version: 13" \
-H "Authorization: Bearer token-xxxxx:string" \
-H "Host: rancher.yourdomain.com" \
-k https://rancher.yourdomain.com/v3/subscribe
Replace rancher.yourdomain.com
with your Rancher URL and token-xxxxx:string
with your API bearer token.
docker run --net=host superseb/rancher2ws:latest rancher.yourdomain.com token-xxxxx:string
May be worth tossing in references to the docs for generating bearer token
https://rancher.com/docs/rancher/v2.5/en/user-settings/api-keys
https://rancher.com/docs/rancher/v2.6/en/user-settings/api-keys/