input stringclasses 1
value | output stringlengths 30 28.3k | text stringlengths 151 31.8k | instruction stringlengths 49 30.3k |
|---|---|---|---|
When you use an image WITHOUT a tag, Kubernetes will assume that you want the latest version of the image, which is identified by the latest tag by default. If you have multiple versions of the same image in your repository with different tags, such as img1:1.0.0, img1:1.1.0, and img1:latest, Kubernetes will use the im... | ###Instruction: I was checking Kubernetes documentation for pulling images. In that, I saw two policies IfNotPresent and Always. In "Always" its stated that
If the kubelet has a container image with that exact digest cached locally, the kubelet uses its cached image; otherwise, the kubelet pulls the image with the res... | I was checking Kubernetes documentation for pulling images. In that, I saw two policies IfNotPresent and Always. In "Always" its stated that
If the kubelet has a container image with that exact digest cached locally, the kubelet uses its cached image; otherwise, the kubelet pulls the image with the resolved digest, an... | |
You won't be able to use the current ManagedCertificate CRD to generate wildcard certificates. Wildcard certificates are only supported by Google Cloud Certificate Manager. ManagedCertificate actually creates the older Google Managed SSL Certificates which do not support wildcards.
Currently, the only supported ways t... | ###Instruction: By default creating a managed certificate object on GKE creates a managed certificate of type "Load Balancer Authorization". How can I create one with DNS authorization through GKE?
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs
apiVersion: networking.gke.io/v1
kind: ManagedCertifi... | By default creating a managed certificate object on GKE creates a managed certificate of type "Load Balancer Authorization". How can I create one with DNS authorization through GKE?
https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
... | |
Not sure if you have whitelisted the IP of Spark cluster NAT to Kafka GKE, i think the request is routing outside to internet from NAT and then accessing the Kafka.
If both are in same VPC what you can do is expose the Kafka service on GKE with internal private load balancer, once SVC in GKE have private LB attached yo... | ###Instruction: I have a Kafka Custer on GKE, and I'm using Apache Spark on Dataproc to access the Kafka Cluster.
Dataproc cluster is a private cluster i.e. --no-address is specified when creating the Dataproc cluster, which means it does not have public IP
(required due to compliance).
Also the Kafka cluster is SSL e... | I have a Kafka Custer on GKE, and I'm using Apache Spark on Dataproc to access the Kafka Cluster.
Dataproc cluster is a private cluster i.e. --no-address is specified when creating the Dataproc cluster, which means it does not have public IP
(required due to compliance).
Also the Kafka cluster is SSL enabled.
Note : G... | |
actual, i'm trying to find out what plugins are used by default too.
the kubernetes version i'm using is 1.20.6.
i found pretty hard to get the answer from source code.
but you can export the configuration used by scheduler isntance by adding an arugument to kube-scheduler.yaml:
--write-config-to=/path/to/hostpath/con... | ###Instruction: The version of Kubernetes in use is v1.26.3.
I have cloned the Kubernetes source code to peruse the scheduler logic.
Upon inspection of the framework.go file, I have observed the existence of a frameworkImpl struct. I am curious as to how I can ascertain which plugins have been registered.
I am curiou... | The version of Kubernetes in use is v1.26.3.
I have cloned the Kubernetes source code to peruse the scheduler logic.
Upon inspection of the framework.go file, I have observed the existence of a frameworkImpl struct. I am curious as to how I can ascertain which plugins have been registered.
I am curious as to how I ca... | |
AFAIK, there is no possibility to add labels to your alerts based on condition without rewriting all rules.
Best solution for your exact question is to create separate alerts for all environments/teams/conditions and just add static labels.
Something along the lines of
- alert: many_restarts_data
expr: increase(k... | ###Instruction: I'm working with Prometheus alerts, and I would like to dynamically add a 'team' label to all of my alerts based on a regex pattern. I have an example alert:
expr: label_replace(label_replace(increase(kube_pod_container_status_restarts_total{job="kube-state-metrics",namespace=~".*",pod!~"app-test-.*"}[3... | I'm working with Prometheus alerts, and I would like to dynamically add a 'team' label to all of my alerts based on a regex pattern. I have an example alert:
expr: label_replace(label_replace(increase(kube_pod_container_status_restarts_total{job="kube-state-metrics",namespace=~".*",pod!~"app-test-.*"}[30m]) > 2, "team"... | |
this can be limited by enabling authentication on Kafka
You would need to enable asymmetric encryption (SSL / Kerberos) between Kafka and any client. This way, you would delegate public keys to any trusted client, while any untrusted code would be unable to connect without a valid key-pair. Also, the encryption would... | ###Instruction: Currently, network policies in Kubernetes allow you to control egress and ingress on the pod. However, if two containers run in the same pod, there is no way to have distinct network policies for each container.
I am trying to implement a Kafka consumer, which is able to read messages from a broker whic... | Currently, network policies in Kubernetes allow you to control egress and ingress on the pod. However, if two containers run in the same pod, there is no way to have distinct network policies for each container.
I am trying to implement a Kafka consumer, which is able to read messages from a broker which is hosted in o... | |
On 1.23.5 even after restarting kubelet through systemctl restart kubelet my kube-controller-manager still had errors (kubectl -n kube-system logs kube-controller-manager-kubeadm - name will vary according to your node name):
error retrieving resource lock kube-system/kube-controller-manager: Unauthorized
Only after f... | ###Instruction: Today, my kubernetes(v1.21) cluster certificate was expired(1 year), after I using this command to renew the certificate:
kubeadm certs renew all
the logs shows that the kube-apiserver\etcd should be restart:
Done renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube... | Today, my kubernetes(v1.21) cluster certificate was expired(1 year), after I using this command to renew the certificate:
kubeadm certs renew all
the logs shows that the kube-apiserver\etcd should be restart:
Done renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube-scheduler and e... | |
Looks kubectl lost connection to the Cluster and you can set the Cluster context by following the official GCP troubleshooting doc GCP kubectl command times out, try below two solutions :
Solutions 1 : When kubectl cannot communicate with the cluster control plane or doesn't exist:
To resolve your issue, verify the co... | ###Instruction: So I was going to set up a GKE cluster and interact it with kubectl. But when I tried to apply the namespace, it just threw an error.
I've added my IP to Control plane authorized networks in GKE dashboard.
I'm using a Windows 10 machine, my kube/config
apiVersion: v1
clusters:
- cluster:
certificate... | So I was going to set up a GKE cluster and interact it with kubectl. But when I tried to apply the namespace, it just threw an error.
I've added my IP to Control plane authorized networks in GKE dashboard.
I'm using a Windows 10 machine, my kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority-data:... | |
ping doesn't work with a service's cluster IP, as it is a virtual IP.
You should be able to ping a specific pod, but not a service.
ping sends packets using the very-low-level ICMP protocol, but Nginx serves HTTP which uses the TCP protocol instead.
| ###Instruction: I have made a nginx deployment which will be tagged by a ClusterIP service via a selector. Then I entered a new pod that is not related to that deployment nor service. And from within that pod I try to ping the i.p of the ClusterIP service hoping it would reach the nginx deploy, but it's not receiving t... | I have made a nginx deployment which will be tagged by a ClusterIP service via a selector. Then I entered a new pod that is not related to that deployment nor service. And from within that pod I try to ping the i.p of the ClusterIP service hoping it would reach the nginx deploy, but it's not receiving the ping response... | |
The error implies that the kubelogin executable could not be located. You need to install kubelogin in the azure cli using
az aks install-cli, then it works as expected.
Refer github for installation process.
I tried the same requirement in my environment, and it worked for me as follows.
az aks get-credentials --resou... | ###Instruction: I created new config file for Kubernetes from Azure in Powershell by az aks get-credentials --resource-group <RGName> --name <ClusterName>. Got a message that Merged "cluster_name" as current context in C:\michu\.kube\config. I copied this file into default .kube\config location and now when I try to ru... | I created new config file for Kubernetes from Azure in Powershell by az aks get-credentials --resource-group <RGName> --name <ClusterName>. Got a message that Merged "cluster_name" as current context in C:\michu\.kube\config. I copied this file into default .kube\config location and now when I try to run any command e.... | |
I was able to figure it out.
One can use personal access tokens as passwords provided by whatever git service the private repo is in along with the repo's username.
I just stored the personal access token as an Opaque secret in my Airflow K8s cluster and referenced that in my git-sync sidecar container yaml definition ... | ###Instruction: I have an Airflow environment (v2.4.3) on Kubernetes and I want to sync it with a private git repo so that any changes I make to DAGs in my master branch get automatically picked up by my Airflow environment.
According to Airflow documentation, I can use Git-sync sidecar along with an SSH key added to m... | I have an Airflow environment (v2.4.3) on Kubernetes and I want to sync it with a private git repo so that any changes I make to DAGs in my master branch get automatically picked up by my Airflow environment.
According to Airflow documentation, I can use Git-sync sidecar along with an SSH key added to my private git re... | |
I figured it out. It needed a bit more configuration in launch.json. Specifically debug section with sourceFileMap. Here is the final result if anybody else has trouble making it work:
{
"configurations": [
{
"name": "Kubernetes: Run/Debug",
"type": "cloudcode.kubernetes",
... | ###Instruction: I am trying to figure out if it is possible to use Cloud Code in VSCode to debug a TypeScript Node application in Kubernetes remotely?
I used Cloud Code regularly to debug JS Node applications in Kubernetes, but I am having hard time to configure launch.json to do the same for TypeScript Node app. Sourc... | I am trying to figure out if it is possible to use Cloud Code in VSCode to debug a TypeScript Node application in Kubernetes remotely?
I used Cloud Code regularly to debug JS Node applications in Kubernetes, but I am having hard time to configure launch.json to do the same for TypeScript Node app. Sources for that is n... | |
It is (or can be) a part of the grafana helm chart, from what I remember when used it in the past. That configuration needs to go into the values.yaml when using that helm chart.
Specifically here to enable/configure dashboardProviders and here to provision the dashboard using dashboard id from the grafana website.
Can... | ###Instruction: I have a helm chart that deploys a kube-prometheus stack (prometheus, grafana, node-exporter), there are some json files (dashboards) in the grafana configuration, they are transferred to the grafana pod via configMap (common practice). I have a task to optimize this configuration to add grafana dashboa... | I have a helm chart that deploys a kube-prometheus stack (prometheus, grafana, node-exporter), there are some json files (dashboards) in the grafana configuration, they are transferred to the grafana pod via configMap (common practice). I have a task to optimize this configuration to add grafana dashboards via their id... | |
A service is basically a load balancer over a deployment (and a deployment is a replica set of multiple pods). So, chances are you want to be listing the deployments instead of the services in this case. Services and deployments are loosely coupled via tags, so there probably isn't a great way to go from services to ... | ###Instruction: How can I list all Kubernetes services along with the number of active pods associated with each service?
Currently, I can list all services with:
kubectl get services
I would like to add one additional column to the output, which lists active pod count for each service.
### Response: A service is basi... | How can I list all Kubernetes services along with the number of active pods associated with each service?
Currently, I can list all services with:
kubectl get services
I would like to add one additional column to the output, which lists active pod count for each service.
| |
df.rename() introduces some overhead, but you can skip that step by constructing the result directly with the new column names:
profile_data = [{new_cols[col]: profiles_df.loc[ix, col]
for col in new_cols}
for ix in profile_ids]
I do not know the answer to your second question.
| ###Instruction: When I run locally, in my laptop (using python 3.10 and pandas 1.3.5), the following code, I get 0.031s approximately (ball parking it):
profile_data = (
profiles_df[data_cols]
.loc[profile_ids]
.rename(columns=new_cols)
.to_dict("records")... | When I run locally, in my laptop (using python 3.10 and pandas 1.3.5), the following code, I get 0.031s approximately (ball parking it):
profile_data = (
profiles_df[data_cols]
.loc[profile_ids]
.rename(columns=new_cols)
.to_dict("records")
)
... | |
I think you were on the right path using 0 (and presumably 1) to access elements of the S3Catalogs array in your values.yaml file.
The following syntax works for me:
deployment.yaml:
- name: S3Catalogs__Catalogs__CatalogName_0
value: "{{ index .Values.S3Catalogs.Catalogs 0 "CatalogName" }}"
- name: S3Catalogs__... | ###Instruction: values.yaml
S3Catalogs:
Catalogs:
- CatalogName: BotVoice
Url: "http://sandbox5.*.com"
- CatalogName: WrongVoice
Url: "http://sandbox5.*.com"
the structure specified above needs to be filled in somehow in deployment.yaml
tried different variants, with brackets [0] does not accept.... | values.yaml
S3Catalogs:
Catalogs:
- CatalogName: BotVoice
Url: "http://sandbox5.*.com"
- CatalogName: WrongVoice
Url: "http://sandbox5.*.com"
the structure specified above needs to be filled in somehow in deployment.yaml
tried different variants, with brackets [0] does not accept.
- name:... | |
Change your bash script to this:
#!/bin/bash
cat test.txt | xargs -I {} bash -c {}
Works like a treat:
{"apiVersion":"v1","data":{"api-key":"abc123","database-url":"postgresql://localhost/mydatabase"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"example-config","namespace":"default"}}
name: example-con... | ###Instruction: I have a test.txt file that has bunch of kubernetes commands. It looks like:
kubectl get cm -o yaml | grep "test"
kubectl get pods
kubectl describe pod xxx
.
.
bash script read the test.txt and loop thru each command should executes.
However, when I run the script, it gives the following error.
Any ide... | I have a test.txt file that has bunch of kubernetes commands. It looks like:
kubectl get cm -o yaml | grep "test"
kubectl get pods
kubectl describe pod xxx
.
.
bash script read the test.txt and loop thru each command should executes.
However, when I run the script, it gives the following error.
Any ideas how to fix th... | |
You need to set the flag in the config-features ConfigMap. That ConfigMap should already have one key, named _example. You'll need to add your key above or below the example. The _example key is ignored by Knative, but provides a place for documentation for system administrators.
| ###Instruction: I am trying to deploy service on eks with knative installed on eks, here eks configured with fargate-profile.
I want to mount efs to my service for that i have created StorageClass,PersistentVolume and PersistentVolumeClaim below are the respective yml
storageclass.yml
kind: StorageClass
apiVersion: sto... | I am trying to deploy service on eks with knative installed on eks, here eks configured with fargate-profile.
I want to mount efs to my service for that i have created StorageClass,PersistentVolume and PersistentVolumeClaim below are the respective yml
storageclass.yml
kind: StorageClass
apiVersion: storage.k8s.io/v1
m... | |
k3s uses traefik, not nginx, so those annotations aren't doing anything... The referenced blog assumes you are using nginx instead
Restart your k3s cluster, but provide --no-deploy-traefik option, and install nginx ingress controller
Otherwise, you will need to refer to Traefik ingress docs on what matching annotations... | ###Instruction: I have a local k3s Kubernetes cluster created by multipass.
I am trying to set up Kafka using Ingress way based on this tutorial to make it accessible for clients running outside of Kubernetes.
Here are my steps:
First get my cluster IP by
➜ kubectl get nodes
NAME STATUS ROLES ... | I have a local k3s Kubernetes cluster created by multipass.
I am trying to set up Kafka using Ingress way based on this tutorial to make it accessible for clients running outside of Kubernetes.
Here are my steps:
First get my cluster IP by
➜ kubectl get nodes
NAME STATUS ROLES AGE VERSION
... | |
To allow clients to access the individual brokers, Strimzi needs to create one type: LoadBalancer service for every broker. In addition, it creates one more service targeting all brokers for bootstrapping (that can be disabled). This normally results in Kubernetes provisioning one load balancer per service -> so there ... | ###Instruction: I have a local k3s Kubernetes cluster created by Rancher Desktop.
I am trying to set up Kafka using load balancer based on this tutorial to make it accessible for clients running outside of Kubernetes.
Here are my steps:
kubectl create namespace hm-kafka
kubectl apply --filename="https://strimzi.io/inst... | I have a local k3s Kubernetes cluster created by Rancher Desktop.
I am trying to set up Kafka using load balancer based on this tutorial to make it accessible for clients running outside of Kubernetes.
Here are my steps:
kubectl create namespace hm-kafka
kubectl apply --filename="https://strimzi.io/install/latest?names... | |
What I'm gonna suggest is along the lines of what Michał has already done, but with a small tweak that might work for you.
So, your template can look something like this:
{{- if .Values.apply_template.true }}
...
{{- end }}
and add this to your values.yaml:
apply_template:
true: true
false: false
Now, as you ment... | ###Instruction: I'm reading helm documentation,
The templates/ directory is for template files. When Tiller evaluates a chart, it will send all of the files in the templates/ directory through the template rendering engine. Tiller then collects the results of those templates and sends them on to Kubernetes.
I have lo... | I'm reading helm documentation,
The templates/ directory is for template files. When Tiller evaluates a chart, it will send all of the files in the templates/ directory through the template rendering engine. Tiller then collects the results of those templates and sends them on to Kubernetes.
I have lots of different ... | |
From this git issue kubernetes_service_account issue has been successfully fixed using this manifest.
I found this alternative solution where changes are made using the terraform resource kubernetes_manifest to manually generate the service accounts along with their secret.
Can you try the main.tf file and let me know ... | ###Instruction: I'm using Terraform workload-identity module , to create Kubernetes service account in Google Cloud. When i apply the changes, I'm getting below warning.
"default_secret_name" is no longer applicable for Kubernetes v1.24.0
and above │ │ with
module.app-workload-identity.kubernetes_service_account_v1.... | I'm using Terraform workload-identity module , to create Kubernetes service account in Google Cloud. When i apply the changes, I'm getting below warning.
"default_secret_name" is no longer applicable for Kubernetes v1.24.0
and above │ │ with
module.app-workload-identity.kubernetes_service_account_v1.main, │
on ../..... | |
A CORS error is related to the fact that you are issuing a request (fetch, XHR, ...) from a Javascript origin to another service, the destination/backend, and the origin service is not allowed to according to the headers provided by that destination service.
It means that your service, the origin, the one deployed in A... | ###Instruction: I have updated the SSL certificates on my AKS service. But I am getting CORS error.
New certificates are getting reflected though.
Can someone provide a solution for it.
Here is the TLS part of my ingress file.
spec:
tls:
- hosts:
- "prodazure.thesolarlabs.com"
secretName: tls-secret
##... | I have updated the SSL certificates on my AKS service. But I am getting CORS error.
New certificates are getting reflected though.
Can someone provide a solution for it.
Here is the TLS part of my ingress file.
spec:
tls:
- hosts:
- "prodazure.thesolarlabs.com"
secretName: tls-secret
| |
I faced a similar issue:
have a wildcard certificate from Certificate Manager
wanted to use it for multiple k8 services for ingress with tls (in my case all services were grpc, but it doesn't matter would work the same for https)
First of all, GKE does not support Certificate Manager (at least not yet). Details here
... | ###Instruction: I have already a google managed SSL certificate created (with dns verification option). I want to use same certificate in my istio-ingress for SSL. Is there any possible annotations available ?
We can create ManagedCertificate resource in GKE, but it is uses the loadbalancer verification option which do... | I have already a google managed SSL certificate created (with dns verification option). I want to use same certificate in my istio-ingress for SSL. Is there any possible annotations available ?
We can create ManagedCertificate resource in GKE, but it is uses the loadbalancer verification option which does not support w... | |
If the container is not assigned to PVC then assuming ephemeral storage is assigned will be used by default.
To ensure that the container does not use more than allocated storage set the memory limits field spec.containers[].resources.limits.memory.
Below example is taken from this official kubernetes doc, similarly yo... | ###Instruction: I am familiar with Kubernetes documentation that describes how to setup limits for PVC. However, what if the container is not assigned PVC?
Suppose a Kubernetes container that simply defines:
- image: 'redis:7'
name: redis
... I keep writing data to this Redis instance.
How do I set a quota to ensur... | I am familiar with Kubernetes documentation that describes how to setup limits for PVC. However, what if the container is not assigned PVC?
Suppose a Kubernetes container that simply defines:
- image: 'redis:7'
name: redis
... I keep writing data to this Redis instance.
How do I set a quota to ensure that the conta... | |
Install the AWS Load Balancer Controller and use it to create an NLB for your NGINX ingress service. NLB is more performant than the Classic Load Balancer.
| ###Instruction: EKS Slowness:
All, I have an EKS cluster running and I am using nginx Ingress controller with Classic LB. However, while accessing the LB, it is too dead slow ( Not all the requests, but only a couple of requests ). I have the LB in the public subnet and my EC2 Instances are in the private subnet. And m... | EKS Slowness:
All, I have an EKS cluster running and I am using nginx Ingress controller with Classic LB. However, while accessing the LB, it is too dead slow ( Not all the requests, but only a couple of requests ). I have the LB in the public subnet and my EC2 Instances are in the private subnet. And my public subnets... | |
I don't think it is possible to get a consolidated list of all permissions that you have in a k8s cluster.
Looking at the help & examples for the kubectl auth can-i command it needs a VERB which is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. and a TYPE which is a Kubernetes resource.
The r... | ###Instruction: I am able to list, get pods, secrets, deployments and many other resources. I have cluster wide access for many resources. Is there some way to see the consolidated list of all permissions that I have in a kubernetes cluster?
The result of kubectl auth can-i '*' '*' is no though.
### Response: I don't ... | I am able to list, get pods, secrets, deployments and many other resources. I have cluster wide access for many resources. Is there some way to see the consolidated list of all permissions that I have in a kubernetes cluster?
The result of kubectl auth can-i '*' '*' is no though.
| |
Solved, just forced the Dockerfile to use version 2023.1.0, that fixed the problem and matched the operator dask version.
| ###Instruction: I'm attempting to deploy a dask application on Kubernetes/Azure. I have a Flask application server that is the client of a Dask scheduler/workers.
I installed the Dask operator as described here:
helm install --repo https://helm.dask.org --create-namespace -n dask-operator --generate-name dask-kubernete... | I'm attempting to deploy a dask application on Kubernetes/Azure. I have a Flask application server that is the client of a Dask scheduler/workers.
I installed the Dask operator as described here:
helm install --repo https://helm.dask.org --create-namespace -n dask-operator --generate-name dask-kubernetes-operator
This... | |
I had the same issue. Locally my pytorch model would return a prediction in 25 ms and then on Kubernetes it would take 5 seconds. The problem had to do with how many threads torch had available to use. I'm not 100% sure why this works, but reducing the number of threads sped up performance significantly.
Set the follow... | ###Instruction: I would like to make the result of a text classification model (finBERT pytorch model) available through an endpoint that is deployed on Kubernetes.
The whole pipeline is working but it's super slow to process (30 seconds for one sentence) when deployed. If I time the same endpoint in local, I'm getting... | I would like to make the result of a text classification model (finBERT pytorch model) available through an endpoint that is deployed on Kubernetes.
The whole pipeline is working but it's super slow to process (30 seconds for one sentence) when deployed. If I time the same endpoint in local, I'm getting results in 1 or... | |
This means that sort was sent a SIGKILL signal.
On modern systems without something weird going on, this almost always means you're out of RAM.
Linux supports something called "memory overcommit". Due to language runtimes (Java among them!) habitually allocating far more virtual memory than they'll ever need matching p... | ###Instruction: I ran bash script from java code to sort a file of tens of millions of strings of <25 characters. The java application is running in a kubernetes pod. The script failed and the error message is
bash: line 1: 425 Killed
sort /tmp/keys > /tmp/keys_sorted
What does 425 actually mean he... | I ran bash script from java code to sort a file of tens of millions of strings of <25 characters. The java application is running in a kubernetes pod. The script failed and the error message is
bash: line 1: 425 Killed
sort /tmp/keys > /tmp/keys_sorted
What does 425 actually mean here? How can I fi... | |
Create the structure
pod_data_update: |
[{% for i in pod_data %}
{% for n,p in i.container_name|zip(i.image_path) %}
{container_name: {{ n }}, image_path: {{ p }}, pod_name: {{ i.pod_name }}},
{% endfor %}
{% endfor %}]
, convert it from YAML, and update pod_data
- set_fact:
pod_data:... | ###Instruction: I've been trying to find a way to take a data collection that contains three fields where two of the fields can contain multiple items and convert/expand that data to a list where a row is added for every item in one of the fields.
The data is about kubernetes pods and the containers and images inside t... | I've been trying to find a way to take a data collection that contains three fields where two of the fields can contain multiple items and convert/expand that data to a list where a row is added for every item in one of the fields.
The data is about kubernetes pods and the containers and images inside them. I can get ... | |
Yes, you can assign permissions to dashboards in Grafana using Helm, as well as through the Grafana web UI or API.
To assign permissions using Helm, you can define a custom Grafana dashboard provisioning configuration file in your Helm chart's values.yaml or in a separate YAML file, and specify the appropriate permissi... | ###Instruction: When I create a dashboard in Grafana and export it in JSON, the role, user and group permissions I define are not saved with it.
I am looking for a way to assign permissions for each dashboard in a Grafana deployment with Helm, in which I already include the dashboards to use.
Does anyone know if this i... | When I create a dashboard in Grafana and export it in JSON, the role, user and group permissions I define are not saved with it.
I am looking for a way to assign permissions for each dashboard in a Grafana deployment with Helm, in which I already include the dashboards to use.
Does anyone know if this is possible? I ca... | |
"Nodeport is internally implemented on top of ClusterIP" - correct.
The port in the Kubernetes Service definition is used to specify the port on which the service will listen for traffic within the Kubernetes cluster. This is the port that will be exposed to other pods in the cluster as an endpoint for the service. Whe... | ###Instruction:
The nodeport takes in 3 parameters in the service yaml.
port
targetPort
nodePort
Since all you wanted was to map a port on the node(nodeport) to the port on the container(targetPort), why do we need to provide the port of the service?
Is this because Nodeport is internally implemented on top of Clust... |
The nodeport takes in 3 parameters in the service yaml.
port
targetPort
nodePort
Since all you wanted was to map a port on the node(nodeport) to the port on the container(targetPort), why do we need to provide the port of the service?
Is this because Nodeport is internally implemented on top of ClusterIP?
| |
Adding to GSerg suggestion
A cluster is a set of nodes running Kubernetes agents, managed by the control plane.You can scale your cluster by adding or removing nodes. The way you do this depends on how your cluster is deployed. The limit is 300000 containers.You can find this in this official doc.
As per this doc
Cont... | ###Instruction: I am starting on learning Containers and Kubernetes.
When watching tutorials on Conatiners and Kubernetes, often the instructors says "You could have thousands of containers".
I am trying to understand how we can end up with thousands of containers?
After deploying my single container app, how thousands... | I am starting on learning Containers and Kubernetes.
When watching tutorials on Conatiners and Kubernetes, often the instructors says "You could have thousands of containers".
I am trying to understand how we can end up with thousands of containers?
After deploying my single container app, how thousands of container in... | |
Helm includes a fromJson function; in fact, its documentation fairly closely matches your updated setup. So you can use this to read in the file, parse it, and then select the specific key out of it.
data:
{{- $secrets := .Files.Get "gh-secrets.json" | fromJson -}}
{{- range .Values.secrets }}
{{ . }}: {{ index $sec... | ###Instruction: I am creating a github actions step
.
.
.
steps:
name: export-secrets
run: |
echo '${{ toJSON(secrets) }}' >> gh-secrets.json
.
.
.
suppose the gh-secrets.json file is as below:
# gh-secrets.json
{"A": "a1", "B": "b1", "C": "c1"}
Then I am going to pull the helm charts and untar them and then ... | I am creating a github actions step
.
.
.
steps:
name: export-secrets
run: |
echo '${{ toJSON(secrets) }}' >> gh-secrets.json
.
.
.
suppose the gh-secrets.json file is as below:
# gh-secrets.json
{"A": "a1", "B": "b1", "C": "c1"}
Then I am going to pull the helm charts and untar them and then move gh-secrets.... | |
I don't think kubectl get pods supports field selectors based on the READY column directly.
But kubectl provides a method exporting the resource configuration (YAML) directly into JSON, -o json. Then, we can use jq to read, parse, and mutate K8s object results from kubectl.
In your case, you could use a command like th... | ###Instruction: I'm running this command:
# kubectl get pods --all-namespaces --field-selector=metadata.namespace!=kube-system,metadata.namespace!=monitoring,metadata.namespace!=rtf
Which gives me output like this:
NAMESPACE NAME READY STATUS RESTARTS AGE
123456-1234-1234-123... | I'm running this command:
# kubectl get pods --all-namespaces --field-selector=metadata.namespace!=kube-system,metadata.namespace!=monitoring,metadata.namespace!=rtf
Which gives me output like this:
NAMESPACE NAME READY STATUS RESTARTS AGE
123456-1234-1234-1234-123456789 som... | |
Unfortunately, there is no built-in way to do this. To get around this, you would have to attach the disk to a container or VM and inspect its contents
You need to add the pvc to a pod and copy the files using kubectl cp or list the files using kubectl exec to check the contents of PVC.
A simpler way is to create an in... | ###Instruction: I'm having a pain point with Kubernetes and I hope someone can help me out. I'm trying to see the contents of a PVC (Persistent Volume Claim), but it seems that the only way to do so is to mount the PVC into a container and check what's inside.
As you can imagine, this is quite cumbersome and not very p... | I'm having a pain point with Kubernetes and I hope someone can help me out. I'm trying to see the contents of a PVC (Persistent Volume Claim), but it seems that the only way to do so is to mount the PVC into a container and check what's inside.
As you can imagine, this is quite cumbersome and not very practical. I was ... | |
Looks like my issue was that my worker, scheduler, and web server container had different dag volume mounts from the ones I defined for my git-sync container.
This is what I had:
containers:
- name: airflow-scheduler
image: <redacted>
imagePullPolicy: IfNotPresent
envFrom:
... | ###Instruction: Im attempting to incorporate git-sync sidecar container into my Airflow deployment yaml so my private Github repo gets synced to my Airflow Kubernetes env every time I make a change in the repo.
So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, e... | Im attempting to incorporate git-sync sidecar container into my Airflow deployment yaml so my private Github repo gets synced to my Airflow Kubernetes env every time I make a change in the repo.
So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, each in their res... | |
Container name
Container name it's just the name you are providing to identify it.
it is useful to debug the POD when failing or running multiple containers inside single POD.
Get logs of specific container
kubectl logs <pod-name> -c <container-name>
Hostname
Only service get the DNS name record mapping not POD so you... | ###Instruction: In a Deployment of Kubernetes, what is the difference between spec.containers.name and spec.hostname?
spec:
containers:
- env:
- name: CONFIG_HOME
value: /config
image: my-image:1.0.0.0-SNAPSHOT
name: name-a
ports:
- containerPort: 8080
...
hostn... | In a Deployment of Kubernetes, what is the difference between spec.containers.name and spec.hostname?
spec:
containers:
- env:
- name: CONFIG_HOME
value: /config
image: my-image:1.0.0.0-SNAPSHOT
name: name-a
ports:
- containerPort: 8080
...
hostname: name-b
| |
How do you know if your application needs to be configured to use
workload identity or not?
That will be hard to say, it depends on your application if it's using any GCP service or needs Auth or not.
If it's not using and running simple API/Tasks you can run it without workload identity just drain node and migrate ... | ###Instruction: This doc https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have workload identity automatically enabled ,then you should configure your application to use workload ... | This doc https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have workload identity automatically enabled ,then you should configure your application to use workload identity before ... | |
There are a couple of things that should decide the impact. Depending on how the applications authenticate to google.
No authentication: can just be moved
Authenticating with service account json files: can be moved, but recommended to switch to workload identity for security reasons
Authenticating with the default co... | ###Instruction: This doc https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have workload identity automatically enabled ,then you should configure your application to use workload ... | This doc https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have workload identity automatically enabled ,then you should configure your application to use workload identity before ... | |
Your problem could be probably related to the directory structure you are defining across the different containers.
It is unclear in your question but, according to your containers definitions, your git repository should contain at least dags and plugins as top level directories:
/
├─ dags/
├─ plugins/
This structure ... | ###Instruction: Im attempting to incorporate git-sync sidecar container into my Airflow deployment yaml so my private Github repo gets synced to my Airflow Kubernetes env every time I make a change in the repo.
So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, e... | Im attempting to incorporate git-sync sidecar container into my Airflow deployment yaml so my private Github repo gets synced to my Airflow Kubernetes env every time I make a change in the repo.
So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, each in their res... | |
I was able to resolve the issue by these 3 steps,
step 1. You need to update your fluentbit image to latest
image: fluent/fluent-bit:2.1.1
You can get the deployment file from here
step 2: Add "Suppress_Type_Name On" to output-elasticsearch.conf
output-elasticsearch.conf: |
[OUTPUT]
Name ... | ###Instruction: i wan't to send pod log to ELK, buat after deploying fluentd i get Error, i got from tutorial Official Fluentd documentation
EKS Version 1.22
i put Suppress_Type_Name On, it's not solved this issue
[2022/06/20 16:23:07] [error] [output:es:es.0] HTTP status=400 URI=/_bulk, response:
{"error":{"root_cause... | i wan't to send pod log to ELK, buat after deploying fluentd i get Error, i got from tutorial Official Fluentd documentation
EKS Version 1.22
i put Suppress_Type_Name On, it's not solved this issue
[2022/06/20 16:23:07] [error] [output:es:es.0] HTTP status=400 URI=/_bulk, response:
{"error":{"root_cause":[{"type":"ille... | |
Your sample:
...
"resources":{"requests":{
"ephemeral-storage":"116Mi"}, # <-- incorrect
...
Try:
...
"resources":{
"requests":{
"ephemeral-storage": "116Mi",
"memory": "50Mi",
"cpu": "50m"
},
...
Here's a working example that runs a pod for 5m. Do kubectl describe pod busybox and check the Reque... | ###Instruction: I'm invoking Kaniko (I Docker image that can build Docker images) successfully in this way (EKS environment):
cat build.tar.gz | kubectl run kaniko-httpd-ex --quiet --stdin --rm --restart=Never --image=748960220740.dkr.ecr.eu-west-1.amazonaws.com/kaniko:0 --env=AWS_SDK_LOAD_CONFIG=true -- --destination=... | I'm invoking Kaniko (I Docker image that can build Docker images) successfully in this way (EKS environment):
cat build.tar.gz | kubectl run kaniko-httpd-ex --quiet --stdin --rm --restart=Never --image=748960220740.dkr.ecr.eu-west-1.amazonaws.com/kaniko:0 --env=AWS_SDK_LOAD_CONFIG=true -- --destination=748960220740.dkr... | |
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prod-demo-ingress
namespace: prod
labels:
env: prod
app: demo-ms
layer: frontend
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: demo.abc.in
http:
paths:
- pathType: Prefi... | ###Instruction: Getting below error while trying to create an ingress endpoint on k8s v1.26.3. i have created a k8s cluster using kops.
Error from server
(BadRequest): error when creating "ingress.yaml": Ingress in version
"v1" cannot be handled as a Ingress: strict decoding error: unknown
field "spec.rules[0].http.pa... | Getting below error while trying to create an ingress endpoint on k8s v1.26.3. i have created a k8s cluster using kops.
Error from server
(BadRequest): error when creating "ingress.yaml": Ingress in version
"v1" cannot be handled as a Ingress: strict decoding error: unknown
field "spec.rules[0].http.paths[0].backend.s... | |
First you create a service for your application. You use the default service type (ClusterIP).
Then you create an ingres-ngnix service of type load balancer.
And you need to create some Ingress rules to make URL paths to the service of your application.
And you need to set the annotation for the Ingres nginx controller... | ###Instruction: I'm fairly new to Kubernetes and having some problems understanding some things.
I'm setting up a cluster on Hetzner Cloud for client applications. In order to make the ingresses of the applications work, I deployed Hetzner Cloud Controller Manager. My question is, how do I expose the applications so i ... | I'm fairly new to Kubernetes and having some problems understanding some things.
I'm setting up a cluster on Hetzner Cloud for client applications. In order to make the ingresses of the applications work, I deployed Hetzner Cloud Controller Manager. My question is, how do I expose the applications so i can access them ... | |
There is no additional cost running the Ingress controller with GCP however you have to pay for the HTTP LoadBalancer that Ingress controller create.
It will be the same for all ingress controllers you use GCP, Nginx, Apache.
While Gateway also it's the same, it's controller only provides more flexibility however with ... | ###Instruction: I was wondering if the ingress controller of GKE comes either any additional costs, like a Google Cloud LoadBalancer, and if so is it possible to expose services with an ingress controller without the Google Cloud LoadBalancer. The same question is for GKE Gateway API.
I have tried to look at several pi... | I was wondering if the ingress controller of GKE comes either any additional costs, like a Google Cloud LoadBalancer, and if so is it possible to expose services with an ingress controller without the Google Cloud LoadBalancer. The same question is for GKE Gateway API.
I have tried to look at several pieces of document... | |
Before deleting the pods check why the pods are failing to create, if it is due to memory follow below steps:
If you are using docker run docker system prune -a to clean up some space taken by docker and then the node will get some space, drain the node and restart docker
Any container will write any amount of stora... | ###Instruction: When low on resources kubernetes starts to re-create pods but newer pods also fail, so they keep growing in number. The cluster becomes unusable. This seems an illogical behaviour. Is it possible to prevent it ? Is it possible to recover without deleting everything ?
light@o-node0:~/lh-orchestrator$ k g... | When low on resources kubernetes starts to re-create pods but newer pods also fail, so they keep growing in number. The cluster becomes unusable. This seems an illogical behaviour. Is it possible to prevent it ? Is it possible to recover without deleting everything ?
light@o-node0:~/lh-orchestrator$ k get pod
NAME ... | |
Curl Magic and trial and error.
Make sure that the user has the right permissions so you don't get the 403.
curl -k \
--http1.1 \
-H "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
-H "Sec-WebSocket-Version: 13" \
-i \
-N \
-L \
-k \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Authorization... | ###Instruction: While using Kubernetes API, I came across this issue where I am not able to pod exec into another pod using the API.
I made sure I am running a pod with a serviceAccount that has correct RBAC permissions (and both pods are in the same namespace). I tried with curl (7.74.0) but I stumbled upon this SO an... | While using Kubernetes API, I came across this issue where I am not able to pod exec into another pod using the API.
I made sure I am running a pod with a serviceAccount that has correct RBAC permissions (and both pods are in the same namespace). I tried with curl (7.74.0) but I stumbled upon this SO answer that curl m... | |
gRPC supports DNS as the default name-system.The following format is supported which is related to IPV4 address.
ipv4:address[:port][,address[:port],...] -- IPv4 addresses
Here,you can specify multiple comma-delimited addresses of the form address[:port]:
address is the IPv4 address to use.
port is the port to use. If ... | ###Instruction: I have a grpc service, here is the yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: staging
labels:
app: staging
spec:
replicas: 4
selector:
matchLabels:
app: staging
template:
metadata:
labels:
app: staging
spec:
containers:
- name: st... | I have a grpc service, here is the yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: staging
labels:
app: staging
spec:
replicas: 4
selector:
matchLabels:
app: staging
template:
metadata:
labels:
app: staging
spec:
containers:
- name: staging
im... | |
Disclaimer: At the time of writing I am not an expert on Kubernetes internals nor do I have any knowledge about Go. (However, I am familiar with the general functioning of K8s components and also with high/low level programming languages...) After about 10 min of research I've gained satisfactory answers:
Question
wha... | ###Instruction: I'm looking at the Kubernetes logs we see in our log aggregation tool (Splunk, but not important), and I'm trying to visualise image pull speeds over the day. message that appears in the logs is something like:
Successfully pulled image "registry.redhat.io/redhat/redhat-operator-index:v4.10" in 1.100152... | I'm looking at the Kubernetes logs we see in our log aggregation tool (Splunk, but not important), and I'm trying to visualise image pull speeds over the day. message that appears in the logs is something like:
Successfully pulled image "registry.redhat.io/redhat/redhat-operator-index:v4.10" in 1.100152244s
The value 1... | |
If could use the yaml-update-action, as example, adding this step before the deploy:
- name: Update values.yaml
uses: fjogeleit/yaml-update-action@main
with:
valueFile: '<the-manifest-filename>'
propertyPath: data['api-key']
value: ${{ secrets. API_KEY_DEV_QA }}
... | ###Instruction: I want to use github actions to deploy a kubernetes secret to my cluster but I want to leverage the secrets in github actions to store the secret value and inject into my manifest file. I'm new to github actions so not sure how it can be done
This is my github actions file
on:
push:
branches: ["... | I want to use github actions to deploy a kubernetes secret to my cluster but I want to leverage the secrets in github actions to store the secret value and inject into my manifest file. I'm new to github actions so not sure how it can be done
This is my github actions file
on:
push:
branches: ["main"]
workflo... | |
Interesting. Even though the yaml you provided is incorrect (.spec.containers map key must be unique), k8s seems to be fine with that.
In your case the pod is started with only the second container (name: nginx) in it though.
Is this login in a Pod not a Container??
Container.
So, with kubectl exec -it ol000dep-bc96... | ###Instruction: I have one deployment which has two containers.
apiVersion: apps/v1
kind: Deployment
metadata:
name: ol000dep
spec:
selector:
matchLabels:
app: ol000kube
replicas : 2
template:
metadata:
labels:
app: ol000kube
spec:
containers:
- name: django
... | I have one deployment which has two containers.
apiVersion: apps/v1
kind: Deployment
metadata:
name: ol000dep
spec:
selector:
matchLabels:
app: ol000kube
replicas : 2
template:
metadata:
labels:
app: ol000kube
spec:
containers:
- name: django
image: django... | |
After the action not working, then I decided to try to write the manifests directly in Azure through the Cloud Shell. The manifests worked as intended which resulted in the understanding that the problem is related to the Deploy action. Finally running the action with debugger activated, the problem finally exposed its... | ###Instruction: I'm setting up a GitHub action for deploying to Azure kubernetes. The deploy job looks as follows:
deploy:
name: Deploy to kubernetes
runs-on: ubuntu-latest
needs: docker
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup kubectl
uses: Azure/setup... | I'm setting up a GitHub action for deploying to Azure kubernetes. The deploy job looks as follows:
deploy:
name: Deploy to kubernetes
runs-on: ubuntu-latest
needs: docker
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup kubectl
uses: Azure/setup-kubectl@v3
... | |
Unfortunately, the v1 Ingress API in Kubernetes does not have sufficient capabilities to express Knative's routing requirements. Knative does support several ingress implementations (including Istio, Contour, and the Gateway API), but no one has written a plugin for the Nginx Ingress annotations.
Some of the capabilit... | ###Instruction: Is it possible to have Knative automatically create K8s Ingress resources?
Hello all,
Based on the following lines from documentation, I was wondering if I can have Knative automatically create the Ingress resources for my service? I haven't found details on this in the documentation.
After the service ... | Is it possible to have Knative automatically create K8s Ingress resources?
Hello all,
Based on the following lines from documentation, I was wondering if I can have Knative automatically create the Ingress resources for my service? I haven't found details on this in the documentation.
After the service has been created... | |
NOTE: this assumes that you're using a docker runtime in K8s! If not, use kaniko.
The docker daemon isn't mounted into the pod - this is the reason for your error. In order to build images, you will need one of these:
get the docker daemon mounted into each container of the pod
run the containers in the pod in privile... | ###Instruction: I am using the docker dind image and creating a pod. When I try to run docker build inside the pod, I get an error.
apiVersion: v1
kind: Pod
metadata:
name: dockercontainer
namespace: default
spec:
containers:
- image: docker:24.0.0-rc.1-dind
name: docker... | I am using the docker dind image and creating a pod. When I try to run docker build inside the pod, I get an error.
apiVersion: v1
kind: Pod
metadata:
name: dockercontainer
namespace: default
spec:
containers:
- image: docker:24.0.0-rc.1-dind
name: dockercontainer
... | |
As per the grafana docker documentation, any config in the grafana.ini file can be set at runtime using environment variables of the format GF_<SectionName>_<KeyName>__FILE, which represent paths to files containing the actual value. So we can use the environment variables GF_SECURITY_ADMIN_USER__FILE, GF_SECURITY_ADMI... | ###Instruction: I am trying to get default Grafana dashboard and admin username/password on deploy.
I tried creating values.yaml but doesn't seem like its working
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: monitoring
labels:
grafana_dashboard: "1"
data:
dashboard-k8.json: | (3)
... | I am trying to get default Grafana dashboard and admin username/password on deploy.
I tried creating values.yaml but doesn't seem like its working
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: monitoring
labels:
grafana_dashboard: "1"
data:
dashboard-k8.json: | (3)
${indent(4, da... | |
Two things that caught my eye:
The Ingress controller you are using seems to might require an ingressClassName defined in the Ingress resource, so that the ingress controller takes this resource (and its configs) into account.
More about Ingress class:
Ingress class
Default IngressClass
You should change the path: ... | ###Instruction: I installed pods and services with deployment.yml,service.yml and ingress.yml like this below.
deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: apa000dep
spec:
selector:
matchLabels:
app: apa000kube
replicas : 3
template:
metadata:
labels:
app: apa0... | I installed pods and services with deployment.yml,service.yml and ingress.yml like this below.
deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: apa000dep
spec:
selector:
matchLabels:
app: apa000kube
replicas : 3
template:
metadata:
labels:
app: apa000kube
spec:... | |
The issue is from configuration. One possible work around is reinstalling the filebeat and sending the logs to elastic search.
Follow the content in the blog by
Semih Sezer which has the process of sending Airflow logs to elastic search using filebeat.
| ###Instruction: i want to ingested containers json log data using filebeat deployed on kubernetes, i am able to ingest the logs to but i am unable to format the json logs in to fields
following is the logs visible in kibana
I want to take out the fields from messages above e.g. field for log.level, message, service.na... | i want to ingested containers json log data using filebeat deployed on kubernetes, i am able to ingest the logs to but i am unable to format the json logs in to fields
following is the logs visible in kibana
I want to take out the fields from messages above e.g. field for log.level, message, service.name and so on
Fol... | |
It is possible for CPU throttling to indirectly cause memory issues by making garbage collection in the JVM less efficient or escalate an already inefficient memory usage, as such it may result in slower response times for your application, leading to more requests being queued up and more memory being used making the ... | ###Instruction: My pod is running in k8s and restarts every 20-30 hours, caused by an OOMKilled error, here are the configured limits:
limits:
cpu: 600m
memory: 1536Mi
requests:
cpu: 150m
memory: 1536Mi
In the container is a JVM (Spring Boot) running with the following Options:
-Xms256m -Xmx1G -Xde... | My pod is running in k8s and restarts every 20-30 hours, caused by an OOMKilled error, here are the configured limits:
limits:
cpu: 600m
memory: 1536Mi
requests:
cpu: 150m
memory: 1536Mi
In the container is a JVM (Spring Boot) running with the following Options:
-Xms256m -Xmx1G -Xdebug -XX:+UseG1GC... | |
you can install the ingress controller and expose it with a TCP port opening with the controller or you can change the service type to LB instead clusterIP which will expose the service directly however you might have to take care about the type of LB coz MySQL will be using TCP maybe so HTTP LB may not work.
Doc for r... | ###Instruction: I have been trying to expose MySQL InnoDB Cluster setup on OCI OKE to Internet. This cluster was installed using MySQL Operator and the pods are listening on to port 6446 and 6447. I have ClusterIP to connect to pods by exec'ing into the pod. However, I have failed to find any best way to expose this c... | I have been trying to expose MySQL InnoDB Cluster setup on OCI OKE to Internet. This cluster was installed using MySQL Operator and the pods are listening on to port 6446 and 6447. I have ClusterIP to connect to pods by exec'ing into the pod. However, I have failed to find any best way to expose this cluster to intern... | |
For that, you can write a TelemetryProcessor:
Telemetry processors allow you to completely replace or discard a telemetry item.
It could look like this:
public class ServiceBusTelemetryReducer : ITelemetryProcessor
{
private readonly ITelemetryProcessor _next;
public ServiceBusTelemetryReducer(IT... | ###Instruction: I have a Kubernetes app that is constantly logging ServiceBusReceiver.Receive Dependency calls. It is creating 2000 logs per hour, per instance.
In the TelemtryClient there are only custom methods for TrackEvent and TrackException so these look like they are coming from somewhere else and I haven't been... | I have a Kubernetes app that is constantly logging ServiceBusReceiver.Receive Dependency calls. It is creating 2000 logs per hour, per instance.
In the TelemtryClient there are only custom methods for TrackEvent and TrackException so these look like they are coming from somewhere else and I haven't been able to trace i... | |
It depends on your use case and what you are planning for.
If you are expecting your service to forward a request to any of the available POD of statefulset you can create a normal clusterIP service.
You have the requirement of getting specific DNS records or You need the IP of each available POD headless (with selecto... | ###Instruction: This is first time I am using statefulsets in openshift and would like to understand how do you expose the services to outside world? Do you create two services headless and another normal one? How to get this working?
### Response: It depends on your use case and what you are planning for.
If you are ... | This is first time I am using statefulsets in openshift and would like to understand how do you expose the services to outside world? Do you create two services headless and another normal one? How to get this working?
| |
Telepresence version 1 is no longer supported but you can install the new version here. Feel free also to join the Telepresence open source slack channel if you have further questions or want to join our weekly help session for further assistance.
| ###Instruction: I am trying to install telepresence version 1 in ubuntu 22.04 but I don't have the download links to it.
### Response: Telepresence version 1 is no longer supported but you can install the new version here. Feel free also to join the Telepresence open source slack channel if you have further questions ... | I am trying to install telepresence version 1 in ubuntu 22.04 but I don't have the download links to it.
| |
According to your https://pastebin.com/7x3NjD8s, you got 401 Unauthorized from ECR. Since you have an On-Premises Kubernetes instance you need to use a process to set your AWS credentials on ImagePullSecrets on your PODs. I would use this one: https://github.com/upmc-enterprises/registry-creds, it will collect your AWS... | ###Instruction: I have a helm chart which is using aws ecr to pull images and deploy them into native Kubernetes:
Chart.yml:
apiVersion: v2
description: helm chart for microservice-registry
name: microservice-registry
type: application
version: 0.0.1
values.yaml
namespace:
replica: 1
labels:
app: microservice-regis... | I have a helm chart which is using aws ecr to pull images and deploy them into native Kubernetes:
Chart.yml:
apiVersion: v2
description: helm chart for microservice-registry
name: microservice-registry
type: application
version: 0.0.1
values.yaml
namespace:
replica: 1
labels:
app: microservice-registry
imagePullSe... | |
Looks like there are 2 versions of ingress controller.
Which K8S community has been maintaining which is https://github.com/kubernetes/ingress-nginx
Which Nginx is maintaining(Opensource & Paid): https://github.com/nginxinc/kubernetes-ingress
The second one seems to be doing strict round robin(still testing) after ... | ###Instruction: I'm trying to set up an ingress controller in Kubernetes that will give me strict alternation between two (or more) pods running in the same service.
My testing setup is a single Kubernetes node, with a deployment of two nginx pods.
The deployment is then exposed with a NodePort service.
I've then deplo... | I'm trying to set up an ingress controller in Kubernetes that will give me strict alternation between two (or more) pods running in the same service.
My testing setup is a single Kubernetes node, with a deployment of two nginx pods.
The deployment is then exposed with a NodePort service.
I've then deployed an ingress c... | |
The kubernetes provider configuration contains an output from the module declared as aks. Prior to version 2.4.0 of the Kubernetes provider it was possible to simultaneously manage a Kubernetes cluster backing infrastructure and the cluster itself at initial provisioning (or subsequent Delete/Create) by configuring the... | ###Instruction: In my terraform project, I have my own module which creates an AKS cluster with RBAC enabled. This module has an output aks_public_fqdn which holds the FQDN of the cluster.
module "aks" {
source = "./aks"
environment = local.environment
region = local.region
instance_id ... | In my terraform project, I have my own module which creates an AKS cluster with RBAC enabled. This module has an output aks_public_fqdn which holds the FQDN of the cluster.
module "aks" {
source = "./aks"
environment = local.environment
region = local.region
instance_id = local.worklo... | |
Not sure how you are setting up the cluster but if you using Helm chart or something it might be creating the statefulsets.
Statefulsets will be having separate PVC unless you setup or plan to use shared Block storage (PVC).
Each stateful set suppose 3 Node and 3 Salve total have 6 PVC and between those Redis bus will ... | ###Instruction: We currently have a 3 node redis cluster running on OKE which has 3 Master nodes only( no replica nodes, each running on their own pod ) with no persistent storage . As an enhancement we are adding 3 replica nodes and Block volumes for persistent storage.
We will have 6 pods ( one for each redis cluster... | We currently have a 3 node redis cluster running on OKE which has 3 Master nodes only( no replica nodes, each running on their own pod ) with no persistent storage . As an enhancement we are adding 3 replica nodes and Block volumes for persistent storage.
We will have 6 pods ( one for each redis cluster node with 3 ma... | |
I was able to fix the issue by adding below annotation
"alb.ingress.kubernetes.io/target-type": ip
Referece - 1695
| ###Instruction: While this question might seem duplicate at first, I would ask people to go through it once. I have checked SO, for all similar questions before posting this.
I have an ALB ingress controller which has a registered Target Group for an application that I am trying to access via the ALB.
However the targe... | While this question might seem duplicate at first, I would ask people to go through it once. I have checked SO, for all similar questions before posting this.
I have an ALB ingress controller which has a registered Target Group for an application that I am trying to access via the ALB.
However the target group binding ... | |
With the help of a colleague, we were able to solve this with vars:
# kustomization.yaml
resources:
- deployment.yaml
- custom-resource.yaml
namePrefix: my-prefix-
secretGenerator:
- name: my-secret
files:
- password.txt
configurations:
- configurations/var-reference.yaml
vars:
- name: MY-VARIABLE
... | ###Instruction: I'm using kustomize to manage a rather standard deployment. I have a namePrefix to modify the resource names.
I need to add a custom resource to my configuration which itself autogenerates a secret after creation. The secret name consists of a fixed prefix and the name of the custom resource. I want to ... | I'm using kustomize to manage a rather standard deployment. I have a namePrefix to modify the resource names.
I need to add a custom resource to my configuration which itself autogenerates a secret after creation. The secret name consists of a fixed prefix and the name of the custom resource. I want to reference this s... | |
Easiest way you can use the allowVolumeExpansion in StorageClass , i did for Elasticsearch Database
Checkout my article on that : https://medium.com/@harsh.manvar111/resizing-pvc-disk-in-gke-c5b882c90f7b
strogeclasss
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
…
provisioner: kubernetes.io/gce-pd
allowVo... | ###Instruction: I want to resize Kubernetes Persistent Volume. So I tried by editing
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-pvc
labels:
app: postgres
spec:
storageClassName: aws-gp2
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
But I got error ... | I want to resize Kubernetes Persistent Volume. So I tried by editing
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-pvc
labels:
app: postgres
spec:
storageClassName: aws-gp2
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
But I got error following error
... | |
The error “Unable to connect to the Server TCP I/O timeout” happens usually due to some common causes and you can try to troubleshoot based on below steps :
1)Your Kubernetes cluster is not running. Verify that your cluster has been started, e.g. by pinging the IP address.
2)There are networking issues that prevent you... | ###Instruction: Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.
After creating argocd namespace, I just try these commands
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
This error persists:
Unable to con... | Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.
After creating argocd namespace, I just try these commands
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
This error persists:
Unable to connect to the serv... | |
Simply replace the following line (wrong):
.dockerconfigjson: '{% include "template-1.yaml.j2" | b64decode %}'
with (right):
.dockerconfigjson: '{{ lookup("template", "template-1.yaml.j2") | b64encode }}'
The template lookup will fetch the result of the given template as a string which can then be passed to the b64en... | ###Instruction: I have 2 templates in my Ansible playbook:
template-1.yaml.j2:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": {{ (user.name + ':' + user.pass) | b64encode }}
}
}
template-2.yaml.j2:
---
apiVersion: v1
data:
.dockerconfigjson: '{% include "template-1.yaml.j2" %}'... | I have 2 templates in my Ansible playbook:
template-1.yaml.j2:
{
"auths": {
"https://index.docker.io/v1/": {
"auth": {{ (user.name + ':' + user.pass) | b64encode }}
}
}
template-2.yaml.j2:
---
apiVersion: v1
data:
.dockerconfigjson: '{% include "template-1.yaml.j2" %}'
kind: Secret
me... | |
There isn't anything wrong with how you've done it, you could potentially restructure it a little to reduce the if nesting.
err := r.Get(ctx, client.ObjectKey{Name: sCrName, Namespace: sCrNs}, &eCmp)
// Object exists, patch it
if err == nil {
patch := client.MergeFrom(eCmp.DeepCopy())
if err := r.Patch(ctx, &eC... | ###Instruction: Im using the following code inside kubebuilder controller to read before update for k8s custom resource, im checking if the object exist if yes check if need to update, if not create it , as I need to use it in several places
I want to ask:
if there is some helper that can help me to reduce this boilar... | Im using the following code inside kubebuilder controller to read before update for k8s custom resource, im checking if the object exist if yes check if need to update, if not create it , as I need to use it in several places
I want to ask:
if there is some helper that can help me to reduce this boilarplate
code ? som... | |
you can use the controllerutil.CreateOrUpdate() function from the sigs.k8s.io/controller-runtime/pkg/controller/controllerutil package to reduce boilerplate code.
use controllerutil.CreateOrUpdate() function:
if err := controllerutil.CreateOrUpdate(ctx, r.Client, &eCmp, func() error {
return r.Patch(ctx, &eCmp, cli... | ###Instruction: Im using the following code inside kubebuilder controller to read before update for k8s custom resource, im checking if the object exist if yes check if need to update, if not create it , as I need to use it in several places
I want to ask:
if there is some helper that can help me to reduce this boilar... | Im using the following code inside kubebuilder controller to read before update for k8s custom resource, im checking if the object exist if yes check if need to update, if not create it , as I need to use it in several places
I want to ask:
if there is some helper that can help me to reduce this boilarplate
code ? som... | |
You can the service name, which will be the same each time K8s DNS will take care of it.
- name: KAFKA_ZOOKEEPER_CONNECT
value: zookeeper-service
K8s work that way, internal communication happens over the service name use the IP if required else ClusterIP in nature may changes IP with new deployment of service or an... | ###Instruction: I have followed the directives of this web site How To Deploy Apache Kafka With Kubernetes (DZone) to deploy a Kafka broker with its Zookeeper. (I've only changed the namespaces names).
apiVersion: v1
kind: Service
metadata:
labels:
app: zookeeper-service
name: zookeeper-service
namespace: eco... | I have followed the directives of this web site How To Deploy Apache Kafka With Kubernetes (DZone) to deploy a Kafka broker with its Zookeeper. (I've only changed the namespaces names).
apiVersion: v1
kind: Service
metadata:
labels:
app: zookeeper-service
name: zookeeper-service
namespace: ecoemploi
spec:
t... | |
We had the same problem. How we resolved it:
Copy output from "kubectl get pvc" to get the link between the pvc and the pv.
Locate the disk in azure portal and create a snapshot of the disk. (In the MC_ resource group to the aks
Edit deployment in kubernetes and set replicacout to 0. Save and see that the pod are stop... | ###Instruction: In a Azure AKS kubernetes cluster, after a cluster version upgrade the nodepool nodes, I have a PV that has this node affinity:
Node Affinity:
Required Terms:
Term 0: failure-domain.beta.kubernetes.io/region in [westeurope]
The nodes don't have the label so the Deployment creates a Pod tha... | In a Azure AKS kubernetes cluster, after a cluster version upgrade the nodepool nodes, I have a PV that has this node affinity:
Node Affinity:
Required Terms:
Term 0: failure-domain.beta.kubernetes.io/region in [westeurope]
The nodes don't have the label so the Deployment creates a Pod that cannot be sche... | |
I was able to make it work.
Some more context is that we are leveraging spark on k8s operator, so we pass in the zip file via pyFiles
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator
This work the same as the following
spark_session.sparkContext.addPyFile('/opt/spark/pyfiles/python.zip')
if we set it up in... | ###Instruction: Running into the following error when use custom UDF
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyspark/worker.py", line 603, in main
func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type)
File "/usr/local/lib/python3.8/dist-packag... | Running into the following error when use custom UDF
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyspark/worker.py", line 603, in main
func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type)
File "/usr/local/lib/python3.8/dist-packages/pyspark/worke... | |
The syntax that worked for me was:
spec:
...
template:
...
spec
...
containers:
env:
- name: PORT
valueFrom:
configMapKeyRef:
name: env-configmap
key: PORT
- name: ELASTIC_PASSWORD
v... | ###Instruction: I'm currently working on a Kubernetes deployment file and I need to set the environment variables that the container will have.
Is there a way to set Kubernetes secrets as environment variables in the deployment file?
Here is a dummy file to help explain:
### Response: The syntax that worked for me wa... | I'm currently working on a Kubernetes deployment file and I need to set the environment variables that the container will have.
Is there a way to set Kubernetes secrets as environment variables in the deployment file?
Here is a dummy file to help explain:
| |
As per official doc:
After disabling Kubernetes Select Apply & Restart to save the
settings.This stops and removes Kubernetes containers, and also
removes the /usr/local/bin/kubectl command.
Below troubleshooting steps can help you:
If you don't have kubectl installed in /usr/local/bin, Docker will
install it for yo... | ###Instruction: I can still access kubectl after disabling Kubernetes from Docker Desktop v4.18.0
On running the kubectl version command, following output is displayed:
Environment details:
- OS: MacOS Ventura 13.3.1 (M1)
- Docker Desktop: v4.18.0
I want to entirely remove kubectl and related services, so... | I can still access kubectl after disabling Kubernetes from Docker Desktop v4.18.0
On running the kubectl version command, following output is displayed:
Environment details:
- OS: MacOS Ventura 13.3.1 (M1)
- Docker Desktop: v4.18.0
I want to entirely remove kubectl and related services, so that I can do a... | |
Play with argocd in the killercoda playground. This is probably the easiest way to get started learning and messing around with it.
https://killercoda.com/mabusaa/course/argocd-endusers-scenarios/00-argocd-playground
Or follow a guide like this:
https://dev.to/abhinavd26/all-about-argocd-a-beginners-guide-33c9
Make sur... | ###Instruction: Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.
After creating argocd namespace, I just try these commands
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
This error persists:
Unable to con... | Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.
After creating argocd namespace, I just try these commands
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
This error persists:
Unable to connect to the serv... | |
I'm also confused by this lately. Here are some findings after a while of digging in the source code and the docs.
'Eviction' here actually means two slightly different concepts, which are both documented in the official docs: Node-Pressure Eviction and API-Initiated Eviction. They can really be mixed up when we just t... | ###Instruction: I'm having trouble understanding what pod Eviction means mechanically in terms of K8s's actions -- what exactly does K8s do with the pod during eviction?
Specifically, my main question is this:
Under what conditions is an Evicted pod actually deleted from ETCD?
Under what conditions is an Evicted pod ju... | I'm having trouble understanding what pod Eviction means mechanically in terms of K8s's actions -- what exactly does K8s do with the pod during eviction?
Specifically, my main question is this:
Under what conditions is an Evicted pod actually deleted from ETCD?
Under what conditions is an Evicted pod just killed withou... | |
STDOUT is usually a command’s normal output, and STDERR is typically used to output error messages. By default, docker/container logs show the command’s STDOUT and STDERR. This information that is logged and the format of the log depends almost entirely on the container’s endpoint command. When you use docker/ containe... | ###Instruction: when i use docker as CRI:
{"log":"I0421 14:23:18.944348 1 node.go:172] Successfully retrieved node IP: 192.168.49.2\n","stream":"stderr","time":"2023-04-21T14:23:18.944635198Z"}
{"log":"I0421 14:23:18.944724 1 server_others.go:142] kube-proxy node IP is an IPv4 address (192.168.49.2), assume... | when i use docker as CRI:
{"log":"I0421 14:23:18.944348 1 node.go:172] Successfully retrieved node IP: 192.168.49.2\n","stream":"stderr","time":"2023-04-21T14:23:18.944635198Z"}
{"log":"I0421 14:23:18.944724 1 server_others.go:142] kube-proxy node IP is an IPv4 address (192.168.49.2), assume IPv4 operation\... | |
The error suggests that the container is already using more memory than the limit you're trying to impose. If the limit were to be imposed in this case, then any further attempts to allocate memory would fail. That would usually cause processes to abort, which is bad. Also, the container would already be violating t... | ###Instruction: I am using 'crictl' tool to work with containerd runtime containers (under kubernetes) in a managed cluster.
I'm trying to set the memory limit (in bytes) to 16MB with the command:
crictl -r unix:///run/containerd/containerd.sock update --memory 16777216 c60df9ef3381e
And get the following error:
E1219 ... | I am using 'crictl' tool to work with containerd runtime containers (under kubernetes) in a managed cluster.
I'm trying to set the memory limit (in bytes) to 16MB with the command:
crictl -r unix:///run/containerd/containerd.sock update --memory 16777216 c60df9ef3381e
And get the following error:
E1219 11:10:11.616194 ... | |
I solved my issue, by following this guide
I then exported resulting stack into my CloudFormation script.
Then to deploy my application I updated my kubernetes manifest to:
---
apiVersion: v1
kind: Namespace
metadata:
name: example
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: example
name: deploy... | ###Instruction: I am trying to create EKS Fargate cluster and deploy example Spring Boot application with 1 endpoint, I successfully create stack with following CloudFormation script:
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'AWS CloudFormation template for EKS Fargate managed Kubernetes cluster with exp... | I am trying to create EKS Fargate cluster and deploy example Spring Boot application with 1 endpoint, I successfully create stack with following CloudFormation script:
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'AWS CloudFormation template for EKS Fargate managed Kubernetes cluster with exposed endpoints'
... | |
Currently, it is not possible to have multiple tenants in the same namespace because the MinIO operator always creates services with the names minio, minio-console, and minio-hl in the installation namespace.
However, a workaround is to use a different namespace for each tenant and use the DNS in Kubernetes to access t... | ###Instruction: I am trying out the minio-operator.
This is a two part question regarding namespaces mentioned in the docs.
I would like have a namespace in which I deploy different kinds of operators.
Eventhough the docs require a dedicated namespace for the operator, I seem to experience no problems so far, putting a... | I am trying out the minio-operator.
This is a two part question regarding namespaces mentioned in the docs.
I would like have a namespace in which I deploy different kinds of operators.
Eventhough the docs require a dedicated namespace for the operator, I seem to experience no problems so far, putting all my operators ... | |
Wow, great spot... The enable flag isn't there. You might want to raise this on the Azure PowerShell GitHub.
As a workaround, the Azure CLI does allow enabling of local accounts.
az aks update --name cluster --resource-group rg --enable-local-accounts
https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-late... | ###Instruction: I am trying to enable the local account on an AKS cluster (version 1.24.10) by running commands from an AzureDevOps yaml pipeline.
The “old” az aks command : az aks update -g <myresourcegroup> -n <myclustername> --enable-local used to serve me well to enable a local account on an AKS cluster.
In the ya... | I am trying to enable the local account on an AKS cluster (version 1.24.10) by running commands from an AzureDevOps yaml pipeline.
The “old” az aks command : az aks update -g <myresourcegroup> -n <myclustername> --enable-local used to serve me well to enable a local account on an AKS cluster.
In the yaml pipeline, how... | |
You can check the prerequisites when running Spark in Kubernetes to determine if it will increase its performance
A running Kubernetes cluster at version >= 1.22 with access configured to it using kubectl. If you do not already have a working Kubernetes cluster, you may set up a test cluster on your local machine usi... | ###Instruction: I have been trying to deploy spark and jupyter note on minikube. I used helm charts for deploying both
Jupyter notebook - https://artifacthub.io/packages/helm/pyspark-notebook-helm/pyspark-notebook
Spark - https://bitnami.com/stack/spark/helm
While able to establish to the master using
spark = SparkSes... | I have been trying to deploy spark and jupyter note on minikube. I used helm charts for deploying both
Jupyter notebook - https://artifacthub.io/packages/helm/pyspark-notebook-helm/pyspark-notebook
Spark - https://bitnami.com/stack/spark/helm
While able to establish to the master using
spark = SparkSession.builder.mas... | |
I recall seeing this before and finding an answer before.
https://cloud.google.com/container-registry/docs/pulling-cached-images
Talks about it a little, but I'll explain it so it's easy to follow.
If I spin up a private GKE cluster and I create 3 deployments:
1st uses image: nginx:latest
2nd uses image: nginx:stable
... | ###Instruction: This is a very wried thing.
I created a private GKE cluster with a node pool of 3 nodes. Then I have a replica set with 3 pods. some of these pods will be scheduled to one node.
So one of these pods always get ImagePullBackOff, I check the error
Failed to pull image "bitnami/mongodb:3.6": rpc error: c... | This is a very wried thing.
I created a private GKE cluster with a node pool of 3 nodes. Then I have a replica set with 3 pods. some of these pods will be scheduled to one node.
So one of these pods always get ImagePullBackOff, I check the error
Failed to pull image "bitnami/mongodb:3.6": rpc error: code = Unknown de... | |
This check - input.request.namespace == ["alpha", "beta"] will evaluate to true only if the input.request.namespace field is exactly identical to the array it is being compared to. i.e. - Only if input.request.namespace is an array with exactly two values, the first one being "alpha" and the second one "beta"
To check ... | ###Instruction: Since 2 days I try to create a simple OPA Gatekeeper Policy which blocks the creation of pods with "privileged:true" for some namespaces.
Some more details:
Im using opa-gatekeeper in version 3.13 installed by following these instructions.
To enable the policy, first I created a ConstraintTemplate:
apiV... | Since 2 days I try to create a simple OPA Gatekeeper Policy which blocks the creation of pods with "privileged:true" for some namespaces.
Some more details:
Im using opa-gatekeeper in version 3.13 installed by following these instructions.
To enable the policy, first I created a ConstraintTemplate:
apiVersion: template... | |
I think (!?) you can't use negation with kubectl's implementation of JSONPath.
Once you use the --output flag with kubectl, you lose the ability to render the command's output using the default table format. With e.g. Bash column can provide similar out.
Consider using a generic JSON processing tool such as jq.
An adv... | ###Instruction: I want to filter namespaces based on the annotation. I do not want namespace which has annotation as components\.gke\.io/layer=="addon".
I tried kubectl get ns -o=jsonpath='{.items[?(@.metadata.annotations.components\.gke\.io/layer=="addon")].metadata.name}' command and at least it gives me the result b... | I want to filter namespaces based on the annotation. I do not want namespace which has annotation as components\.gke\.io/layer=="addon".
I tried kubectl get ns -o=jsonpath='{.items[?(@.metadata.annotations.components\.gke\.io/layer=="addon")].metadata.name}' command and at least it gives me the result but it is not com... | |
Try using Predis session handler instead.
Setup your services
# services.yaml
Redis:
class: \Predis\Client
arguments:
- 'redis://%env(REDIS_HOST)%:%env(REDIS_PORT)%'
predis_session_handler:
class: 'Predis\Session\Handler'
arguments:
- '@Redis'
Configu... | ###Instruction: Having an app running perfectly on my local with docker.
When I deploy it, I can't get why a new session is started on each request. It seems it can't come from the code since it's exactly the same.
The session is stored on a redis DB (I have the same bug if I use the filesystem session). It's there I c... | Having an app running perfectly on my local with docker.
When I deploy it, I can't get why a new session is started on each request. It seems it can't come from the code since it's exactly the same.
The session is stored on a redis DB (I have the same bug if I use the filesystem session). It's there I can see all the n... | |
The issue was that the networking solution was not routing to the service because the health checks had not been updated with the correct routes.
readinessProbe:
httpGet:
path: /health/ready
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
time... | ###Instruction: I am trying to modify a kubernetes keycloak deployment to respond on /auth in place of /. I see in the documentation that this should be possible by setting --http-relative-path to /auth. I have attempted this and it causes all the services to receive Connection refused from the keycloak service. Is thi... | I am trying to modify a kubernetes keycloak deployment to respond on /auth in place of /. I see in the documentation that this should be possible by setting --http-relative-path to /auth. I have attempted this and it causes all the services to receive Connection refused from the keycloak service. Is this possibly an is... | |
As ENTRYPOINT you specify Java to run ./ws.jar, assuming it would resolve from within work directory /app.
At runtime you get the error message that /ws.jar is not accessible, which looks like an absolute path.
When running your container with /bin/bash, please check out where your jar file exists and which mode it has... | ###Instruction: I'm using this Dockerfile configuration
FROM openjdk:17-alpine
ARG APP_HOME=/app
WORKDIR $APP_HOME
COPY ./target/ws-exec.jar ws.jar
ENV JAVA_OPTS="-Dspring.profiles.active=prod -Dspring.application.name=words"
ENTRYPOINT java $JAVA_OPTS -jar ./ws.jar $JAVA_ARGS
After deploying it to minikube, I se... | I'm using this Dockerfile configuration
FROM openjdk:17-alpine
ARG APP_HOME=/app
WORKDIR $APP_HOME
COPY ./target/ws-exec.jar ws.jar
ENV JAVA_OPTS="-Dspring.profiles.active=prod -Dspring.application.name=words"
ENTRYPOINT java $JAVA_OPTS -jar ./ws.jar $JAVA_ARGS
After deploying it to minikube, I see the only log:
... | |
I had the same issue. Fixed it with:
removed whitelist annotation from ns.
deployed the pod.
kubectl get pod <pod name> -o yaml
in my case, I had a couple of extra toleration injected without me realizing.
revert 1 (annotations on ns).
| ###Instruction:
I have been trying to make use of Azure Spot instances on Azure Kubernetes Service (AKS) - version 1.19.11 and to enable scheduling of pods onto those nodes, I am trying to use the PodTolerationRestriction admission controller.
I can confirm that the PodTolerationRestriction controller is enabled as I ... |
I have been trying to make use of Azure Spot instances on Azure Kubernetes Service (AKS) - version 1.19.11 and to enable scheduling of pods onto those nodes, I am trying to use the PodTolerationRestriction admission controller.
I can confirm that the PodTolerationRestriction controller is enabled as I am having no iss... | |
The token is probably simply too big to be handled as an auth header. Request headers have a max size of 4096 KB (depends on the browser and/or proxy implementation) - link
Allow logging in when a very long token is provided (i.e. Azure with groups, etc.) - link to GitHub Repo of Kubernetes dashboard with Feature reque... | ###Instruction: I deployed kubernetes dashboard in Azure Kubernetes cluster with the help of following command
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
Applied clusterrole and clusterrolebinding to same cluster on my azure AD object.
ClusterRole.yml
api... | I deployed kubernetes dashboard in Azure Kubernetes cluster with the help of following command
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
Applied clusterrole and clusterrolebinding to same cluster on my azure AD object.
ClusterRole.yml
apiVersion: rbac.au... | |
Try you are missing - in ports []
apiVersion: v1
kind: Service
metadata:
name: srv1
spec:
selector:
name: srv1
ports:
- protocol: TCP
port: 80
targetPort: 9376
| ###Instruction: Below is my Service object
apiVersion: v1
kind: Service
metadata:
name: srv1
spec:
selector:
name: srv1
ports:
protocol: TCP
port: 80
targetPort: 9736
When I am creating this object then I get below exception, do anyone knows what is wrong in this?
Error from server (BadRequest): ... | Below is my Service object
apiVersion: v1
kind: Service
metadata:
name: srv1
spec:
selector:
name: srv1
ports:
protocol: TCP
port: 80
targetPort: 9736
When I am creating this object then I get below exception, do anyone knows what is wrong in this?
Error from server (BadRequest): error when creat... | |
You need to point to the path of the log4j2.xml in the system that contains the spark-submit something like this starting with file:///:
spark.driver.extraJavaOptions=-Dlog4j.configurationFile=file:///opt/spark/log/log4j2.xml
| ###Instruction: I have a Spark cluster running on Kubernetes using this Bitnami Helm chart.
Looking at Spark documentation, I have created a log4j2 config file at the below location:
/opt/bitnami/spark/conf/log4j2.properties
Configuration within this log file works fine as expected.
Now, I have a Spring boot based app... | I have a Spark cluster running on Kubernetes using this Bitnami Helm chart.
Looking at Spark documentation, I have created a log4j2 config file at the below location:
/opt/bitnami/spark/conf/log4j2.properties
Configuration within this log file works fine as expected.
Now, I have a Spring boot based application which I... | |
Generally there are two way to do it:
Incorporate additional check about this job into your alert rules. For this you'll need to add something like unless on() my_job_status{name="kured_reboot"} == 1 (You might need to something similar or even completely different depending on your situation and style of job and metr... | ###Instruction: When nodes reboot based on the job "kured_reboots", alertManager still alerts on other node alerts. Is there a way to stop alertManager alerts for nodes going through a reboot based on the job "kured_reboot'? Something like this:
route:
receiver: default
group_by:
- cluster
- namespace
- sever... | When nodes reboot based on the job "kured_reboots", alertManager still alerts on other node alerts. Is there a way to stop alertManager alerts for nodes going through a reboot based on the job "kured_reboot'? Something like this:
route:
receiver: default
group_by:
- cluster
- namespace
- severity
- alertnam... | |
This line is the problem:
protocol: TCP
You are missing a hyphen. You need to put:
- protocol: TCP
Basically, if there is a list for a specific field (like, containers, ports), then commonly, there is a hyphen at the start.
| ###Instruction: Below is my Service object
apiVersion: v1
kind: Service
metadata:
name: srv1
spec:
selector:
name: srv1
ports:
protocol: TCP
port: 80
targetPort: 9736
When I am creating this object then I get below exception, do anyone knows what is wrong in this?
Error from server (BadRequest): ... | Below is my Service object
apiVersion: v1
kind: Service
metadata:
name: srv1
spec:
selector:
name: srv1
ports:
protocol: TCP
port: 80
targetPort: 9736
When I am creating this object then I get below exception, do anyone knows what is wrong in this?
Error from server (BadRequest): error when creat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.