1. Containerize your application with a [Dockerfile](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246). In the example we provide we start with a base alpine node image and set the working directory, install the packages we need and then copy everything in the container at[ line 10](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246#LC10). The app is running at[ line 14](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246#LC14). We have a react app so we added 2 arguments in the dockerfile, especially for js apps.
1. Containerize your application with a [Dockerfile](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246"Dockerfile"). In the example we provide we start with a base alpine node image and set the working directory, install the packages we need and then copy everything in the container at[ line 10](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246#LC10). The app is running at[ line 14](https://gitlab.com/corina-s/how-fast-can-flash-run/-/snippets/2415246#LC14). We have a react app so we added 2 arguments in the dockerfile, especially for js apps.
2. Now it's time to create the actual agent. In your GitLab project, go to `> Infrastructure > Kubernetes Cluster` and click on `Connect a cluster ( agent )` button.
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.
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!`
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
To check if the commands above were successful you should see this response\
`...Successfully got an update from the "ingress-nginx" chart repository ...Successfully got an update from the "gitlab" chart repository Update Complete. ⎈Happy Helming!⎈`
7. Now that we have added ingress to our cluster we need to give it a name and also install it
7. Now that we have added ingress to our cluster we need to give it a name and also install it