-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (27 loc) · 791 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
VAR_FILE ?= values.tfvars
STATE_FILE ?= terraform.tfstate
CLUSTER_NAME ?= terraform-eks-demo
default: setup
init:
awsudo -u eks terraform init
plan:
awsudo -u eks terraform plan -var-file="$(VAR_FILE)" -var cluster_name="$(CLUSTER_NAME)"
apply:
awsudo -u eks terraform apply -var-file="$(VAR_FILE)" -var cluster_name="$(CLUSTER_NAME)" -state="$(STATE_FILE)" -lock=false
output:
awsudo -u eks terraform output
config:
awsudo -u eks terraform output config_map_aws_auth > config_map_aws_auth.yml
update:
awsudo -u eks aws eks update-kubeconfig --name "$(CLUSTER_NAME)"
auth:
kubectl apply -f config_map_aws_auth.yml
verify:
kubectl get nodes
destroy:
awsudo -u eks terraform destroy -var-file="$(VAR_FILE)"
all:
$(MAKE) apply
$(MAKE) update
$(MAKE) auth
$(MAKE) verify