mirror of
https://github.com/KevinMidboe/infra-map.git
synced 2025-10-28 17:10:30 +00:00
use default kubeconfig based on runtime environment
This commit is contained in:
@@ -2,14 +2,8 @@ import * as k8s from '@kubernetes/client-node';
|
||||
import stream from 'stream';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const context = {
|
||||
name: 'kazan-insecure',
|
||||
user: 'admin',
|
||||
cluster: 'kazan-insecure'
|
||||
};
|
||||
|
||||
const kc = new k8s.KubeConfig();
|
||||
kc.loadFromDefault({ contexts: [context] });
|
||||
kc.loadFromDefault();
|
||||
|
||||
const k8sApi = kc.makeApiClient(k8s.CoreV1Api);
|
||||
const appsV1Api = kc.makeApiClient(k8s.AppsV1Api);
|
||||
|
||||
Reference in New Issue
Block a user