操作系统信息:虚拟机,Centos7.9,8C/8G
采用官方指导的all-in-one安装
Kubernetes版本信息:v1.22.10。单节点
Kubesphere版本信息:3.3
启用了devops
1、修改ClusterConfiguration中ks-installer中的devops下的enabled为true,
2、查看kubectl -n kubesphere-system get cm kubesphere-config -o yaml,将新增的项加入到本地的kubesphere.yaml中
kubernetes:
kubeconfig: "/root/.kube/config"
master: https://192.168.2.130:6443
$qps: 1e+06
burst: 1000000
authentication:
authenticateRateLimiterMaxTries: 10
authenticateRateLimiterDuration: 10m0s
loginHistoryRetentionPeriod: 168h
maximumClockSkew: 10s
multipleLogin: True
kubectlImage: registry.cn-beijing.aliyuncs.com/kubesphereio/kubectl:v1.22.0
jwtSecret: "v5RHyakbEkcvNMfMBQjfXoCVZutLeKJM"
oauthOptions:
clients:
- name: kubesphere
secret: kubesphere
redirectURIs:
- '*'
ldap:
host: openldap.kubesphere-system.svc:389
managerDN: cn=admin,dc=kubesphere,dc=io
managerPassword: admin
userSearchBase: ou=Users,dc=kubesphere,dc=io
groupSearchBase: ou=Groups,dc=kubesphere,dc=io
redis:
# host: redis.kubesphere-system.svc
host: 192.168.2.130
port: 32340
# password: KUBESPHERE_REDIS_PASSWORD
password: szclznfkvGaIBId
db: 0
s3:
endpoint: http://minio.kubesphere-system.svc:9000
region: us-east-1
disableSSL: True
forcePathStyle: True
accessKeyID: openpitrixminioaccesskey
secretAccessKey: openpitrixminiosecretkey
bucket: s2i-binaries
network:
ippoolType: none
devops:
host: http://devops-jenkins.kubesphere-devops-system.svc/
username: admin
password: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQGt1YmVzcGhlcmUuaW8iLCJ1c2VybmFtZSI6ImFkbWluIiwidG9rZW5fdHlwZSI6InN0YXRpY190b2tlbiJ9.UlDWc-5BwqAscyOqTBXYXxdFC7RaKcSbsI9JhGu0O9s
maxConnections: 100
endpoint: http://devops-apiserver.kubesphere-devops-system:9090
multicluster:
clusterRole: none
monitoring:
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
enableGPUMonitoring: false
gpu:
kinds:
- resourceName: nvidia.com/gpu
resourceType: GPU
default: True
notification:
endpoint: http://notification-manager-svc.kubesphere-monitoring-system.svc:19093
terminal:
image: registry.cn-beijing.aliyuncs.com/kubesphereio/alpine:3.14
timeout: 600
gateway:
watchesPath: /var/helm-charts/watches.yaml
repository: registry.cn-beijing.aliyuncs.com/kubesphereio/nginx-ingress-controller
tag: v1.1.0
namespace: kubesphere-controls-system
问题是什么
登录控制台devops操作访问均正常,但使用postman调用devops相关接口超时
curl –location –request GET ‘http://localhost:9090/kapis/devops.kubesphere.io/v1alpha3/devops/hiaip-devops926np/pipelines/has-user-service’ \
–header ‘Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjEyNDY3OTYsImlhdCI6MTY2MTIzOTU5NiwiaXNzIjoia3ViZXNwaGVyZSIsInN1YiI6ImFkbWluIiwidG9rZW5fdHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.w5XwYizgAkIpMio4AEhkLAbpQhWr-hSprlYR76-mk_c’ \
–header ‘Content-Type: application/json’
直接调本地环境是可以的