ecs和eks 比较_如何使用Kubernetes,EKS和NGINX为网站设置DNS

ecs和eks 比较

As the creator of Foo, a platform for website quality monitoring, I recently endeavored in a migration to Kubernetes and EKS (an AWS service).

作为网站质量监控平台Foo的创建者,我最近努力迁移到Kubernetes和EKS(一种AWS服务)。

Kubernetes provides a robust level of DNS support. Luckily for us, within a cluster, we can reference pods by host name as defined in a spec.

Kubernetes提供了强大的DNS支持级别。 对我们来说幸运的是,在集群中,我们可以按规范中定义的主机名引用Pod。

But what if we want to expose an app to the outside world as a website under a static domain? I thought this would be a common, well documented case, but boy was I wrong.

但是,如果我们想将应用程序作为静态站点下的网站公开给外界,该怎么办? 我以为这是一个常见且有据可查的案例,但是男孩我错了。

Assume a Service named foo in the Kubernetes namespace bar. A Pod running in namespace bar can look up this service by simply doing a DNS query for foo. A Pod running in namespace quux can look up this service by doing a DNS query for foo.bar ~ DNS for Services and Pods - Kubernetes

在Kubernetes命名空间bar假设一个名为foo的服务。 在名称空间bar运行的Pod可以通过对foo进行DNS查询来查找此服务。 在命名空间quux运行的Pod可以通过对foo.bar进行DNS查询来查找此服务〜 服务和 foo.bar DNS-Kubernetes

Yes, that's great ❤️ But this still leads to many unsolved mysteries. Let's take this one step at a time shall we?! This post will address the following items.

是的,太好了❤️但这仍然导致许多未解之谜。 让我们一次迈出这一步吧? 这篇文章将解决以下问题。

  1. How to define services

    如何定义服务

  2. How to expose multiple services under one NGINX server. No fancy schmancy "Ingress" needed 🙌

    如何在一台NGINX服务器下公开多种服务 。 无需花哨的“ Ingress🙌

  3. How to create an external DNS and connect to a domain you've acquired through any qualified registry like GoDaddy or Google Domains, for example. We'll use Route 53 and ExternalDNS to do the heavy lifting.

    例如,如何创建外部DNS并连接到通过任何合格的注册表(例如GoDaddy或Google Domains)获得的域。 我们将使用Route 53ExternalDNS进行繁重的工作。

This post assumes a setup with EKS and eksctl as documented in "Getting started with eksctl", but many of the concepts and examples in this post could be applicable in a variety of configurations.

这篇文章假定使用“ eksctl入门 ”中介绍的EKS和eksctl进行设置,但是本文中的许多概念和示例可能适用于各种配置。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值