logo
  • Blog
  • The Cloud
  • DevOps
  • Trending
    • Blockchain
    • Bitcoin
  • How To
  • Kubernetes

 

  • Introduction to Kubernetes
  • Kubernetes Introduction
  • Container Introduction
  • Kubernetes Setup
  • Local Setup with Minikube
  • Minikube Demo
  • Kubernetes using the Docker client
  • Minikube vs Docker Client vs Kops vs Kubeadm
  • Introduction to Kops
  • Demo: Preparing Kops install
  • Demo: DNS Troubleshooting
  • Demo: Cluster setup on AWS using kops
  • Building Docker images
  • Demo: Building docker images
  • Docker Image Registry
  • Demo: Pushing Docker Image
  • Running first app on Kubernetes
  • Demo: Userful commands
  • Service with LoadBalancer
  • Demo: Service with AWS ELB LoadBalancer
  • Kubernetes Basic
  • Node Architecture
  • Replication Controller
  • Demo Replication Controller
  • Deployments
  • Demo: Deployments
  • Services
  • Demo: Services
  • Labels
  • Demo: NodeSelector using Labels
  • Healthchecks
  • Demo: Healthcheck
  • Readiness Probe
  • Demo: Liveness and Readiness probe
  • Pod State
  • Pod Lifecycle
  • Demo: Pod Lifecycle
  • Secrets
  • Demo: Credentials using Volumes
  • Demo: Running WordPress on K8s
  • WebUI
  • Demo: Web UI in Kops
  • Demo: WebUI
  • Advanced Topic
  • Service Discovery
  • Demo: Service Discovery
  • ConfigMap
  • Demo: ConfigMap
  • Ingress Controller
  • Demo: Ingress Controller
  • External DNS
  • Demo: External DNS
  • Volumes
  • Demo: Volumes
  • Volumes Autoprovisioning
  • Demo: WordPress with Volumes
  • Pod Presets
  • Demo: Pod Presets
  • StatefulSets
  • Demo: StatefulSets
  • Daemon Sets
  • Resource Usage Monitoring
  • Demo: Resource Usage Monitoring
  • Autoscaling
  • Demo: Autoscaling
  • Affinity / Anti-Affinity
  • Demo: Affinity / Anti-Affinity
  • Interpod Affinity and Anti-Affinity
  • Demo: Interpod Affinity
  • Demo Interpod Anti-Affinity
  • Taints and Tolerations
  • Demo: Taints and Tolerations
  • Custom Resource Definitions (CRDs)
  • Operators
  • Demo: postgresql-operator
  • Kubernetes Administration
  • The Kubernetes Master Services
  • Resource Quotas
  • Namespaces
  • Demo: Namespace quotas
  • User Managements
  • Demo: Adding Users
  • RBAC
  • Demo: RBAC
  • Networking
  • Node Maintenance
  • Demo: Node Maintenance
  • High Availability
  • Demo: High Availability
  • TLS on ELB using Annotations
  • Demo: TLS on ELB
  • Packaging and Deploying on Kubernetes
  • Introduction to Helm
  • Demo: Helm
  • Creating your own Helm Charts
  • Demo: Creating your own Helm Charts
  • Demo: Nodejs app Helm Chart
  • Demo: Setting up a Helm Repository on S3
  • Demo: Building and Deploying Helm Charts with Jenkins
  • Serverless on Kubernetes
  • Introduction to Serverless
  • Introduction to Kubeless
  • Demo: Creating Functions with Kubeless
  • Demo: Triggering Kubeless Functions with Kafka
  • Microservices
  • Introduction to Istio
  • Demo: Istio Installation
  • Demo: An Istio enables app
  • Demo: Advances routing with Istio
  • Installing Kubernetes using kubeadm
  • Introduction to kubeadm
  • Demo: kubeadm (Part 1)
  • Demo: kubeadm (Part 2)
  • On-Prem or Cloud Agnostic Kubernetes
  • Managing TLS Certs with Cert-Manager
  • Demo: Cert-Manager (Part 1)
  • Demo: Cert-Manager (Part 2)

Demo: Cluster setup on AWS using kops

This article will take you through Kubernetes cluster setup on AWS using kops tool.

Following are the steps to setup cluster.

1. Login toUbuntu xenial box (vagrant up && vagrant ssh)

2. Download the kops tool on Ubuntu box.

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

3. Make the kops binary executable.
$ chmod +x kops-linux-amd64

4. Move the binary in to your PATH.
$ sudo mv kops-linux-amd64 /usr/local/bin/kops

5. Test to ensure the version you installed is up-to-date:
$ kops version

6. Create new SSH keys – These SSH keys will be used to login to the cluster. Create SSH key with the name of your cluster, so that you can easily differentiate cluster SSH key and other SSH keys.
ssh-keygen -t rsa -b 4096 -f ./k8s.timesofcloud.com

Above command will create a pair of SSH keys (a Public Key, and a Private key)

We will be uploading k8s.timesofcloud.com.pub public key to our cluster instances (VMs). That way we will be able to login to our Nodes (VM) using Private key k8s.timesofcloud.com

7. Below is the command to create the
kops create cluster –name=k8s.timesofcloud.com --state=s3:// k8s.timesofcloud.com --zones=eu-west-1a --node-count=2 --node-size:t2.micro --dns-zone=k8s.timesofcloud.com

Run a pod on cluster to verify Kubernetes is working:

$ kubectl run hello-minikube –image=k8s.grc.io/echoserver:1.4 –port=8080

$ kubectl export deployment hello-minikube –type=NodePort

$ kubectl get svc

Watch below video to see demo of cluster creation.

  • Previous page
  • Next page

 372 total views,  1 views today

Demo: Cluster setup on AWS using kops was last modified: December 27th, 2019 by Sushil Verma
Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Email this to someone
email

Latest Blogs

  • Linux: Viewing Log Messages
  • AWS CodeBuild: Getting Started
  • AWS CodeCommit: Set up Notifications
  • AWS CodeCommit: Securing The Repository and Branches
  • Managing Systemd units in Linux

Tags

Amazon EC2 AWS bash_shell bitcoin blockchain Cloud computing CodeCommit DevOps digital currency Kubernetes Linux trending ubuntu

For Improving Education

Categories

  • Amazon EC2
  • Amazon Web Services
  • AWS
  • AWS CodeCommit
  • Bash shell
  • Best Practices
  • Bitcoin
  • Blockchain
  • Chaincode
  • CLI
  • Cloud Computing
  • Cloud Security
  • CodeBuild
  • CodeCommit
  • CryptoCurrency
  • Cryptography
  • DevOps
  • Digital Currency
  • EC2 Lambda
  • Hyperledger
  • IBM Bluemix
  • IBM Garage
  • Kubernetes
  • Linux
  • Monitoring
  • OpenStack
  • Platform as a Service
  • TDD
  • Trending
  • Ubuntu
  • Virtual Server
Home | Site Map | Privacy Policy | Site Terms | Terms of use @2013, Times of Cloud.
The content is copyrighted to 'Times of Cloud' and may not be reproduced on other websites.