Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
30d8dcc7
Commit
30d8dcc7
authored
Feb 22, 2019
by
danielgruesso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update adding existing cluster
parent
715b3fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
doc/user/project/clusters/index.md
doc/user/project/clusters/index.md
+13
-13
No files found.
doc/user/project/clusters/index.md
View file @
30d8dcc7
...
...
@@ -107,70 +107,70 @@ To add an existing Kubernetes cluster to your project:
[`cluster-admin`](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles)
privileges.** To create this service account:
1. Create a file called `
eks
-admin-service-account.yaml` with contents:
1. Create a file called `
gitlab
-admin-service-account.yaml` with contents:
```yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name:
eks
-admin
name:
gitlab
-admin
namespace: kube-system
```
2. Apply the service account to your cluster:
```bash
kubectl apply -f
eks
-admin-service-account.yaml
kubectl apply -f
gitlab
-admin-service-account.yaml
```
Output:
```bash
serviceaccount "
eks
-admin" created
serviceaccount "
gitlab
-admin" created
```
3. Create a file called `
eks
-admin-cluster-role-binding.yaml` with contents:
3. Create a file called `
gitlab
-admin-cluster-role-binding.yaml` with contents:
```yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name:
eks
-admin
name:
gitlab
-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name:
eks
-admin
name:
gitlab
-admin
namespace: kube-system
```
4. Apply the cluster role binding to your cluster:
```bash
kubectl apply -f
eks
-admin-cluster-role-binding.yaml
kubectl apply -f
gitlab
-admin-cluster-role-binding.yaml
```
Output:
```bash
clusterrolebinding "
eks
-admin" created
clusterrolebinding "
gitlab
-admin" created
```
5. Retrieve the token for the `
eks
-admin` service account:
5. Retrieve the token for the `
gitlab
-admin` service account:
```bash
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep
eks
-admin | awk '{print $1}')
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep
gitlab
-admin | awk '{print $1}')
```
Copy the `<authentication_token>` value from the output:
```yaml
Name:
eks
-admin-token-b5zv4
Name:
gitlab
-admin-token-b5zv4
Namespace: kube-system
Labels: <none>
Annotations: kubernetes.io/service-account.name=
eks
-admin
Annotations: kubernetes.io/service-account.name=
gitlab
-admin
kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8
Type: kubernetes.io/service-account-token
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment