我在kubernetes集群中部署了一项基本服务。我使用此Ingress处理路由:
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: owncloud
spec:
rules:
- host: example.com
http:
paths:
- backend:
serviceName: owncloud
servicePort: 80
我使用生成的密钥和证书在默认名称空间中生成了kubernetes机密。我将其命名为example-tls
并将其添加到spec下的Ingress配置中:
tls:
- secretName: example-tls
hosts:
- example.com
当我使用https(curl -k https://example.com
)获取服务时,它超时:
curl: (7) Failed to connect to example.com port 443: Connection timed out
它可以使用http。
这可能是什么问题?
以下是相关describe
的{{1}}输出:
ingress
我的Ingress Controller服务:
Name: owncloud
Namespace: default
Address:
Default backend: default-http-backend:80 (<none>)
Rules:
Host Path Backends
---- ---- --------
example.com
owncloud:80 (10.40.0.4:80)
Annotations:
kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{},"name":"owncloud","namespace":"default"},"spec":{"rules":[{"host":"example.com","http":{"paths":[{"backend":{"serviceName":"owncloud","servicePort":80}}]}}]}}
Events: <none>