a11enhuang opened a new issue, #111:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/111

   
在`apisix-go-plugin-runner`中使用了`client-go`作为`K8S`客户端,尝试从`K8S`的`ConfigMaps`中获取配置数据,用来初始化插件。
   
   `APISIX-SERVER`部署在`GKE`中,并且配置文件中也指定了执行Go插件
   ```
   ext-plugin:
           cmd: ["/plugins/go-runner", "run"]
   ```
   但是在集群中启动时无法获取`K8S`的配置信息。
   
   初始化代码如下:
   ```go
   config, err := rest.InClusterConfig()
   ```
   
   ```text
   2022/10/28 02:51:23 [warn] 65#65: *186 [lua] init.lua:913: W1028 
02:51:23.682992 1084 client_config.go:617] Neither --kubeconfig nor --master 
was specified. Using the inClusterConfig. This might not work.
   --
   Fri, Oct 28 2022 10:51:23 am | , context: ngx.timer
   Fri, Oct 28 2022 10:51:23 am | 2022/10/28 02:51:23 [warn] 65#65: *186 [lua] 
init.lua:913: W1028 02:51:23.683029 1084 client_config.go:622] error creating 
inClusterConfig, falling back to default config: unable to load in-cluster 
configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be 
defined
   Fri, Oct 28 2022 10:51:23 am | , context: ngx.timer
   Fri, Oct 28 2022 10:51:23 am | 2022/10/28 02:51:23 [warn] 65#65: *186 [lua] 
init.lua:913: panic: invalid configuration: no configuration has been provided, 
try setting KUBERNETES_MASTER environment variable
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to