O'Reilly logo

Kubernetes Cookbook, 2nd Edition by Ke-Jou Carol Hsu, Hui-Chuan Chloe Lee, Hideto Saito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EC2

Now you need to upload your ssh public key and then launch the EC2 instance on both the public subnet and the private subnet:

  1. Upload your ssh public key (assume you have a public key that is located at ~/.ssh/id_rsa.pub):
$ aws ec2 import-key-pair --key-name=chap6-key --public-key-material "`cat ~/.ssh/id_rsa.pub`"
  1. Launch the first EC2 instance with the following parameters:
    • Use Amazon Linux image: ami-1853ac65 (Amazon Linux)
    • T2.nano instance type: t2.nano
    • Ssh key: chap6-key
    • Public Subnet: subnet-6296863f
    • Public Security Group: sg-dd8a3f94
$ aws ec2 run-instances --image-id ami-1853ac65 --instance-type t2.nano --key-name chap6-key --security-group-ids sg-dd8a3f94 --subnet-id subnet-6296863f
  1. Launch the second EC2 instance with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required