Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0a98ddb

Browse files
authored
Update managed-cluster.md (#659)
* Update managed-cluster.mdFormatting and content edits* Update managed-cluster.mdfixes* Update managed-cluster.md* Update managed-cluster.md
1 parent3531b38 commit0a98ddb

File tree

1 file changed

+57
-48
lines changed

1 file changed

+57
-48
lines changed

‎_docs/installation/gitops/managed-cluster.md‎

Lines changed: 57 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ sub_group: gitops
66
toc:true
77
---
88

9-
Once you have an Argo CD installation as part of a[hybrid]({{site.baseurl}}/docs/installation/gitops/hybrid-gitops/) or[hosted runtime]({{site.baseurl}}/docs/installation/gitops/hosted-runtime/) you
10-
can add external deployment clusters to them.
11-
12-
Once you add an external cluster, you can deploy applications to that cluster without having to install Argo CD on the clusters in order to do so.
9+
Once you have an Argo CD installation as part of a[Hybrid]({{site.baseurl}}/docs/installation/gitops/hybrid-gitops/) or[Hosted]({{site.baseurl}}/docs/installation/gitops/hosted-runtime/) GitOps Runtime, you can add external clusters to them. You can then deploy applications to those clusters without having to install Argo CD on the clusters in order to do so.
1310

1411
When you add an external cluster to a provisioned GitOps Runtime, the cluster is registered as a managed cluster. A managed cluster is treated as any other managed K8s resource, meaning that you can monitor its health and sync status, deploy applications to it, view information in the Applications dashboard, and remove the cluster from the Runtime's managed list.
1512

@@ -21,13 +18,20 @@ Adding a managed cluster via Codefresh ensures that Codefresh applies the requir
2118
##Prerequisites
2219

2320
* For_Hosted GitOps_ Runtimes:[Configure access to these IP addresses]({{site.baseurl}}/docs/administration/platform-ip-addresses/)
24-
* Your Git personal access token is valid and has the[required scopes]({{site.baseurl}}/docs/reference/git-tokens)
25-
* You have the[latest version of the Codefresh CLI]({{site.baseurl}}/docs/installation/gitops/upgrade-gitops-cli/)
26-
* You have created a Codefresh token in user settings
27-
* You know the ingress host of your runtime using`cf runtime list`
28-
29-
###Add a managed cluster with GitOps CLI
30-
Add an external cluster to a provisioned GitOps Runtime through the GitOps CLI. When adding the cluster, you can also add labels and annotations to the cluster, which are added to the cluster secret created by Argo CD.
21+
* Valid Git personal access token with the[required scopes]({{site.baseurl}}/docs/reference/git-tokens)
22+
*[Latest version of the Codefresh CLI]({{site.baseurl}}/docs/installation/gitops/upgrade-gitops-cli/)
23+
* Codefresh token in user settings
24+
* For ingress-based GitOps Runtimes, the ingress host of the Runtime (use`cf runtime list` to get this)
25+
26+
##Adding managed clusters
27+
Add a managed cluster in any of the following ways:
28+
*[Codefresh UI](#add-a-managed-cluster-in-codefresh)
29+
*[Kustomize](#add-a-managed-cluster-with-kustomize)
30+
*[Helm](#add-a-managed-cluster-with-helm)
31+
*[Terraform](#add-a-managed-cluster-with-terraform)
32+
33+
###Add a managed cluster in Codefresh
34+
Add an external cluster to a provisioned GitOps Runtime in the Codefresh UI. When adding the cluster, you can also add labels and annotations to the cluster, which are added to the cluster secret created by Argo CD.
3135
Optionally, to first generate the YAML manifests, and then manually apply them, use the`dry-run` flag in the CLI.
3236

3337
**How to**
@@ -37,7 +41,8 @@ Optionally, to first generate the YAML manifests, and then manually apply them,
3741
1. From either the**Topology** or**List** views, select the Runtime to which to add the cluster.
3842
1. Topology View: Select {::nomarkdown}<imgsrc="../../../../images/icons/add-cluster.png"display=inline-block/>{:/}.
3943
List View: Select the**Managed Clusters** tab, and then select**+ Add Cluster**.
40-
1. In the Add Managed Cluster panel, copy and run the command:
44+
1. In the Add Managed Cluster panel, if needed install the Codefresh GitOps CLI.
45+
1. Copy and run the command:
4146
`cf cluster add [runtime-name] [--labels label-key=label-value] [--annotations annotation-key=annotation-value][--dry-run]`
4247
where:
4348
*`runtime-name` is the name of the Runtime to which to add the cluster.
@@ -56,7 +61,7 @@ Optionally, to first generate the YAML manifests, and then manually apply them,
5661
max-width="40%"
5762
%}
5863

59-
{:start="5"}
64+
{:start="7"}
6065
1. If you used`dry-run`, apply the generated manifests to the same target cluster on which you ran the command.
6166
Here is an example of the YAML manifest generated with the`--dry-run` flag. Note that the example has placeholders, which are replaced with the actual values during the`--dry-run`.
6267

@@ -65,35 +70,34 @@ The new cluster is registered to the GitOps Runtime as a managed cluster.
6570

6671
###Add a managed cluster with Kustomize
6772

68-
1.Clone locally[https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/kustomize](https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/kustomize).
69-
1. Updateconfimap.yml and secret.yml with therequire values
70-
1. Run`kustomize build` or`kubectl -k` to apply the final result to the cluster
73+
1.Locally clone[https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/kustomize](https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/kustomize){:target="\_blank"}.
74+
1. Update`configmap.yml` and`secret.yml` with therequires values.
75+
1. Run`kustomize build` or`kubectl -k` to apply the final result to the cluster.
7176

72-
You can get the`ingressUrl` value of your runtime by running`cf runtime list` in your terminal
73-
after authenticating to the[Codefresh GitOps CLI]({{site.baseurl}}/docs/installation/cli/).
77+
>For ingress-based GitOps Runtimes, to get the`ingressUrl` for your, first authenticate to the[Codefresh GitOps CLI]({{site.baseurl}}/docs/installation/cli/), and then run`cf runtime list` in your terminal.
7478
75-
###Add a managed cluster with Helm
7679

77-
A Helm chart is published athttps://chartmuseum.codefresh.io/csdp-add-cluster. You can see the source templates at[https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/helm](https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/helm).
78-
79-
To deploy the chart copy locally[https://github.com/codefresh-io/csdp-official/blob/main/add-cluster/helm/values.yaml](https://github.com/codefresh-io/csdp-official/blob/main/add-cluster/helm/values.yaml) and fill in the required values.
80+
###Add a managed cluster with Helm
8081

81-
Then run
82+
The Helm chart is published athttps://chartmuseum.codefresh.io/csdp-add-cluster. You can see the source templates at[https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/helm](https://github.com/codefresh-io/csdp-official/tree/main/add-cluster/helm){:target="\_blank"}.
8283

84+
To deploy the chart:
85+
1. Copy[https://github.com/codefresh-io/csdp-official/blob/main/add-cluster/helm/values.yaml](https://github.com/codefresh-io/csdp-official/blob/main/add-cluster/helm/values.yaml){:target="\_blank"} locally.
86+
1. Fill in the required values.
87+
1. Run:
8388
```shell
8489
helm repo add csdp-add-cluster https://chartmuseum.codefresh.io/csdp-add-cluster
8590
helm repo update
8691
helm search repo csdp-add-cluster
8792
helm install csdp-add-cluster/csdp-add-cluster -f values.yaml --generate-name
8893
```
8994

95+
>For ingress-based GitOps Runtimes, to get the`ingressUrl` for your, first authenticate to the[Codefresh GitOps CLI]({{site.baseurl}}/docs/installation/cli/), and then run`cf runtime list` in your terminal.
96+
9097

91-
You can get the`ingressUrl` value of your runtime by running`cf runtime list` in your terminal
92-
after authenticating to the[Codefresh GitOps CLI]({{site.baseurl}}/docs/installation/cli/).
93-
94-
###Add a manage cluster with Terraform
98+
###Add a managed cluster with Terraform
9599

96-
Use the[Helm provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs) as any other Helm chart.
100+
*Use the[Helm provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs) as any other Helm chart.
97101

98102
```hcl
99103
resource "helm_release" "my-managed-cluster" {
@@ -106,23 +110,23 @@ resource "helm_release" "my-managed-cluster" {
106110
]
107111
}
108112
```
113+
{:start="2"}
114+
* Apply the file using Terraform or your favorite workflow tool.
109115

110-
And then apply the file using Terraform or your favorite workflow tool.
111-
112-
##Work with managed clusters
113-
Work with managed clusters in either the Topology or List Runtime views. For information on Runtime views, see[Runtime views]({{site.baseurl}}/docs/installation/gitops/monitor-manage-runtimes/#gitops-runtime-views).
116+
##View managed clusters
117+
View managed clusters in either the Topology or List Runtime views. For information on Runtime views, see[Runtime views]({{site.baseurl}}/docs/installation/gitops/monitor-manage-runtimes/#gitops-runtime-views).
114118
As the cluster is managed through the Runtime, updates to the Runtime automatically updates the components on all the managed clusters that include it.
115119

116120
View connection status for the managed cluster, and health and sync errors. Health and sync errors are flagged by the error notification in the toolbar, and visually flagged in the List and Topology views.
117121

118-
###Install Argo Rollouts
122+
##Install Argo Rollouts
119123
Applications with`rollout` resources need Argo Rollouts on the target cluster, both to visualize rollouts in the Applications dashboard and control rollout steps with the Rollout Player.
120-
If Argo Rollouts has not been installed on the target cluster,it displays**Install Argo Rollouts** button.
124+
If Argo Rollouts has not been installed on the target cluster,the**Install Argo Rollouts** button displayed.
121125

122126
Install Argo Rollouts with a single click to execute rollout instructions, deploy the application, and visualize rollout progress in the[Applications dashboard]({{site.baseurl}}/docs/deployments/gitops/applications-dashboard/).
123127

124128

125-
1. In the Codefresh UI, on the toolbar, click the**Settings** icon,expandRuntimes in the sidebar, and select[**GitOps Runtimes**](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}.
129+
1. In the Codefresh UI, on the toolbar, click the**Settings** icon,and fromRuntimes in the sidebar, select[**GitOps Runtimes**](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}.
126130
1. Select**Topology View**.
127131
1. Select the target cluster, and then select**+ Install Argo Rollouts**.
128132

@@ -136,15 +140,22 @@ Install Argo Rollouts with a single click to execute rollout instructions, deplo
136140
max-width="40%"
137141
%}
138142

139-
##Remove a managed cluster
143+
##Removing managed clusters
144+
145+
Removing a cluster as a deployment target means removing it from the GitOps Runtime that manages it.
140146

141-
When you want to remove a cluster as a deployment target you can unlink it fromtheruntime that manages it.
147+
>This action only removes the management link between your GitOps Runtime and your cluster. Applications that are already running onthecluster are not affected.
142148
143-
Note that this only removes the management link between your runtime and your cluster. It doesn't do anything with the applications that are already running on the cluster.
149+
Remove a managed cluster in any of the following ways:
150+
*[Codefresh UI](#remove-a-managed-cluster-from-the-codefresh-ui)
151+
*[GitOps CLI](#remove-a-managed-cluster-through-the-gitops-cli)
152+
*[Kustomize](#remove-a-managed-cluster-with-kustomize)
153+
*[Helm](#remove-a-managed-cluster-with-helm)
154+
*[Terraform](#remove-a-managed-cluster-with-terraform)
144155

145156

146157
###Remove a managed cluster from the Codefresh UI
147-
Remove a cluster from theRuntime'slistofmanagedclusters from the Codefresh UI.
158+
Remove a cluster from the list managedby the GitOps Runtime in the Codefresh UI.
148159

149160
>You can also remove it through the CLI.
150161
@@ -167,28 +178,26 @@ In the Codefresh UI, on the toolbar, click the **Settings** icon, expand Runtime
167178

168179

169180
###Remove a managed cluster through the GitOps CLI
170-
Remove a cluster from the list managed by the GitOps Runtime, through the GitOps CLI.
181+
Remove amanaged cluster from the list managed by the GitOps Runtime through the GitOps CLI.
171182

172183
* Run:
173184
`cf cluster remove <runtime-name> --server-url <server-url>`
174185
where:
175-
`<runtime-name>` is the name of theruntime that the managed cluster is registered to.
186+
`<runtime-name>` is the name of theGitOps Runtime that the managed cluster is registered to.
176187
`<server-url>` is the URL of the server on which the managed cluster is installed.
177188

178189

179190

180191

181-
###Remove with Kustomize
192+
###Removea managed clusterwith Kustomize
182193

183-
Run`kubectl delete -f <your_yaml>` with the result of the`kustomize build` command
184-
that you run during installation
194+
Run`kubectl delete -f <your_yaml>` with the result of the`kustomize build` command that you run during installation
185195

186-
###Remove with Helm
196+
###Removea managed clusterwith Helm
187197

188-
Run`helm delete <release_name>` with the name of the release that was created
189-
during installation.
198+
Run`helm delete <release_name>` with the name of the release that was created during installation.
190199

191-
###Remove withterraform
200+
###Removea managed clusterwithTerraform
192201

193202
Use the`terraform destroy` command.
194203

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp