需求:
用户镜像启动有问题。问了排查原因,我需要看下打镜像前用户上传的原始代码包。
操作过程如下:在kubesphere中,用户上传的代码包是放在minio中,然后再进行后续的打镜像操作。
所以问题转变为查找minio的登录信息
# kubectl get pod -n kubesphere-system
NAME READY STATUS RESTARTS AGE
etcd-65796969c7-vb67h 1/1 Running 0 89d
ks-apiserver-67ccdf6dfd-grshf 1/1 Running 0 31d
ks-console-b4df86d6f-qhpfm 1/1 Running 1 89d
ks-controller-manager-8bc6554fb-w6klz 1/1 Running 0 88d
ks-installer-7cb866bd-g8xdp 1/1 Running 0 89d
minio-7bfdb5968b-djwkw 1/1 Running 0 89d
mysql-7f64d9f584-pw6j2 1/1 Running 0 89d
openldap-0 1/1 Running 1 89d
redis-644bc597b9-c22kw 1/1 Running 1 89d
查看minio的登录信息
# kubectl logs minio-7bfdb5968b-djwkw -n kubesphere-system
You are running an older version of MinIO released 2 years ago
Update: https://docs.min.io/docs/deploy-minio-on-kubernetes
Endpoint: http://x.x.x.x:9000 http://127.0.0.1:9000
Browser Access:
http://x.x.x.x:9000 http://127.0.0.1:9000
得到登录地址
但是需要用户名和密码。
# kubectl get secret minio -n kubesphere-system -oyaml
apiVersion: v1
data:
accesskey: b3BlbnBpdHJpeG1pbmlvYWNjZXNza2V5
secretkey: b3BlbnBpdHJpeG1pbmlvc2VjcmV0a2V5
kind: Secret
...
得到了accesskey和secretkey。但是现在的key是base64加密的,所以还需要转换一下
# echo b3BlbnBpdHJpeG1pbmlvYWNjZXNza2V5 | base64 -d
openpitrixminioaccesskey
# echo b3BlbnBpdHJpeG1pbmlvc2VjcmV0a2V5 | base64 -d
openpitrixminiosecretkey
登录成功,可以去s2i-binaries这个bucket下查找上传的代码包
,