Skip to content

Commit e0e6184

Browse files
author
Shakir
committed
updated 2021-11-14-aws-ec2-launch-instances-the-hard-way-with-cli.md
1 parent 13bfb4b commit e0e6184

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_posts/aws/2021-11-14-aws-ec2-launch-instances-the-hard-way-with-cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: aws ec2 > launch instances the hard way with cli
55

66
Hey All :wave:, in this post we shall launch 3 AWS EC2 instances and test SSH connectivity to those...
77

8-
We are not going to use the GUI / Web console :relaxed: for this purpose, we would be using the CLI :sweat_drops:, and also create individual components along the way, that are required for the instances to function properly, instead of relying on default ones, and thus touch bits of networking and security areas. Hope this approach gives someone a better understanding of the different components(like it gave me) that glue together underhood / behind the scenes, which we don't usually notice when we quickly setup instances with all the default options.
8+
We are not going to use the GUI / Web console :relaxed: for this purpose, we would be using the CLI :sweat_drops:, and also create individual components along the way, that are required for the instances to function properly, instead of relying on default ones, and thus touch bits of networking and security areas. Hope this approach gives someone a better understanding(like it gave me) of the different components that glue together underhood / behind the scenes, which we don't usually notice when we quickly setup instances with all the default options.
99

1010
Hence, please ensure you have the following installed and configured: [aws cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and [jq](https://stedolan.github.io/jq/download/). Note that jq is used to parse JSON content at different places in this post, though you can use the AWS CLI's built in filters.
1111

@@ -245,6 +245,8 @@ EOF
245245

246246
And then test the connection.
247247
```
248+
$ ips=$(<k8s-node-ips.txt)
249+
248250
$ for ip in $ips; do ssh ubuntu@$ip -i ~/.ssh/kubeadmKeyPair.pem 'echo -n "Hello World!, my AWS EC2 hostname is "; hostname'; done
249251
Hello World!, my AWS EC2 hostname is ip-10-0-0-5
250252
Hello World!, my AWS EC2 hostname is ip-10-0-0-11

0 commit comments

Comments
 (0)