Getting ready

Before our major tutorial, we will need to install kops on to your local host. It is a straightforward step for downloading the binary file and moving it to the system directory of the execution file:

// download the latest stable kops binary
$ curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64
$ chmod +x kops-linux-amd64
$ sudo mv kops-linux-amd64 /usr/local/bin/kops
// verify the command is workable
$ kops version
Version 1.9.0 (git-cccd71e67)

Next, we have to prepare some AWS configuration on your host and required services for cluster. Refer to the following items and make sure that they are ready:

  • IAM user: Since kops would create and build several AWS service components together for you, you must have an IAM user with kops required permissions. We've created an IAM user named chap6 in the previous section that has the following policies with the necessary permissions for kops:
    • AmazonEC2FullAccess
    • AmazonRoute53FullAccess
    • AmazonS3FullAccess
    • IAMFullAccess
    • AmazonVPCFullAccess

Then, exposing the AWS access key ID and secret key as environment variables can make this role applied on host while firing kops commands:

 

$ export AWS_ACCESS_KEY_ID=${string of 20 capital character combination}
$ export AWS_SECRET_ACCESS_KEY=${string of 40 character and number combination}
  • Prepare an S3 bucket for storing cluster configuration: In our demonstration later, the S3 bucket name will be kubernetes-cookbook.
  • Prepare a Route53 DNS domain for accessing points of cluster: In our demonstration later, the domain name we use will be k8s-cookbook.net.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.166.34