Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiServer交互机制 #84

Open
pioneer-hash opened this issue Apr 23, 2023 · 12 comments
Open

ApiServer交互机制 #84

pioneer-hash opened this issue Apr 23, 2023 · 12 comments

Comments

@pioneer-hash
Copy link

想请教下helm-wrapper发布的时候是怎么跟k8s的Apiserver交互的呢

@opskumu
Copy link
Owner

opskumu commented Apr 23, 2023

@pioneer-hash 通过 kubeconfig 哈,和 helm 一样的

@pioneer-hash
Copy link
Author

@pioneer-hash 通过 kubeconfig 哈,和 helm 一样的

我用的是ServiceAccount的方式,没有在请求的时候传入kubeconfig

@pioneer-hash
Copy link
Author

Account的方式,没有在请求的时候

是默认取的宿主机的~/.kube/config吗

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

是的,默认是读取 ~/.kube/config,可以通过选项指定

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

image

@pioneer-hash
Copy link
Author

image

这段读取默认kubeconfig的代码在哪个位置呢?我想了解下

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

@pioneer-hash
Copy link
Author

pioneer-hash commented Apr 24, 2023

https://github.com/opskumu/helm-wrapper/blob/master/main.go#L28

是通过环境变量获取的吗?
image

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

不是,你仔细看下面,可以通过配置项的

@pioneer-hash
Copy link
Author

不是,你仔细看下面,可以通过配置项的

您指的是这段吗
image
我现在用helm部署的,配了sa,没有通过配置项指定

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

没有指定就是默认的哦

@opskumu
Copy link
Owner

opskumu commented Apr 24, 2023

环境变量有配置也可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants