prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I am using the non HA version of ArgoCD (v2.6.5) installed in a single node k3s cluster. The goal is to deploy a sample application together with kube-prometheus-stack, loki, tempo &amp; minIO via Helm.</p> <p>However, when I create an &quot;Application&quot; in Github and reference it in Argocd, all of them are in ...
<p>Try changing:</p> <pre><code>FROM repoURL: https://prometheus-community.github.io/helm-charts TO repoURL: git@github.com:prometheus-community/helm-charts.git OR repoURL: https://github.com/prometheus-community/helm-charts.git </code></pre> <pre><code>FROM targetRevision: 44.4.1 TO targetRevision: kube-prometh...
<p>I have superset installed via helmchart in my kubernetes environment, I took everything from official documentation and repository: <a href="https://github.com/apache/superset" rel="nofollow noreferrer">https://github.com/apache/superset</a></p> <p>I'm trying to archive a data autorefresh of the dashboard every 12 h...
<p><strong>TL;DR;</strong> your <code>configOverrides</code> should look like this:</p> <pre><code>configOverrides: cache_config: | from datetime import timedelta from superset.superset_typing import CacheConfig CACHE_CONFIG: CacheConfig = { 'CACHE_TYPE': 'RedisCache', 'CACHE_DEFAULT_TIME...
<p>I am running airflow via MWAA on aws and the worker nodes are running k8s. The pods are getting scheduled just fine but I am trying to use pod_template_file with KubernetesPodOperator, it's giving me a bunch of uncertain behavior.</p> <p>My template file stored in S3</p> <pre><code>apiVersion: v1 kind: Pod metadata:...
<p>Never used <code>MWAA</code> on aws before. But your problem seems to be:</p> <p><strong>Is your template file stored in S3 available to the DAG script file through path <code>&quot;/opt/airflow/pod_template_file_example-1.yaml&quot;</code>?</strong></p> <p>Check out the docs for <a href="https://airflow.apache.org/...
<p>I have a kafka topic that has 5 partitions. I have 5 pods currently consuming these 5 partitions. However due to a particular need, I need each pod to only consume from its assigned partition. But due to pods all having the identical configuration on kubernetes I can't tell each pod which partition to consumer. What...
<p>If you're able to change your deployment to a statefulset, each pod of your replica will contain a sequence number starting from 0. The podname is fixed like my-kafka-consumer-0, my-kafka-consumer-1, my-kafka-consumer-(N-1), and so on.</p> <p>Next you should use the podname as an environment variable inside your pod...
<p>I want to change kube-apiserver log level use --v parameter , I checked all the documents, and none of them gave the value range of this parameter.</p> <p>Check the code, the value is int32 type, I tried to fill in 0, 1, 2, and even 9999, all can pass the verification and start kube-apiserver normally.</p> <p>So I w...
<p>9999 isn't a valid value.</p> <p><a href="https://i.stack.imgur.com/bcFc4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bcFc4.png" alt="Table" /></a></p> <p><a href="https://docs.openshift.com/container-platform/4.8/rest_api/editing-kubelet-log-level-verbosity.html#log-verbosity-descriptions_edi...
<p>I am having a problem in my Kubernetes cluster. Currently I am running my Laravel application in kubernetes with success. Now I am trying to make the storage folder in my app a persistant volume, because it can be used to store images and stuff. My deployment looks like this now:</p> <pre><code>apiVersion: apps/v1 k...
<p>You didn't mention your k8s version. My answer might not be suitable for you, when you're using k8s below of v1.23.</p> <p>Kubernetes can setup the permissions for you. Use <code>fsGroup</code> and <code>fsGroupChangePolicy</code> and k8s will take over the job for you.</p> <pre class="lang-yaml prettyprint-override...
<p>i got a configuration of a postgres deployment, something like this..</p> <p>on the volumeMounts level</p> <pre><code> volumeMounts: - mountPath: /var/lib/postgresql/data name: postgres-persistance-storage-new </code></pre> <p>on the volumes level</p> <pre><code> volumes: - name: postgres...
<p>When you delete a PVC, if there is a resource that uses it (for example if the volume is attached to a Deployments with running Pods) this remains ACTIVE.</p> <p>This is the reason: <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection" rel="nofollow noreferrer">ht...
<p>Our project is undergoing a refactor to a micro-services architecture, and we are currently considering different API gateway solutions.</p> <p>We did our research, looked at the official sites for several solutions, went over some technical comparisons of different solutions, and read articles about our top picks.<...
<p>Both Kong and Apache APISIX are popular and feature-rich API gateway solutions. Choosing the right one depends on your specific requirements and use case.</p> <ol> <li><p>API Management Features: Both Kong and Apache APISIX provide a wide range of API management features including API authentication, rate limiting, ...
<p>What does the <code>maxReplicas</code> property mean in the pipeline yaml in Azure in context of the k8s deployment?</p> <p>E.g. in <a href="https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-scale?tabs=azure-cli" rel="nofollow noreferrer">this</a> documentation the <code>maxReplicas: 10</code> is menti...
<p>It refers to the Kubernetes Horizontal Pod Autoscaler.</p> <p><a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/</a></p> <p>Example: <a href="https://learn.mi...
<p>We have <a href="https://github.com/jonashackt/tekton-argocd-eks" rel="nofollow noreferrer">a EKS setup provisioned</a> where we use a Cloud Native Buildpacks based Tekton Pipeline our <code>PipelineRuns</code> are stuck and pending forever without getting a Pod resource. We created a PersistentVolumeClaim like this...
<p>From EKS 1.23 on <a href="https://kubernetes.io/blog/2019/01/15/container-storage-interface-ga/" rel="noreferrer">a Container Storage Interface (CSI) driver</a> is needed in order to get your PersisentVolumeClaims served by a PersistentVolume as you are used to from earlier EKS versions.</p> <p><a href="https://docs...
<p>I am trying to install using Helm Chart Repository image of Keycloak so that MariaDB Galera is used as database.</p> <p><strong>Installation</strong></p> <pre><code>helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update helm upgrade keycloak bitnami/keycloak --create-namespace --install --namespac...
<p>Try using</p> <pre><code>jdbc:mariadb://host/database jdbc:mariadb://mariadb-galera.default.svc.cluster.local/bitnami_keycloak </code></pre> <p>as KC_DB_URL value.</p> <p><a href="https://www.keycloak.org/server/containers" rel="nofollow noreferrer">https://www.keycloak.org/server/containers</a> (chapter “Relevant ...
<p>The EKS docs in the page <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html" rel="nofollow noreferrer">Amazon EKS node IAM role</a> state that before you create worker nodes, you must create a role with the following policies:</p> <ul> <li>AmazonEKSWorkerNodePolicy</li> <li>AmazonEC2Cont...
<p>The reason why it is recommended to attach the AmazonEKS_CNI_Policy to a separate role used specifically for the Amazon VPC CNI add-on is to follow the principle of least privilege.</p> <p>The Amazon VPC CNI (Container Network Interface) is a plugin for Kubernetes that enables networking between pods and the rest of...
<p>Can I lint only changes or pull requests in the kubernetes file instead of linting whole kubernetes files everytime I make any changes in the kubernetes folder?</p> <p>I was trying this <a href="https://docs.kubelinter.io/#/?id=using-docker" rel="nofollow noreferrer">https://docs.kubelinter.io/#/?id=using-docker</a>...
<p>I'm assuming that you are referering to the <a href="https://github.com/marketplace/actions/kube-linter" rel="nofollow noreferrer"><em>kube-linter</em> GitHub action</a>, because that's the one <a href="https://docs.kubelinter.io/#/?id=kubelinter-github-action" rel="nofollow noreferrer">referenced by the kube-linter...
<p>Is it possible to run a deployment job that downloads helm chart from bitbucket repository and applies the helm chart into kubernetes:</p> <pre><code>pipeline { agent any stages { stage('test') { steps { script { withKubeConfig([credentialsId: 'm...
<p>Yes you are right first need to clone the Helm template repo build the files</p> <p>You can review this file although i am not using Helm but mostly steps are similar might need to do last step <strong>tweaks</strong> : <a href="https://github.com/harsh4870/node-js-aws-codebuild-basic-ci-cd/blob/main/Jenkinsfile" re...
<p>so I am creating a system composed of different components that are installed via helm charts. Since I needed different customizations for each of the charts, I created my own separated repositories, copied the charts there and added customizations.</p> <p>The question is: how do I conveniently upgrade the charts ve...
<p>Unfortunately it often happens that the Helm Chart repositories of an application aren't suitable for the environment in which you are going to install them.</p> <p>I suggest modifying the templates following the patterns of how they were written and sending PRs to the application's GitHub repository.</p> <p>Unless ...
<p>I am using a StatefulSet to deploy my application and I have 10 replicas. Because each pod waits for the previous pod to be ready, it takes a long time to spin up my cluster. I found the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies" rel="nofollow noreferrer"...
<p>Looks like you are on K8s version <strong>1.24</strong> or above as mentioned in error you can only update a few fields in <strong>statefulset</strong> unlike <strong>Deployment</strong> or <strong>POD</strong>.</p> <p>So you have to <strong>delete</strong> and <strong>re-apply</strong> the new changes is the only s...
<p>I am deploying to version 1.16 but the pods are getting crashed below are the pod's error.</p> <p>istiod pod:</p> <p>2023-03-21T11:58:09.768255Z info kube controller &quot;extensions.istio.io/v1alpha1/WasmPlugin&quot; is syncing... controller=crd-controller 2023-03-21T11:58:09.868998Z info kube controller &quot;exte...
<p>The error is speaking; the Service Account istiod-service-account has no privileges on the CRDs extensions.istio.io/v1alpha1/WasmPlugin.</p> <p>The solution to your problem is documented here: <a href="https://github.com/istio/istio/issues/36886#issue-1107794465" rel="nofollow noreferrer">https://github.com/istio/is...
<p>I'm using NGINX (v4.5.2) on a Kubernetes cluster, and I'm trying to configure it to redirect non-www URLs to the www equivalent. For example...</p> <blockquote> <p><a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> -&gt; <a href="https://www.example.com" rel="nofollow noreferrer">https...
<p><code>$request_uri</code> will contain the path with arguments. To get your desired redirect you probably want to use <code>$host$request_uri</code>. For some examples of usage of <code>$request_uri</code> you can search it on <a href="https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/" rel...
<p>I have an application in Docker Container which connects with the host application using SCTP protocol. When this container is deployed on Kubernetes Pods, connectivity with this pod from another pod inside a cluster is working fine. I have tried exposing this pod using a Load Balancer Service and NodePort service e...
<p>You cannot expose port 38412 via NodePort.</p> <blockquote> <p>If you set the type field to NodePort, the Kubernetes control plane allocates a port from a range specified by --service-node-port-range flag <strong>(default: 30000-32767)</strong>. Each node proxies that port (the same port number on every Node) into y...
<p>I am building a Kubernetes cluster using kubeadm and have an issue with a single node.<br /> The worker nodes are running with sub-interfacing and policy based routing, which work as intended; however, out of the 4 worker nodes, if pods are moved to one of them, they fail liveness and readiness checks over http.<br ...
<p>I found out what I was doing to cause the issue in the first place, so will document it just in case someone runs across the same scenario.</p> <p>Some more background on this as it is very niche. But to some limitations we face, the worker nodes have 1 physical interface which is broken out into 2 additional sub-i...
<p>I am currently working on Spring micro-service(Eureka Implementation) project. To manage the distributed configuration we are using Consul KV. We are deploying services on Kubernetes cluster.</p> <p>The issue I am facing that, whenever I restart the cluster for Consul it deletes all the data of KV. I am creating Kub...
<p>Please note that k8s <code>pods</code> are by default ephemeral even if you deploy them as <code>StatefulSet</code>.</p> <p><code>StatefulSet</code> is providing you option for <code>pod</code> with define name eg. <code>consul-0</code> rather that standard <code>consul-&lt;&lt;random string&gt;&gt;</code>. It also ...
<p>I have a local Kubernetes created by Rancher Desktop. I have deployed a named Cloudflared Tunnel based on <a href="https://github.com/cloudflare/argo-tunnel-examples/tree/86a2dccc880669ef3b5f9f2e6c2f034242c08f12/named-tunnel-k8s" rel="nofollow noreferrer">this tutorial</a>.</p> <p>I recently started to get error:</p...
<p>My <code>cloudflared</code> pod is running under <code>hm-cloudflared</code> namesapce.</p> <p>So I can get the node name by:</p> <pre class="lang-bash prettyprint-override"><code>kubectl get pods -o wide -n hm-cloudflared NAME READY STATUS RESTARTS AGE IP N...
<p>I have a <a href="https://konghq.com/" rel="nofollow noreferrer">Kong</a> deployment.</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1 kind: Deployment metadata: name: local-test-kong labels: app: local-test-kong spec: replicas: 1 selector: matchLabels: app: local-test-...
<p>I had exactly the same problem using Microk8s. I had the following plugins enabled: <code>hostpath-storage</code> and <code>dns</code>. I don't deploy Kong, <a href="https://www.rabbitmq.com/kubernetes/operator/quickstart-operator.html" rel="nofollow noreferrer">but RabbitMQ</a> (here's my example project).</p> <p>I...
<p>Suppose I have bellow code snippet which setups a reconciler that watches external resource &quot;External&quot;:</p> <pre><code>// SetupWithManager sets up the controller with the Manager. func (r *SomethingReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). F...
<p>Yes it's possible.</p> <p>You can create a REST client for your resource in <code>main.go</code> as below:</p> <pre class="lang-golang prettyprint-override"><code>gvkExternal := schema.GroupVersionKind{ Group: &quot;some.group.io&quot;, Version: &quot;v1&quot;, Kind: &quot;External&quot;, } restCli...
<p>I am trying to migrate a dashboard which shows the count of Readiness and Liveness Probe Failures, from Kibana(ElasticSearch) to a Grafana Dashboard(Sauron). In kibana the we can get both the probe failures separately using <code>kubernetes.event.message : Liveness probe failed</code> for Liveness failure and simila...
<p>The following two queries will do the trick for you:</p> <pre><code>prober_probe_total{probe_type=&quot;Readiness&quot;,result=&quot;failed&quot;} </code></pre> <pre><code>prober_probe_total{probe_type=&quot;Liveness&quot;,result=&quot;failed&quot;} </code></pre>
<p>I have a small hobby website I want to release on my server. I chose to use kubernetes for that, as I partly use it at work as well, so I'd like to get familiar. I bought hetzner debian server and installed k3s. Now are deploying PostgreSQL container (version 15.2, not cluster) as per this <a href="https://www.conta...
<p>Of course the best practice is using an operator like <a href="https://cloudnative-pg.io/" rel="nofollow noreferrer">cloudnative-pg</a> or <a href="https://postgres-operator.readthedocs.io/en/latest/" rel="nofollow noreferrer">postgres-operator</a> but they are pretty big and probably have way more feature for a sim...
<p>Is it possible to make the k3s ingress route a certain path to a certain IP or port of a service which is not running inside the Kubernetes, but on same physical machine?</p> <p><strong>My use-case</strong></p> <p>Using single node k3s setup.</p> <p>I have a special server running on the same host that the k3s is ru...
<blockquote> <p>Is it possible to make the k3s ingress route a certain path to a certain IP or port of a service which is not running inside the Kubernetes, but on same physical machine?</p> </blockquote> <p>Yes you can do it with the <strong><a href="https://kubernetes.io/docs/concepts/services-networking/service/#ext...
<p>After I uninstalled a release(with --keep-history), there will remain a release history with &quot;uninstalled status&quot;.</p> <p>Then if I want to install this release again, <code>install</code> and <code>upgrade --install</code> are both failed.</p> <p><code>install</code> failed because of &quot;cannot re-use ...
<p>As described in this <a href="https://phoenixnap.com/kb/helm-has-no-deployed-releases" rel="nofollow noreferrer">doc</a> by phoenixnap.</p> <p><strong>There are several ways to fix the “helm has no deployed releases” error, one ways is by running the following command</strong>:</p> <pre><code>kubectl -n kube-syst...
<p>I have a Google Cloud Composer environment set up that has 3 nodes in the worker pool. Each node has memory of 16GB (using n1-standard-4) instance. I have tasks inside a DAG that takes around 7-8GB of memory. The allocable memory for the worker nodes is roughly 12GB and hence, these tasks should run without encounte...
<p>It's certainly good practice to pre-assess the resources available in your node-pool and know in advance how &quot;big&quot; your Pods will be.</p> <p>Once you know how many resources you have available, you can do 2 things:</p> <p>1.set up resources/limits for all your Pods, making sure you never reach the maximum ...
<p>When releasing a Helm chart, Kubernetes resources have Helm's <code>.Release.Name</code> prepended to their names. In the Chart I'm writing separate namespaces with default resource naming is enough, and the additional prefix is verbose and unwanted. Vault is a dependency of my Chart.</p> <p>Is there a way I can ach...
<p>I took a quick look at the Chart and I don't think there is the possibility of doing what is requested.</p> <p>What you can do is modify the templates yourself, adding the override parameter for names/namespaces and try doing a PR against the Hashicorp repo; maybe they didn't think this feature could be useful.</p> ...
<p>I deployed a Spring Boot app on AWS Elastic Kubernetes Service. I am facing a 502 Bad Gateway error. I cannot find anything useful from the logs, there is no event to check, it works fine locally and the docker image is also running without any issue.</p> <p>Right now its just a simple hello world app, Here are the ...
<p>Your <code>targetPort</code> in the <code>Service</code> and the <code>containerPort</code> in the <code>Deployment</code> do not match. You can fix it by changing the targetPort in the Service</p> <pre><code>apiVersion: v1 kind: Service metadata: namespace: my-namespace name: backend-service spec: type: NodeP...
<p>I am using k9s tool for managing kubernetes cluster(GKE on Google Cloud Platform).</p> <p>Recently k9s has stopped working and stopped connecting to k8s cluster.</p> <p>When I launch k9s(i.e. <code>k9s -n default</code>) it shows me all clusters's context and when I click on one of the contexts then</p> <p>Error is<...
<p>After investigating, checked logs, you can get logs location by running</p> <pre class="lang-bash prettyprint-override"><code>$ k9s info       ____  __.________        |    |/ _/   __   \______ |      &lt; \____    /  ___/ |    |  \   /    /\___ \  |____|__ \ /____//____  &gt;         \/            \/  Co...
<p>I have installed microk8s, traefik and cert-manager. When I try to receive a letsencrypt certificate, a new pod for answering the challenge is created, but the request from the letsencryt server does not reach this pod. Instead, the request is forwarded to the pod that serves the website.</p> <p>It looks like the in...
<p>Shouldn't this annotation be added to ingress?</p> <pre><code>cert-manager.io/cluster-issuer=letsencrypt-production </code></pre>
<p>I have scenario when my cluster consist of two microservices.</p> <p>In service <strong>A</strong> i have .CSV(15MB) file, which also is needed in service <strong>B</strong>.</p> <p>I don't want to place this file two times in each repo.</p> <p>During deployment of service <strong>A</strong> I want to place this .cs...
<p>The easiest solution would be to build the file into the docker image.</p>
<p>So, according to <a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">Kubernetes documentation</a>, when you have an external LoadBalancer service set with <code>externalTrafficPolicy=Local</code>, you can explicitly define a healthCheckNodePo...
<p>It's actually very simple; I report a part of OpenShift documentation:</p> <blockquote> <p>healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it ...
<p>I have a Kubernetes cluster running a Docker image. My web app is containerized and uses an environment variable that changes every couple of days.</p> <p>I am wondering if there is a way to externally store the variables or if I just have to enter the new variables and push a new image every couple of days?</p>
<p>Store the <code>Env</code> in a <code>configmap</code> and mount it on your <code>deployment</code>. Just rollout your deployment if you want to update the <code>Env</code>s in the <code>pod</code>s(containers).</p>
<p>Say I have an RLS policy on a table, and I realize I goofed and forgot a command in the policy, so can't <code>ALTER</code> it; it must be <code>DROP</code>/<code>CREATE</code>ed. I'm using rolling updates in k8s, and my DB migrations happen in an init container. I deploy my new application version that <code>DROP</...
<p>A row level security policy allows a role to do something, so dropping the policy will <em>reduce</em> what the user can do. If you are worried that this can cause errors or bad results for concurrent queries, wrap the <code>DROP POLICY</code> and CREATE POLICY` statements in a single transaction, then all concurren...
<p>I am just learning containers and kubernetes and everything around it. There has been a use case to build a reliable setup, where we can store all our python scripts(small, usecase defined scripts that do one only job each). There are some scripts in other languages like perl too.</p> <p>Not sure if this is the corr...
<p>The idea of ​​containerizing your scripts allows you to have a highly customized &quot;environment&quot; that doesn't change wherever you deploy it.</p> <p>For the management of these containers then, you decide according to your needs... If they are management scripts, you can think of creating a management Pod tha...
<p>The following pod definition <em>successfully</em> executes a <code>readinessProbe</code>, which makes a request to the service <code>service-am-i-ready</code> that connects to pods on the same cluster.</p> <pre><code>apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: run: ready-if-service-re...
<p>@glv's answer is also correct, but let me explain you why it is not working and what is the otherway</p> <p>The reason is <strong>wget</strong> uses the <strong>DNS resolver configured in the pod</strong>, which is set to the Kubernetes DNS service by default.</p> <p><strong>httpGet probe</strong>, which is executed...
<p>We currently have several microservices running on-premises, and we use shell scripts to monitor their performance, including JVM, heap size, and number of running threads. However, we are planning to move to the cloud using Kubernetes. We want to monitor service level stats like the number of threads open, JVM, hea...
<p>Your question requires a series of reflections that you don't do.. for example, which Cloud provider are you going to? Why do you want to create a monitoring (Prometheus/Alertmanager/Grafana) and a logging stack (Elasticsearch/fluentd)? Is there a particular reason why you want to remain &quot;untied&quot; from the ...
<p>When join node : <code>sudo kubeadm join 172.16.7.101:6443 --token 4mya3g.duoa5xxuxin0l6j3 --discovery-token-ca-cert-hash sha256:bba76ac7a207923e8cae0c466dac166500a8e0db43fb15ad9018b615bdbabeb2</code></p> <p>The outputs:</p> <pre><code>[preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: dete...
<p>on worker nodes doing</p> <pre><code>sudo kubeadm reset </code></pre> <p>and then rejoining will solve this issue</p>
<p>I have scenario when my cluster consist of two microservices.</p> <p>In service <strong>A</strong> i have .CSV(15MB) file, which also is needed in service <strong>B</strong>.</p> <p>I don't want to place this file two times in each repo.</p> <p>During deployment of service <strong>A</strong> I want to place this .cs...
<p>If you need both microservice that can read and write to a file, then you need a <code>sharedStorage</code> that supports the <code>ReadWriteMany</code> accessMode. There are a couple of options in Kubernetes like:</p> <ul> <li>NFS</li> <li>CephFS</li> <li>Glusterfs</li> </ul> <p>You could find more on this topic <a...
<p>I'm trying to integrate Grafana with managed prometheus service provided by Kubernetes Engine in GCP.</p> <p>I configured Managed Prometheus service and I'm able see the metrics well, but I'm not able to integrate the managed prometheus service with Grafana <strong>on the same kubernetes cluster</strong>.</p> <p>Bel...
<p>You need to deploy the <a href="https://cloud.google.com/stackdriver/docs/managed-prometheus/manifests#expandable-6" rel="nofollow noreferrer">frontend</a> service. More details on using Grafana with Managed Prometheus can be found <a href="https://cloud.google.com/stackdriver/docs/managed-prometheus/query#ui-grafa...
<p>I have scenario when my cluster consist of two microservices.</p> <p>In service <strong>A</strong> i have .CSV(15MB) file, which also is needed in service <strong>B</strong>.</p> <p>I don't want to place this file two times in each repo.</p> <p>During deployment of service <strong>A</strong> I want to place this .cs...
<p>If you dont want to set it in the docker image, you can use the <strong>initcontainer</strong> to download when POD starts. You can set the file into the <strong>hostPath</strong> when <strong>service A</strong> starting.</p> <p>When you say <strong>service A</strong> has file not sure if it's in the <strong>repo</s...
<p>I wrote a <strong>CronJob</strong> that periodically takes volume snapshot of my <strong>PVC</strong>. Below is the <strong>CronJob</strong> file:</p> <pre><code>kind: CronJob metadata: name: mycronjob spec: schedule: &quot;*/2 * * * *&quot; # Run the job every 2 minutes jobTemplate: spec: template...
<p>It seems to me that what you describe mirrors the YAML files you shared; there is nothing that changes the name of the backup and therefore it will never create a new one.</p> <p>If you want to make a backup of one PVC to another in a &quot;raw&quot; way with scripts, maybe think of a job that mounts 2 Volumes (sour...
<p>I have an EksNodeGroup with the following taints:</p> <pre class="lang-js prettyprint-override"><code> const ssdEksNodeGroupPublicLargeSubnet = new aws.eks.EksNodeGroup( this, &quot;ssdEksNodeGroupPublicLargeSubnet&quot;, { // ... other stuff... taint: [ { ...
<p>This is due to the <a href="https://developer.hashicorp.com/terraform/cdktf/concepts/tokens" rel="nofollow noreferrer">Token System</a> powering CDKTF. Instead of real run-time values accessing <code>ssdEksNodeGroupPublicLargeSubnet.taint</code> gives you a token that is a reference to the taints. This reference is ...
<p>I set up a local kubernetes cluster with minikube. On my cluster I have only one deployment runnning and one service attached to it. I used a NodePort on port 30100 to expose the service, so I can access it from my browser or via curl.</p> <p>here is the <code>python-server.yml</code> file I use to setup the cluster...
<p>It is not said that you reach the IP of your node (you should provide some more information about the environment if necessary).</p> <p>But you could port forward the service and reach it easily.</p> <p>Take a look here: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-applica...
<p>I have write a server side sse test api like this:</p> <pre><code>public SseEmitter testStream(String question) { SseEmitter emitter = new SseEmitter(); // Start asynchronous processing new Thread(() -&gt; { try { for (int i = 0; i &lt; 10; i++) { ...
<p>Finally I found the nginx cached the sse message, configure the nginx like this to fixed this issue:</p> <pre><code>location ^~ /ai/stream { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $prox...
<p>When running the Kubernetes Dashboard in a Windows Docker Desktop when I click on &quot;pods&quot; either nothing is shown</p> <blockquote> <p>There is nothing to display here No resources found.</p> </blockquote> <p>or I get this error:</p> <blockquote> <p>deployments.apps is forbidden: User &quot;system:serviceacc...
<p>It's definitely a Permissions issue.</p> <p>Binds the kubernetes-dashboard ServiceAccount to the cluster-admin ClusterRole.</p> <p>Otherwise it doesn't have the privileges to be able to collect data from the cluster.</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: d...
<p>I have a 3 node test cluster: 1 head and 2 worker nodes (all raspberry pies). I would like to expose a specific folder on the head for read/write on each pod on the cluster (irregardless of which node they are running on).</p> <p>E.g. my head node has this folder: <code>/media/usb/test</code>. I want to mount this t...
<p>You could use <code>hostPath</code>. More in <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">here</a>. It is also recommended not to use it.</p> <blockquote> <p>HostPath volumes present many security risks, and it is a best practice to avoid the use of HostPaths when...
<p>I have several image do different thing. Now, I expose them like these commands:</p> <pre><code>kubectl create deployment work_deployment_1 --image=username/work_image_1:0.0.1-SNAPSHOT kubectl expose deployment work_deployment_1 --type=LoadBalancer --port=8000 </code></pre> <p>and then</p> <pre><code>kubectl create ...
<p>You will need to have an Ingress controller installed in your cluster to handle incoming traffic and route it to the appropriate service. Examples of Ingress controllers include Nginx Ingress, Traefik, and Istio.</p> <p>Another way around that we use in Azure and Google Cloud is that we Expose the services via App G...
<p>I have a Nodejs microservice and a Kafka broker running in the same cluster.</p> <p>The kafka broker and zookeeper are running without errors, but I am not sure how to connect to them.</p> <p><strong>kafka.yaml</strong></p> <pre><code># create namespace apiVersion: v1 kind: Namespace metadata: name: &quot;kafka&qu...
<p>From outside k8s, your app cannot resolve cluster DNS names. You'll need to use an ClusterIP / NodePort address (but you've set that to None). This will also require you to advertise that. Refer <a href="https://strimzi.io/blog/2019/04/17/accessing-kafka-part-1/" rel="nofollow noreferrer">https://strimzi.io/blog/201...
<p><strong>I am deploying PostgreSQL cluster using kubernetes runnung 3 Instance How do you add postgresql connection string url by using kubernetes yaml file</strong></p> <blockquote> <p>postgresql://bigdata:bigdata@dbhost1:5432,dbhost2:5432/bigdata?target_session_attrs=primary</p> </blockquote>
<p>Try like this:</p> <pre><code>jdbc:postgresql://&lt;database_host&gt;:&lt;port&gt;/&lt;database_name&gt; </code></pre> <p>Credentials will need to be managed via Secrets.</p>
<p>We need to backup PV on an on-premise Kubernetes cluster, so we installed Velero, linked to MinIO, with Velero's File System Backup. No PV are backed up and no error is shown, only this mention appears in the logs &quot;Persistent volume is not a supported volume type for snapshots, skipping&quot;. Does someone have...
<p>have you add option --default-volumes-to-restic(for older versions like 1.7) or --default-volumes-to-fs-backup(new versions) when doing velero backup? could be same problem like: <a href="https://stackoverflow.com/questions/75803242/velero-volume-snapshots-contain-no-data-when-restoring-a-backup">Velero - Volume Sna...
<p>We have recently introduced Karpenter autoscaler in our Kubernetes infrastructure.</p> <p>One of its strength is the <a href="https://karpenter.sh/preview/concepts/deprovisioning/" rel="nofollow noreferrer">deprovisioning mechanism</a>.</p> <p>However given that we have a lot of stateful workload, this can cause som...
<p>There is a metric in kubelet <code>kube_pod_status_scheduled_time</code> you could use. If the <code>start time</code> is more than <code>scheduled time</code>, it is scheduled:</p> <pre><code>kube_pod_start_time{namespace=&quot;my-ns&quot;} - kube_pod_status_scheduled_time{namespace=&quot;my-ns&quot;} &gt; 0 </code...
<p>how can I do health check for cnosdb in kubernetes, as we know, health-check is important in kubernetes, as common, a binary should provider a restful api for kubernetes periodically health-checking. Does cnosdb provider such api?</p> <p>best practise to do health-checking in kubernetes for cnosdb</p>
<p>It's a very general question, which in my opinion leaves too much room for interpretation.</p> <p>In general, however, you should think about configuring a Monitoring stack, perhaps based on Prometheus, Grafana and Alertmanager that allows you to extrapolate the metrics that are exposed by the DB.</p> <p>Otherwise y...
<p>I have apache flink deployed to AWS EKS (1.21) with version 1.17-SNAPSHOT and state storage in AWS S3. This setup works great.</p> <p>I am now trying to deploy the same version to Azure AKS (1.22 - minimum available version for AKS) and store the state in Azure Blob.</p> <p>In both cases I use the <a href="https://g...
<p>This issue should be fixed in flink 1.17.1 or higher: <a href="https://issues.apache.org/jira/browse/FLINK-31612" rel="nofollow noreferrer">https://issues.apache.org/jira/browse/FLINK-31612</a></p>
<h2>Background</h2> <p>I have two Kubernetes nodepools - <code>A</code> and <code>B</code>.</p> <p><code>A</code> nodepool is the right hardware and the preferred one. <code>B</code> be nodepool is less preferred since it using different hardware.</p> <p>My pods allocation preferring nodepool <code>A</code>. But, <code...
<p>The need is very clear.</p> <p>You can add this piece of code to your Deployment (.spec.affinity.nodeAffinity):</p> <pre><code> nodeAffinity: # Soft anti affinity between nodes A and B preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector...
<pre><code>echo &quot;apiVersion: v1 kind: Node metadata: name: host-cluster-control-plane-64j47 labels: beta.kubernetes.io/arch: amd64 &quot; | yq -o p </code></pre> <p>Result:</p> <pre><code>apiVersion = v1 kind = Node metadata.name = host-cluster-control-plane-64j47 metadata.labels.beta.kubernetes.io/arch = ...
<p>You can get close by doing something like:</p> <pre class="lang-bash prettyprint-override"><code>yq '(.. | key | select(test(&quot;\.&quot;))) |= (&quot;[\&quot;&quot; + . + &quot;\&quot;]&quot;)' file.yaml -op apiVersion = v1 kind = Node metadata.name = host-cluster-control-plane-64j47 metadata.labels.[&quot;beta....
<p>I'd like to downgrade the load balancer of my GKE Service from Premium tier, to Standard tier. To do that, I added <code>cloud.google.com/network-tier: Standard</code> to the annotations of my service. The problem now is that no load balancer is getting created in the <code>Load Balancer</code> section, and I can't ...
<p>I found the solution, the problem was that my reserved IP address was of premium tier. Now that I changed it, everything seems to be in working order</p>
<p>I'm using Grafana with Helm <a href="https://github.com/grafana/helm-charts/tree/main/charts/grafana" rel="nofollow noreferrer">https://github.com/grafana/helm-charts/tree/main/charts/grafana</a>. I would like to switch from SQLite 3 to PostgreSQL as my backend database. However, I'm concerned about the security of ...
<blockquote> <p>Had you already seen this section from your link? How to securely reference secrets in grafana.ini – jordanm</p> </blockquote> <p>Thank you so much @jordanm :)</p>
<p>All my kustomize declarations for my kubernetes cluster are stored in a folder with this structure:</p> <pre><code>. ├── apps │ └── nginx-test │ ├── base │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── kustomization.yaml │ │ ├── namespace.yaml │ │ ...
<p>This behaviour is not supported (yet). There is an open issue for it: <a href="https://github.com/tilt-dev/tilt/issues/5268" rel="nofollow noreferrer">https://github.com/tilt-dev/tilt/issues/5268</a></p>
<p>Since Kubernetes 1.25, the <a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container" rel="nofollow noreferrer">ephemeral containers</a> are stable.</p> <p>I can inject ephemeral container into running pod but when the purpose of debug container ends I'd like to remove ...
<p>Unfortunately it isn't possible to do what you say.</p> <blockquote> <p>Ephemeral containers are created using a special <em>ephemeralcontainers</em> handler in the API rather than by adding them directly to <em>pod.spec</em>, so it's not possible to add an ephemeral container using <em>kubectl edit</em>.</p> </bloc...
<p>I would like to know how does the AKS cluster autoscaler choses in which node pool to add a node in a multiple node pool environment</p> <p>For instance, if I have a node pool tainted for a specific applications, will the autoscaler automatically detect the taint and only scale the node pool up if there are some pen...
<p>Below are my test results:</p> <p><strong>Scenario1:</strong></p> <p>If there are multiple nodepools and if all those nodepools have got corresponding taints applied , then cluster autoscaler will scale only that particular nodepool for which the corresponding pods are in pending state which are specified with toler...
<p>I have deployed Azure AKS using the below official terraform docs</p> <p><a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster</a></p> <p...
<p>I usually recommend the following, which gives you control over the IP address etc.</p> <ul> <li>Deploy an Public IP address using Terraform (or ARM) alongside your AKS cluster</li> <li>Give the AKS Kubelet identity &quot;Network Contributor&quot; permissions on that PIP</li> <li>When deploying your Ingress, <a href...
<p>Below is my <code>testfile.yaml</code>:</p> <pre><code>--- kind: Pod metadata: name: amazing-application --- kind: Deployment metadata: name: amazing-deployment --- kind: Service metadata: name: amazing-deployment --- kind: Service metadata: name: tea-service </code></pre> <p>My goal is to split this into 4 ...
<p>According to your shell-scripted workaround, you want to store each document into its own file named after <code>.metadata.name</code> in a subdirectory named after <code>.kind</code>. However, yq's <a href="https://mikefarah.gitbook.io/yq/usage/split-into-multiple-files#split-single-document-into-files" rel="nofoll...
<p>I have a problem. There is preStop option in manifest file and OOMKilled was happened. pod was restarted but no heapdump is created.</p> <p>lifecycle: preStop: exec: command: [&quot;/tmp/preStop.sh&quot;]</p> <p>heapdump works when I manually terminate the pod.</p> <p>so I wonder if pod is restarted, preStop is not ...
<blockquote> <p>when the pod is restarted, first send TermSignal to the application and execute preStop and terminate and start pod again. Am I wrong?</p> </blockquote> <p>As per the official <a href="https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks" rel="nofollow noreferrer">do...
<p>In k8s, dns name can be unchangable, the ip is unflexable. the cnosdb github repo provide ip to config the clusters, but in kubernetes the cluster should use dns name, please provide a workaround method to config.</p> <p>know the best practise to deploy cnosdb in k8s</p>
<p>I don't know the code of the tool you indicate in the question, but not giving the possibility to configure a DNS name in favor of a static IP is generally an anti-pattern, especially on Kubernetes.</p> <p>However, Network plug-ins like Calico allow you to reserve a static IP address for your Pod.</p> <p>Take a look...
<p>When I run the application locally the application is up and running but when i deploy the same application in the Kubernetes cluster i am getting the error</p> <p><strong>Error</strong></p> <pre><code>java.lang.NoClassDefFoundError: org/springframework/core/env/Profiles at org.springframework.cloud.kubernet...
<p>The version of Spring Cloud Kubernetes that you are using (1.1.10.RELEASE) requires Spring Boot 2.2.x. You are using 2.0.x. This older version of Spring Boot uses an older version of Spring Framework that does not contain the <code>org.springframework.core.env.Profiles</code> class. It was introduced in Spring Frame...
<p>I am trying to update the eks add-on named &quot;vpc-cni&quot;. This plugin, does the following:</p> <p>&quot;The CNI plugin allows Kubernetes Pods to have the same IP address as they do on the VPC network. More specifically, all containers inside the Pod share a network namespace, and they can communicate with each...
<p>Work around: when deploying this addon in the AWS console, click on the &quot;advanced options&quot; in the first panel after specifying the version and the IAM role. At the very bottom is a button that can be selected to override conflicts and this allows the installation to succeed.</p>
<p>Can I target a K8s service to a Pod without labels?</p> <p>That is, I have a K8s Pod created with the following configuration.</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: nofrills-first-pod spec: containers: - name: nofrills-container image: nofrills/to-deploy:0.0.1 ports: - containerPo...
<p>You can define a <a href="https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors" rel="nofollow noreferrer">Service without specifying a selector</a> to match Pods. Because this Service has no selector, the corresponding EndpointSlice (and legacy Endpoints) objects are not create...
<p>I have a kubernetes cluster on which I have deployed a opensearch cluster and opensearch dashboard using Helm, I am also able to deploy logstash using helm successfully but I am confused on how to integrate those, I want to feed data to my Opensearch using logstash as my OBJECTIVE as I am not able to find much docum...
<p>for opensearch sso(keycloak) please use below steps: opensearch:</p> <ol> <li><p>Make a custom iamge for opensearch, for this make 2 files as below. i.config.yml(for opensearch security plugin) --- _meta: type: &quot;config&quot; config_version: 2</p> <pre><code> config: dynamic: http: anonymous_auth_...
<p>I'm trying to delete resources of a particular kind in a k8s cluster using client-go.</p> <p>I'm using this code but it requires a specific namespace to be declared, but i want to delete this resource in all namespaces.</p> <pre><code> u.SetName(&quot;test&quot;) u.SetNamespace(v1.NamespaceAll) u.SetGroup...
<p>Use the <code>List</code> method to get a list of all resources in <code>all namespaces</code> and then loop through the list and delete each resource using the <code>Delete</code> method.</p> <pre class="lang-js prettyprint-override"><code>cr := &amp;v1alpha1.CustomResource{} // Get a list of all instances of your...
<p>I wanted to know if there is any way that I can set a DNS for the Pod in the StatefulSet, so I can call them directly.</p> <p>I have read the Kubernetes documentation, but I haven't seen anything useful.</p>
<p>You can directly hit the POD if using the statefulset with <strong>headless</strong> service</p> <p>So if you have three replicas running web-0, web-1, web-2 you can use curl</p> <pre><code>web-0.&lt;service-name&gt;.&lt;namespace-name&gt;.svc.cluster.local </code></pre> <p>POD name</p> <pre><code>&lt;pod-name&gt;.&...
<p>I am facing an issue in kubernetes. I have a deployment and in replicaset we have given value as 2. After updating my release it is showing 3 replicas. 2 of them are running properly but one is in CrashLoopBackOff. I tried deleting it but it again comes up with same error.</p> <p>There are 2 containers running in th...
<p>As seen from your <em>get pods</em>, the Deployment in <strong>CrashLoopBackOff</strong> state has a different hash from the other 2; it would appear that it is being handled by a different ReplicaSet than the other 2.</p> <blockquote> <p>The pod-template-hash label is added by the Deployment controller to every Rep...
<p>The below container.conf works fine in Kubernetes 1.23 but fails after migrating to 1.25. I have also specified the deamonset that I have used to push the logs to cloudwatch. When I look into the logs of the fluentd deamonset I could see a lot of below errors</p> <p>2023-04-03 01:32:06 +0000 [warn]: #0 [in_tail_cont...
<p>I had the same problem a while ago.</p> <blockquote> <p>It seems to be an issue between the logs being emitted from the container and what is being written to the log file. Something is prefixing all logs with the &lt;stdout/stderr&gt; &lt;?&gt; </p> </blockquote> <p>Ref. <a href="https://github.com/fluent/fluentd-...
<p>I have a backend with golang that talks to k8s. I want to reformulate the error response that i get from k8s and send it to the frontend.</p> <p>I want to return a meaningful validation error messages for the user, when he add a non valid name, something already exist ...</p> <p>And i want something generic not hard...
<p>In general (although there are workarounds), if you want to trap an error in order to return a more useful error, you want to ensure the following conditions are met:</p> <ol> <li>The error you're trapping has a <a href="https://sourcegraph.com/github.com/kubernetes/client-go/-/blob/tools/clientcmd/validation.go" re...
<p>I have a local cluster running using minikube. I installed elastic operator with official helm chart and have a elastic cluster running with this yaml:</p> <pre><code>apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: es-qs spec: version: 8.6.2 nodeSets: - name: default count...
<p>You can use the simple <strong>Curl</strong> command manually to configure the <strong>Elasticsearch</strong> that will be an easy way.</p> <p>Ref doc : <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasti...
<p>I have a backend with golang that talks to k8s. I want to reformulate the error response that i get from k8s and send it to the frontend.</p> <p>I want to return a meaningful validation error messages for the user, when he add a non valid name, something already exist ...</p> <p>And i want something generic not hard...
<p>String <code>err.Error()</code> is the original, meaningful and best error message you can get from Kubernetes server for the user (Or you have to translate it by yourself).</p> <p><strong>Explains:</strong></p> <p>You need to look beyond the surface of <code>kubernetes/client-go</code> client library.</p> <p>Each c...
<p>I have a service for which i dont want to use autoscaling, so i created a copy of it and now i want to have it behind an internal LB using nginx ingress, one of them will be always active and other one will be passive which can be get through probes status, ingress is as below</p> <pre><code>apiVersion: networking.k...
<p>Kubernetes Ingress does NOT allow you to do this.</p> <p>You must necessarily distinguish by host or by path.</p> <p>The only thing you could do is implement a structure like this: <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout" rel="nofollow noreferrer">https://kubernetes.io...
<br/> I have a cluster on Digital Ocean. The API of my project is in DO. My image is from google/cloud-sdk:alpine and also I installed gke-gcloud-auth-plugin with the following command <pre><code>gcloud components install gke-gcloud-auth-plugin </code></pre> <p>I have another cluster on Google Kubernetes Engine. I w...
<p>Finally I solved like following:</p> <p>1: Create a secret with a token and service account. Then associate them.<br/> 2: Create a clusterrole (give necessary permissions) and clusterrolebinding. Associate them. <br/> 3: Associate the service account and clusterrolebinding.</p> <p>Now you can use the token to connec...
<p>I have a kubernetes cronjob object defined as follows:</p> <pre><code>apiVersion: batch/v1 kind: CronJob metadata: name: cloud-backup namespace: test-backup spec: schedule: &quot;0 */50 * * *&quot; ..... </code></pre> <p>However, it's running every single day at 8pm which makes no sense to me. Isn't this cron ...
<p>A cron expression allows certain values per field. For the hour field the values 0-23 are allowed. (See <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax</a> )</...
<p>I have to inject DB URL, DB Username and Password variables into a Java Spring Boot Application. I know that these properties reside in the application.properties file under res/ folder.</p> <p>Now as a design change I want to adopt K8s ConfigMaps and Secrets to be used in place of hardcoding in the the application....
<p>First you need to enable <code>spring.cloud.kubernetes.secrets.enabled</code> then you can use Kubernetes Secrets via <code>SecretsPropertySource</code>.</p> <p>You can use secret name via: <code>-Dspring.cloud.kubernetes.secrets.name=my-secret</code> where <code>my-sercret</code> is name of a secret which is define...
<p>I have to inject DB URL, DB Username and Password variables into a Java Spring Boot Application. I know that these properties reside in the application.properties file under res/ folder.</p> <p>Now as a design change I want to adopt K8s ConfigMaps and Secrets to be used in place of hardcoding in the the application....
<p>You have two options: one can be achieved without extra dependencies and one with Spring Boot Cloud.</p> <h2>Plain way</h2> <p>You define enviroment variable placeholders in your <code>application.yml</code>:</p> <pre class="lang-yaml prettyprint-override"><code>spring: datasource: driver-class-name: org.postg...
<p>I have several PHP applications which I am trying to configure inside K8s. Currently I have issue with one custom service - it is using own server (listening 8800 port) and nginx server which is redirecting traffic from 80/443 (we can use 80 this time to simplify example) to 8800.</p> <p>Here is part of nginx conf:<...
<ul> <li>Run the command below to check whether your service is mapped to your podIP:port properly.</li> <li>If the ENDPOINTS column in the output of the command below does not show podIP:port, then your service is most likely misconfigured - Label in the deployment is not matching with the selector in the service</li>...
<p>I am using aws EKS with a managed node group. Twice in the passed couple of weeks I had a case where the Kubelet in one of the nodes crashed or stopped reporting back to the control plane.</p> <p>In this case I would expect the Autoscaling group to identify this node as unhealthy, and replace it. However, this is no...
<p>I would suggest looking at the <a href="https://github.com/kubernetes/node-problem-detector" rel="nofollow noreferrer">node-problem-detector</a> or this <a href="https://blog.cloudflare.com/automatic-remediation-of-kubernetes-nodes/" rel="nofollow noreferrer">blog</a> by Cloudflare. There is an <a href="https://gith...
<p>My team is experiencing an issue with longhorn where sometimes our RWX PVCs are indefinitely terminating after running <code>kubectl delete</code>. A symptom of this is that the finalizers never get removed.</p> <p>It was explained to me that the longhorn-csi-plugin containers should execute <code>ControllerUnpublis...
<p>Probably some Pod mounts the volume you are trying to remove.</p> <p>Check out this old answer of mine: <a href="https://stackoverflow.com/a/75768413/21404450">https://stackoverflow.com/a/75768413/21404450</a></p>
<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>It can be done with simple <code>if</code> statement.</p> <p>Your <code>template</code> file</p> <pre><code>{{- if .Values.serviceAccount.enabled -}} ... {{- end }} </code></pre> <p>Your <code>values</code> file</p> <pre><code>serviceAccount: enabled: true/false </code></pre> <p>You also can do the same for resour...
<p>I am currently facing an issue with a Kubernetes configuration on my cluster running in Google Kubernetes Engine in Autopilot mode in the us-west1 region. The configuration requires 40 replicas, each with a CPU limit of 1000m. I have an Nginx load balancer with an external IP that distributes load to these pods, and...
<p>Even though Autopilot handles node management for you, behind the scenes it is still creating nodes which count against your CPU quota. While you only pay for the CPU/Memory requested by your pods, the nodes which are spun up behind the scenes actually use more CPU/Memory than that as they also run system pods whic...
<p>Im looking to get the number of pods on a cluster by namespace. Is this possible with a kubectl command?</p> <p>Looking to exclude certain namespaces as well</p> <p>kubectl get pods gets me a list of every pod.</p>
<p>Please use below command:</p> <pre><code>kubectl get pods --all-namespaces -o json | jq '.items | group_by(.metadata.namespace) | map({&quot;namespace&quot;: .[0].metadata.namespace, &quot;NoOfPods&quot;: (length)})' </code></pre> <p>Output format:</p> <pre><code>[ { &quot;namespace&quot;: &quot;keda&quot;, ...
<p>Below is my <code>testfile.yaml</code>:</p> <pre><code>--- kind: Pod metadata: name: amazing-application --- kind: Deployment metadata: name: amazing-deployment --- kind: Service metadata: name: amazing-deployment --- kind: Service metadata: name: tea-service </code></pre> <p>My goal is to split this into 4 ...
<p>There are a few ways you can do this direct in yq.</p> <p>First of, you can use string concatenation with another property to comeup with a unique filename:</p> <pre><code>yq -s '(.kind | downcase) + &quot;_&quot; + .metadata.name' testfile.yaml </code></pre> <p>That will create files like:</p> <pre><code>deployment...
<p>In our kubernetes cluster we are using istio, with mutual tls for the communication between the pods inside the mesh. Everything is working fine, but now we would like to introduce a VirtualService to able to do traffic shifting for canary deployments. We configured everything according to the istio documentation, b...
<p>As you suggested, Istio derives protocol information from the protocol name and will try to use HTTPS on your port 80/8080. You should name them http-web. Additionally, your VS wants to match traffic via TLS-SNI-header on a port 80. Don't use a tls matcher but a http matcher and let it use the host-header to capture...
<p>Trying to export vault secrets as an environment variable to k8s pod using vault injector. Following vault documentation <a href="https://developer.hashicorp.com/vault/docs/platform/k8s/injector/examples#environment-variable-example" rel="nofollow noreferrer">https://developer.hashicorp.com/vault/docs/platform/k8s/i...
<p>You can use the <a href="https://github.com/hashicorp/vault-secrets-operator/" rel="nofollow noreferrer">Vault Secrets Operator</a> to synchronize secrets from Vault to Kubernetes <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">Secret</a> resources.</p> <p>Once you've do...
<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>To create a google managed certificate with DNS Authorization follow this <a href="https://cloud.google.com/certificate-manager/docs/deploy-google-managed-dns-auth#create_a_google-managed_certificate_referencing_the_dns_authorization" rel="nofollow noreferrer">Google official doc</a> and <a href="https://registry.te...
<p>Im looking to get the number of pods on a cluster by namespace. Is this possible with a kubectl command?</p> <p>Looking to exclude certain namespaces as well</p> <p>kubectl get pods gets me a list of every pod.</p>
<p>I have just modified the command posted in the above answer owing to OP's need of excluding certain namespaces as well.</p> <pre><code>kubectl get pods --all-namespaces -o json | jq '[.items[] | select(.metadata.namespace != &quot;logging&quot;)] | group_by(.metadata.namespace) | map({&quot;namespace&quot;: .[0].met...
<p>I'm new here so if this comes out stupid please forgive me 🙂 I've been using Couchbase over 10+ years on real hardware. I've been working on establishing CB in Kubernetes and that seems to be working just fine. I'm also using Couchbase Autonomous Operator. Works great, no complaints with normal functioning thus...
<p>As Sathya S. noted it appears that Velero doesn't (reliably) restore metadata.OwnerReferences from it's backups.</p> <p><strong>I will add to that, that SOMETIMES it does.</strong> And that's what throws me. It almost seems like it has a pattern when it does at least in my case. if CB-dev-0000 has it, then the Se...
<p>When you read about API Groups in Kubernetes, you may come across group names like <code>core/v1</code>, <code>batch/v1</code>, <code>storage.k8s.io/v1</code>, and <code>scheduling.k8s.io/v1</code>. Some of these groups have the <code>k8s.io</code> postfix, while others do not. It can be confusing when specifying th...
<p>I haven't found a precise explanation for your question, I believe it's an implementation choice.</p> <p>But I'm sharing some resources that might clarify your ideas a bit.</p> <blockquote> <p>Resources are bound together in API groups - each group may have one or more versions that evolve independent of other API g...
<p>I have a very interesting situation here. :-) I reinstalled my Kubernetes cluster (bare metal). I have 1 master and 2 worker nodes. On worker no 2, on the host machine, I have an Apache http server listening on port 80 and serving a web page.</p> <pre><code>NAME STATUS ROLES AGE VERSION kubemas...
<p>I found it out... When I installed Nginx using Helm, it adds a hostPort:80 to the pod definition by default. Even it is not in the values.yaml, and not mentioned anywhere. So, if you remove that by hand, then Nginx won't steal port 80 from the Apache installed outside of Kubernetes.</p>
<p>I have a pod within a Kubernetes cluster that needs to send alarms via SNMP to an external network management system. However, the external system will only be able to identify the pod if it keeps a stable IP address. Considering the ephermal nature of pods, would it be possible to send/redirect requests to a system...
<p>One viable solution is to utilize an Egress Router resource defined <a href="https://docs.openshift.com/container-platform/4.12/networking/openshift_sdn/using-an-egress-router.html" rel="nofollow noreferrer">here</a>, which redirects traffic to a specified IP using a dedicated source IP address:</p> <pre><code>apiVe...
<p>I have in my home env two systems:</p> <ul> <li>a Docker server on 10.0.0.10/16, using Traefik reverse proxy with one of my public domains</li> <li>and a kubernetes cluster with VIP on 10.0.0.201/16, with Nginx and supposedly with another of my public domains my firewall is pfsense, I have reverse proxy installed; c...
<p>You need to:</p> <ol> <li>Enable <a href="https://docs.netgate.com/pfsense/en/latest/packages/haproxy.html" rel="nofollow noreferrer">Haproxy on pfsense</a></li> <li>Create a frontend on your 80,443 ports.</li> <li>Create two backends pointing to docker and k8s environments.</li> <li>Write ACLs in your frontend to p...