-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes commands not working without sudo #17139
Fixes commands not working without sudo #17139
Conversation
In doc of kubeadm installation, there are commands which wont work without sudo regarding to Ubuntu/Debian instruction. However, other docs related to kubeadm under content/en/docs/setup/production-environment have commands with sudo. This commit fixes this inconsistency.
Deploy preview for kubernetes-io-master-staging ready! Built with commit 7a4970a https://deploy-preview-17139--kubernetes-io-master-staging.netlify.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit odd to document using sudo
for just one of the OSs. If the change is good for Debian it seems like it'd be good for Fedora as well.
Separately, but I'm going to mention it, I don't like sudo
. I'm personally wary of nudging readers towards a particular tool. That's my opinion and not an outright request to change. If other reviewers have similar feelings then that's worth taking into account.
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy | ||
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy | ||
sudo update-alternatives --set arptables /usr/sbin/arptables-legacy | ||
sudo update-alternatives --set ebtables /usr/sbin/ebtables-legacy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the Debian tab? Line 77 has update-alternatives
and that also requires superuser access.
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy | ||
update-alternatives --set arptables /usr/sbin/arptables-legacy | ||
update-alternatives --set ebtables /usr/sbin/ebtables-legacy | ||
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add a comment saying that these commands need superuser access, eg sudo
.
There are alternatives to sudo
(and I use some of them).
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zparnold The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
i'm mostly -1 on adding |
Thanks @sftim , @bradtopol , @zparnold & @neolit123 ! My main concerns are
For me, it's not matter to use So should I remove all |
Just a FYI, I don't have a lot of time to contribute to SIG Docs at the moment. |
if you are up for it, please go ahead. |
Hi All, |
Adding 'sudo' wherever appropriate helps indicate the need of privilege and it hurts nobody. |
In doc of kubeadm installation, there are commands which wont work without sudo regarding to Ubuntu/Debian instruction.
However, other docs related to kubeadm under
content/en/docs/setup/production-environment
have commands with sudo.This commit fixes this inconsistency.