diff --git a/k8s/README.md b/k8s/README.md index 86a66fc..ba48753 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -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: @@ -25,7 +26,7 @@ 3. Apply the cluster: ```sh - kubectl apply -f . + ./scripts/create.sh ``` 4. Optionally, start up the minikube dashboard: @@ -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: @@ -52,6 +59,8 @@ 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 + #### 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: @@ -59,3 +68,5 @@ Use this command to forward the port 8081, used for the club manager site/admin, ```sh kubectl port-forward svc/proxy 30081:8081 --namespace main ``` + +You can test that it's working by going to diff --git a/k8s/scripts/create.sh b/k8s/scripts/create.sh index 6cac543..cb0486a 100755 --- a/k8s/scripts/create.sh +++ b/k8s/scripts/create.sh @@ -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 . diff --git a/k8s/scripts/destroy.sh b/k8s/scripts/destroy.sh old mode 100644 new mode 100755