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
Copy file name to clipboardExpand all lines: adminforth/documentation/blog/2026-06-01-branch-sandboxing-k3s/index.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,12 @@ terraform {
106
106
}
107
107
}
108
108
```
109
+
After this you need to run
110
+
111
+
```bash
112
+
terraform init -migrate-state
113
+
```
114
+
in terraform directory
109
115
110
116
Also, we need to output the values we need for the sandbox deployment. In the same directory add (or edit) the `outputs.tf` file:
111
117
@@ -166,6 +172,59 @@ output "instance_type" {
166
172
}
167
173
```
168
174
175
+
Also you need to attach IAM policy to the instance profile created in the main deployment. This is required for the cluster autoscaler to be able to manage the Auto Scaling Group. Also we attach role for ECR repository pull only to the node role. So the autoscaled node instances can pull images from ECR.
Make sure you attach the policies to the node role created in the main deployment. If you didn't create the node role in the main deployment, you should create it now. We attach it to the node role, because we create node instances using Auto Scaling Group. So the autoscaled node instances can pull images from ECR. Also you need to add cluster autoscaler deployment to the cluster.
222
+
223
+
```bash
224
+
terraform apply --auto-approve
225
+
```
226
+
in terraform directory
227
+
169
228
Make sure, that you're using the same values as in the main deployment, so if you're using different `ECR` repository name, `subnet_id`, `security_group_id`, `iam_instance_profile`, `key_name` or `instance_type` in your main deployment, you should use the same values in the sandbox deployment.
0 commit comments