prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I was checking Kubernetes <a href="https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy" rel="nofollow noreferrer">documentation</a> for pulling images. In that, I saw two policies IfNotPresent and Always. In &quot;Always&quot; its stated that</p> <blockquote> <p>If the kubelet has a container im...
<p>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...
<p>By default creating a managed certificate object on GKE creates a managed certificate of type &quot;Load Balancer Authorization&quot;. How can I create one with DNS authorization through GKE?</p> <p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs" rel="nofollow noreferrer">https://cloud...
<p>You won't be able to use the current <code>ManagedCertificate</code> CRD to generate wildcard certificates. Wildcard certificates are only supported by <a href="https://cloud.google.com/certificate-manager/docs/overview" rel="nofollow noreferrer">Google Cloud Certificate Manager</a>. <code>ManagedCertificate</code>...
<p>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).</p> <p>Also the Kafka cluster is SSL enabled...
<p>Not sure if you have <strong>whitelisted</strong> the <strong>IP</strong> of <strong>Spark cluster NAT</strong> to <strong>Kafka GKE</strong>, i think the request is routing outside to <strong>internet</strong> from <strong>NAT</strong> and then accessing the <strong>Kafka</strong>.</p> <p>If both are in same <stron...
<p>The version of Kubernetes in use is v1.26.3.</p> <p>I have cloned the Kubernetes source code to peruse the scheduler logic.</p> <p>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.</p> <pre><co...
<p>actual, i'm trying to find out what plugins are used by default too.</p> <p>the kubernetes version i'm using is 1.20.6.</p> <p>i found pretty hard to get the answer from source code.</p> <p>but you can export the configuration used by scheduler isntance by adding an arugument to kube-scheduler.yaml:</p> <ul> <li>--w...
<p>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:</p> <pre><code>expr: label_replace(label_replace(increase(kube_pod_container_status_restarts_total{job=&quot;kube-state-metrics&quot;,namespace=~&quot;.*&quot;...
<p>AFAIK, there is no possibility to add labels to your alerts based on condition without rewriting all rules.</p> <p>Best solution for your exact question is to create separate alerts for all environments/teams/conditions and just add static labels.</p> <p>Something along the lines of</p> <pre class="lang-yaml prettyp...
<p>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.</p> <p>I am trying to implement a Kafka consumer, which is able to read messages from a broker which is h...
<blockquote> <p>this can be limited by enabling authentication on Kafka</p> </blockquote> <p>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 k...
<p>Today, my kubernetes(<code>v1.21</code>) cluster certificate was expired(1 year), after I using this command to renew the certificate:</p> <pre><code>kubeadm certs renew all </code></pre> <p>the logs shows that the kube-apiserver\etcd should be restart:</p> <pre><code>Done renewing certificates. You must restart the...
<p>On 1.23.5 even after restarting <code>kubelet</code> through <code>systemctl restart kubelet</code> my <code>kube-controller-manager</code> still had errors (<code>kubectl -n kube-system logs kube-controller-manager-kubeadm</code> - name will vary according to your node name):</p> <pre><code>error retrieving resourc...
<p>So I was going to set up a GKE cluster and interact it with <code>kubectl</code>. But when I tried to apply the namespace, it just threw an error.</p> <p>I've added my IP to Control plane authorized networks in GKE dashboard.</p> <p>I'm using a Windows 10 machine, my kube/config</p> <pre class="lang-yaml prettyprint...
<strong>Looks kubectl lost connection to the Cluster and you can set the Cluster context by following the official GCP troubleshooting doc&nbsp;<a href="https://cloud.google.com/kubernetes-engine/docs/troubleshooting#kubectl-times-out" rel="nofollow noreferrer">GCP kubectl command times out</a>, try below two solutions...
<p>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 respo...
<p>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.</p> <p>ping sends packets using the very-low-level ICMP protocol, but Nginx serves HTTP which uses the TCP protocol instead.</p>
<p>I created new <code>config</code> file for Kubernetes from <code>Azure</code> in <code>Powershell</code> by <code>az aks get-credentials --resource-group &lt;RGName&gt; --name &lt;ClusterName&gt;</code>. Got a message that <code>Merged &quot;cluster_name&quot; as current context in C:\michu\.kube\config</code>. I co...
<p>The error implies that the <code>kubelogin</code> executable could not be located. You need to install <code>kubelogin</code> in the azure cli using <code>az aks install-cli</code>, then it works as expected.</p> <p>Refer <a href="https://azure.github.io/kubelogin/install.html" rel="nofollow noreferrer">github</a> f...
<p>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.</p> <p>According to <a href="https://airflow.apache.org/docs/helm-chart/stable/manage-dags-files.html#mounti...
<p>I was able to figure it out.</p> <p>One can use <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="nofollow noreferrer">personal access tokens</a> as passwords provided by whatever git service the private repo is in along with the repo's use...
<p>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?</p> <p>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...
<p>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:</p> <pre><code>{ &quot;configurations&quot;: [ { &quot;name&quot;: &quot;Kubernetes: Run/Debug&quot;, ...
<p>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...
<p>It is (or can be) a part of the <a href="https://github.com/grafana/helm-charts/tree/grafana-6.52.9/charts/grafana" rel="nofollow noreferrer">grafana helm chart</a>, from what I remember when used it in the past. That configuration needs to go into the <code>values.yaml</code> when using that helm chart.</p> <p>Spec...
<p>How can I list all Kubernetes services along with the number of active pods associated with each service?</p> <p>Currently, I can list all services with: <code>kubectl get services</code></p> <p>I would like to add one additional column to the output, which lists active pod count for each service.</p>
<p>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 ...
<p>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):</p> <pre><code>profile_data = ( profiles_df[data_cols] .loc[profile_ids] .rename(columns=new_cols) .to_dict(&quot;re...
<p><code>df.rename()</code> introduces some overhead, but you can skip that step by constructing the result directly with the new column names:</p> <pre class="lang-py prettyprint-override"><code>profile_data = [{new_cols[col]: profiles_df.loc[ix, col] for col in new_cols} for ix in p...
<p>values.yaml</p> <pre><code>S3Catalogs: Catalogs: - CatalogName: BotVoice Url: &quot;http://sandbox5.*.com&quot; - CatalogName: WrongVoice Url: &quot;http://sandbox5.*.com&quot; </code></pre> <p>the structure specified above needs to be filled in somehow in deployment.yaml tried different varian...
<p>I think you were on the right path using <code>0</code> (and presumably <code>1</code>) to access elements of the <code>S3Catalogs</code> array in your <code>values.yaml</code> file.</p> <p>The following syntax works for me:</p> <p>deployment.yaml:</p> <pre><code> - name: S3Catalogs__Catalogs__CatalogName_0 val...
<p>I have a test.txt file that has bunch of kubernetes commands. It looks like:</p> <pre><code>kubectl get cm -o yaml | grep &quot;test&quot; kubectl get pods kubectl describe pod xxx . . </code></pre> <p>bash script read the test.txt and loop thru each command should executes. However, when I run the script, it gives ...
<p>Change your bash script to this:</p> <pre><code>#!/bin/bash cat test.txt | xargs -I {} bash -c {} </code></pre> <p>Works like a treat:</p> <pre><code>{&quot;apiVersion&quot;:&quot;v1&quot;,&quot;data&quot;:{&quot;api-key&quot;:&quot;abc123&quot;,&quot;database-url&quot;:&quot;postgresql://localhost/mydatabase&quot;...
<p>I am trying to deploy service on <code>eks</code> with <code>knative</code> installed on eks, here eks configured with <code>fargate-profile</code>. I want to mount <code>efs</code> to my service for that i have created <code>StorageClass</code>,<code>PersistentVolume</code> and <code>PersistentVolumeClaim</code> be...
<p>You need to <a href="https://knative.dev/docs/serving/configuration/feature-flags/#configuring-flags" rel="nofollow noreferrer">set the flag in the <code>config-features</code> ConfigMap</a>. That ConfigMap should already have one key, named <code>_example</code>. You'll need to add your key above or below the exa...
<p>I have a local k3s Kubernetes cluster created by multipass.</p> <p>I am trying to set up Kafka using Ingress way based on <a href="https://strimzi.io/blog/2019/05/23/accessing-kafka-part-5/" rel="nofollow noreferrer">this tutorial</a> to make it accessible for clients running outside of Kubernetes.</p> <p>Here are m...
<p>k3s uses traefik, not nginx, so those annotations aren't doing anything... The referenced blog assumes you are using nginx instead</p> <p>Restart your k3s cluster, but provide <code>--no-deploy-traefik</code> option, and install nginx ingress controller</p> <p>Otherwise, you will need to refer to Traefik ingress doc...
<p>I have a local k3s Kubernetes cluster created by Rancher Desktop.</p> <p>I am trying to set up Kafka using load balancer based on <a href="https://strimzi.io/blog/2019/05/13/accessing-kafka-part-4/" rel="nofollow noreferrer">this tutorial</a> to make it accessible for clients running outside of Kubernetes.</p> <p>He...
<p>To allow clients to access the individual brokers, Strimzi needs to create one <code>type: LoadBalancer</code> 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 serv...
<p>I'm reading helm documentation,</p> <blockquote> <p>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.</p> ...
<p>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.</p> <p>So, your <code>template</code> can look something like this:</p> <pre><code>{{- if .Values.apply_template.true }} ... {{- end }} </code></pre> <p>and add this to your <code>values.yaml</c...
<p>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.</p> <blockquote> <p>&quot;default_secret_name&quot; is no longer applicable for Kubernetes v1.24.0 and above │ │ with module.app-workload-identity.kubernetes_ser...
<p>From this <a href="https://github.com/hashicorp/terraform-provider-kubernetes/pull/1792" rel="nofollow noreferrer">git issue</a> kubernetes_service_account issue has been successfully fixed using this <a href="https://github.com/hashicorp/terraform-provider-kubernetes/pull/1792/files/04140ea649a2dcdaffb2da3f85dde353...
<p>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.</p> <pre><code>spec: tls: - hosts: - &quot;prodazure.thesolarlabs.com&quot; secretName: tls...
<p>A <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" rel="nofollow noreferrer">CORS</a> 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 p...
<p>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 ?</p> <p>We can create ManagedCertificate resource in GKE, but it is uses the loadbalancer verification option which does not...
<p>I faced a similar issue:</p> <ol> <li>have a wildcard certificate from Certificate Manager</li> <li>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)</li> </ol> <p>First of all, GKE does not support Certificate Mana...
<p>I am familiar with Kubernetes <a href="https://kubernetes.io/docs/tasks/administer-cluster/limit-storage-consumption/" rel="nofollow noreferrer">documentation</a> that describes how to setup limits for PVC. However, what if the container is not assigned PVC?</p> <p>Suppose a Kubernetes container that simply defines:...
<p>If the container is not assigned to PVC then assuming ephemeral storage is assigned will be used by default.</p> <p>To ensure that the container does not use more than allocated storage set the <strong><code>memory limits field spec.containers[].resources.limits.memory</code></strong>.</p> <p>Below example is taken ...
<p>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 subn...
<p>Install the <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/" rel="nofollow noreferrer">AWS Load Balancer Controller</a> and use it to create an NLB for your NGINX ingress service. NLB is more performant than the Classic Load Balancer.</p>
<p>I am able to <code>list</code>, <code>get</code> 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?</p> <p>The result of <code>kubectl auth can-i '*' '*'</code> is <...
<p>I don't think it is possible to get a consolidated list of all permissions that you have in a k8s cluster.</p> <p>Looking at the <code>help</code> &amp; <code>examples</code> for the <code>kubectl auth can-i</code> command it needs a <code>VERB</code> which is a logical Kubernetes API verb like <code>'get'</code>, <...
<p>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.</p> <p>I installed the Dask operator as described <a href="https://kubernetes.dask.org/en/latest/#kubecluster" rel="nofollow noreferrer">here</a>:</p> <pre><code>helm ins...
<p>Solved, just forced the Dockerfile to use version 2023.1.0, that fixed the problem and matched the operator dask version.</p>
<p>I would like to make the result of a text classification model (finBERT pytorch model) available through an endpoint that is deployed on Kubernetes.</p> <p>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 resul...
<p>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.</p> <p>Set ...
<p>I ran bash script from java code to sort a file of tens of millions of strings of &lt;25 characters. The java application is running in a kubernetes pod. The script failed and the error message is</p> <pre><code>bash: line 1: 425 Killed sort /tmp/keys &gt; /tmp/keys_sorted </code></pre> <p>What d...
<p>This means that <code>sort</code> was sent a SIGKILL signal.</p> <p>On modern systems without something weird going on, this <em>almost</em> always means you're out of RAM.</p> <p>Linux supports something called &quot;memory overcommit&quot;. Due to language runtimes (Java among them!) habitually allocating far more...
<p>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.</p> <p>The data is about kubernetes pods and the containers and images inside them. ...
<p>Create the structure</p> <pre class="lang-yaml prettyprint-override"><code> 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 %}] </code></pre> <p>, co...
<p>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.</p> <p>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.</p> <p>Does anyone know if this ...
<p>Yes, you can assign permissions to dashboards in Grafana using Helm, as well as through the Grafana web UI or API.</p> <p>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 appropriat...
<p><a href="https://i.stack.imgur.com/A2G76.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A2G76.png" alt="enter image description here" /></a></p> <p>The nodeport takes in 3 parameters in the service yaml.</p> <ul> <li>port</li> <li>targetPort</li> <li>nodePort</li> </ul> <p>Since all you wanted wa...
<p>&quot;Nodeport is internally implemented on top of ClusterIP&quot; - correct.</p> <p>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 ...
<p>I am starting on learning Containers and Kubernetes. When watching tutorials on Conatiners and Kubernetes, often the instructors says &quot;You could have thousands of containers&quot;.</p> <p>I am trying to understand how we can end up with thousands of containers?</p> <p>After deploying my single container app, ho...
<p>Adding to GSerg suggestion</p> <p>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 <a href="https:/...
<p>I am creating a github actions step</p> <pre><code>. . . steps: name: export-secrets run: | echo '${{ toJSON(secrets) }}' &gt;&gt; gh-secrets.json . . . </code></pre> <p>suppose the gh-secrets.json file is as below:</p> <pre><code># gh-secrets.json {&quot;A&quot;: &quot;a1&quot;, &quot;B&quot;: &quot;b1&quot...
<p>Helm includes a <a href="https://docs.helm.sh/docs/chart_template_guide/function_list/#fromjson" rel="nofollow noreferrer"><code>fromJson</code></a> 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...
<p>I'm running this command:</p> <pre><code># kubectl get pods --all-namespaces --field-selector=metadata.namespace!=kube-system,metadata.namespace!=monitoring,metadata.namespace!=rtf </code></pre> <p>Which gives me output like this:</p> <pre><code>NAMESPACE NAME READY STATUS RE...
<p>I don't think <code>kubectl get pods</code> supports <code>field selectors</code> based on the <code>READY</code> column directly.</p> <p>But <code>kubectl</code> provides a method exporting the resource configuration (YAML) directly into <code>JSON, -o json</code>. Then, we can use <code>jq</code> to read, parse, a...
<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.</p> <p>As you can imagine, this is quite cumbersome and not very practic...
<p>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</p> <p>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.</p> <p>A simpler way i...
<p>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.</p> <p>So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, each in...
<p>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.</p> <p>This is what I had:</p> <pre><code>containers: - name: airflow-scheduler image: &lt;redacted&gt; imagePullPolicy: IfNotPres...
<p>In a Deployment of Kubernetes, what is the difference between <code>spec.containers.name</code> and <code>spec.hostname</code>?</p> <pre><code>spec: containers: - env: - name: CONFIG_HOME value: /config image: my-image:1.0.0.0-SNAPSHOT name: name-a ports: - container...
<p><strong>Container name</strong></p> <p>Container name it's just the <strong>name</strong> you are providing to identify it.</p> <p>it is useful to debug the <strong>POD</strong> when <strong>failing</strong> or running <strong>multiple</strong> <strong>containers</strong> inside <strong>single</strong> <strong>POD</...
<p>This doc <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity</a> explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have ...
<blockquote> <p>How do you know if your application needs to be configured to use workload identity or not?</p> </blockquote> <p>That will be hard to say, it depends on your application if it's using any <strong>GCP</strong> service or needs <strong>Auth</strong> or not.</p> <p>If it's not using and running simple <st...
<p>This doc <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity</a> explains that if you enable workload identity on a running cluster and create a new node on that cluster which would have ...
<p>There are a couple of things that should decide the impact. Depending on how the applications authenticate to google.</p> <ol> <li>No authentication: can just be moved</li> <li>Authenticating with service account json files: can be moved, but recommended to switch to workload identity for security reasons</li> <li>A...
<p>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.</p> <p>So far, it successfully creates a git-sync container along with our scheduler, worker, and web server pods, each in...
<p>Your problem could be probably related to the directory structure you are defining across the different containers.</p> <p>It is unclear in your question but, according to your containers definitions, your git repository should contain at least <code>dags</code> and <code>plugins</code> as top level directories:</p>...
<p>i wan't to send pod log to ELK, buat after deploying fluentd i get Error, i got from tutorial Official Fluentd documentation</p> <p>EKS Version 1.22</p> <p>i put Suppress_Type_Name On, it's not solved this issue</p> <pre><code>[2022/06/20 16:23:07] [error] [output:es:es.0] HTTP status=400 URI=/_bulk, response: {&quo...
<p>I was able to resolve the issue by these 3 steps,</p> <p>step 1. You need to update your fluentbit image to latest</p> <blockquote> <pre><code> image: fluent/fluent-bit:2.1.1 </code></pre> </blockquote> <p>You can get the deployment file from <a href="https://docs.fluentbit.io/manual/v/1.5/installation/kubernetes...
<p>I'm invoking Kaniko (I Docker image that can build Docker images) successfully in this way (EKS environment):</p> <pre><code>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 -- --destinatio...
<p>Your sample:</p> <pre><code>... &quot;resources&quot;:{&quot;requests&quot;:{ &quot;ephemeral-storage&quot;:&quot;116Mi&quot;}, # &lt;-- incorrect ... </code></pre> <p>Try:</p> <pre><code>... &quot;resources&quot;:{ &quot;requests&quot;:{ &quot;ephemeral-storage&quot;: &quot;116Mi&quot;, &quot;memory&...
<p>Getting below error while trying to create an ingress endpoint on k8s v1.26.3. i have created a k8s cluster using kops.</p> <p>Error from server</p> <blockquote> <p>(BadRequest): error when creating &quot;ingress.yaml&quot;: Ingress in version &quot;v1&quot; cannot be handled as a Ingress: strict decoding error: unk...
<pre><code>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: - path...
<p>I'm fairly new to Kubernetes and having some problems understanding some things.</p> <p>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 ac...
<p>First you create a service for your application. You use the default service type (ClusterIP).</p> <p>Then you create an ingres-ngnix service of type load balancer.</p> <p>And you need to create some Ingress rules to make URL paths to the service of your application.</p> <p>And you need to set the annotation for the...
<p>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.</p> <p>I have tried to look at several pieces o...
<p>There is <strong>no additional</strong> cost running the <strong>Ingress controller</strong> with <strong>GCP</strong> however you have to pay for the <strong>HTTP LoadBalancer</strong> that <strong>Ingress controller</strong> create.</p> <p>It will be the same for all <strong>ingress</strong> <strong>controllers</s...
<p>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 ?</p> <pre><code>light@o-node0:~/lh-orchestrator$ k...
<p>Before deleting the pods check why the pods are failing to create, if it is due to memory follow below steps:</p> <ol> <li><p>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</p> </li> <li><p>Any contain...
<p>While using <code>Kubernetes API</code>, I came across this issue where I am not able to <code>pod exec</code> into another pod using the API.</p> <p>I made sure I am running a <code>pod</code> with a <code>serviceAccount</code> that has correct <code>RBAC</code> permissions (and both <code>pods</code> are in the sa...
<p>Curl Magic and trial and error. Make sure that the user has the right permissions so you don't get the 403.</p> <pre><code>curl -k \ --http1.1 \ -H &quot;Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==&quot; \ -H &quot;Sec-WebSocket-Version: 13&quot; \ -i \ -N \ -L \ -k \ -H &quot;Connection: Upgrade&quot; \...
<p>I have a grpc service, here is the yaml:</p> <pre><code>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: ...
<p>gRPC supports DNS as the default name-system.The following format is supported which is related to IPV4 address.</p> <p><strong>ipv4:address[:port][,address[:port],...] -- IPv4 addresses</strong></p> <p>Here,you can specify multiple comma-delimited addresses of the form <strong>address[:port]:</strong></p> <p><stron...
<p>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:</p> <p>Successfully pulled image &quot;registry.redhat.io/redhat/redhat-operator-index:v4.10&quot; in 1.10...
<p><strong>Disclaimer</strong>: 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 an...
<p>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</p> <p>This is my github actions file</p> <pre><code> on: push: bra...
<p>If could use the <a href="https://github.com/marketplace/actions/yaml-update-action" rel="nofollow noreferrer">yaml-update-action</a>, as example, adding this step before the deploy:</p> <pre><code> - name: Update values.yaml uses: fjogeleit/yaml-update-action@main with: valueFile: '&l...
<p>I have one deployment which has two containers.</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: ol000dep spec: selector: matchLabels: app: ol000kube replicas : 2 template: metadata: labels: app: ol000kube spec: containers: - name: django ...
<p>Interesting. Even though the yaml you provided is incorrect (<code>.spec.containers</code> map key must be <strong>unique</strong>), k8s seems to be fine with that.</p> <p>In your case the pod is started with <strong>only</strong> the second container (name: nginx) in it though.</p> <blockquote> <p>Is this login in ...
<p>I'm setting up a GitHub action for deploying to Azure kubernetes. The deploy job looks as follows:</p> <pre><code>deploy: name: Deploy to kubernetes runs-on: ubuntu-latest needs: docker steps: - name: Checkout uses: actions/checkout@v3 - name: Setup kubectl uses: Azure/set...
<p>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 ...
<h2>Is it possible to have Knative automatically create K8s Ingress resources?</h2> <p>Hello all, Based on the following lines from <a href="https://knative.dev/docs/serving/services/creating-services/" rel="nofollow noreferrer">documentation</a>, I was wondering if I can have Knative automatically create the Ingress r...
<p>Unfortunately, the v1 Ingress API in Kubernetes does not have sufficient capabilities to express Knative's routing requirements. Knative <em>does</em> support several ingress implementations (including Istio, Contour, and the Gateway API), but no one has written a plugin for the Nginx Ingress annotations.</p> <p>So...
<p>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.</p> <pre class="lang-yaml prettyprint-override"><code> apiVersion: v1 kind: Pod metadata: name: dockercontainer namespace: default spec: containers: - image: doc...
<p><strong>NOTE</strong>: this assumes that you're using a docker runtime in K8s! If not, use <a href="https://github.com/agavitalis/kaniko-kubernetes" rel="nofollow noreferrer">kaniko</a>.</p> <p>The docker daemon isn't mounted into the pod - this is the reason for your error. In order to build images, you will need o...
<p>I am trying to get default Grafana dashboard and admin username/password on deploy.</p> <p>I tried creating <code>values.yaml</code> but doesn't seem like its working</p> <pre><code>--- apiVersion: v1 kind: ConfigMap metadata: name: grafana namespace: monitoring labels: grafana_dashboard: &quot;1&quot; dat...
<p>As per the grafana docker <a href="https://grafana.com/docs/grafana/latest/setup-grafana/configure-docker/#configure-grafana-with-docker-secrets" rel="nofollow noreferrer">documentation</a>, any config in the <code>grafana.ini</code> file can be set at runtime using environment variables of the format <code>GF_&lt;S...
<p>I installed pods and services with <code>deployment.yml</code>,<code>service.yml</code> and <code>ingress.yml</code> like this below.</p> <p><code>deployment.yml</code></p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: apa000dep spec: selector: matchLabels: app: apa000kube replicas ...
<p>Two things that caught my eye:</p> <ol> <li><p>The Ingress controller you are using <del>seems to</del> might require an <code>ingressClassName</code> defined in the Ingress resource, so that the ingress controller takes this resource (and its configs) into account.</p> <p>More about <code>Ingress class</code>:</p> ...
<p>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</p> <p>following is the logs visible in kibana</p> <p><a href="https://i.stack.imgur.com/xd22X.png" rel="nofollow noreferrer"><img src="https://i.sta...
<p>The issue is from configuration. One possible work around is reinstalling the filebeat and sending the logs to elastic search.</p> <p>Follow the content in the blog by <a href="https://medium.com/@semih.sezer/how-to-send-airflow-logs-to-elasticsearch-using-filebeat-and-logstash-250c074e7575" rel="nofollow noreferrer...
<p>My pod is running in k8s and restarts every 20-30 hours, caused by an <code>OOMKilled</code> error, here are the configured limits:</p> <pre><code> limits: cpu: 600m memory: 1536Mi requests: cpu: 150m memory: 1536Mi </code></pre> <p>In the container is a JVM (Spring Boot) running with the followin...
<p>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 t...
<p>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 <code>exec</code>'ing into the pod. However, I have failed to find any best way to expose this c...
<p>you can install the ingress controller and expose it with a <strong>TCP</strong> port opening with the controller or you can change the service type to LB instead <strong>clusterIP</strong> which will expose the service directly however you might have to take care about the type of <strong>LB</strong> coz <strong>My...
<p>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 trac...
<p>For that, you can write a <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#itelemetryprocessor-and-itelemetryinitializer" rel="nofollow noreferrer">TelemetryProcessor</a>:</p> <blockquote> <p>Telemetry processors allow you to completely replace or discard a telemetry item.</p...
<p>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?</p>
<p>It depends on your use case and what you are planning for.</p> <p>If you are expecting your service to forward a request to any of the available <strong>POD</strong> of <strong>statefulset</strong> you can create a normal <strong>clusterIP</strong> service.</p> <p>You have the requirement of getting specific <strong...
<p>I am trying to install telepresence version 1 in ubuntu 22.04 but I don't have the download links to it.</p>
<p>Telepresence version 1 is no longer supported but you can install the new version <a href="https://www.getambassador.io/docs/telepresence/latest/install" rel="nofollow noreferrer">here</a>. Feel free also to join the <a href="https://a8r.io/slack" rel="nofollow noreferrer">Telepresence open source slack channel</a> ...
<p>I have a helm chart which is using aws ecr to pull images and deploy them into native Kubernetes:</p> <p><em><strong>Chart.yml:</strong></em></p> <pre><code>apiVersion: v2 description: helm chart for microservice-registry name: microservice-registry type: application version: 0.0.1 </code></pre> <p><em><strong>value...
<p>According to your <a href="https://pastebin.com/7x3NjD8s" rel="nofollow noreferrer">https://pastebin.com/7x3NjD8s</a>, you got <code>401 Unauthorized</code> from ECR. Since you have an On-Premises Kubernetes instance you need to use a process to set your AWS credentials on <code>ImagePullSecrets</code> on your PODs....
<p>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.</p> <p>My testing setup is a single Kubernetes node, with a deployment of two nginx pods. The deployment is then exposed with a NodePort service.</p> <p>I've then depl...
<p>Looks like there are 2 versions of ingress controller.</p> <ol> <li><p>Which K8S community has been maintaining which is <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx</a></p> </li> <li><p>Which Nginx is maintaining(Opensource &amp; Paid): ...
<p>In my terraform project, I have my own module which creates an AKS cluster with RBAC enabled. This module has an output <strong>aks_public_fqdn</strong> which holds the FQDN of the cluster.</p> <pre><code>module &quot;aks&quot; { source = &quot;./aks&quot; environment = local.environment region ...
<p>The <code>kubernetes</code> provider configuration contains an output from the module declared as <code>aks</code>. Prior to version <code>2.4.0</code> of the Kubernetes provider it was possible to simultaneously manage a Kubernetes cluster backing infrastructure and the cluster itself at initial provisioning (or su...
<p>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...
<p>Not sure how you are setting up the cluster but if you using Helm chart or something it might be creating the statefulsets.</p> <p><strong>Statefulsets</strong> will be having separate <strong>PVC</strong> unless you setup or plan to use shared Block storage (PVC).</p> <p>Each stateful set suppose <strong>3</strong>...
<p>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.</p> <p>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 grou...
<p>I was able to fix the issue by adding below annotation</p> <pre><code>&quot;alb.ingress.kubernetes.io/target-type&quot;: ip </code></pre> <p>Referece - <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1695" rel="nofollow noreferrer">1695</a></p>
<p>I'm using kustomize to manage a rather standard deployment. I have a <code>namePrefix</code> to modify the resource names.</p> <p>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 w...
<p>With the help of a colleague, we were able to solve this with vars:</p> <pre class="lang-yaml prettyprint-override"><code># kustomization.yaml resources: - deployment.yaml - custom-resource.yaml namePrefix: my-prefix- secretGenerator: - name: my-secret files: - password.txt configurations: - configura...
<p>I want to resize Kubernetes Persistent Volume. So I tried by editing</p> <pre><code>kind: PersistentVolumeClaim apiVersion: v1 metadata: name: postgres-pvc labels: app: postgres spec: storageClassName: aws-gp2 accessModes: - ReadWriteOnce resources: requests: storage: 50Gi </code></pre> <...
<p>Easiest way you can use the <strong>allowVolumeExpansion</strong> in <strong>StorageClass</strong> , i did for <strong>Elasticsearch</strong> Database</p> <p>Checkout my article on that : <a href="https://medium.com/@harsh.manvar111/resizing-pvc-disk-in-gke-c5b882c90f7b" rel="nofollow noreferrer">https://medium.com/...
<p>Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.</p> <p>After creating argocd namespace, I just try these commands</p> <pre><code>kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml </code></pre> <p>This erro...
<p>The error “<code>Unable to connect to the Server TCP I/O timeout</code>” happens usually due to some common causes and you can try to troubleshoot based on below steps :</p> <p>1)Your Kubernetes cluster is not running. Verify that your cluster has been started, e.g. by pinging the IP address.</p> <p>2)There are netw...
<p>I have 2 templates in my Ansible playbook:</p> <p><em>template-1.yaml.j2</em>:</p> <pre><code>{ &quot;auths&quot;: { &quot;https://index.docker.io/v1/&quot;: { &quot;auth&quot;: {{ (user.name + ':' + user.pass) | b64encode }} } } </code></pre> <p><em>template-2.yaml.j2</em>:</p> <pre>...
<p>Simply replace the following line (wrong):</p> <pre class="lang-yaml prettyprint-override"><code>.dockerconfigjson: '{% include &quot;template-1.yaml.j2&quot; | b64decode %}' </code></pre> <p>with (right):</p> <pre class="lang-yaml prettyprint-override"><code>.dockerconfigjson: '{{ lookup(&quot;template&quot;, &quot...
<p>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:</p> <ul> <li><p>if there is some helper that can help me to reduce this boil...
<p>There isn't anything wrong with how you've done it, you could potentially restructure it a little to reduce the if nesting.</p> <pre><code>err := r.Get(ctx, client.ObjectKey{Name: sCrName, Namespace: sCrNs}, &amp;eCmp) // Object exists, patch it if err == nil { patch := client.MergeFrom(eCmp.DeepCopy()) if e...
<p>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:</p> <ul> <li><p>if there is some helper that can help me to reduce this boil...
<p>you can use the controllerutil.CreateOrUpdate() function from the sigs.k8s.io/controller-runtime/pkg/controller/controllerutil package to reduce boilerplate code.</p> <p>use controllerutil.CreateOrUpdate() function:</p> <pre><code>if err := controllerutil.CreateOrUpdate(ctx, r.Client, &amp;eCmp, func() error { r...
<p>I have followed the directives of this web site <a href="https://dzone.com/articles/how-to-deploy-apache-kafka-with-kubernetes" rel="nofollow noreferrer">How To Deploy Apache Kafka With Kubernetes (DZone)</a> to deploy a <em>Kafka</em> broker with its <em>Zookeeper</em>. (I've only changed the namespaces names).</p>...
<p>You can the service name, which will be the same each time K8s DNS will take care of it.</p> <pre><code>- name: KAFKA_ZOOKEEPER_CONNECT value: zookeeper-service </code></pre> <p><strong>K8s</strong> work that way, internal communication happens over the <strong>service name</strong> use the <strong>IP</strong> if ...
<p>In a Azure AKS kubernetes cluster, after a cluster version upgrade the nodepool nodes, I have a PV that has this node affinity:</p> <pre><code>Node Affinity: Required Terms: Term 0: failure-domain.beta.kubernetes.io/region in [westeurope] </code></pre> <p>The nodes don't have the label so the Deployment...
<p>We had the same problem. How we resolved it:</p> <ol> <li>Copy output from &quot;kubectl get pvc&quot; to get the link between the pvc and the pv.</li> <li>Locate the disk in azure portal and create a snapshot of the disk. (In the MC_ resource group to the aks</li> <li>Edit deployment in kubernetes and set replicaco...
<p>Running into the following error when use custom UDF</p> <pre><code>Traceback (most recent call last): File &quot;/usr/local/lib/python3.8/dist-packages/pyspark/worker.py&quot;, line 603, in main func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type) File &quot;/usr/local/lib/pyth...
<p>I was able to make it work.</p> <p>Some more context is that we are leveraging spark on k8s operator, so we pass in the zip file via pyFiles <a href="https://github.com/GoogleCloudPlatform/spark-on-k8s-operator" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/spark-on-k8s-operator</a></p> <p>This wo...
<p>I'm currently working on a Kubernetes deployment file and I need to set the environment variables that the container will have.</p> <p>Is there a way to set Kubernetes secrets as environment variables in the deployment file?</p> <p>Here is a dummy file to help explain:</p> <p><a href="https://i.stack.imgur.com/mv4Rr...
<p>The syntax that worked for me was:</p> <pre><code>spec: ... template: ... spec ... containers: env: - name: PORT valueFrom: configMapKeyRef: name: env-configmap key: PORT - name: ELASTIC_PASSWO...
<p>I can still access kubectl after disabling Kubernetes from Docker Desktop v4.18.0</p> <p><a href="https://i.stack.imgur.com/LIubu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LIubu.png" alt="Disabled Kubernetes service in Docker Desktop" /></a></p> <p>On running the <code>kubectl version</code>...
<p>As per official <a href="https://docs.docker.com/desktop/kubernetes/#disable-kubernetes" rel="nofollow noreferrer">doc</a>:</p> <blockquote> <p>After disabling Kubernetes Select Apply &amp; Restart to save the settings.This stops and removes Kubernetes containers, and also removes the /usr/local/bin/kubectl command....
<p>Hi I was just trying to install argo CD in my local machine. I have installed and running minikube.</p> <p>After creating argocd namespace, I just try these commands</p> <pre><code>kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml </code></pre> <p>This erro...
<p>Play with argocd in the killercoda playground. This is probably the easiest way to get started learning and messing around with it. <a href="https://killercoda.com/mabusaa/course/argocd-endusers-scenarios/00-argocd-playground" rel="nofollow noreferrer">https://killercoda.com/mabusaa/course/argocd-endusers-scenarios/...
<p>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?</p> <p>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 kil...
<p>I'm also confused by this lately. Here are some findings after a while of digging in the source code and the docs.</p> <p>'Eviction' here actually means two slightly different concepts, which are both documented in the official docs: <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-evic...
<p>when i use docker as CRI:</p> <pre><code>{&quot;log&quot;:&quot;I0421 14:23:18.944348 1 node.go:172] Successfully retrieved node IP: 192.168.49.2\n&quot;,&quot;stream&quot;:&quot;stderr&quot;,&quot;time&quot;:&quot;2023-04-21T14:23:18.944635198Z&quot;} {&quot;log&quot;:&quot;I0421 14:23:18.944724 1 serve...
<p>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. <em><strong>When you use d...
<p>I am using 'crictl' tool to work with containerd runtime containers (under kubernetes) in a managed cluster.</p> <p>I'm trying to set the memory limit (in bytes) to 16MB with the command: <code>crictl -r unix:///run/containerd/containerd.sock update --memory 16777216 c60df9ef3381e</code></p> <p>And get the following...
<p>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 violatin...
<p>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:</p> <pre><code>--- AWSTemplateFormatVersion: '2010-09-09' Description: 'AWS CloudFormation template for EKS Fargate managed Kubernetes cluster with e...
<p>I solved my issue, by following this <a href="https://repost.aws/knowledge-center/eks-alb-ingress-controller-fargate" rel="nofollow noreferrer">guide</a></p> <p>I then exported resulting stack into my CloudFormation script.</p> <p>Then to deploy my application I updated my kubernetes manifest to:</p> <pre><code>--- ...
<p>I am trying out the minio-operator.</p> <p>This is a two part question regarding namespaces mentioned in the docs.</p> <p>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 ...
<p>Currently, it is not possible to have multiple tenants in the same namespace because the MinIO operator always creates services with the names <code>minio</code>, <code>minio-console</code>, and <code>minio-hl</code> in the installation namespace.</p> <p>However, a workaround is to use a different namespace for each...
<p>I am trying to enable the local account on an AKS cluster (version 1.24.10) by running commands from an AzureDevOps yaml pipeline.</p> <p>The “old” az aks command : <code>az aks update -g &lt;myresourcegroup&gt; -n &lt;myclustername&gt; --enable-local</code> used to serve me well to enable a local account on an AKS...
<p>Wow, great spot... The enable flag isn't there. You might want to raise this on the <a href="https://github.com/Azure/azure-powershell/discussions/categories/feature-requests" rel="nofollow noreferrer">Azure PowerShell GitHub</a>.</p> <p>As a workaround, the Azure CLI does allow enabling of local accounts.</p> <pre ...
<p>I have been trying to deploy spark and jupyter note on minikube. I used helm charts for deploying both</p> <p>Jupyter notebook - <a href="https://artifacthub.io/packages/helm/pyspark-notebook-helm/pyspark-notebook" rel="nofollow noreferrer">https://artifacthub.io/packages/helm/pyspark-notebook-helm/pyspark-notebook...
You can check the <a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html#prerequisites" rel="nofollow noreferrer">prerequisites</a> when running Spark in Kubernetes to determine if it will increase its performance</p> A running Kubernetes cluster at version &gt;= 1.22 with access configured to it us...
<p>This is a very wried thing.</p> <p>I created a <strong>private</strong> 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. </p> <p>So one of these pods always get <code>ImagePullBackOff</code>, I check the error </p> <pre><code>Failed ...
<p>I recall seeing this before and finding an answer before.</p> <p><a href="https://cloud.google.com/container-registry/docs/pulling-cached-images" rel="nofollow noreferrer">https://cloud.google.com/container-registry/docs/pulling-cached-images</a><br /> Talks about it a little, but I'll explain it so it's easy to fol...
<p>Since 2 days I try to create a simple OPA Gatekeeper Policy which blocks the creation of pods with &quot;privileged:true&quot; for some namespaces.</p> <p>Some more details:</p> <p>Im using opa-gatekeeper in version 3.13 installed by following <a href="https://open-policy-agent.github.io/gatekeeper/website/docs/inst...
<p>This check - <code>input.request.namespace == [&quot;alpha&quot;, &quot;beta&quot;]</code> will evaluate to true only if the <code>input.request.namespace</code> field is exactly identical to the array it is being compared to. i.e. - Only if <code>input.request.namespace</code> is an array with exactly two values, t...
<p>I want to filter namespaces based on the annotation. I do not want namespace which has annotation as <code>components\.gke\.io/layer==&quot;addon&quot;</code>.</p> <p>I tried <code>kubectl get ns -o=jsonpath='{.items[?(@.metadata.annotations.components\.gke\.io/layer==&quot;addon&quot;)].metadata.name}'</code> comma...
<p>I think (!?) you can't use negation with <code>kubectl</code>'s implementation of <a href="https://kubernetes.io/docs/reference/kubectl/jsonpath/" rel="nofollow noreferrer">JSONPath</a>.</p> <p>Once you use the <code>--output</code> flag with <code>kubectl</code>, you lose the ability to render the command's output ...
<p>Having an app running perfectly on my local with docker.</p> <p>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.</p> <p>The session is stored on a redis DB (I have the same bug if I use the filesystem session). It's there I ...
<p>Try using <a href="https://github.com/predis/predis" rel="nofollow noreferrer">Predis</a> session handler instead.</p> <ol> <li>Setup your services</li> </ol> <pre class="lang-yaml prettyprint-override"><code># services.yaml Redis: class: \Predis\Client arguments: - 'redis://%env(REDI...
<p>I am trying to modify a kubernetes keycloak deployment to respond on <code>/auth</code> in place of <code>/</code>. I see in the documentation that this should be possible by setting <code>--http-relative-path</code> to <code>/auth</code>. I have attempted this and it causes all the services to receive <code>Connect...
<p>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.</p> <pre><code> readinessProbe: httpGet: path: /health/ready port: 8080 initialDelaySeconds: 30 periodSeconds:...
<p>I'm using this <code>Dockerfile</code> configuration</p> <pre><code>FROM openjdk:17-alpine ARG APP_HOME=/app WORKDIR $APP_HOME COPY ./target/ws-exec.jar ws.jar ENV JAVA_OPTS=&quot;-Dspring.profiles.active=prod -Dspring.application.name=words&quot; ENTRYPOINT java $JAVA_OPTS -jar ./ws.jar $JAVA_ARGS </code></pre...
<p>As ENTRYPOINT you specify Java to run <code>./ws.jar</code>, assuming it would resolve from within work directory <code>/app</code>. At runtime you get the error message that <code>/ws.jar</code> is not accessible, which looks like an absolute path.</p> <p>When running your container with /bin/bash, please check out...
<ol> <li>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 <code>PodTolerationRestriction</code> admission controller.</li> <li>I can confirm that the PodTolerationRestriction controller is...
<p>I had the same issue. Fixed it with:</p> <ol> <li><p>removed whitelist annotation from ns.</p> </li> <li><p>deployed the pod.</p> </li> <li><p><code>kubectl get pod &lt;pod name&gt; -o yaml</code></p> <p>in my case, I had a couple of extra toleration injected without me realizing.</p> </li> <li><p>revert 1 (annotati...
<p>I deployed kubernetes dashboard in Azure Kubernetes cluster with the help of following command</p> <pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml </code></pre> <p>Applied clusterrole and clusterrolebinding to same cluster on my azure AD object.</...
<p>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) - <a href="https://github.com/kubernetes/dashboard/issues/6904#issuecomment-1070971435" rel="nofollow noreferrer">link</a></p> <p>Allow logging in when...
<p>Below is my Service object</p> <pre><code>apiVersion: v1 kind: Service metadata: name: srv1 spec: selector: name: srv1 ports: protocol: TCP port: 80 targetPort: 9736 </code></pre> <p>When I am creating this object then I get below exception, do anyone knows what is wrong in this?</p> <p><code>E...
<p>Try you are missing <strong>-</strong> in <code>ports []</code></p> <pre><code>apiVersion: v1 kind: Service metadata: name: srv1 spec: selector: name: srv1 ports: - protocol: TCP port: 80 targetPort: 9376 </code></pre>
<p>I have a Spark cluster running on Kubernetes using <a href="https://github.com/bitnami/charts/tree/main/bitnami/spark" rel="nofollow noreferrer">this</a> Bitnami Helm chart.</p> <p>Looking at Spark documentation, I have created a log4j2 config file at the below location:</p> <pre><code>/opt/bitnami/spark/conf/log4j2...
<p>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:///:</p> <pre><code>spark.driver.extraJavaOptions=-Dlog4j.configurationFile=file:///opt/spark/log/log4j2.xml </code></pre>
<p>When nodes reboot based on the job &quot;kured_reboots&quot;, 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 &quot;kured_reboot'? Something like this:</p> <pre><code>route: receiver: default group_by: - cluster - na...
<p>Generally there are two way to do it:</p> <ol> <li><p>Incorporate additional check about this job into your alert rules. For this you'll need to add something like <code>unless on() my_job_status{name=&quot;kured_reboot&quot;} == 1</code> (You might need to something similar or even completely different depending on...
<p>Below is my Service object</p> <pre><code>apiVersion: v1 kind: Service metadata: name: srv1 spec: selector: name: srv1 ports: protocol: TCP port: 80 targetPort: 9736 </code></pre> <p>When I am creating this object then I get below exception, do anyone knows what is wrong in this?</p> <p><code>E...
<p>This line is the problem:</p> <p><code> protocol: TCP</code></p> <p>You are missing a hyphen. You need to put:</p> <p><code> - protocol: TCP</code></p> <p>Basically, if there is a list for a specific field (like, containers, ports), then commonly, there is a hyphen at the start.</p>