Saravanan666/pypi-org huggingface dataset:
Package: kubebuild
KubeBuild - Kubernetes YAML Generator and Deployment ToolKubeBuild is a command-line tool designed to simplify the process of creating Kubernetes YAML files for various Kubernetes resources and deploying them into your Kubernetes clusters. It's a valuable tool for both developers and Site Reliability Engineers (SREs).Installation  🛠️You can install KubeBuild via pip:pipinstallkubebuildUsage 📋KubeBuild init  🚀The init command helps you create Kubernetes YAML files for different resources interactively. It supports the following resources:NamespaceDeploymentServiceIngressConfigMapSecretExample:kubebuildinitScreenshot 📷:KubeBuild deploy  🚢The deploy command allows you to deploy previously generated Kubernetes YAML files into your Kubernetes cluster. It lists available YAML files in the current directory and lets you choose which one to deploy.Example:kubebuilddeployScreenshot 📷:KubeBuild version 📌The version command displays the current version of KubeBuild.Example:kubebuildversionScreenshot 📷:Feedback and Contributions 🤝KubeBuild is an open-source project, and we welcome contributions and feedback from the community. Feel free to report issues, suggest improvements, or contribute to the project on GitHub: KubeBuild GitHub Repository.Happy Kubernetes resource management with KubeBuild! 🎉
Package: kubecfg
kubecfgPython library and cli utility to check k8s client configurationsShow configurationTest connectivityInstallpipinstallkubecfgRunkubecfgUse the libraryThis example shows how to use theHTTPXto obtain the version of the API server.importhttpxfromkubecfg.configimportKubeConfigk8s_config=KubeConfig()k8s_config.load_config()server,cert,client_ca=k8s_config.get_auth_data()r=httpx.get(f"{server}/version",cert=cert,verify=client_ca)r.raise_for_status()print(r.text)
Package: kube-cli
Command line interface for Kubernetes that simplifies usage of kubectl.Installationpipinstallkube-cliRequirementspython 3.6 or higherkubectlkubectl config file in ~/.kube/configHow to use# show helpkubehelp# List all namespaces / podskubeallnskubeallpods# Find namespace / podkubefindns<query>kubefindpod<query># Operations with namespacekube<namespace>kube<namespace>pods# Scaling deploymentskube<namespace>scalekube<namespace>scale<deployment>kube<namespace>scale<deployment><value># Operations with podkube<namespace><pod>logskube<namespace><pod>logs-fkube<namespace><pod>bashFuzzy searchFuzzy search is a killing feature that allows to search namespaces and pods by short equivalents.For example, following commands are equal:kube1234redismetriclogskubejira-1234rd-jira-5103-redis-metrics-57dff4f8b7-5c49klogs
Package: kube-compose
kube-composeAn opinionated way of deploying docker-compose to kubernetes clusters by managing them with a helm chart.The CLI is intended to be easy to use for those familiar with docker-compose and includes some additional features. Basically all features expect you to have adocker-compose.yamlfile in the working directory.kube-compose init=> specify the helm release name/namespace in yourdocker-compose.yamlfiledocker-compose-like featureskube-compose up=>helm install/upgrade+ volume create (pvc)kube-compose down=>helm uninstallkube-compose ps=>helm statuskube-compose logs SERVICE=>kubectl logskube-compose exec SERVICE=>kubectl execkube-compose restart SERVICE=>kubectl rollout restartadditional featureskube-compose volume ...=> manage docker-compose defined volumes as persistent volume claimskube-compose volume create [VOLUME]=> create the claim(s)kube-compose volume rm [VOLUME]=> delete the claim(s)kube-compose diff=>diff -Naur <(helm get values) <(docker-compose config)kube-compose version SERVICE [<newversion> | major | minor | patch]=> like npm version but for services in the docker-compose.yamlPre-requisiteskubernetes clusterkubectlhelmInstallation# install off of pypipipinstallkube-compose# verify install was successfulkube-compose--helpEnd-to-end Example with K3D# launch a test kubernetes clusterk3dclustercreate-a1-p"80:80@loadbalancer"-p"443:443@loadbalancer"# one option for auto-creating Ingress resources from annotations on the deploymenthelmrepoaddmaayanlabhttps://maayanlab.github.io/helm-charts
helminstallkubernetes-auto-ingressmaayanlab/kubernetes-auto-ingress--setingressClassName=traefik# create the docker-compose.yamlcat>docker-compose.yaml<< EOFversion: '3'x-kubernetes:# this is the helm chart release name and namespacename: testnamespace: defaultservices:# a deployment is created with this nametest-web:image: nginx:latestports:# a service is created exposing this port- 80x-kubernetes:# these are the kubernetes annotations added to the deploymentannotations:# this annotation causes a ingress to be created for the deploymentmaayanlab.cloud/ingress: http://localhostEOF# start the docker-compose service(s) on the kubernetes clusterkube-composeup# verify it's running at http://localhost
Package: kubeconf
kubeconfLightweight Python module for creating, manipulating, and editing kubeconfig filesWhy not use or wrapkubectl config?kubectl configis great and writing a Python wrapper is a fine solution. However,kubectl configis quite limited in functionality. I wanted more control over my kubernetes config.kubeconfiggives me that control. It doesn't usekubectlat all. Rather, it reads, edits, and writes config files entirely on its own.Getting startingInstall this package using pip:pip install kubeconfBasic UsagefromkubeconfimportKubeConfk=KubeConf(path='path/to/config')# Open the filek.open()# Add a clusterk.add_cluster(name='mycluster',server='...',certificate_authority_data='...',)# Add a user for that clusterk.add_user(user='me')# Add a context to map the user to the clusterk.add_context(name='mycontext',cluster_name='mycluster',user_name='me')# Commit change to the file.k.close()DevelopingDownload and install this repo from source, and move into the base directory.git clone https://github.com/Zsailer/kubeconf
cd kubeconfIf you usepipenv, you can install a developement version:pipenv install --devOtherwise you can install a development version using pippip install -e .LicensingThe code in this project is licensed under MIT license.
Package: kubeconfig
kubeconfig is a simple Python module for manipulating Kubernetes kubeconfig
files.fromkubeconfigimportKubeConfigconf=KubeConfig()conf.set_context('new-context',cluster='other-cluster',user='my-user')conf.use_context('new-context')print(conf.view())InstallingpipinstallkubeconfigExample usage casesGenerating configs for usersTooling that manages switching between multiple clusters or usersCycling credentials out in a configUpdating CA cert entries in your configDocumentationSee thedocumentationfor more details on usage.Licensekubeconfig is licensed under the BSD 3-Clause License.
Package: kubectlfr
Utilitaire de contrôle de Kubernetes** What is this ??? **
Every time we use a word in English our manager tells us to use the French translation of it. So, here is a version of kubectl ... in French !Le fonctionnement est très simple :kubectlfrtraduit les mots qu'il a dans son dictionnaire puis les passe àkubectl. Vous pouvez donc utiliserkubectlfrexactement vous utilisezkubectltout en vous gardant la possibilité de défendre le beau pays du vin :wine_glass: et du fromage :cheese:.Vous pourrez retrouver tous les mots traduitsici.N'hésitez pas à en ajouter, Molière sera fier de vous :fountain_pen: ! Attention aux accents et au pluriel !Parce que quelques exemples valent mieux que mille motskubectl get pods :$kubectlfrrécupérergousses
NAMEREADYSTATUSRESTARTSAGE
ceci-est-une-gousse1/1Running01h
...
ceci-est-une-autre-gousse1/1Running09dkubectl create namespace test :$kubectlfrcréerespace-de-nomtestnamespace/testcreatedInstallation$pipinstallkubectlfrRéférencekubectl
Package: kubectlgetall
kubectlgetallList all CR's for all CRD types on a cluster in a given namespace.Requires kubectl to be installed.Usagekubectlgetall<namespace>There are some flags that can be passed.kubectlgetall--help
Usage:kubectlgetall[OPTIONS]NAMESPACEReturnsalistofCRforthedifferentCRDsinagivennamespace

Options:--versionShowtheversionandexit.-s,--sortPrintstheresourcesinanorder.Initialresultstakelongertoshow.Unsortedreturnresultsfasterbutcanhitratelimits.-e,--excludeTEXTExcludecrdtypes.Multiplecanbeexcludedeg:"-e <crdtype> -e <other type>"--helpShowthismessageandexit.
Package: kube-debug-pod
kube-debug-podCLI for easy kube debug podInstall:python-mpipinstallkube-debug-podUsage:kdb[OPTIONS]Options:-n,--namespaceTEXTNamespacetostartpodin,default:default.-c,--commandTEXTCommandtorunincontainer,default:/bin/bash.-m,--pod-nameTEXTThenameforthedebugpod,default:kdb.-t,--timeoutTEXTTimetowaitforpodtobeready,default:60s.-p,--port-forwardTEXTForwardaporttothecontainer,like8000:8000.-v,--versionDisplayversioninfoandexit.-a,--arch-linuxUsearchlinux:latestimage.-s,--sky-toolsUseskymoore/tools:latestimage.-i,--imageTEXTImagefordebugcontainer,default:debian:latest.--helpShowthismessageandexit.

Constraints:{--arch-linux,--sky-tools,--image}mutuallyexclusiveExample Usage 1:kdb-s-nmyns-p8000:8000-mmypodExample Usage 2:kdb-nmynsExample Usage 3:kdb
Package: kubedownscaler
kubedownscalerScales down Kubernetes Deployments and StatefulSets to 0 replicas, keeps note of the number
of replicas in annotations, and scales everything back up to the original number of replicas.Can operate on a single namespace, or the entire cluster.
Can operate only on Deployments and StatefulSets that use a specific StorageClassIdeal for performing a controlled shutdown, maintenance, etc.Uses whatever context your localkubectlhas.InstallpipinstallkubedownscalerUseEither-d|--downor-u|--upmust be specified.usage: kubectl downscale [-h] (-d | -u) [--dry-run] [-n NAMESPACE] [--deployments | --no-deployments]
               [--statefulsets | --no-statefulsets] [--storageclass STORAGECLASS]

options:
  -h, --help            show this help message and exit
  -d, --down            scale down cluster resources
  -u, --up              scale up to restore state
  --dry-run             don't actually scale anything
  -n NAMESPACE, --namespace NAMESPACE
                        namespace to operate on
  --deployments, --no-deployments
                        scale Deployments (default: True)
  --statefulsets, --no-statefulsets
                        scale StatefulSets (default: True)
  --storageclass STORAGECLASS
                        only scale Deployments and StatefulSets that are consuming a specific StorageClassBuildpoetryinstall
poetrybuild
poetrypublish
Package: kubedrctl
kubedrctlis a command line tool to exercise some functionality of
theKubeDRproject.InstallationHere is one way of installing using a virtual environment:# Create a virtual environment
$ python3 -m venv $HOME/venv/kubedrctl

# Install the library
$ $HOME/venv/kubedrctl/bin/pip install kubedrctl

$ export PATH=$PATH:$HOME/venv/kubedrctl/binUsageListing Backups$kubedrctllistbackups--accesskey<ACCESSKEY>\--secretkey<SECRETKEY>--repopwd<REPO_PASSWORD>\--endpoint<S3-ENDPOINT>--bucket<BUCKET>Restoring from backups$kubedrctlrestore--accesskey<ACCESSKEY>\--secretkey<SECRETKEY>--repopwd<REPO_PASSWORD>\--endpoint<S3-ENDPOINT>--bucket<BUCKET>\--targetdir<RESTORE_TARGET_DIR><SNAPSHOT-ID>
Package: kubeform
django-kube-form================Reusable Django app for display [kube forms](http://imperavi.com/kube/forms/ "kube forms")## InstallationInstall with pip: `pip install kubeform`Add `'kubeform',` to INSTALLED_APPS## UsageSimple column form:```html{% load kube %}<h2>Form</h2><form method="POST">{{ form|kubecolumn }}<p><input type="submit" class="btn" value="Send"></p></form>```Simple inline form:```html{% load kube %}<h2>Form</h2><form method="POST">{{ form|kubeinline }}<input type="submit" class="btn" value="Send"></form>```Width fields:```html{% load kube %}<h2>Form</h2><form method="POST">{{ form.title|kubewidth:"50" }}<input type="submit" class="btn" value="Send"></form>```
Package: kubegpt
kubegptA command-line tool for using human language to interact with Kubernetes. Powered by OpenAI/GPT.kubegpt will take your input likekubegpt "Am I using GlusterFS as a storage class?"It will generate a kubectl command to run to get information, read the results of the
command and then interpret the results. It will use your local kubectl config and context
to reach your k8s cluster.kubectl get storageclassAn example of the output of the above command is:$ kubegpt "Am I using GlusterFS as a storage class?"

> Entering new AgentExecutor chain...
 I need to use kubectl to query the storage class information.
Action: terminal
Action Input: kubectl get storageclass
Observation: NAME                 PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
hostpath (default)   docker.io/hostpath   Delete          Immediate           false                  14d

Thought: I can see the storage class is "hostpath" which is not GlusterFS.
Final Answer: No, you are not using GlusterFS as a storage class.

> Finished chain.The data you see inObservationisrealinfo returned from the kubectl command that the AI agent ran using whatever Kubernetes cluster is currently set in your kubectl context.Installationpip install kubegptSetup your OpenAI API keyexport OPENAI_API_KEY=xxxx

# NOTE: you will need to add a credit card to the OpenAI dashboard for this to work.And then ask away!kubegpt "What kubernetes context am I using?"WARNINGUse at your own risk! We tell the OpenAI agent mutliple times to only run non-destructive
kubectl commands but this is not guaranteed. We are not responsible for any damage.
Package: kubekind
kubekindLibrary to generate Kubernetes manifests using Python codeMotivationWrite manifests using Python code to improve readability and getting the benefits of IDEs IntelliSense features.RequirementsPython 3.9+ on Linux, Windows or MacInstallpipinsallkubekindGenerated a pod manifest# test.pyfromkubekindimportPod,ContainerwithPod("my-pod")aspod:Container("bash","bash:latest",args=["sleep","10000"]).add()Container("bash_2","bash:latest",args=["sleep","10000"]).add()pod.print()Apply the manifestpythontest.py|kubectlapply-f-
Package: kubelaunch
============Kubelaunch============.. image:: https://img.shields.io/pypi/v/hugo_jupyter.svg:target: https://pypi.python.org/pypi/kubelaunch.. image:: https://img.shields.io/travis/knowsuchagency/kubelaunch.svg:target: https://travis-ci.org/knowsuchagency/kubelaunch.. image:: https://pyup.io/repos/github/knowsuchagency/kubelaunch/shield.svg:target: https://pyup.io/repos/github/knowsuchagency/kubelauch/:alt: Updates.. image:: https://img.shields.io/github/license/mashape/apistatus.svgMaking analytics-ops on Kubernetes easy.* Source: https://github.com/kuberlytics/kubelaunchThis is a work in progress, but the goal is to makeInstallation------------.. code-block:: bashpip install kubelaunchUsage-----Create a new empty directory for your cluster... code-block:: bashkubel init gcp --jupyterThis will create .Docker Image-----This is a Jupyter Singleuser container with Google Cloud Platform and Azure CLI installed.Build locally:```docker build -t kuberlytics/kubelaunch:latest -t kuberlytics/kubelaunch:v0.0.1 .```### To use Locally for example.```docker run -it --rm -p 8888:8888  -v /Users/<yourpath>/launch:/home/jovyan/work kuberlytics/kubelaunch:latest /bin/bash```### Launch a docker container configured to control.```docker run -it --rm -p 8888:8888  kuberlytics/kubelaunch:latest /bin/bash```
Package: kubeleds
kubeledsMonitor your kubernetes clusters using NeoPixel LEDS!HardwareRaspberry PI (any model that supports GPIO)Currently using a Raspberry PI 4b 2GB.  Preparing a Raspberry PI Zero WNeoPixel LED Strips, 12mm Diffussed bulbsUsagecdinto project directory.Create a virtual environment.$makevenvActivate it.$sourcevenv/bin/activateInstall development dependencies with editable mode to test the CLI.$makeinstallTake kubeleds for a spinThis will basic command line functionality$kubeledscliinitThis will retrieve node status and set the leds base off of status of each node, testing each status condition (ready, cpu, memory, disk)$kubeledscliget_cluster_nodes'[api fqdn]'\'[your token]''True''get_cluster_nodes'\'set_leds''get_cluster_nodes''Ready'\'set_leds''get_cluster_nodes''MemoryPressure'\'set_leds''get_cluster_nodes''DiskPressure'\'set_leds''get_cluster_nodes''PIDPressure'\'set_leds''get_cluster_nodes''Ready'\The above commands will retrieve cluster node status and set an led frame per status condition, 1 led per node.GREEN: Node Ready
BLUE: CPU Good
CYAN: Memory good
Purple: Disk GoodTest with DockerCLI commands can be tested with Docker.Build an image for the CLI.Image is tagged with the same name as thecli_command.$makedocker-imageRun the command inside the container.$docker-run--rmkubeledscliinitDocumentationInstall documentation-related dependencies.$makedocsServe the docs locally.$makeserve-docsDistributionNOTEMake sure you have account inPyPIbefore you try this out.To publish you CLI to PyPI, run:$makedistributionsdistdirectory will be created inside your project directory. Upload it to PyPI using:$twinedist/*HelpFor help related to make commands.$makehelp
Package: kubelib
Python library to simplify kubernetes scripting.  Minimal test coverage.Full Documentation HereTODO: The current plan is to rebuild this around <https://github.com/kubernetes-incubator/client-python>.QuickstartImport Kubelib and config:import kubelib
kube = kubelib.KubeConfig(context='dev-seb', namespace='myspace')List all namespaces:for ns in kubelib.Namespace(kube).get_list():
        print(ns.metadata.name)List all resource controllers:for ns in kubelib.ReplicationController(kube).get_list():
    print(ns.metadata.name)(you get the idea)Get a specific pod:pod = kubelib.Pod(kube).get(podname)
print(pod.toJSON())Upgrading KubernetesUpgrade kubernetes based on a directory of yaml files:import kubelib
kube = kubelib.KubeConfig(context='dev-seb', namespace='myspace')
kube.apply_path("./kubernetes", recursive=True)This will look at every yaml file and act based on the “Kind” field.  Deployments are replaced, replication controllers are deleted and re-created.  Other “Kind” resources are created if a resource with that “Kind” and “Name” is not already present.Command Line UtilitiesThis package provides a few command line utilities, the most helpful (to me) issee_limitswhich displays the resource limits for all pods and namespaces within a context.Initial package setup borrowed fromhttps://github.com/kennethreitz/samplemodA reasonable approach to getting sphinx output into github pages fromhttps://daler.github.io/sphinxdoc-test/includeme.html
Package: kubelink
kubelink automatically sync files to kubernetes pods. It speed up your development. You just work with your local files and kubelink automatically syncing them to your kubernetes cluster.Using kubelink is as simple as:kubelink create --name mypreset --source ./ --destination /code --namespace default --selector "app=backend"to create a preset with your settingskubelink watch mypresetto start syncing fileskubelink based onkubectl cpandkubectl execcommands. So, kubelink is lightweight utility.RequirementsPython >= 3.7kubelink requires that thetarbinary is present in your kubernetes container. Iftaris not present, kubelink will fail.InstallationVia pippip install kubelinkFrom source codegit clone https://github.com/waverage/kubelink.git
cd kubelink
python setup.py buiild
python setup.py installUsagekubelink createCreate a kubelink config preset with your sync settings.kubelink create --name mypreset --source /Users/bob/myproject --destination /code --namespace default --selector "app=backend"--name- kubelink preset name-s, --source- Local source directory to sync-d, --destination- Destination directory in kubernetes pod--namespace- Kubernetes namespace-l, --selector- Label selector to find pod. For example:-s "app=php"-c, --container- Container name. Required if pod contains more than one container-h, --help- Show help--log- Set log level. Default: info. Available levels: info, debug, errorThe presets file location is~/.kubelink/config.yaml.
You can create multiple config presets.Help available by command:kubelink create -hkubelink watchStart watching for real-time synchronizations.kubelink watch mypresetname- kubelink preset name-h, --help- Show help--log- Set log level. Default: info. Available levels: info, debug, errorHelp available by command:kubelink watch -hHow to build and publish packageBuild setup.pypython setup.py sdist bdist_wheelUpload package to Pypitwine upload dist/*
Package: kubeluigi
KubeluigiKubeluigi lets you run Luigi tasks as Pods in a Kubernetes Cluster.  Kubeluigi is an update on Luigi's defaultKubernetesTask.Improvements over default luigi's contrib:Currently default K8s task on Luigi is outdated, it does not handle some edge cases but most importantly it is not a priority in Luigi, this makes it slow to get changes merged.Kubeluigi uses a non-deprecated kubernetes client libraryKubeluigi handle edge error cases not handled by the stdlib KubernetesTaskFor most cases with only minor changes you should be able to unplug Luigi's default KubernetesJobTask and use Kubeluigi instead.Realtime logging from Kubernetes TasksLogsfrom Kubernetes Tasks include a prefix which makes it easier to track the association of Job, Task, and Pod.Installationpip install kubeluigiMoving from Luigi's default contribJust replace your imports ofKubernetesJobTask:- from luigi.contrib.kubernetes import KubernetesJobTask+ from kubeluigi import KubernetesJobTaskExamplefromkubeluigiimportKubernetesJobTaskclassTask(KubernetesJobTask):container_name="ubuntu:18.04"@propertydeflimits(self):r={"requests":{"memory":"50M","cpu":"1m"}}returnr@propertydefcmd(self):return"echo something && sleep 2 && echo after && sleep 5 && echo again"@propertydefnamespace(self):return"moussaka"@propertydeflabels(self):return{"my_label":"my_label_1"}@propertydefspec_schema(self):print(self.container_name)print(self.container_tag)return{"containers":[{"name":self.name,"image":self.container_name+self.container_tag,"args":["/bin/bash","-c",self.cmd],"imagePullPolicy":"Always","resources":self.limits,"env":[{"name":"my_env","value":"env"}]}],}@propertydefname(self):return'dummytask'## LogsKubeluigi's task logs include Job, Task, and Pod identifiers:INFO:luigi-interface:JOB: dummytask-20211028031913-a5eb1d7e634b43c8 POD: dummytask-20211028031913-a5eb1d7e634b43c8-9cnmt: some echo messageDevelopmentlocal setup:install local packagepip install -e .testingpip install noxnox
Package: kube-manifest-lint
Kubernetes Manifest LinterValidate Kubernetes YAML manifests against JSON schema.
It will use the Kubernetes v1.17 schemas for validation by default.Usage:pip3 install kube-manifest-lint
kube-manifest-lint my-deployment.yamlPre Commit HookYou can use this tool as apre-commitin your git repository. Example.pre-commit-config.yaml:repos:-repo:https://codeberg.org/hjacobs/kube-manifest-lintrev:"0.2.0"hooks:-id:kube-manifest-lintExit Codes1: file is not a Kubernetes manifests2: schema for apiVersion/kind was not found4: schema is deprecated (e.g. using "extensions/v1beta1" instead of "apps/v1")8: schema validation failed
Package: kube_merge
kube-merge allows merging other Kubernetes configurations into the
current configuration.Installationpipinstallkube-mergeUsageIn order to merge other configs first dump the configuration to a file.
For example if using the microk8s snap from Ubuntu, just dump the
configuration to a file:microk8s.kubectlconfigview--raw>microk8s.ymlthen simply add it:kube-mergemicrok8s.ymlThiswill changethe default configuration, adding the clusters and
users.From there you’ll just switch the context using the regular:kubectlconfiguse-context...