3. Create a new agent by typing in a unique name for the agent and clicking create.
3. Create a new agent by typing in a unique name for the agent and clicking create.
4.**!!! Important !!!** After you create the Agent, GitLab shares a token and some helm commands to connect the agent to the cluster with the newly generated token. Please copy the commands in the popup before you close it.
4.**!!! Important !!!** After you create the Agent, GitLab shares a token and some helm commands to connect the agent to the cluster with the newly generated token. Please copy the commands in the popup before you close it.
5. Connect to your Kubernetes cluster via the terminal and execute the helm commands with the agent token you copied at the previous step. If this was successful you should see this response
5. Connect to your Kubernetes cluster via the terminal and execute the helm commands with the agent token you copied at the previous step. If this was successful you should see this response
`Release "<your-agent-name-here>" has been upgraded. Happy Helming!`
`Release "<your-agent-name-here>" has been upgraded. Happy Helming!`
6. Next, you need to add ingress to your Kubernetes cluster. Execute the following commands from the same terminal
6. Next, you need to add ingress to your Kubernetes cluster. Execute the following commands from the same terminal
...
@@ -24,4 +23,6 @@ To check if the commands above were successful you should see this response\
...
@@ -24,4 +23,6 @@ To check if the commands above were successful you should see this response\
8. Ingress has been installed with default configuration, we need to make sure that our cluster is aware of it
8. Ingress has been installed with default configuration, we need to make sure that our cluster is aware of it
`kubectl get svc --all-namespaces -o jsonpath='{range.items\\\[?(@.status.loadBalancer.ingress)\\\]}{.status.loadBalancer.ingress\\\[\\\*\\\].ip} '`
`kubectl get svc --all-namespaces -o jsonpath='{range.items\\\[?(@.status.loadBalancer.ingress)\\\]}{.status.loadBalancer.ingress\\\[\\\*\\\].ip} '`
\ No newline at end of file
9. Modify or add the .gitlab-ci.yml file in your root directory as specified [here](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415249) please make sure to change [line 15](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415249#LC15) with <your-k8-agent-name> and [line 18](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415249#LC18) with <your-k8-env-name> ( the env will be created automatically by the runner with the name you provide here )