kopf
python
Our great sponsors
kopf | python | |
---|---|---|
6 | 22 | |
1,951 | 6,415 | |
- | 1.5% | |
7.8 | 7.9 | |
15 days ago | 12 days ago | |
Python | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kopf
- A Kubernetes Operator in Rust
- I wrote a kubernetes operator for โlocustโ, should I open source it
-
Automate All the Boring Kubernetes Operations with Python
If you're looking for more examples beyond what was shown and referenced above, I recommend exploring other popular tools that make use Python Kubernetes client, such kopf - the library for creating Kubernetes operators. I also find it very useful to take a look at tests of the library itself, as it showcases its intended usage such this client test suite.
-
is it possible to have components of a specific namespace run on specific nodes ?
Depending on how you want to configure your selecting logic, it can be solved by mutating admission webhooks for the pods. For example, in Kopf, the simplest approach would be:
-
Kopf 1.31 now supports admission webhooks. Feedback is welcome!
Hello. Kopf (a framework to write Kubernetes operators in Python) 1.31 is released and has finally got admission webhooks โ https://github.com/nolar/kopf/releases/tag/1.31.0. I would appreciate some feedback from experienced operator developers on how easy or hard it is to write webhooks now, and what is missing and makes it inconvenient. The docs: https://kopf.readthedocs.io/en/stable/admission/ For a brief preview, it looks like this:
-
lightkube 0.6.0 - python kubernetes client
Correct, using generic resources with Client.watch should work. In general to create more complex operators I would recommend to check out kopf.
python
- Show HN: Kr8s a batteries-included Python client library for Kubernetes
-
How can I get a list of all namespaces within a specific Kubernetes cluster, using the Kubernetes API?
One option is to use list_namespace(), as described in https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CoreV1Api.md
- python-k8sclient documentatiom
-
Running `connect_get_namespaced_pod_exec` using kubernetes client corev1api gives bad request
I have checked the python version == 2.7 and pip freeze - ipaddress==1.0.22, urllib3==1.24.1 and websocket-client==0.54.0 are the versions which satisfy the requirement - as mentioned here: https://github.com/kubernetes-client/python/blob/master/README.md#hostname-doesnt-matchfollowed the issue on this thread - https://github.com/kubernetes-client/python/issues/36 - not much help.
-
How to use the kubernetes-client for executing "kubectl apply"
kubectl apply -f class.yamlkubectl apply -f rbac.yamlkubectl apply -f deployment-arm.yaml I want to use the kubernetes-client written in python to replace it. My current code, loads the there yaml files (using pyyaml), edits them a bit, inserts into a file and use the command line kubectl to execute those three commands. Some of the code:
-
Tell HN: Amusing Substitutions for Class Keyword
In the Kubernetes Python client code it's called "klass":
https://github.com/kubernetes-client/python/blob/1a0cb469528e6b2bdeb3eb2c06945f1c22303dfd/kubernetes/client/api_client.py#L266
and in Apache ecosystem it's called clazz:
https://github.com/search?q=org%3Aapache+clazz&type=code
Just thought it was amusing and wanted to share
- Connecting to EKS from a Python Lambda
-
Leader Election In Kubernetes
One way is to use configmap lock https://github.com/kubernetes-client/python/tree/master/kubernetes/base/leaderelection
-
Unable to connect to kubernetes python api - .kube/config file not found
I'm having trouble connecting to the kubernetes python client even though I'm following the examples here in the api.
-
Automate All the Boring Kubernetes Operations with Python
As you can imagine, that's a lot of functions to choose from, luckily all of them are listed in docs and you can click on any one of them to get an example of its usage.
What are some alternatives?
awx-operator - An Ansible AWX operator for Kubernetes built with Operator SDK and Ansible. ๐ค
helm - The Kubernetes Package Manager
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
kubebuilder - Kubebuilder - SDK for building Kubernetes APIs using CRDs
fastapi-crudrouter - A dynamic FastAPI router that automatically creates CRUD routes for your models
pyJoules - A Python library to capture the energy consumption of code snippets
Celery-Kubernetes-Operator - An operator to manage celery clusters on Kubernetes (Work in Progress)
bicep - Bicep is a declarative language for describing and deploying Azure resources
flyte - Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
control-flag - A system to flag anomalous source code expressions by learning typical expressions from training data
pykorm - A python ๐ kubernetes โธ๏ธ ORM ๐. Very useful when writing operators for your CRDs with Kopf.
szurubooru - Image board engine, Danbooru-style.