Skip to content

Commit

Permalink
feat: Add windows version
Browse files Browse the repository at this point in the history
  • Loading branch information
paul2126 committed Nov 17, 2023
1 parent 8704334 commit b674028
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/waiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## kubeconfig

### Prerequisites

**Download**

- [waiter-ca.pem](waiter-ca.pem)
- [kubelogin](https://github.com/int128/kubelogin)

`waiter-ca.pem` is required to be in the same directory as kubectl config commands.

### Linux Version

```bash
# Configure the cluster
kubectl config set-cluster bacchus-waiter \
Expand Down Expand Up @@ -35,6 +43,42 @@ kubectl config use-context bacchus-waiter

Verify with `kubectl auth whoami`.

Grant access in the webpage.

---

### Windows Version

#### Install Chocolaty (Optional)

1. In powershell run `Get-ExecutionPolicy`. If it returns `Restricted`, then run `Set-ExecutionPolicy AllSigned` or `Set-ExecutionPolicy Bypass -Scope Process`.
2. Run `Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))`

#### Configure kubeconfig

```bash
# Configure the cluster
kubectl config set-cluster bacchus-waiter --server=https://waiter.bacchus.io:6443 --embed-certs --certificate-authority=waiter-ca.pem

# Configure authentication
kubectl config set-credentials bacchus-waiter --exec-api-version=client.authentication.k8s.io/v1beta1 --exec-command=kubectl --exec-arg=oidc-login --exec-arg=get-token --exec-arg=--oidc-issuer-url=https://auth.bacchus.io/dex --exec-arg=--oidc-client-id=bacchus-waiter --exec-arg=--oidc-extra-scope=email --exec-arg=--oidc-extra-scope=groups --exec-arg=--oidc-use-pkce

# Configure context
kubectl config set-context bacchus-waiter --cluster=bacchus-waiter --user=bacchus-waiter

# Switch to the context
kubectl config use-context bacchus-waiter
```

Change `kubelogin.exe` to `kubectl-oidc_login.exe`.

- Normally, `kubelogin` is installed in `C:\Users\<username>\bin\kubelogin.exe`
- In case of chocolaty, `kubelogin` is installed in `C:\ProgramData\chocolatey\bin\kubelogin.exe`

Verify with `kubectl auth whoami`.

Grant access in the webpage.

## VPN

TODO

0 comments on commit b674028

Please sign in to comment.