我们的 EKS(AWS 中的弹性 Kubernetes 服务)中部署了 Spring Cloud 数据流服务。
该服务或多或少是使用带有默认配置的helm chart部署的,我们唯一真正配置的是 Spring Cloud Data Flow 外部数据库。
现在,尝试进入 UI 时发生了一件非常奇怪的事情:
- 输入 https://<scdf 的 URL>/dashboard
- 等待可能超过一分钟?
- 浏览器加载 UI 失败,url 更改为 http://<url of scdf>: 8000 /dashboard/index.html
- 然后从地址栏中删除 :8000 并重试,它可以工作!
我们不知道端口 8000 来自哪里?
此外,当您转到根路径 https://<url of scdf> 时,您会看到服务的不同端点,它们都显示 8000 端口 - 同样,我们没有在哪里配置此端口...
我们还有许多其他通过 k8s 公开的服务(注册为入口服务),它们都按预期工作
更新添加 Helm 图表
compname:
chartName: compname/spring-cloud-dataflow
chartPath: path
deploymentName: spring-cloud-dataflow
namespace: default
productLine: productline
# Original chart values: https://github.com/bitnami/charts/blob/master/bitnami/spring-cloud-dataflow/values.yaml
vault:
enabled: true
global:
imageRegistry: ""
imagePullSecrets: []
storageClass: ""
nameOverride: ""
fullnameOverride: ""
commonLabels: {}
kubeVersion: ""
clusterDomain: cluster.local
extraDeploy: []
server:
image:
registry: registery
repository: infra
tag: bitnami-docker-spring-cloud-dataflow-2.9.1-debian-10-r27
pullPolicy: IfNotPresent
pullSecrets: []
debug: false
hostAliases: []
composedTaskRunner:
image:
registry: registry
repository: infra
tag: bitnami-docker-spring-cloud-dataflow-composed-task-runner-2.9.1-debian-10.r27
configuration:
streamingEnabled: false
batchEnabled: true
accountName: default
trustK8sCerts: false
containerRegistries: {}
grafanaInfo: ""
metricsDashboard: ""
defaultSpringApplicationJSON: true
existingConfigmap: ""
extraEnvVars: []
extraEnvVarsCM: ""
extraEnvVarsSecret: ""
replicaCount: 1
strategyType: RollingUpdate
podAffinityPreset: ""
podAntiAffinityPreset: soft
containerPort: 8080
nodeAffinityPreset:
type: ""
key: ""
values: []
affinity: {}
nodeSelector: {}
tolerations: []
podAnnotations: {}
priorityClassName: ""
podSecurityContext:
fsGroup: 1001
containerSecurityContext:
runAsUser: 1001
resources:
limits: {}
requests: {}
livenessProbe:
enabled: true
initialDelaySeconds: 120
timeoutSeconds: 1
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 120
timeoutSeconds: 1
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
customLivenessProbe: {}
customReadinessProbe: {}
service:
type: ClusterIP
port: 8080
nodePort: ""
clusterIP: ""
externalTrafficPolicy: Cluster
loadBalancerIP: ""
loadBalancerSourceRanges: []
annotations: {}
ingress:
enabled: true
path: /
pathType: ImplementationSpecific
hostname: hostname
annotations: {}
tls: false
extraHosts: []
extraTls: []
secrets: []
initContainers: []
sidecars: []
pdb:
create: false
minAvailable: 1
maxUnavailable: ""
autoscaling:
enabled: false
minReplicas: ""
maxReplicas: ""
targetCPU: ""
targetMemory: ""
extraVolumes: []
extraVolumeMounts: []
jdwp:
enabled: false
port: 5005
proxy: {}
skipper:
enabled: false
hostAliases: []
image:
registry: registry
repository: infra
tag: bitnami-docker-spring-cloud-skipper-2.8.1-debian-10-r26
pullPolicy: IfNotPresent
pullSecrets: []
debug: false
configuration:
accountName: default
trustK8sCerts: false
existingConfigmap: ""
extraEnvVars: []
extraEnvVarsCM: ""
extraEnvVarsSecret: ""
replicaCount: 1
strategyType: RollingUpdate
podAffinityPreset: ""
podAntiAffinityPreset: soft
nodeAffinityPreset:
type: ""
key: ""
values: []
affinity: {}
nodeSelector: {}
tolerations: []
podAnnotations: {}
priorityClassName: ""
podSecurityContext:
fsGroup: 1001
containerSecurityContext:
runAsUser: 1001
resources:
limits: {}
requests: {}
livenessProbe:
enabled: true
initialDelaySeconds: 120
timeoutSeconds: 1
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 120
timeoutSeconds: 1
periodSeconds: 20
failureThreshold: 6
successThreshold: 1
customLivenessProbe: {}
customReadinessProbe: {}
service:
type: ClusterIP
port: 80
nodePort: ""
clusterIP: ""
externalTrafficPolicy: Cluster
loadBalancerIP: ""
loadBalancerSourceRanges: []
annotations: {}
initContainers: []
sidecars: []
pdb:
create: false
minAvailable: 1
maxUnavailable: ""
autoscaling:
enabled: false
minReplicas: ""
maxReplicas: ""
targetCPU: ""
targetMemory: ""
extraVolumes: []
extraVolumeMounts: []
jdwp:
enabled: false
port: 5005
externalSkipper:
host: localhost
port: 7577
deployer:
metadata:
annotations: {}
resources:
limits:
cpu: 500m
memory: 1024Mi
requests: {}
readinessProbe:
initialDelaySeconds: 120
livenessProbe:
initialDelaySeconds: 90
nodeSelector: ""
tolerations: {}
volumeMounts: {}
volumes: {}
environmentVariables: ""
podSecurityContext:
runAsUser: 1001
serviceAccount:
create: true
name: ""
rbac:
create: true
metrics:
enabled: true
image:
registry: registry
repository: infra
tag: bitnami-docker-prometheus-rsocket-proxy-1.3.0-debian-10-r334
pullPolicy: IfNotPresent
pullSecrets: []
resources:
limits: {}
requests: {}
replicaCount: 1
podAffinityPreset: ""
podAntiAffinityPreset: soft
nodeAffinityPreset:
type: ""
key: ""
values: []
affinity: {}
nodeSelector: {}
tolerations: []
podAnnotations: {}
priorityClassName: ""
service:
httpPort: 8080
rsocketPort: 7001
serviceMonitor:
enabled: true
extraLabels: {}
namespace: ""
interval: ""
scrapeTimeout: ""
pdb:
create: false
minAvailable: 1
maxUnavailable: ""
autoscaling:
enabled: false
minReplicas: ""
maxReplicas: ""
targetCPU: ""
targetMemory: ""
waitForBackends:
enabled: true
image:
registry: registry
repository: infra
tag: bitnami-docker-kubectl-1.19.16-debian-10-r27
pullPolicy: IfNotPresent
pullSecrets: []
resources:
limits: {}
requests: {}
mariadb:
enabled: false
architecture: standalone
auth:
rootPassword: ""
username: dataflow
password: change-me
database: dataflow
forcePassword: false
usePasswordFiles: false
initdbScripts:
create_databases.sql: |
CREATE OR REPLACE USER 'skipper'@'%' identified by 'change-me';
CREATE DATABASE IF NOT EXISTS `skipper`;
GRANT ALL ON skipper.* to 'skipper'@'%';
FLUSH PRIVILEGES;
flyway:
enabled: true
externalDatabase:
host: host
port: 3306
driver: ""
scheme: "mysql"
password: "vault:kubernetes/productline/data/scdf#SCDF_DB_PASSWORD"
existingPasswordSecret: "True"
existingPasswordKey: "password"
dataflow:
url: ""
database: dataflow
username: "vault:kubernetes/productline/data/scdf#SCDF_DB_USER"
skipper:
url: ""
database: skipper
username: skipper
hibernateDialect: ""
rabbitmq:
enabled: false
auth:
username: user
externalRabbitmq:
enabled: false
host: localhost
port: 5672
username: guest
password: guest
vhost: ""
existingPasswordSecret: ""
kafka:
enabled: false
replicaCount: 1
offsetsTopicReplicationFactor: 1
zookeeper:
replicaCount: 1
externalKafka:
enabled: false
brokers: localhost:9092
zkNodes: localhost:2181