Class: EksCli::EKS::Cluster
- Inherits:
-
Object
- Object
- EksCli::EKS::Cluster
- Defined in:
- lib/eks_cli/eks/cluster.rb
Instance Method Summary collapse
- #config ⇒ Object
- #create ⇒ Object
- #delete ⇒ Object
-
#initialize(cluster_name) ⇒ Cluster
constructor
A new instance of Cluster.
- #update_kubeconfig ⇒ Object
Constructor Details
#initialize(cluster_name) ⇒ Cluster
Returns a new instance of Cluster.
11 12 13 |
# File 'lib/eks_cli/eks/cluster.rb', line 11 def initialize(cluster_name) @cluster_name = cluster_name end |
Instance Method Details
#config ⇒ Object
30 |
# File 'lib/eks_cli/eks/cluster.rb', line 30 def config; Config[@cluster_name]; end |
#create ⇒ Object
15 16 17 18 19 20 |
# File 'lib/eks_cli/eks/cluster.rb', line 15 def create Log.info "creating cluster #{@cluster_name}" cf_stack_outputs = CloudFormation::EKS.new(@cluster_name).create config.write(cf_stack_outputs) self end |
#delete ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/eks_cli/eks/cluster.rb', line 22 def delete delete_vpc_peering delete_services delete_nodegroups delete_cf_stack delete_config end |