Skip to content

Kubernetes configuration file is group-readable #13320

@bjt-user

Description

@bjt-user

Normally when you try to execute helm commands as a normal user you will get permission denied, because the config file is owned by root and not readable:

$ helm list
Error: Kubernetes cluster unreachable: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

The only solution to have a config file that all users can use that I see:

sudo chmod 644 /etc/rancher/k3s/k3s.yaml

But then you get these warnings:

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml

I do not understand the logic here.
How can I use a k3s config file for all users and be able to use helm without warnings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions