Skip to content

Commit

Permalink
Merge pull request #74 from ufosc/feature/k8s
Browse files Browse the repository at this point in the history
check k8s create/delete scripts, add testing instructions to docs
  • Loading branch information
IkeHunter authored Nov 17, 2024
2 parents e04b7cc + 0abed86 commit e2546c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@

### Running cluster

1. In root project directory, navigate to the `k8s` directory:
1. In root project directory, navigate to the `k8s` directory and make sure the scripts are setup as executables:

```sh
cd k8s
chmod -R +x ./scripts
```

2. Start Minikube:
Expand All @@ -25,7 +26,7 @@
3. Apply the cluster:

```sh
kubectl apply -f .
./scripts/create.sh
```

4. Optionally, start up the minikube dashboard:
Expand All @@ -34,6 +35,12 @@
minikube dashboard
```

5. When you are finished, destroy the local cluster:

```sh
./scripts/destroy.sh
```

### Accessing Cluster

The general way to access a nodeport is via the following command:
Expand All @@ -52,10 +59,14 @@ Run this command to open up the base 8080 port onto 30080 on your local machine:
kubectl port-forward svc/proxy 30080:8080 --namespace main
```

You can test that it's working by going to <http://localhost:30080/api/docs/>

#### Forwarding Club Manager Admin

Use this command to forward the port 8081, used for the club manager site/admin, onto 30081 of your local machine:

```sh
kubectl port-forward svc/proxy 30081:8081 --namespace main
```

You can test that it's working by going to <http://localhost:30081/>
1 change: 0 additions & 1 deletion k8s/scripts/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ helm install redis ./charts/redis \
kubectl create namespace main --dry-run=client -o yaml | kubectl apply -f -

# Apply kubernetes files
kubectl apply -f namespaces.yml
kubectl apply -f .

Empty file modified k8s/scripts/destroy.sh
100644 → 100755
Empty file.

0 comments on commit e2546c2

Please sign in to comment.