volcano-sh / volcano

A Cloud Native Batch System (Project under CNCF)
https://volcano.sh
Apache License 2.0
4.09k stars 948 forks source link

vcctl not use kubeconfig #2594

Open googlebabaio opened 1 year ago

googlebabaio commented 1 year ago

What happened: vcctl not use kubeconfig

What you expected to happen: Use the kubeconfig file

How to reproduce it (as minimally and precisely as possible):

# kubectl get vcjob
NAME    STATUS      MINAVAILABLE   RUNNINGS   AGE
job-1   Completed   1                         3h32m
[root@volcano-0001 volcano]# 
[root@volcano-0001 volcano]# kubectl get vcjob -n volcano-system
NAME    STATUS      MINAVAILABLE   RUNNINGS   AGE
job-1   Completed   1                         3h32m
[root@volcano-0001 volcano]# 
[root@volcano-0001 volcano]#  vcctl job list
No resources found
[root@volcano-0001 volcano]# 
[root@volcano-0001 volcano]#  vcctl job list -n volcano-system
Name    Creation       Phase       JobType     Replicas    Min   Pending   Running   Succeeded   Failed    Unknown     RetryCount
job-1   2022-12-07     Completed   Batch       1           1     0         0         1           0         0           0         
[root@volcano-0001 volcano]# cat /root/.kube/config 
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: ...
    server: https://xxxx:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    namespace: volcano-system
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: ...

Anything else we need to know?:

Environment:

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
wangyang0616 commented 1 year ago

Thank you for your contribution to the Volcano community. This problem recurs locally. Currently, vcctl does not apply the namespace configuration in kubeconfig. Instead, it is specified by command-line parameters.

I tried to fix the problem.

googlebabaio commented 1 year ago

Thanks. Because we think the reason for using vcctl is to simplify the complexity of kubectl commands, just like helm. In other words, using kubectl is sufficient if not simplified.

stale[bot] commented 1 year ago

Hello 👋 Looks like there was no activity on this issue for last 90 days. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

wangyang0616 commented 1 year ago

Retain the current issue.

wangyang0616 commented 1 year ago

/assign @wangyang0616

stale[bot] commented 1 year ago

Hello 👋 Looks like there was no activity on this issue for last 90 days. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

lowang-bh commented 5 months ago

/remove lifecycle/stale