openebs-archive/openebsctl

environment KUBECONFIG not working windows

开放

#156 创建于 2023年6月24日

 (0 条评论) (0 个反应) (0 位负责人)Go (22 个派生)auto 404
good first issue

仓库指标

星标
 (33 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

setting environment KUBECONFIG seems to add random folder to file name on windows 11?

PS C:\Users\sas_2\Documents\Developer\talos> $env:KUBECONFIG=".\mycluster\kubeconfig"
PS C:\Users\sas_2\Documents\Developer\talos> kubectl openebs version 
2023/06/24 23:23:46 error creating kubernetes client: failed to build Kubernetes clientset: Could not build config from flags: CreateFile mycluster\kubeconfig\.kube\config: The system cannot find the path specified.
Error: exit status 1

PS C:\Users\sas_2\Documents\Developer\talos> kubectl openebs version --kubeconfig ".\mycluster\kubeconfig"
COMPONENT             VERSION
Client                v0.5.0
OpenEBS CStor         3.4.0
OpenEBS Jiva          3.4.0
OpenEBS LVM LocalPV   Not Installed
OpenEBS ZFS LocalPV   Not Installed

EDIT: even if i hard code the kubeconfig file its the same problem

$env:KUBECONFIG="C:\Users\sas_2\Documents\Developer\talos\mycluster\kubeconfig"
PS C:\Users\sas_2\Documents\Developer\talos> kubectl openebs get volumes --cas-type=cstor
2023/07/16 17:10:29 error creating kubernetes client: failed to build Kubernetes clientset: Could not build config from flags: CreateFile C:\Users\sas_2\Documents\Developer\talos\mycluster\kubeconfig\.kube\config: The system cannot find the path specified.
Error: exit status 1

贡献者指南