简体   繁体   English

我可以在没有“船长”入口的情况下使用“kube-ingress-aws-controller”吗?

[英]Can I use "kube-ingress-aws-controller" without "skipper" ingress?

I'm trying to use the ingress of kubernetes on an AWS cluster built with Kops.我正在尝试在使用 Kops 构建的 AWS 集群上使用 kubernetes 的入口。
I'm following this documentation: https://github.com/kubernetes/kops/tree/master/addons/kube-ingress-aws-controller .我正在关注此文档: https : //github.com/kubernetes/kops/tree/master/addons/kube-ingress-aws-controller
As you can see, I'm using the kube-ingress-aws-controller with the skipper ingress .如您所见,我将kube-ingress-aws-controller船长 ingress 一起使用

For the kube-ingress-aws-controller I have the following script:对于kube-ingress-aws-controller,我有以下脚本:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kube-ingress-aws-controller
  namespace: kube-system
  labels:
    application: kube-ingress-aws-controller
    component: ingress
spec:
  replicas: 1
  selector:
    matchLabels:
      application: kube-ingress-aws-controller
      component: ingress
  template:
    metadata:
      labels:
        application: kube-ingress-aws-controller
        component: ingress
    spec:
      serviceAccountName: kube-ingress-aws
      containers:
      - name: controller
        image: registry.opensource.zalan.do/teapot/kube-ingress-aws-controller:latest
        env:
        - name: AWS_REGION
          value: eu-central-1

For the skipper ingress , the script is this one:对于船长 ingress ,脚本是这样的:

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: skipper-ingress
  namespace: kube-system
  labels:
    component: ingress
spec:
  selector:
    matchLabels:
      component: ingress
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      name: skipper-ingress
      labels:
        component: ingress
        application: skipper
    spec:
      hostNetwork: true
      serviceAccountName: skipper-ingress
      containers:
      - name: skipper-ingress
        image: registry.opensource.zalan.do/pathfinder/skipper:latest
        ports:
        - name: ingress-port
          containerPort: 9999
          hostPort: 9999
        - name: metrics-port
          containerPort: 9911
        args:
          - "skipper"
          - "-kubernetes"
          - "-kubernetes-in-cluster"
          - "-address=:9999"
          - "-proxy-preserve-host"
          - "-serve-host-metrics"
          - "-enable-ratelimits"
          - "-experimental-upgrade"
          - "-metrics-exp-decay-sample"
          - "-lb-healthcheck-interval=3s"
          - "-metrics-flavour=codahale,prometheus"
          - "-enable-connection-metrics"
        resources:
          requests:
            cpu: 200m
            memory: 200Mi
        readinessProbe:
          httpGet:
            path: /kube-system/healthz
            port: 9999
          initialDelaySeconds: 5
          timeoutSeconds: 5

After that I applied a few more scripts to have a functional prove of concept and everything is working.之后,我又应用了一些脚本来对概念进行功能验证,并且一切正常。

QUESTION

what's the point of having both ingresses?有两个入口有什么意义? What's doing the skipper one?一号船长在做什么?

Shouldn't the kube-ingress-aws-controller be enough? kube-ingress-aws-controller 不应该足够吗?

Ordinary AWS loadbalancers enable TLS termination, automated certificate rotation, possible WAF, and Security Groups but the HTTP routing capabilities are very limited.普通 AWS 负载均衡器支持 TLS 终止、自动证书轮换、可能的 WAF 和安全组,但 HTTP 路由功能非常有限。

Skipper's main advantages compared to other HTTP routers are:与其他 HTTP 路由器相比,Skipper 的主要优点是:

  • matching and changing HTTP匹配和更改 HTTP
  • by default with kube-ingress-aws-controller, just work as you would expect.默认情况下使用 kube-ingress-aws-controller,就像您期望的那样工作。

HAproxy and Nginx are well understood and good TCP/HTTP proxies, that were built before Kubernetes. HAproxy 和 Nginx 是很好理解的很好的 TCP/HTTP 代理,它们是在 Kubernetes 之前构建的。 But they have drawbacks like:但它们有以下缺点:

  • reliance on static configuration files which comes from a time when routes and their configurations were依赖静态配置文件,该文件来自路由及其配置的时代
  • relatively static the list of annotations to implement even basic features are already quite a big list for users相对静态,实现基本功能的注释列表对于用户来说已经是一个相当大的列表

Skipper was built to:船长旨在:

  • support dynamically changing route configurations, which happens quite often in Kubernetes支持动态更改路由配置,这在 Kubernetes 中经常发生
  • gives ability to easily implement automated canary deployments, automated blue-green deployments or shadow traffic能够轻松实现自动化金丝雀部署、自动化蓝绿部署或影子流量

However there are some features that have better support in aws-alb-ingress-controller, HAproxy and nginx.但是,有些功能在 aws-alb-ingress-controller、HAproxy 和 nginx 中得到了更好的支持。 For instance the sendfile() operation.例如 sendfile() 操作。 If you need to stream a large file or large amount of files, then you may want to go for one of these options.如果您需要流式传输一个大文件或大量文件,那么您可能需要选择这些选项之一。

Aws-alb-ingress-controller directly routes traffic to your Kubernetes services, which is both good and bad, because it can reduce latency, but comes with the risk of depending on kube-proxy routing. Aws-alb-ingress-controller 将流量直接路由到您的 Kubernetes 服务,这有好处也有坏处,因为它可以减少延迟,但存在依赖 kube-proxy 路由的风险。 kube-proxy routing can take up to 30 seconds, ETCD ttl, for finding pods from dead nodes. kube-proxy 路由最多需要 30 秒,ETCD ttl,用于从死节点中查找 pod。 Skipper enables: passively observe errors from endpoints and are able to drop these from the loadbalancer members. Skipper 启用:被动观察端点的错误,并能够从负载均衡器成员中删除这些错误。 actively checked member pool, which will enable endpoints if these are healthy again from skipper point of view.主动检查成员池,如果从船长的角度来看它们再次健康,这将启用端点。

Additionally the aws-alb-ingress-controller does not support features like ALB sharing, or Server Name Indication which can reduce costs.此外,aws-alb-ingress-controller 不支持可降低成本的 ALB 共享或服务器名称指示等功能。 Features like path rewriting are also not currently supported.目前也不支持路径重写等功能。

Traefik has a good community and support for Kubernetes. Traefik拥有良好的社区和对 Kubernetes 的支持。 Skipper originates from Project Mosaic which was started in 2015. Back then Traefik was not yet a mature project and still had time to go before the v1.0.0 release. Skipper 起源于 2015 年启动的 Project Mosaic。 当时 Traefik 还不是一个成熟的项目,距离 v1.0.0 发布还有时间。 Traefik also does not currently support our Opentracing provider. Traefik 目前也不支持我们的 Opentracing 提供商。 It also did not support traffic splitting when we started stackset-controller for automated traffic switching.当我们启动 stackset-controller 进行自动流量切换时,它也不支持流量拆分。 We have also recently done significant work on running Skipper as API gateway within Kubernetes, which could potentially help many teams that run a many small services on Kubernetes.我们最近还在将 Skipper 作为 Kubernetes 中的 API 网关运行方面做了大量工作,这可能会帮助许多在 Kubernetes 上运行许多小型服务的团队。 Skipper predicates and filters are a powerful abstraction which can enhance the system easily. Skipper 谓词和过滤器是一种强大的抽象,可以轻松增强系统。

So as you can see kube-ingress-aws-controller with the skipper ingress has much more advantages and possibilities comparing to other similar solutions.因此,如您所见,与其他类似解决方案相比,带有船长入口的kube-ingress-aws-controller具有更多的优势和可能性。

More information you can find here: skipper-ingress-controller .您可以在此处找到更多信息: skipper-ingress-controller

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM