Closed
Description
Describe the bug
Authentication fails using Azure. The "expires-on" property when using Azure authentication is in seconds but is expected in milliseconds.
Client Version
0.16.1
To Reproduce
az login
az get-credentials --resource-group xxx --name aks-name --subscription xxx
- Any
kubectl
command to authenticate to the cluster - Execute:
const kc = new k8s.KubeConfig();
kc.loadFromDefault();
const appApi = kc.makeApiClient(k8s.AppsV1Api);
await appApi.readNamespacedDeployment('xxx', 'xxx');
Throws Error: Token is expired!
Expected behavior
Should not try to refresh token when it is not expired (just generated).
Additional context
The user authProvider.config
has this set:
environment: 'AzurePublicCloud',
'expires-in': '4410',
'expires-on': '1638979372', // in seconds
Metadata
Metadata
Assignees
Labels
No labels