generated from OpenDocCN/doc-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0059.yaml
127 lines (127 loc) · 8.41 KB
/
0059.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
- en: How To Install Traefik Ingress Controller In Kubernetes
id: totrans-0
prefs:
- PREF_H1
type: TYPE_NORMAL
zh: 如何在 Kubernetes 中安装 Traefik Ingress Controller
- en: 原文:[https://towardsdatascience.com/how-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942?source=collection_archive---------18-----------------------#2023-01-04](https://towardsdatascience.com/how-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942?source=collection_archive---------18-----------------------#2023-01-04)
id: totrans-1
prefs:
- PREF_BQ
type: TYPE_NORMAL
zh: 原文:[https://towardsdatascience.com/how-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942?source=collection_archive---------18-----------------------#2023-01-04](https://towardsdatascience.com/how-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942?source=collection_archive---------18-----------------------#2023-01-04)
- en: Provide load balancing, name-based virtual hosting, and SSL-termination
id: totrans-2
prefs:
- PREF_H2
type: TYPE_NORMAL
zh: 提供负载均衡、基于名称的虚拟主机和 SSL 终止
- en: '[](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)[![Paul
Knulst](../Images/9fcb767d927a1fe53ee739c584fdf92c.png)](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)[](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)[![Towards
Data Science](../Images/a6ff2676ffcc0c7aad8aaf1d79379785.png)](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)
[Paul Knulst](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)'
id: totrans-3
prefs: []
type: TYPE_NORMAL
zh: '[](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)[![Paul
Knulst](../Images/9fcb767d927a1fe53ee739c584fdf92c.png)](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)[](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)[![Towards
Data Science](../Images/a6ff2676ffcc0c7aad8aaf1d79379785.png)](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)
[Paul Knulst](https://medium.knulst.de/?source=post_page-----fa2b9079e942--------------------------------)'
- en: ·
id: totrans-4
prefs: []
type: TYPE_NORMAL
zh: ·
- en: '[Follow](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fsubscribe%2Fuser%2F1282c85b5cbc&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&user=Paul+Knulst&userId=1282c85b5cbc&source=post_page-1282c85b5cbc----fa2b9079e942---------------------post_header-----------)
Published in [Towards Data Science](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)
·5 min read·Jan 4, 2023[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Ftowards-data-science%2Ffa2b9079e942&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&user=Paul+Knulst&userId=1282c85b5cbc&source=-----fa2b9079e942---------------------clap_footer-----------)'
id: totrans-5
prefs: []
type: TYPE_NORMAL
zh: '[关注](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fsubscribe%2Fuser%2F1282c85b5cbc&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&user=Paul+Knulst&userId=1282c85b5cbc&source=post_page-1282c85b5cbc----fa2b9079e942---------------------post_header-----------)
发布于 [Towards Data Science](https://towardsdatascience.com/?source=post_page-----fa2b9079e942--------------------------------)
·5 分钟阅读·2023年1月4日[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Ftowards-data-science%2Ffa2b9079e942&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&user=Paul+Knulst&userId=1282c85b5cbc&source=-----fa2b9079e942---------------------clap_footer-----------)'
- en: --
id: totrans-6
prefs: []
type: TYPE_NORMAL
zh: --
- en: '[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Ffa2b9079e942&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&source=-----fa2b9079e942---------------------bookmark_footer-----------)![](../Images/2c753cb3418bb0cc7907fc66fb5f7b5c.png)'
id: totrans-7
prefs: []
type: TYPE_NORMAL
zh: '[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Ffa2b9079e942&operation=register&redirect=https%3A%2F%2Ftowardsdatascience.com%2Fhow-to-install-traefik-ingress-controller-in-kubernetes-fa2b9079e942&source=-----fa2b9079e942---------------------bookmark_footer-----------)![](../Images/2c753cb3418bb0cc7907fc66fb5f7b5c.png)'
- en: Photo by [Growtika Developer Marketing Agency](https://unsplash.com/@growtika?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
/ [Unsplash](https://unsplash.com/s/photos/kubernetes-k8s?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
id: totrans-8
prefs: []
type: TYPE_NORMAL
zh: 图片由 [Growtika Developer Marketing Agency](https://unsplash.com/@growtika?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
/ [Unsplash](https://unsplash.com/s/photos/kubernetes-k8s?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
提供
- en: Introduction
id: totrans-9
prefs:
- PREF_H1
type: TYPE_NORMAL
zh: 介绍
- en: This tutorial will show how to use Traefik as an Ingress Controller in Kubernetes
(or k8s) to provide load balancing, name-based virtual hosting, and SSL termination.
id: totrans-10
prefs: []
type: TYPE_NORMAL
zh: 本教程将展示如何在 Kubernetes(或 k8s)中使用 Traefik 作为 Ingress Controller 以提供负载均衡、基于名称的虚拟主机和
SSL 终止。
- en: To follow this tutorial, you need.
id: totrans-11
prefs: []
type: TYPE_NORMAL
zh: 要跟随本教程,你需要:
- en: A running Kubernetes cluster or a Managed Kubernetes
id: totrans-12
prefs:
- PREF_UL
type: TYPE_NORMAL
zh: 一个正在运行的 Kubernetes 集群或一个托管的 Kubernetes
- en: A Load Balancer that dynamically distributes your traffic to any Kubernetes
resource that is marked as [LoadBalancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/)
id: totrans-13
prefs:
- PREF_UL
type: TYPE_NORMAL
zh: 一个负载均衡器会动态分配你的流量到任何标记为 [LoadBalancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/)
的 Kubernetes 资源。
- en: A PRIMARY_DOMAIN
id: totrans-14
prefs:
- PREF_UL
type: TYPE_NORMAL
zh: 一个 PRIMARY_DOMAIN
- en: 'Note: The domain that I use in this post is `PRIMARY_DOMAIN`, please change
accordingly. If your desired domain is `paulsblog.dev`, replace `PRIMARY_DOMAIN`
with `paulsblog.dev`.'
id: totrans-15
prefs: []
type: TYPE_NORMAL
zh: 注意:我在这篇文章中使用的域名是 `PRIMARY_DOMAIN`,请根据需要更改。如果你希望使用的域名是 `paulsblog.dev`,请将 `PRIMARY_DOMAIN`
替换为 `paulsblog.dev`。
- en: What is an Ingress Controller?
id: totrans-16
prefs:
- PREF_H1
type: TYPE_NORMAL
zh: 什么是 Ingress Controller?
- en: An Ingress Controller is an API object that will manage external access to any
deployed service in a Kubernetes cluster. Typically HTTP or HTTPS is used. Furthermore,
it provides load balancing, name-based virtual hosting, and SSL termination.
id: totrans-17
prefs: []
type: TYPE_NORMAL
zh: Ingress Controller 是一个 API 对象,它会管理对 Kubernetes 集群中任何已部署服务的外部访问。通常使用 HTTP 或 HTTPS。此外,它还提供负载均衡、基于名称的虚拟主机和
SSL 终止。
- en: Why do you need an Ingress Controller?
id: totrans-18
prefs:
- PREF_H1
type: TYPE_NORMAL
zh: 你为什么需要一个 Ingress Controller?