Update systemctl en/disable to start/stop service (#12100)
If there is a combination of `systemctl` commands where in one you are enabling it and in another you are starting it, that can be done in one single command with an additional flag called `--now`. This commit changes those two command steps in docs to one command. The help of systemctl shows the following explanation of `--now`: ``` Start or stop unit in addition to enabling or disabling it ``` Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5b2d835ea9
commit
a0cf7ebf13
@@ -65,8 +65,7 @@ KUBE_MASTER="--master=http://fed-master:8080"
|
|||||||
systemctl mask firewalld.service
|
systemctl mask firewalld.service
|
||||||
systemctl stop firewalld.service
|
systemctl stop firewalld.service
|
||||||
|
|
||||||
systemctl disable iptables.service
|
systemctl disable --now iptables.service
|
||||||
systemctl stop iptables.service
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Configure the Kubernetes services on the master.**
|
**Configure the Kubernetes services on the master.**
|
||||||
@@ -97,8 +96,7 @@ ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do
|
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do
|
||||||
systemctl restart $SERVICES
|
systemctl enable --now $SERVICES
|
||||||
systemctl enable $SERVICES
|
|
||||||
systemctl status $SERVICES
|
systemctl status $SERVICES
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
@@ -146,8 +144,7 @@ current-context: kubelet-context
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
for SERVICES in kube-proxy kubelet docker; do
|
for SERVICES in kube-proxy kubelet docker; do
|
||||||
systemctl restart $SERVICES
|
systemctl enable --now $SERVICES
|
||||||
systemctl enable $SERVICES
|
|
||||||
systemctl status $SERVICES
|
systemctl status $SERVICES
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
|
|||||||
|
|
||||||
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
|
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
|
||||||
|
|
||||||
systemctl enable kubelet && systemctl start kubelet
|
systemctl enable --now kubelet
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:**
|
**Note:**
|
||||||
@@ -210,7 +210,7 @@ curl -sSL "https://raw.githubusercontent.com/kubernetes/kubernetes/${RELEASE}/bu
|
|||||||
Enable and start `kubelet`:
|
Enable and start `kubelet`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl enable kubelet && systemctl start kubelet
|
systemctl enable --now kubelet
|
||||||
```
|
```
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|||||||
Reference in New Issue
Block a user