Kubernetes RDF exporter
Quick Start
Using npx
npx @zazuko/k8s-rdf-exporter
Using the default configured cluster
npm i
npm run build
npm run start
Using explicit credentials
npm i
npm run build
(cd k8s && kustomize build | kubectl apply -f -)
export K8S_CLUSTER_NAME=$(kubectl config view --minify -o 'jsonpath={.clusters[0].name}')
export K8S_API_URL=$(kubectl config view --minify -o 'jsonpath={.clusters[0].cluster.server}')
export K8S_SERVICE_TOKEN=$(kubectl -n kube-system get secret k8s-rdf-exporter -o jsonpath='{.data.token}' | base64 -d)
export K8S_CERTIFICATE_PATH="/tmp/k8s-rdf-exporter-cert.txt"
kubectl -n kube-system get secret k8s-rdf-exporter \
-o jsonpath='{.data.ca\.crt}' | base64 -d > "${K8S_CERTIFICATE_PATH}"
node dist/cli.js \
--api-url="${K8S_API_URL}" \
--cluster-name="${K8S_CLUSTER_NAME}" \
--certificate-path="${K8S_CERTIFICATE_PATH}" \
--service-token="${K8S_SERVICE_TOKEN}"