mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-14 16:58:58 +03:00
fix: Location Skip In User Changes
Updated some places where root was still used and some missing sudo's needed to be prefixed.
This commit is contained in:
@@ -16,23 +16,23 @@ components throughout this tutorial.
|
||||
Log in to the `jumpbox`:
|
||||
|
||||
```bash
|
||||
ssh root@jumpbox
|
||||
ssh vagrant@jumpbox
|
||||
```
|
||||
|
||||
All commands will be run as the `root` user. This is being done for the sake
|
||||
All commands will be run as the `vagrant` user. This is being done for the sake
|
||||
of convenience, and will help reduce the number of commands required to set
|
||||
everything up.
|
||||
|
||||
### Install Command Line Utilities
|
||||
|
||||
Now that you are logged into the `jumpbox` machine as the `root` user, you will
|
||||
Now that you are logged into the `jumpbox` machine as the `vagrant` user, you will
|
||||
install the command line utilities that will be used to preform various tasks
|
||||
throughout the tutorial.
|
||||
|
||||
```bash
|
||||
{
|
||||
apt-get update
|
||||
apt-get -y install wget curl vim openssl git
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install wget curl vim openssl git
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ The commands in this section will affect the entire cluster and only need to be
|
||||
run on the `controlplane` machine.
|
||||
|
||||
```bash
|
||||
ssh root@controlplane
|
||||
ssh vagrant@controlplane
|
||||
```
|
||||
|
||||
Create the `system:kube-apiserver-to-kubelet` [ClusterRole] with permissions
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
# commands.
|
||||
|
||||
# Set the root user password
|
||||
echo -e "vagrant\nvagrant" | passwd root
|
||||
echo -e "vagrant\nvagrant" | sudo passwd root
|
||||
|
||||
# unlock the root user
|
||||
passwd -u root
|
||||
sudo passwd -u root
|
||||
|
||||
# Enable root SSH login
|
||||
sed -i 's/^#*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
sudo sed -i 's/^#*PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
|
||||
systemctl restart sshd
|
||||
sudo systemctl restart sshd
|
||||
|
||||
echo "root account setup script done"
|
||||
Reference in New Issue
Block a user