gitpod-eks-guide
gitpod-eks-guide copied to clipboard
Cleaned up changes from PR comments
Description
Refinements and fixes for existing PR #51
I see this PR switches the deployment process to use KOTS. I have to deploy a gitpod cluster, is it recommended to wait till PR is merged or I can proceed with the previous no-KOTS approach?
@HadesArchitect This cleans up some other edge cases that the current guide doesn't cover. If you run into problems with the current guide, you can checkout this branch, just be sure to run make build before make install to use the updated container and tools that this branch introduces
I get the following error:
The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: b'Release "metrics-server" does not exist. Installing it now.\nError: chart "metrics-server" version "5.10.10" not found in https://charts.bitnami.com/bitnami repository\n'
Since I cannot push to this repo, here is the diff:
diff --git a/lib/charts/metrics-server.ts b/lib/charts/metrics-server.ts
index 4b9c17f..44d35c6 100644
--- a/lib/charts/metrics-server.ts
+++ b/lib/charts/metrics-server.ts
@@ -13,7 +13,7 @@ export class MetricsServer extends cdk.Construct {
release: 'metrics-server',
repository: 'https://charts.bitnami.com/bitnami',
namespace: 'kube-system',
- version: '5.10.10',
+ version: '5.10.14',
wait: true,
values: {
hostNetwork: true,
Run make build.
As my install failed I had to re-run make install after make build, this however resulted in another failure about region not being specified:
ubuntu@ip-172-31-8-93:~/gitpod-eks-guide$ make install
Starting install process...
Using eksctl configuration file: eks-cluster.yaml
Missing (optional) AWS profile.
Using external-dns. No manual intervention required.
⏳ Bootstrapping environment aws://691173103445/us-east-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
✅ Environment aws://691173103445/us-east-1 bootstrapped (no changes).
You must specify a region. You can also configure your region by running "aws configure".
make: *** [Makefile:41: install] Error 255
This happens in the install function in setup.sh:
if ! eksctl get cluster "${CLUSTER_NAME}" > /dev/null 2>&1; then
# https://eksctl.io/usage/managing-nodegroups/
eksctl create cluster --config-file "${EKSCTL_CONFIG}" --without-nodegroup --kubeconfig ${KUBECONFIG}
else
aws eks update-kubeconfig --name "${CLUSTER_NAME}" --region "${AWS_REGION}"
fi
Here's the diff that fixes that:
diff --git a/setup.sh b/setup.sh
index 01d3844..88295a6 100755
--- a/setup.sh
+++ b/setup.sh
@@ -80,7 +80,7 @@ function install() {
# https://eksctl.io/usage/managing-nodegroups/
eksctl create cluster --config-file "${EKSCTL_CONFIG}" --without-nodegroup --kubeconfig ${KUBECONFIG}
else
- aws eks update-kubeconfig --name "${CLUSTER_NAME}"
+ aws eks update-kubeconfig --name "${CLUSTER_NAME}" --region "${AWS_REGION}"
fi
# Disable default AWS CNI provider.
Again run make build and then make install.
After fixing the above I then get:
The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: b'Release "aws-for-fluent-bit" does not exist. Installing it now.\nError: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1", unable to recognize "": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"]\n'
This is due to an outdated chart for aws-for-fluent-bit. My diff:
diff --git a/lib/charts/container-insights.ts b/lib/charts/container-insights.ts
index a5d5a2b..d109276 100644
--- a/lib/charts/container-insights.ts
+++ b/lib/charts/container-insights.ts
@@ -29,7 +29,7 @@ export class ContainerInsights extends cdk.Construct {
release: 'aws-for-fluent-bit',
repository: 'https://aws.github.io/eks-charts',
namespace,
- version: '0.1.11',
+ version: '0.1.17',
values: {
serviceAccount: {
create: false,
The next error was:
The stack named Addons failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Error: b'Release "aws-load-balancer-controller" does not exist. Installing it now.\nError: timed out waiting for the condition\n'
Again this appears to be due to an outdated chart version for aws-load-balancer-controller. My diff:
diff --git a/lib/charts/load-balancer.ts b/lib/charts/load-balancer.ts
index b6afb83..b675d73 100644
--- a/lib/charts/load-balancer.ts
+++ b/lib/charts/load-balancer.ts
@@ -14,7 +14,7 @@ export class AWSLoadBalancerController extends cdk.Construct {
release: AWS_LOAD_BALANCER_CONTROLLER,
repository: 'https://aws.github.io/eks-charts',
namespace: 'kube-system',
- version: '1.3.1',
+ version: '1.4.2',
wait: true,
values: {
replicaCount: 1,
Run make build and make install again.