use default kubeconfig based on runtime environment

This commit is contained in:
2025-04-09 22:21:17 +02:00
parent bd33174b4a
commit f0922f485d

View File

@@ -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);