mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-05-23 05:15:16 +00:00
Updating tabs
This commit is contained in:
+12
-12
@@ -28,15 +28,15 @@ Save the IP of the Linux machine.
|
||||
|
||||
The kubeconfig file is important for accessing the Kubernetes cluster. Copy the file at `/etc/rancher/k3s/k3s.yaml` from the Linux machine and save it to your local workstation in the directory `~/.kube/config`. One way to do this is by using the `scp` tool and run this command on your local machine:
|
||||
|
||||
{{% tabs %}}
|
||||
{{% tab "Mac and Linux" %}}
|
||||
<Tabs>
|
||||
<TabItem label="Mac and Linux">
|
||||
|
||||
```
|
||||
scp root@<IP_OF_LINUX_MACHINE>:/etc/rancher/k3s/k3s.yaml ~/.kube/config
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab "Windows" %}}
|
||||
</TabItem>
|
||||
<TabItem label="Windows">
|
||||
|
||||
By default, "scp" is not a recognized command, so we need to install a module first.
|
||||
|
||||
@@ -50,15 +50,15 @@ Install-Module Posh-SSH
|
||||
scp root@<IP_OF_LINUX_MACHINE>:/etc/rancher/k3s/k3s.yaml $env:USERPROFILE\.kube\config
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% /tabs %}}
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Edit the Rancher server URL in the kubeconfig
|
||||
|
||||
In the kubeconfig file, you will need to change the value of the `server` field to `<IP_OF_LINUX_NODE>:6443`. The Kubernetes API server will be reached at port 6443, while the Rancher server will be reached at ports 80 and 443. This edit is needed so that when you run Helm or kubectl commands from your local workstation, you will be able to communicate with the Kubernetes cluster that Rancher will be installed on.
|
||||
|
||||
{{% tabs %}}
|
||||
{{% tab "Mac and Linux" %}}
|
||||
<Tabs>
|
||||
<TabItem label="Mac and Linux">
|
||||
|
||||
One way to open the kubeconfig file for editing is to use Vim:
|
||||
|
||||
@@ -68,8 +68,8 @@ vi ~/.kube/config
|
||||
|
||||
Press `i` to put Vim in insert mode. To save your work, press `Esc`. Then press `:wq` and press `Enter`.
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab "Windows" %}}
|
||||
</TabItem>
|
||||
<TabItem label="Windows">
|
||||
|
||||
In Windows Powershell, you can use `notepad.exe` for editing the kubeconfig file:
|
||||
|
||||
@@ -80,8 +80,8 @@ notepad.exe $env:USERPROFILE\.kube\config
|
||||
Once edited, either press `ctrl+s` or go to `File > Save` to save your work.
|
||||
|
||||
|
||||
{{% /tab %}}
|
||||
{{% /tabs %}}
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Install Rancher with Helm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user