You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -277,9 +277,9 @@ echo $(kubectl get secret -o go-template='{{index .data "token" }}' $(kubectl ge
277
277
278
278
Once the cluster been added successfully you can go to the `Kubernetes` tab to start working with the services of your cluster.
279
279
280
-
#### The proper/secure way
280
+
#### Kubernetes <=1.23: The proper/secure way
281
281
282
-
For production environments you should create a service account and/or role for Codefresh access.
282
+
For production environments, create a service account and/or role for Codefresh access.
283
283
The minimum permissions Codefresh needs to work with the cluster are the following:
284
284
285
285
`codefresh-role.yml`
@@ -296,7 +296,7 @@ rules:
296
296
{% endraw %}
297
297
{% endhighlight %}
298
298
299
-
Note that these permissions will only allow Codefresh to read the cluster resources and populate the respective dashboards. You need to give more privileges for actual deployments. For more information see the [Kubernetes RBAC documentation page](https://kubernetes.io/docs/reference/access-authn-authz/rbac/){:target="\_blank"}.
299
+
>These permissions only allow Codefresh to read the cluster resources and populate the respective dashboards. For actual deployments, you need to give more privileges. For more information see the [Kubernetes RBAC documentation page](https://kubernetes.io/docs/reference/access-authn-authz/rbac/){:target="\_blank"}.
300
300
301
301
Here is an example with role + service account + binding.
302
302
@@ -333,26 +333,27 @@ subjects:
333
333
{% endraw %}
334
334
{% endhighlight %}
335
335
336
-
Select the appropriate cluster if you have more than one:
336
+
<br />
337
337
338
+
**How to**
339
+
340
+
1. Select the appropriate cluster if you have more than one:
338
341
`Choose cluster`
339
342
{% highlight shell %}
340
343
{% raw %}
341
344
kubectl config use-context <my-cluster-name>
342
345
{% endraw %}
343
346
{% endhighlight %}
344
-
345
-
Create the Codefresh user/role:
346
-
347
+
{:start="2"}
348
+
1. Create the Codefresh user/role:
347
349
`Apply Codefresh access rules`
348
350
{% highlight shell %}
349
351
{% raw %}
350
352
kubectl apply -f codefresh-role-sa-bind.yml
351
353
{% endraw %}
352
354
{% endhighlight %}
353
-
354
-
Finally run the following commands and copy-paste the result to each Codefresh field in the UI:
355
-
355
+
{:start="3"}
356
+
1. Finally run the following commands and copy-paste the result to each Codefresh field in the UI:
For production environments, create a service account and/or role for Codefresh access.
383
+
384
+
Codefresh needs these minimum permissions to work with the cluster:
385
+
386
+
`codefresh-role.yml`
387
+
{% highlight yaml %}
388
+
{% raw %}
389
+
kind: ClusterRole
390
+
apiVersion: rbac.authorization.k8s.io/v1
391
+
metadata:
392
+
name: codefresh-role
393
+
rules:
394
+
- apiGroups: [“”]
395
+
resources: [“*”]
396
+
verbs: [“list”, “watch”, “get”]
397
+
{% endraw %}
398
+
{% endhighlight %}
399
+
400
+
>These permissions only allow Codefresh to read the cluster resources and populate the respective dashboards. For actual deployments, you need to give more privileges. For more information see the [Kubernetes RBAC documentation page](https://kubernetes.io/docs/reference/access-authn-authz/rbac/){:target="\_blank"}.
401
+
402
+
Here is an example with role + service account + binding.
0 commit comments