Commit 448e0ab6 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'nagyv-gitlab-master-patch-10767' into 'master'

Move namespace creation up

See merge request gitlab-org/gitlab!56749
parents 669b4025 22bae1d3
......@@ -167,17 +167,21 @@ the Agent in subsequent steps. You can create an Agent record with GraphQL:
### Install the Agent into the cluster
Next, install the in-cluster component of the Agent.
To install the in-cluster component of the Agent, first you need to define a namespace. To create a new namespace,
for example, `gitlab-kubernetes-agent`, run:
NOTE:
For GitLab.com users, the KAS is available at `wss://kas.gitlab.com`.
```shell
kubectl create namespace gitlab-kubernetes-agent
```
#### One-liner installation
To perform a one-liner installation, run the command below. Make sure to replace:
Replace the value of `agent-token` below with the token received from the previous step. Also, replace `kas-address` with the configured access of the Kubernetes Agent Server:
- `your-agent-token` with the token received from the previous step.
- `gitlab-kubernetes-agent` with the namespace you defined in the previous step.
- `wss://kas.gitlab.example.com` with the configured access of the Kubernetes Agent Server (KAS). For GitLab.com users, the KAS is available under `wss://kas.gitlab.com`.
```shell
docker run --pull=always --rm registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/cli:stable generate --agent-token=your-agent-token --kas-address=wss://kas.gitlab.example.com --agent-version stable | kubectl apply -f -
docker run --pull=always --rm registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/cli:stable generate --agent-token=your-agent-token --kas-address=wss://kas.gitlab.example.com --agent-version stable --namespace gitlab-kubernetes-agent | kubectl apply -f -
```
Set `--agent-version` to the latest released patch version matching your
......@@ -204,17 +208,11 @@ Otherwise, you can follow below for fully manual, detailed installation steps.
After generating the token, you must apply it to the Kubernetes cluster.
1. If you haven't previously defined or created a namespace, run the following command:
```shell
kubectl create namespace <YOUR-DESIRED-NAMESPACE>
```
To create your Secret, run:
1. Run the following command to create your Secret:
```shell
kubectl create secret generic -n <YOUR-DESIRED-NAMESPACE> gitlab-agent-token --from-literal=token='YOUR_AGENT_TOKEN'
```
```shell
kubectl create secret generic -n <YOUR_NAMESPACE> gitlab-agent-token --from-literal=token='YOUR_AGENT_TOKEN'
```
The following example file contains the
Kubernetes resources required for the Agent to be installed. You can modify this
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment