Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.6 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.6 KB

Projects

API to manage multiple Kubernetes clusters.

A Project represent a Cluster, Namespace, User Account, Resource Quotas, Billing etc.

Setup

Setup your Docker for Mac for local development. Create a cluster via Swagger API

  1. k8s baseUrl with in pod: https://kubernetes, for local development with Docker for Mac, use https://localhost:6443
kubectl get endpoints | grep kubernetes
  1. Create kubeview Service Account: Instructions

  2. YOUR_KUBEVIEW_TOKEN for kubeview Service Account can be retrieved from kubernetes via cli:

kubectl get secret | grep kubeview
kubectl get secrets <name-of-the-secret> -o json | jq -Mr '.data.token' | base64 -D
  1. from Pod, you should be able to test
curl -k  https://kubernetes/api/v1/namespaces -H "Authorization: Bearer  $TOKEN"
{
  "name": "LOC",
  "ver": "1.13",
  "baseUrl": "https://localhost:6443",
  "token": "YOUR_KUBEVIEW_TOKEN"
}

Test

# Get all namespaces in a clusterName
curl -X GET "http://localhost:3000/api/kubernetes/LOC" \
-H "accept: application/json" \
-H "authorization: Bearer YOUR_OIDC_ACCESS_TOKEN"

# Find one namespace in a cluster by namespaceName
curl -X GET "http://localhost:3000/api/kubernetes/LOC/kube-system" \
-H "accept: application/json" \
-H "authorization: Bearer YOUR_OIDC_ACCESS_TOKEN"

TODO

Implement kubeview with Angular