cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

CloudStack API not Listed

Open th3cod3r opened this issue 2 years ago • 2 comments

I onboard a K8s cluster on version 1.28.4 with Management and KVM on a single node using 4.18.1 cloudstack version. ISO was uploaded from https://download.cloudstack.org/cks/

After that I am able to access the K8s dashboard but didn't able to get the API authentication details as the cloudstack-secret is not present when cluster is created. Please refer below information.

kubectl --kubeconfig kube.conf get all -A
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system pod/coredns-5dd5756b68-8fxd2 1/1 Running 0 3m6s kube-system pod/coredns-5dd5756b68-vsh25 1/1 Running 0 3m6s kube-system pod/etcd-kloudspot-app-control-18dd57ecd9d 1/1 Running 0 3m12s kube-system pod/kube-apiserver-kloudspot-app-control-18dd57ecd9d 1/1 Running 0 3m12s kube-system pod/kube-controller-manager-kloudspot-app-control-18dd57ecd9d 1/1 Running 0 3m13s kube-system pod/kube-proxy-6w887 1/1 Running 0 2m59s kube-system pod/kube-proxy-qr7mx 1/1 Running 0 3m6s kube-system pod/kube-scheduler-kloudspot-app-control-18dd57ecd9d 1/1 Running 0 3m11s kube-system pod/weave-net-hkmd8 2/2 Running 1 (3m4s ago) 3m6s kube-system pod/weave-net-tlv6b 2/2 Running 0 2m59s kubernetes-dashboard pod/dashboard-metrics-scraper-5657497c4c-xx9xz 1/1 Running 0 3m6s kubernetes-dashboard pod/kubernetes-dashboard-5b749d9495-vhghk 1/1 Running 0 3m6s

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default service/kubernetes ClusterIP 10.96.0.1 443/TCP 3m13s kube-system service/kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 3m11s kubernetes-dashboard service/dashboard-metrics-scraper ClusterIP 10.98.255.143 8000/TCP 3m10s kubernetes-dashboard service/kubernetes-dashboard ClusterIP 10.96.60.130 443/TCP 3m10s

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE kube-system daemonset.apps/kube-proxy 2 2 2 2 2 kubernetes.io/os=linux 3m11s kube-system daemonset.apps/weave-net 2 2 2 2 2 3m10s

NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE kube-system deployment.apps/coredns 2/2 2 2 3m11s kubernetes-dashboard deployment.apps/dashboard-metrics-scraper 1/1 1 1 3m10s kubernetes-dashboard deployment.apps/kubernetes-dashboard 1/1 1 1 3m10s

NAMESPACE NAME DESIRED CURRENT READY AGE kube-system replicaset.apps/coredns-5dd5756b68 2 2 2 3m7s kubernetes-dashboard replicaset.apps/dashboard-metrics-scraper-5657497c4c 1 1 1 3m7s kubernetes-dashboard replicaset.apps/kubernetes-dashboard-5b749d9495 1 1 1 3m7s

kubectl --kubeconfig kube.conf get secrets -A
NAMESPACE NAME TYPE DATA AGE kube-system bootstrap-token-ed065e bootstrap.kubernetes.io/token 6 96s kube-system bootstrap-token-nsg1jy bootstrap.kubernetes.io/token 4 97s kube-system kubeadm-certs Opaque 8 97s kubernetes-dashboard kubernetes-dashboard-certs Opaque 0 95s kubernetes-dashboard kubernetes-dashboard-csrf Opaque 1 95s kubernetes-dashboard kubernetes-dashboard-key-holder Opaque 2 95s

The API details also not listed in UI as well, refer below

Screenshot 2024-02-23 at 3 07 51 PM Screenshot 2024-02-23 at 3 10 16 PM

th3cod3r avatar Feb 23 '24 09:02 th3cod3r

@th3cod3r , I am not clear on what you are looking for, but if it is the cloudstack API keys, you need to go into the user. image

DaanHoogland avatar Feb 23 '24 12:02 DaanHoogland

@th3cod3r in the control node, there is a script to do it

root@CKS-1292-2-control-18dcb0cd536:~# deploy-cloudstack-secret -h
Usage: ./deploy-cloudstack-secret [OPTIONS]...
To deploy the keys needed for the cloudstack kubernetes provider.
Arguments:
  -u, --url string         ID of the cluster
  -k, --key string         API Key
  -s, --secret string      Secret Key
  -p, --project string     Project ID
Other arguments:
  -h, --help              Display this help message and exit
Examples:
  ./deploy-cloudstack-secret -u http://localhost:8080 -k abcd -s efgh

Please note, the url should be like http://<management IP or domain>:8080/client/api (corrected by #8697)

weizhouapache avatar Feb 23 '24 13:02 weizhouapache