我有同样的问题,可以用insecureSkipVerify
标志解决它。
traefik 的问题在于,NiFi 从 traefik 获取请求并将其自签名证书发送回 traefik 进行握手。Traefik 不接受它,因此握手失败,导致bad_certificate
NiFi 出现异常(具有 loglevel DEBUG
,因此您必须更改logback.xml
文件)。
因此,一种解决方案可能是将您的自签名证书添加到 traefik,目前这是不可能的,请参阅这个(当前)未解决的问题。
nginx
另一个解决方案是在 traefik 和 NiFi 之间添加一个,而不是“不安全”您现有的 traefik 。所以 traefikHTTP
与 nginx 交谈,后者HTTPS
与 NiFi 交谈(这将是我正在尝试的下一件事)。
或者你可以insecureSkipVerify
像我在这个中所做的那样在 traefik 中设置标志daemonset.yaml
:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
creationTimestamp: 2018-06-21T16:18:46Z
generation: 4
labels:
k8s-app: traefik-internal
release: infrastructure
name: traefik-internal
namespace: infrastructure
resourceVersion: "18860064"
selfLink: /apis/extensions/v1beta1/namespaces/infrastructure/daemonsets/traefik-internal
uid: c64a20e1-776e-11f8-be83-42010a9c0ff6
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: traefik-internal
name: traefik-internal
release: infrastructure
template:
metadata:
creationTimestamp: null
labels:
k8s-app: traefik-internal
name: traefik-internal
release: infrastructure
spec:
containers:
- args:
- --api
- --ping
- --defaultEntryPoints=http,https
- --logLevel=INFO
- --accessLog
- --kubernetes
- --kubernetes.ingressClass=traefik-internal
- --metrics.prometheus=true
- --entryPoints=Name:https Address::443 TLS:/certs/cert.pem,/certs/cert.key
CA:/certs/clientca.pem
- --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
- --insecureSkipVerify=true
image: traefik:1.6.0-rc6-alpine
imagePullPolicy: IfNotPresent
name: traefik-internal
resources: {}
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /certs
name: traefik-internal-certs
readOnly: true
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: sa-traefik
serviceAccountName: sa-traefik
terminationGracePeriodSeconds: 60
volumes:
- name: traefik-internal-certs
secret:
defaultMode: 420
secretName: traefik-internal
templateGeneration: 4
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
status:
currentNumberScheduled: 3
desiredNumberScheduled: 3
numberAvailable: 3
numberMisscheduled: 0
numberReady: 3
observedGeneration: 4
updatedNumberScheduled: 3
insecureSkipVerify
标志在 内更改spec.containers.args
。
希望有帮助!