kubernetes

Use Python to remotely connect to a k8s pod and send commands on that pod

Use Python to remotely connect to a k8s pod and send commands on that pod Question: I have a scenario where if I want to run a postgres query or check a kafka topic my only option is to connect to a pod that has those privileges and from there either run the relevant kafka …

Total answers: 1

Expose specific metrics location for my custom collector of metrics

Expose specific metrics location for my custom collector of metrics Question: I’m writing custom k8s metrics collector for purpose of monitoring application’s versions in two various clusters. How to expose specific location for metrics like "/metrics" and collect metrics in infinity cycle? That’s my custom metrics collector example: import time from prometheus_client import start_http_server from …

Total answers: 1

Sklearn-classifier, issue with freez (pod pending in K8s)

Sklearn-classifier, issue with freez (pod pending in K8s) Question: I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, … minutes), see log output: 2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: training-tgplm see freez/pending issue on Web UI: …

Total answers: 1

How do I connect to a minio pod using the python API?

How do I connect to a minio pod using the python API? Question: I set up a microk8s deployment with the Minio service activated. I can connect to the Minio dashboard with a browser but cannot find a way to connect to the service via the API. Here is the output to the microk8s kubectl …

Total answers: 1

Restrict/Exclude specific logs from Airflow to Datadog

Restrict/Exclude specific logs from Airflow to Datadog Question: We are observing Airflow is sending large amount of logs to Datadog and we want to restrict/Reduce these logs by excluding logs from below tasks: pod_manager.py base.py base_aws.py logging_mixin.py Do we have any configuration settings where I can define this requirement? We have Airflow-2.0 running on Kubernetes. …

Total answers: 1

Azure AKS/Container App can't access Key vault using managed identity

Azure AKS/Container App can't access Key vault using managed identity Question: I have a docker container python app deployed on a kubernetes cluster on Azure (I also tried on a container app). I’m trying to connect this app to Azure key vault to fetch some secrets. I created a managed identity and assigned it to …

Total answers: 3

How to edit a file with multiple YAML documents in Python

How to edit a file with multiple YAML documents in Python Question: I have the following YAML file: apiVersion: apps/v1 kind: Deployment metadata: name: nodejs namespace: test labels: app: hello-world spec: selector: matchLabels: app: hello-world replicas: 100 template: metadata: labels: app: hello-world spec: containers: – name: hello-world image: test/first:latest ports: – containerPort: 80 resources: limits: …

Total answers: 2

Conditional access to items in Python

Conditional access to items in Python Question: I want to write some tests for Kubernetes with python. This is a sample of my deployment file in Kubernetes: apiVersion: apps/v1 kind: Deployment metadata: name: test-service namespace: test creationTimestamp: ‘2022-12-08T18:18:49Z’ labels: app: test-service team: teamA . . what I want to do is get access to the …

Total answers: 1