Code Monkey home page Code Monkey logo

yc-mk8s-and-aws-eks-app-deployment's Introduction

Overview and target scenario

This scenario specifically targets customers who have chosen Kubernetes as their base PaaS technology. These customers may have users in regions where AWS doesn't have data centers (such as Russia). To solve this issue, users can deploy a Kubernetes satellite cluster on Yandex Cloud and add services from their clusters to the Global Service Management system.

For example, in this solution, you can have a main application installed on AWS and a satellite application installed on Yandex Cloud. Both applications use Route 53 with regional forwarding, which forwards requests from the US to a US site and Russian requests to a Russian site.

Kubernetes clusters at YC and AWS diagram

Prerequisites

  • Accounts in AWS and Yandex Cloud
  • Bash
  • Terraform 1.1.5
  • curl
  • jq

Configure the AWS site:

Configure Yandex Cloud:

  • Configure the YC CLI
  • Export Yandex Cloud configuration data for the Terraform provider:
export YC_TOKEN=$(yc iam create-token)
export YC_CLOUD_ID=$(yc config get cloud-id)
export YC_FOLDER_ID=$(yc config get folder-id)

Quick start

Configure your public DNS domain name

Specify value for aws_domain_name variable at variables.tf file.

Initiate an example playbook

Please note that this uses the path ~/.ssh/id_rsa.pub for public keys:

cd example
terraform init
terraform apply # use -var=public_key_path='another_path_to_ssh_public_key' if you your ssh key is located somewhere else

and wait about 10 minutes.

Check the result

You can run curl for both pods deployed in multiple clusters:

curl $(terraform output eks_lb_ip)
curl $(terraform output yc_lb_ip)

Check if the Route 53 Global DNS is working:

  1. Go to the AWS Console.
  2. Choose Route 53 Service.
  3. Choose aws-yandex-example.com. (your public DNS name)
  4. Click Test Connection.

Test the WWW record from different resolver addresses:

  1. You can use a Google DNS IP address to emulate US client: 8.8.8.8
  2. You can use a Yandex IP address to emulate RU client: 87.250.250.1

yc-mk8s-and-aws-eks-app-deployment's People

Contributors

nettworker avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.