Skip to content

Nuke CloudFormation resource before EKSCluster #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2022
Merged

Conversation

phanikumv
Copy link
Collaborator

@phanikumv phanikumv commented May 12, 2022

This change to the nuke config will ensure that any left over EKS cluster is terminated to save costs. Note that since we should not delete databricks-workspace-stack, it is included in the filters so that aws-nuke would not delete it

Closes #337

Below are the logs of the run with this change.

us-east-2 - EC2Instance - i-0b0fff6220c1aaf69 - [Identifier: "i-0b0fff6220c1aaf69", ImageIdentifier: "ami-0410b1b829bec36f6", InstanceState: "running", InstanceType: "m5.large", LaunchTime: "2022-05-11T20:34:58Z", tag:Name: "providers-team-eks-cluster-ng-2c554d24-Node", tag:alpha.eksctl.io/nodegroup-name: "ng-2c554d24", tag:alpha.eksctl.io/nodegroup-type: "managed", tag:aws:autoscaling:groupName: "eks-ng-2c554d24-eec057c8-e1cc-86f3-d6b2-a740bb8d905c", tag:aws:ec2:fleet-id: "fleet-4c758bfd-d4a8-c47c-0432-a9a846411362", tag:aws:ec2launchtemplate:id: "lt-0d91352a1e6fb5411", tag:aws:ec2launchtemplate:version: "1", tag:eks:cluster-name: "providers-team-eks-cluster", tag:eks:nodegroup-name: "ng-2c554d24", tag:k8s.io/cluster-autoscaler/enabled: "true", tag:k8s.io/cluster-autoscaler/providers-team-eks-cluster: "owned", tag:kubernetes.io/cluster/providers-team-eks-cluster: "owned"] - removed
us-east-2 - EC2Instance - i-075d710346df2feff - [Identifier: "i-075d710346df2feff", ImageIdentifier: "ami-0410b1b829bec36f6", InstanceState: "running", InstanceType: "m5.large", LaunchTime: "2022-05-11T20:32:55Z", tag:Name: "providers-team-eks-cluster-ng-2c554d24-Node", tag:alpha.eksctl.io/nodegroup-name: "ng-2c554d24", tag:alpha.eksctl.io/nodegroup-type: "managed", tag:aws:autoscaling:groupName: "eks-ng-2c554d24-eec057c8-e1cc-86f3-d6b2-a740bb8d905c", tag:aws:ec2:fleet-id: "fleet-645f0357-76a0-4cde-8c12-8b28f3f46640", tag:aws:ec2launchtemplate:id: "lt-0d91352a1e6fb5411", tag:aws:ec2launchtemplate:version: "1", tag:eks:cluster-name: "providers-team-eks-cluster", tag:eks:nodegroup-name: "ng-2c554d24", tag:k8s.io/cluster-autoscaler/enabled: "true", tag:k8s.io/cluster-autoscaler/providers-team-eks-cluster: "owned", tag:kubernetes.io/cluster/providers-team-eks-cluster: "owned"] - removed
us-east-2 - CloudFormationStack - eksctl-providers-team-eks-cluster-nodegroup-ng-2c554d24 - [CreationTime: "2022-05-10T20:03:06Z", LastUpdatedTime: "2022-05-10T20:03:06Z", Name: "eksctl-providers-team-eks-cluster-nodegroup-ng-2c554d24", tag:alpha.eksctl.io/cluster-name: "providers-team-eks-cluster", tag:alpha.eksctl.io/eksctl-version: "0.96.0", tag:alpha.eksctl.io/nodegroup-name: "ng-2c554d24", tag:alpha.eksctl.io/nodegroup-type: "managed", tag:eksctl.cluster.k8s.io/v1alpha1/cluster-name: "providers-team-eks-cluster"] - removed
us-east-2 - CloudFormationStack - eksctl-providers-team-eks-cluster-addon-iamserviceaccount-kube-system-aws-node - [CreationTime: "2022-05-10T20:02:35Z", LastUpdatedTime: "2022-05-10T20:02:35Z", Name: "eksctl-providers-team-eks-cluster-addon-iamserviceaccount-kube-system-aws-node", tag:alpha.eksctl.io/cluster-name: "providers-team-eks-cluster", tag:alpha.eksctl.io/eksctl-version: "0.96.0", tag:alpha.eksctl.io/iamserviceaccount-name: "kube-system/aws-node", tag:eksctl.cluster.k8s.io/v1alpha1/cluster-name: "providers-team-eks-cluster"] - removed
us-east-2 - CloudFormationStack - eksctl-providers-team-eks-cluster-cluster - [CreationTime: "2022-05-10T19:49:32Z", LastUpdatedTime: "2022-05-10T19:49:32Z", Name: "eksctl-providers-team-eks-cluster-cluster", tag:alpha.eksctl.io/cluster-name: "providers-team-eks-cluster", tag:alpha.eksctl.io/eksctl-version: "0.96.0", tag:eksctl.cluster.k8s.io/v1alpha1/cluster-name: "providers-team-eks-cluster"] - removed
us-east-2 - CloudFormationStack - databricks-workspace-stack - [CreationTime: "2022-04-27T02:39:16Z", LastUpdatedTime: "2022-04-27T02:39:16Z", Name: "databricks-workspace-stack"] - filtered by config```

 

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #343 (2c004eb) into main (851a817) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #343   +/-   ##
=======================================
  Coverage   96.78%   96.78%           
=======================================
  Files          56       56           
  Lines        2925     2925           
=======================================
  Hits         2831     2831           
  Misses         94       94           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 851a817...2c004eb. Read the comment docs.

@phanikumv phanikumv changed the title Nuke CloudFormation resource before EKSCluster Nuke CloudFormation resource(ignore databricks stack) before EKSCluster May 12, 2022
@phanikumv phanikumv changed the title Nuke CloudFormation resource(ignore databricks stack) before EKSCluster Nuke CloudFormation resource before EKSCluster May 12, 2022
Copy link
Collaborator

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs look great. ❤️

@phanikumv phanikumv merged commit 9401094 into main May 12, 2022
@phanikumv phanikumv deleted the aws-nuke-eks branch May 12, 2022 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS nuke fails to delete EKS cluster
4 participants