-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: issue with file mode in Kubernetes 1.18 (#160)
Signed-off-by: Ernest Wong <[email protected]>
- Loading branch information
Ernest Wong
authored
Aug 27, 2021
1 parent
c36e3c6
commit cdbaa1a
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Known Issues | ||
|
||
## Permission denied when reading the projected service account token file | ||
|
||
In Kubernetes 1.18, the default mode for the projected service account token file is `0600`. This causes containers running as non-root to fail while trying to read the token file: | ||
|
||
```bash | ||
F0826 20:03:20.113998 1 main.go:27] failed to get secret from keyvault, err: autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: failed to read service account token: open /var/run/secrets/tokens/azure-identity-token: permission denied | ||
``` | ||
|
||
The default mode was changed to `0644` in Kubernetes v1.19, which allows containers running as non-root to read the projected service account token. | ||
|
||
If you ran into this issue, you can either: | ||
|
||
1. Upgrade your cluster to v1.19+ or | ||
|
||
2. Apply the following `securityContext` field to your pod spec: | ||
|
||
```yaml | ||
spec: | ||
securityContext: | ||
fsGroup: 65534 | ||
``` |