kubectl-sync2local
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

kube-sync2local

A tool for sync online resource detail to Local YAML manifest file.

install

### from npm
npm install -g kubectl-sync2local

### from resource
https://github.com/bagechashu/kubectl-sync2local.git
cd kubectl-sync2local
npm link

usage

kubectl-sync2local -f tmp.yaml

kubectl sync2local -f tmp.yaml

import

import { mergeAndUpdateLocalResources, mergeAndUpdateLocalResourcesContainers } from "kubectl-sync2local";


const localPath = "./tmp.yaml"

const kc = new KubeConfig();
kc.loadFromDefault();

try {
    mergeAndUpdateLocalResources(kc, localPath);
} catch (error) {
    console.error(`Failed to sync Kubernetes resource: ${error}`);
}

Thanks to ChatGPT !!!

Package Sidebar

Install

npm i kubectl-sync2local

Weekly Downloads

5

Version

1.1.3

License

MIT

Unpacked Size

28.8 kB

Total Files

12

Last publish

Collaborators

  • bashu