Update Kube Config instructions (#470)

Co-authored-by: Techno Tim <timothystewart6@gmail.com>
This commit is contained in:
Luke D Iremadze 2024-03-05 21:21:40 -07:00 committed by GitHub
parent f81ec04ba2
commit efbfadcb93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,8 +96,22 @@ ansible-playbook reset.yml -i inventory/my-cluster/hosts.ini
To copy your `kube config` locally so that you can access your **Kubernetes** cluster run: To copy your `kube config` locally so that you can access your **Kubernetes** cluster run:
```bash ```bash
scp debian@master_ip:~/.kube/config ~/.kube/config scp debian@master_ip:/etc/rancher/k3s/k3s.yaml ~/.kube/config
``` ```
If you get file Permission denied, go into the node and temporarly run:
```bash
sudo chmod 777 /etc/rancher/k3s/k3s.yaml
```
Then copy with the scp command and reset the permissions back to:
```bash
sudo chmod 600 /etc/rancher/k3s/k3s.yaml
```
You'll then want to modify the config to point to master IP by running:
```bash
sudo nano ~/.kube/config
```
Then change `server: https://127.0.0.1:6443` to match your master IP: `server: https://192.168.1.222:6443`
### 🔨 Testing your cluster ### 🔨 Testing your cluster