gcr-rs-dev-workshop-ec2-key
Suppose you are using Mac, save the key pair to you local disk, eg: ~/Downloads
Open an SSH client, run this command, to ensure your key is not publicly viewable
cd ~/Downloads
chmod 400 gcr-rs-dev-workshop-ec2-key.pem
Go to CloudFormation (ap-northeast-1 region) or CloudFormation (cn-north-1)
CloudFormation template:
https://aws-gcr-rs-sol-workshop-ap-northeast-1-common.s3.ap-northeast-1.amazonaws.com/rs-dev-workshop-code/release/v2.0.1/rs-raw-ec2.yaml
https://aws-gcr-rs-sol-workshop-cn-north-1-common.s3.cn-north-1.amazonaws.com.cn/rs-dev-workshop-code/release/v2.0.1/cn-rs-raw-ec2.yaml
Stack name: gcr-rs-dev-workshop-ec2
KeyPairParam: gcr-rs-dev-workshop-ec2-key
Click Next -> Next -> Create Stack
Wait CloudFormation deployment complete
This will take about 5 - 6 minutes to provision
Get CloudFormation output
Open an SSH client, connect to your instance, replace <EC2_IP_Address> with the EC2 IP
cd ~/Downloads
HOST_IP=<EC2_IP_Address>
ssh -i "gcr-rs-dev-workshop-ec2-key.pem" ec2-user@${HOST_IP}
Type yes when showing the messages below.
Check your EC2 environment and related tools
eksctl version
kubectl version --client
aws configure get default.region
echo $REGION
If the output is empty or error, please run tail /var/log/user-data.log
to check the init log, maker sure init script finished successfully,
then re-login the EC2.