godaddy/kubernetes-client
View on GitHub.getStream() doesn't authenticate with refreshAuth
Open
#373 opened on Dec 15, 2018
help wanted
Description
On an AWS EKS cluster calling:
const stream = client.apis.apps.v1.watch.namespaces('default').deployments.getStream();
const jsonStream = new JSONStream();
stream.pipe(jsonStream);
jsonStream.on('data', object => {
console.log('Event: ', JSON.stringify(object, null, 2));
});
Fails to authenticate with:
Event: { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "deployments.apps is forbidden: User "system:anonymous" cannot watch deployments.apps in the namespace "tilloo"", "reason": "Forbidden", "details": { "group": "apps", "kind": "deployments" }, "code": 403 }
Workaround is to call any other API first. This may be related to: #248