- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 kubernetes 集群上设置 letencrypt cert-issuer。我的地形看起来像这样:
resource "helm_release" "cert_manager" {
keyring = ""
name = "cert-manager"
chart = "stable/cert-manager"
namespace = "kube-system"
depends_on = ["helm_release.ingress"]
set {
name = "webhook.enabled"
value = "false"
}
provisioner "local-exec" {
command = "kubectl --server=${aws_eks_cluster.demo.endpoint} --insecure-skip-tls-verify=true --token=${data.aws_eks_cluster_auth.demo.token} apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml"
}
provisioner "local-exec" {
command = "kubectl --server=${aws_eks_cluster.demo.endpoint} --insecure-skip-tls-verify=true --token=${data.aws_eks_cluster_auth.demo.token} label namespace kube-system certmanager.k8s.io/disable-validation=\"true\" --overwrite"
}
provisioner "local-exec" {
command = <<EOT
cat <<EOF | kubectl --server=${aws_eks_cluster.demo.endpoint} --insecure-skip-tls-verify=true --token=${data.aws_eks_cluster_auth.demo.token} create -f -
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: mymail@gmail.com
privateKeySecretRef:
name: letsencrypt
http01: {}
EOF
EOT
}
}
http://<cluster-address>/apple
它响应
apple
.所以我尝试为它创建入口:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
certmanager.k8s.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: nginx
labels:
app: apple
heritage: Tiller
release: apple
spec:
rules:
- http:
paths:
- path: /apple
backend:
serviceName: apple-service
servicePort: 5678
tls:
- hosts:
- my.domain.alias.to.cluster.address.io
secretName: my.domain.alias.to.cluster.address.io
https://my.domain.alias.to.cluster.address.io/apple
时我的浏览器警告我,我可以看到证书是 Kubernetes Ingress Controller Fake Certificate。
I0220 16:34:49.071883 1 sync.go:180] Certificate "my.domain.alias.to.cluster.address.io" for ingress "example-ingress" is up to date
I0220 16:34:49.072121 1 controller.go:179] ingress-shim controller: Finished processing work item "default/example-ingress"
I0220 16:34:49.071454 1 controller.go:145] certificates controller: syncing item 'default/my.domain.alias.to.cluster.address.io'
I0220 16:34:49.073892 1 helpers.go:183] Setting lastTransitionTime for Certificate "my.domain.alias.to.cluster.address.io" condition "Ready" to 2019-02-20 16:34:49.073885527 +0000 UTC m=+889.175312552
I0220 16:34:49.074450 1 sync.go:263] Certificate default/my.domain.alias.to.cluster.address.io scheduled for renewal in 1438h47m42.92555861s
I0220 16:34:49.081224 1 controller.go:151] certificates controller: Finished processing work item "default/my.domain.alias.to.cluster.address.io"
I0220 16:34:49.081479 1 controller.go:173] ingress-shim controller: syncing item 'default/example-ingress'
I0220 16:34:49.081567 1 sync.go:177] Certificate "my.domain.alias.to.cluster.address.io" for ingress "example-ingress" already exists
I0220 16:34:49.081631 1 sync.go:180] Certificate "my.domain.alias.to.cluster.address.io" for ingress "example-ingress" is up to date
I0220 16:34:49.081672 1 controller.go:179] ingress-shim controller: Finished processing work item "default/example-ingress"
I0220 16:34:49.081743 1 controller.go:145] certificates controller: syncing item 'default/my.domain.alias.to.cluster.address.io'
I0220 16:34:49.082384 1 sync.go:263] Certificate default/my.domain.alias.to.cluster.address.io scheduled for renewal in 1438h47m42.917624001s
I0220 16:34:49.087552 1 controller.go:151] certificates controller: Finished processing work item "default/my.domain.alias.to.cluster.address.io"
I0220 16:35:04.571789 1 controller.go:173] ingress-shim controller: syncing item 'default/example-ingress'
kubectl describe certificate my.domain.alias.to.cluster.address.io
返回:
Name: my.domain.alias.to.cluster.address.io
Namespace: default
Labels: <none>
Annotations: <none>
API Version: certmanager.k8s.io/v1alpha1
Kind: Certificate
Metadata:
Creation Timestamp: 2019-02-20T16:34:49Z
Generation: 1
Owner References:
API Version: extensions/v1beta1
Block Owner Deletion: true
Controller: true
Kind: Ingress
Name: example-ingress
UID: 709a55df-352d-11e9-bf9d-06ede39599be
Resource Version: 278211
Self Link: /apis/certmanager.k8s.io/v1alpha1/namespaces/default/certificates/my.domain.alias.to.cluster.address.io
UID: 709bf1bd-352d-11e9-b941-026486635030
Spec:
Acme:
Config:
Domains:
my.domain.alias.to.cluster.address.io
Http 01:
Ingress:
Ingress Class: nginx
Dns Names:
my.domain.alias.to.cluster.address.io
Issuer Ref:
Kind: ClusterIssuer
Name: letsencrypt
Secret Name: my.domain.alias.to.cluster.address.io
Status:
Conditions:
Last Transition Time: 2019-02-20T16:34:49Z
Message: Certificate is up to date and has not expired
Reason: Ready
Status: True
Type: Ready
Not After: 2019-05-21T15:22:32Z
Events: <none>
I0220 16:22:34.428736 8 store.go:446] secret default/my.domain.alias.to.cluster.address.io was updated and it is used in ingress annotations. Parsing...
I0220 16:22:34.429898 8 backend_ssl.go:68] Adding Secret "default/my.domain.alias.to.cluster.address.io" to the local store
I0220 16:22:35.410950 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:22:35.522502 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:22:35 +0000]TCP200000.000
I0220 16:27:39.225810 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:27:39.226685 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"f2f0c9bd-345d-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"277488", FieldPath:""}): type: 'Normal' reason: 'DELETE' Ingress default/example-ingress
I0220 16:27:39.336879 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:27:39 +0000]TCP200000.001
I0220 16:27:53.090686 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"78ab0815-352c-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"277520", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress default/example-ingress
I0220 16:27:53.091216 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:27:53.212854 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:27:53 +0000]TCP200000.000
I0220 16:28:04.566342 8 status.go:388] updating Ingress default/example-ingress status from [] to [{34.245.112.11 }]
I0220 16:28:04.576525 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"78ab0815-352c-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"277542", FieldPath:""}): type: 'Normal' reason: 'UPDATE' Ingress default/example-ingress
I0220 16:28:05.676217 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"78ab0815-352c-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"277546", FieldPath:""}): type: 'Normal' reason: 'DELETE' Ingress default/example-ingress
I0220 16:28:07.909830 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:28:08.019070 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:28:08 +0000]TCP200000.000
I0220 16:28:22.557334 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:28:22.557490 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"cm-acme-http-solver-dmnqh", UID:"7f8f4be4-3461-11e9-b941-026486635030", APIVersion:"extensions/v1beta1", ResourceVersion:"277576", FieldPath:""}): type: 'Normal' reason: 'DELETE' Ingress default/cm-acme-http-solver-dmnqh
I0220 16:28:22.662971 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:28:22 +0000]TCP200000.000
I0220 16:34:49.057385 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"709a55df-352d-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"278207", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress default/example-ingress
I0220 16:34:49.057688 8 controller.go:172] Configuration changes detected, backend reload required.
I0220 16:34:49.175039 8 controller.go:190] Backend successfully reloaded.
[20/Feb/2019:16:34:49 +0000]TCP200000.000
I0220 16:35:04.565324 8 status.go:388] updating Ingress default/example-ingress status from [] to [{34.245.112.11 }]
I0220 16:35:04.572954 8 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"example-ingress", UID:"709a55df-352d-11e9-bf9d-06ede39599be", APIVersion:"extensions/v1beta1", ResourceVersion:"278236", FieldPath:""}): type: 'Normal' reason: 'UPDATE' Ingress default/example-ingress
10.0.1.114 - [10.0.1.114] - - [20/Feb/2019:18:38:33 +0000] "\x05\x01\x00" 400 157 "-" "-" 0 0.751 [] - - - - e0aec2a9e3e71e136a1c62939e341b49
10.0.1.114 - [10.0.1.114] - - [20/Feb/2019:18:39:50 +0000] "\x04\x01\x00P\x05\xBC\xD2\x0C\x00" 400 157 "-" "-" 0 0.579 [] - - - - 7f825a3ef2f94e200b14fe3691e4fdde
10.0.1.114 - [10.0.1.114] - - [20/Feb/2019:18:41:30 +0000] "GET http://5.188.210.12/echo.php HTTP/1.1" 400 657 "https://www.google.com/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" 359 0.000 [] - - - - 1167890a763ddc360051046c84a47d21
10.0.1.114 - [10.0.1.114] - - [20/Feb/2019:19:46:35 +0000] "GET /apple HTTP/1.1" 308 171 "-" "Mozilla/5.0 (Linux; Android 8.0.0; ONEPLUS A3003) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.105 Mobile Safari/537.36" 555 0.000 [default-apple-service-5678] - - - - b1f1bb0da3e465c3a54e963663dffb61
10.0.1.114 - [10.0.1.114] - - [20/Feb/2019:20:38:39 +0000] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 157 "-" "-" 0 0.065 [] - - - - cd420e70b3f78bee069f8bac97918e36
最佳答案
基本上,letsencrypt 不会为您颁发证书,因此它默认为假证书。您需要确保 my.domain.alias.to.cluster.address.io
可公开解析,例如通过 DNS 服务器,例如 8.8.8.8
然后它需要解析为可公开访问的 IP 地址。您可以通过查看 certmanager pod 日志来调试正在发生的事情。
$ kubectl logs <certmanagerpod>
$ kubectl get certificates
$ kubectl describe <certificate-name>
https://acme-v02.api.letsencrypt.org/directory
的限速这是他们的生产环境。你也可以试试:
https://acme-staging-v02.api.letsencrypt.org/directory
这是他们的登台环境。
关于kubernetes - 如何使用 Terraform 在 AWS EKS 上为 kubernetes 设置 letencrypt 证书颁发者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54791480/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 6 年前。 Improv
我们最近构建了一个 Web 生成器应用程序(所见即所得、预先设计的模板、购物车等)。我们一直在寻找 SSL 证书的几个不同选项,甚至是通配符,以寻求解决方案。问题是我们不想每次有客户想要将 SSL 添
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 6 年前。 Improve
我想这是不可能的,但如果是这样,我想知道为什么。 假设我从附近的官方证书颁发机构之一获得了 example.com 的 SSL 证书。假设我正在运行 a.example.com 和 b.c.d.exa
在我的 java 应用程序中,我有一个带有自签名证书/ key 的 JKS keystore 。我需要加载它们并将它们转换为 BouncyCaSTLe 类型。 我正在使用 java.security.
我不是这方面的专家,但我只是遵循 Android 开发者网站上列出的代码 keytool -genkey -v -keystore orbii.jks-keyalg RSA -keysize 2048
我正在为我的一个应用程序实现推送通知系统,所以我正在关注 this教程并为此生成 SSL 证书。 我的这个应用程序还涉及应用程序和服务器之间的一些数据交换,我希望它受到 SSL 保护,我想知道从 ve
可能这是重复的问题,但我没有从上一个问题中完全清楚,这就是我发布新问题的原因。请看看这个。我会将 Ca 证书放在我的资源文件夹中以验证 ca 认证的证书,服务器中也会有相同的 ca 证书。 我正在创建
首先,我想指出这在 Internet Exporer 11 上运行良好。但出于某种原因,我无法让 FireFox 正常运行! 所以我已经添加了我自己的 rootCA 安全证书,在 Internet E
我有域“www.example.com”的 SSL 证书,我已将此证书安装在运行良好的端口 80 上的 tomcat 服务器中。现在我的要求是在 https 中运行 php 代码,因为我的 Apach
我正在构建一个 oauth 1.0a 服务,它将被 Jira 中的一个小工具使用,它是一个用 C# 编写的 .Net 3.5 应用程序。 Jira 使用 RSA-SHA1 签名方法向此服务发出请求,这
假设用户打开 https://ssl-site.example/link/index.php我用 ProxyPass 配置了我的服务器和 ProxyPassReverse在 Apache 配置中(在
我有一个 tcp 服务器,它使用证书进行 ssl/tls 和许可。对于 ssl/tls,证书存储在 pkcs#12 文件中,我认为该文件将作为安装过程的一部分进行安装。 关于 Rhino 许可,作为安
我开始想第一次在 jmeter 中记录。 我的步骤是: 我在 mac 上安装了 jmeter:brew install jmeter 我创建了新的录音模板 我点击开始按钮。它显示如下图所示的弹出窗口。
通常,我的困惑似乎正在从我在WCF上下文中理解安全性的尝试中消除。在WCF中,似乎可以将证书用于身份验证和加密。基本上,我试图理解: 如何将X509证书用作身份验证令牌? ssl证书通常不公开吗?这是
我正在尝试使用 openssl 库让客户端通过 https 连接到某些服务器。 调用堆栈是这样的: SSL_library_init(); SSL_load_error_strings(); SSL_
我正在阅读 this article其中解释了 iOS/OSX 中的代码签名。 我知道从KeyChain Access utility 我可以看到我的证书,如果展开我的开发者证书,我可以看到有一个私钥
我有一个既在互联网上又在私有(private)网络上的服务器。 我正尝试按照我的经理的要求在内部专用网络上设置 TLS。 该服务可供 Internet 和私有(private)内部网络客户端使用。 外
我在具有不同域扩展名的单个网络服务器中设置了我的站点,例如 https://mybusiness.com https://mybusiness.com.au https://mybusiness.co
我正在开发一个移动应用程序。我是网络开发的新手。 我在 GoDaddy 上有 DNS(比如 app.test.com)并且有一个只有 IP 地址的服务器(比如 31.254.42.73)。我的请求从
我是一名优秀的程序员,十分优秀!