apolloconfig / apolloconfig/apollo
k8s集群环境多副本pod无法登陆
- 主要言語
- Java
- スター
- 29.8k
- フォーク
- 10.2k
- 平均マージ
- 4日 7時間
- マージ済み PR(30日)
- 4
説明
**版本信息**
k8s version: 1.14.1
apollo version:1.7.1
traefik version: 1.7
helm chart version: 0.1.1
**问题描述**
参考这里:https://github.com/ctripcorp/apollo/wiki/%E5%88%86%E5%B8%83%E5%BC%8F%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97#241-%E5%9F%BA%E4%BA%8Ekubernetes%E5%8E%9F%E7%94%9F%E6%9C%8D%E5%8A%A1%E5%8F%91%E7%8E%B0
部署了apollo后,并集成了ldap(windows ad),apollo-portal如果配置多pod副本,系统无法登陆,
修改为单副本的pod,就可以正常登陆。
看官方配置只有nginx ingress controller的例子,我们实际生成环境用的traefik ingress controller,我依照官方例子修改如下信息以后还是无法登陆;实际测试中通过chrome debug可以看出其实已经登陆成功,只是没有跳转到后台,不知道哪里的问题,还请帮忙解惑。
helm chart参考这里:https://github.com/ctripcorp/apollo/tree/master/docs/charts
ingress配置如下:
```
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
field.cattle.io/ingressState: '{"YXBvbGxvLXBvcnRhbC9tYWxsL2FpYmVlLmNuLy8vODA3MA==":""}'
traefik.ingress.kubernetes.io/affinity: "true"
traefik.ingress.kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/load-balancer-method: drr
traefik.ingress.kubernetes.io/max-conn-amount: "10"
traefik.ingress.kubernetes.io/session-cookie-name: JSESSIONID
creationTimestamp: "2020-12-22T07:02:24Z"
generation: 3
labels:
app.kubernetes.io/version: 1.7.1
name: apollo-portal
namespace: mall
resourceVersion: "336484675"
selfLink: /apis/extensions/v1beta1/namespaces/mall/ingresses/apollo-portal
uid: a48ff897-4423-11eb-b624-ac1f6b6ca72e
spec:
rules:
- host: conf.test.cn
http:
paths:
- backend:
serviceName: apollo-portal
servicePort: 8070
path: /
status:
loadBalancer: {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""
```
service配置如下:
```
apiVersion: v1
kind: Service
metadata:
annotations:
field.cattle.io/ipAddresses: "null"
field.cattle.io/targetDnsRecordIds: "null"
field.cattle.io/targetWorkloadIds: "null"
creationTimestamp: "2020-12-22T07:02:23Z"
labels:
app.kubernetes.io/version: 1.7.1
name: apollo-portal
namespace: mall
resourceVersion: "336490784"
selfLink: /api/v1/namespaces/mall/services/apollo-portal
uid: a47e04ef-4423-11eb-a028-ac1f6b6cd636
spec:
clusterIP: 10.68.65.74
ports:
- name: http
port: 8070
protocol: TCP
targetPort: 8070
selector:
app: apollo-portal
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
type: ClusterIP
status:
loadBalancer: {}
```
pod信息:
```
➜ kubectl get pod
NAME READY STATUS RESTARTS AGE
apollo-adminservice-86f68f989b-hpv4j 1/1 Running 0 3h54m
apollo-adminservice-86f68f989b-rv9bd 1/1 Running 0 3h54m
apollo-configservice-7467fb54f8-bs7dx 1/1 Running 0 3h54m
apollo-configservice-7467fb54f8-zbpxm 1/1 Running 0 3h54m
apollo-portal-57ddbf686f-p4vcm 1/1 Running 0 32m
apollo-portal-57ddbf686f-trb8z 1/1 Running 0 4m14s
➜ kubectl get ing
NAME HOSTS ADDRESS PORTS AGE
apollo-portal conf.test.cn 80 178m
➜ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
apollo-adminservice ClusterIP 10.68.6.254 8090/TCP 4h1m
apollo-configdb ClusterIP 10.68.95.70 3306/TCP 4h1m
apollo-configservice ClusterIP 10.68.53.26 8080/TCP 4h1m
apollo-portal ClusterIP 10.68.65.74 8070/TCP 178m
apollo-portaldb ClusterIP 10.68.108.159 3306/TCP 178m
```
コントリビューションガイド
評価
この issue はまだ評価されていません。