Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>by default, nginx ingress listens to two ports 80 and 443, how to add listening on port 9898 I tried to change it in daemon set, but nothing came out , I don 't even know where else to dig</p>
Iceforest
<p>I'm not sure what will work exactly for you, but here's a few things you can try to approach this (read carefully because nginx is confusing):</p> <ol> <li><p>Define <code>service</code> for your deployment, and make sure it covers port routes you want and support on deployment end:</p> <pre><code> apiVersion: v1 k...
Randych
<p>If we want to to build OCI container images with <code>docker</code> and e.g. want to the following pod setup:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 kind: Pod metadata: name: dind spec: containers: - name: build image: docker:23.0.1-cli command: - cat ...
Gabriel
<p>As per kubernetes official API reference documentation for V 1.26 they have changed the fields for security context.</p> <p>Instead of using <code>privileged: true</code> they got other parameters in the latest versions. That are</p> <p><strong>runAsUser:</strong> You can run as any user in the latest versions by ...
Kranthiveer Dontineni
<p>I have an issue with <a href="https://github.com/percona/mongodb_exporter" rel="nofollow noreferrer">mongodb_exporter</a> (prometheus metrics exporter for mongodb). I think it's because of a configuration problem in my side but after 2 days of searching I'm empty of solution :)</p> <p>I run mongodb on K8S and mongod...
Doul
<p>Yes, found the solution, with the help of JMLX42 on github. The key was to take an another image. Change from <code>docker.io/bitnami/mongodb-exporter:latest</code> to <code>percona/mongodb_exporter:0.37.0</code> (and adapt the configuration) :</p> <pre><code> - name: metrics image: percona/mongodb_exporter...
Doul
<p>I want to use the <a href="https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/" rel="nofollow noreferrer">App-of-apps</a> practice with ArgoCD. So I created a simple folder structure like the one below. Then I created a project called <code>dev</code> and I created an app that will look i...
everspader
<h2>Posting comment as the community wiki answer for better visibility</h2> <hr /> <p>It turns out that at the moment ArgoCD can only recognize application declarations made in ArgoCD namespace, but @everspader was doing it in the default namespace. For more info, please refer to <a href="https://github.com/argoproj/ar...
Bazhikov
<p>Going through <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">this</a> doc, was wondering if there is a way to restrict unix socket creation using Kubernetes Network policies.</p>
ambikanair
<p><strong>Kubernetes network policies</strong> can’t restrict <strong>unix socket</strong> creation, they can only be useful for managing the traffic flow in between the pods. If you want to restrict new unix sockets from getting created you need to configure the <strong>SElinux parameter</strong> in the <strong>secur...
Kranthiveer Dontineni
<p>I use the Google Cloud Code extension on VSCode. I have a minikube running on my macbook (using the virtualbox driver).</p> <p>I can run <code>skaffold debug</code> from my terminal just fine; the Helm chart gets deployed, but I haven't done the debugger setup so the breakpoints don't hit (as expected).</p> <p>I wan...
AdrienF
<p>my work around.</p> <pre><code>ls -l /var/run/docker.sock # /var/run/docker.sock -&gt; $HOME/.docker/run/docker.sock sudo rm /var/run/docker.sock ssh -i ~/.minikube/machines/minikube/id_rsa -L $HOME/.minikube/docker.sock:/var/run/docker.sock docker@$(minikube ip) -o StrictHostKeyChecking=no -o UserKnownHostsFile=/d...
user21144791
<p>I have to process tasks stored in a work queue and I am launching this kind of Job to do it:</p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: parallelism: 10 containers: - name: pi image: perl command: [&quot;some&quot;, &quot;long&quot...
Fabrice Jammes
<p>As it already mentioned in the comments, you can set <code>restartPolicy: OnFailure</code>, that means kubelet will perform restarts until the Job succeeds. However every retry <a href="https://docs.openshift.com/container-platform/4.1/nodes/jobs/nodes-nodes-jobs.html" rel="nofollow noreferrer">doesn't increment the...
Bazhikov
<p>Do we need to have Istio sidecar proxy containers running alongside the application pod for Istio Authorization Policy to work as expected?</p> <p>Do we have any Istio docs around this?</p> <p>I tried running my application without sidecars and the authorisation policy is not getting applied.</p>
Chandra Sekar
<p>As per the architecture provided in the <a href="https://istio.io/latest/docs/concepts/security/#authentication-architecture:%7E:text=receives%20the%20traffic.-,Authentication%20architecture,-You%20can%20specify" rel="nofollow noreferrer">official Istio documentation</a>. Istio proxy acts as a gateway between your i...
Kranthiveer Dontineni
<p>I have a python app</p> <pre><code>from flask import Flask, jsonify app = Flask(__name__) @app.route(&quot;/&quot;) def index(): return jsonify({&quot;hey&quot;:&quot;test6&quot;}) </code></pre> <p>And a deployment.yaml file</p> <pre><code> apiVersion: apps/v1 kind: Deployment metadata: name:...
Kspr
<p><code>containerPort</code> is only informational and doesn't configure the port your app is running on.</p> <p>You flask application is using its default port. Try changing it in you main file where you are starting your server using:</p> <pre class="lang-py prettyprint-override"><code>port = 6000 #you can change it...
Ansh Tyagi
<h2 id="background">Background:</h2> <p>I have a GKE cluster which has suddenly stopped being able to pull my docker images from GCR; both are in the same GCP project. It has been working well for several months, no issues pulling images, and has now started throwing errors without having made any changes.</p> <p>(NB: ...
localghost
<p>I don't know if it still helps, but I had the same issue and managed to fix it.</p> <p>In my case I was deploying GKE trough terraform and did not specify <code>oauth_scope</code> property for node pool as show in <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_clust...
jwwebsensa
<p>In my <code>Deployment</code>, i specify 2 replicas for my application, but when i look at the result generated by kubernetes, it has 3 <code>ReplicaSet</code>, in my <code>Deployment</code> i don't specify anything related to <code>ReplicaSet</code>, why is that?</p> <p><a href="https://i.stack.imgur.com/8kfjJ.png"...
hades
<p>Those are previous revisions of your deployment. Notice the little &quot;rev1&quot;, &quot;rev2&quot; labels. Kubernetes retains old replicaSets, per default 10 revisions are stored.</p> <p>Only the latest revision has your two pod <code>replicas</code> in the <code>replicaSet</code>. You can set the cleanup policy ...
CloudWatcher
<p>I have a Kubernetes cluster with 3 HA nodes on 3 different servers. One of the server had the control plane and got deleted (meaning, I lost the server).</p> <p>Right now, other two servers are running normally and all deployments and services are running, however I don't have any access to the cluster.</p> <p>How c...
user3184767
<p>Restoring a lost control plane node is very troublesome if you haven’t taken snapshots of the instance and the backup of ETCD data, then follow these steps as mentioned in this <strong><a href="https://www.lisenet.com/2023/replacing-a-failed-control-plane-node-in-a-ha-kubernetes-cluster/" rel="nofollow noreferrer">b...
Kranthiveer Dontineni
<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>
Syed Sadath
<p>I'm using a kubernetes and want to filter only the <strong>sampledb</strong> on my postgreSQL.</p> <p>I tried to use this command:</p> <pre><code>kubectl exec podname-89tq4763k23-klp83 -- bash -c &quot;psql -U postgres --tuples-only -P format=unaligned -c &quot;SELECT datname FROM pg_database WHERE NOT datistemplate...
生きがい
<p>I think your command needs a quoting fix.</p> <pre><code>kubectl exec podname-89tq4763k23-klp83 -- bash -c &quot;psql -U postgres --tuples-only -P format=unaligned -c &quot;SELECT datname FROM pg_database WHERE NOT datistemplate AND datname &lt;&gt; 'postgres'&quot;;&quot; </code></pre> <p>Try this:</p> <pre><code>k...
Filip Rembiałkowski
<p>I would like to understand the difference between PVC capacity I assigned (5G) and the container available capacity reported against the mounted volume inside the container.</p> <ol> <li>Have a GCE PD with 10G capacity</li> <li>Have a PVC with 5G capacity against the same GCE PD.</li> <li>However, when I run df -h i...
Rubans
<p>Persistent volumes can be attached to pods in a variety of ways. When you set the storage requests for dynamic provisioning to 30 Gi, GCE PD will be automatically provisioned for you with 30 Gi. However, the storage size will equal the size of the GCE PD if you opt to use the <a href="https://cloud.google.com/kubern...
Bryan L
<p>I am writing a script that receives a Kubernetes context name as an input and outputs the different elements of the cluster -&gt;</p> <pre><code>class GKE: def __init__(self, context): s = context.split(&quot;_&quot;) self.provider: str = s[0] self.project: str = s[1] self.data_ce...
David Wer
<p>You need to differentiate between the correct name of the cluster and the naming schema of a resource.</p> <p>When I run <code>kubectl config get-contexts</code> on the clusters Aks, Eks, and Gke I get the following results:</p> <pre><code>NAME AUTHINFO gke_project-1234_...
Moshe Rappaport
<p>I am trying to enable ingress in minkube. When I run <code>minikube addons enable ingress</code> it hangs for a while then I get the following error message:</p> <pre><code>❌ Exiting due to MK_ADDON_ENABLE: run callbacks: running callbacks: [sudo KUBECONFIG=/var/lib/minikube/kubeconfig /var/lib/minikube/binaries/v1...
joe
<p>Bit late, but I hope someone find this useful, this happens becouse minikube could not pull the image(ingress-nginx-controller) in time, the way to know is:</p> <pre><code>kubectl get pod -n ingress-nginx </code></pre> <p>If the ingress-nginx-controller-xxxx (xxxx is the identifier of the pod) has a status of ImageP...
Steve Rodriguez
<p>I use istio-ingress gateway and virtualservice to expose different microservices. So far all of them have been http services, so it was straight-forward to follow istio's documentation.</p> <p>But with kafka I am facing some issues. I am using <a href="https://github.com/bitnami/charts/tree/master/bitnami/kafka" rel...
Grimlock
<p>edit your istio-ingressgateway and add 9092 for tcp port</p> <pre><code>kubectl edit svc -nistio-system istio-ingressgateway </code></pre> <p>add</p> <pre><code>- name: kafka-broker port: 9092 protocol: TCP targetPort: 9092 </code></pre>
Charles Chiu
<p>I set up a microk8s deployment with the Minio service activated. I can connect to the Minio dashboard with a browser but cannot find a way to connect to the service via the API.</p> <p>Here is the output to the <code>microk8s kubectl get all --all-namespaces</code> command</p> <pre><code>NAMESPACE NAME ...
Mark C
<p>Can you try this?</p> <pre><code>client = Minio(&quot;minio.minio-operator.svc.cluster.local:80&quot;, YOUR_ACCESS_KEY, YOUR_SECRET_KEY, secure=False) </code></pre> <p>If the service cannot be reached where your python code is running you can port-forward the service using the command below</p> <pre><code>microk8s ...
dilverse
<p>when creating a Pod with one container. The Container has a memory request of 200 MiB and a memory limit of 400 MiB. Look at configuration file for the creating Pod:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: memory-demo-ctr image:...
KMS
<p>Change your <code>args: [&quot;--vm&quot;, &quot;1&quot;, &quot;--vm-bytes&quot;, &quot;150M&quot;, &quot;--vm-hang&quot;, &quot;1&quot;]</code>. your yaml will work.</p>
Pranavi
<p>We are shutting down the AKS Cluster for our Non-Production Environments during night-time to save cost. For the shutdown we first scale the user nodepool to 0 and then shut down the cluster using the following PowerShell Commands:</p> <pre><code>Update-AzAksNodePool -Name $NodePoolName -ClusterName $AksClusterName ...
Markus S.
<p>It seems pods were not gracefully terminated before the nodes are deleted. As per your comment, same thing is happening while taking AKS cluster down. It can happen if the pods are not given enough time to gracefully terminate before the nodes are deleted.</p> <p>To prevent this issue happening in future, you can pe...
HowAreYou
<p>I'm just doing a wordpress deploy to practice openshift, I have this problem that I can't solve:</p> <pre><code>AH00558: apache2: Unable to reliably determine the FQDN of the server, using [10.128.2.60](https://10.128.2.60/). Globally set the &quot;ServerName&quot; directive to suppress this message (13) Permission ...
Belbo
<p>Permission denied is on port 80, your configured port is 8443 Access it with :8443 or change it to Port 80</p>
My Codebucket
<p>I installed vanilla kubernetes 1.24, cluster is up and healthy but when i try to install kubernetes-dashboard, i realized can not access dashboard token. Before 1.24 i just describe token and get.</p> <p>Normally when sa created, secret should be created automaticaly, BUT NOW, I just tried create service account the...
Cagatay Atabay
<p>For your question “Anyone faced this problem?”, the answer is that all the people that install version 1.24 are going to face the same behavior, as this <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/" rel="nofollow noreferrer">documentation</a> indicates, this version inclu...
Nestor Daniel Ortega Perez
<p>I have an application that runs a code and at the end it sends an email with a report of the data. When I deploy pods on <strong>GKE</strong> , certain pods get terminated and a new pod is created due to Auto Scale, but the problem is that the termination is done after my code is finished and the email is sent twice...
Elias
<p>&quot;Perhaps you are affected by this &quot;Note that even if you specify .spec.parallelism = 1 and .spec.completions = 1 and .spec.template.spec.restartPolicy = &quot;Never&quot;, the same program may sometimes be started twice.&quot; from doc. What happens if you increase terminationgraceperiodseconds in your yam...
Nestor Daniel Ortega Perez
<p>How to reproduce no pod is ready when deploying a daemonset?</p> <p>I try a small example:</p> <pre><code>apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd namespace: logging labels: app: fluentd-logging spec: selector: matchLabels: name: fluentd template: metadata: labels...
susanna
<p>To set to a not ready pod of your DaemonSet, you can simply add a readiness probe that will never be ready.</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd namespace: default labels: app: fluentd-logging spec: selector: matchLabels: ...
kiggyttass
<p>We have a .NET 7 application, that uses autofac IOC and needs to pull RegionInfo from the appsetting file, in a class library that is part of our solution. When running locally in Visual Studio, or by using Bridge to Kubernetes the IOptions in the class library are populated and the functionality works as expected....
Damian70
<p>I created a simple webapi using part of your code. It uses the IOptions pattern like your code does, and it outputs the configuration.</p> <p>It was created launching the simple command <code>dotnet new webapi -o abcde</code></p> <p>Here the entire files i changed or created:</p> <p><strong>Program.cs (changed)</str...
kiggyttass
<p>I got problem with connecting my k3s cluster to GitLab Docker Registry.</p> <p>On cluster I got created secret in default namespace like this</p> <pre><code>kubectl create secret docker-registry regcred --docker-server=https://gitlab.domain.tld:5050 --docker-username=USERNAME --docker-email=EMAIL --docker-password=T...
vdobes
<p>To pull from a private container registry on Gitlab you must first create a <code>Deploy Token</code> similar to how the pipeline or similar &quot;service&quot; would access it. Go to the repository then go to <code>Settings</code> -&gt; <code>Repository</code> -&gt; <code>Deploy Tokens</code></p> <p>Give the deplo...
EternalDev1
<p>I am working on a centOS environment and I have configured kubectl using kubeadm to work with k8s and learn about it. I have configured it using containerd as I am working with k8s v1.26.2.</p> <p>The problem is that I am not able to configure the coredns pod when executing kubeadm init as you can see here:</p> <pre...
Luis Roset
<p>Already fixed it by performing the download and installation of the <a href="https://github.com/coreos/flannel/raw/master/Documentation/kube-flannel.yml" rel="nofollow noreferrer">https://github.com/coreos/flannel/raw/master/Documentation/kube-flannel.yml</a> file.</p> <p>After the download I executed the command ku...
Luis Roset
<p>I'd like to know if <code>kubectl</code> offers an easy way to list all the secrets that a certain pod/deployment/statefulset is using, or if there is some way to cleanly retrieve this info. When doing a <code>kubectl describe</code> for a pod, I see I can get a list of mounted volumes which include the ones that co...
DavSanchez
<p>To <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" rel="nofollow noreferrer">List all Secrets</a> currently in use by a pod use:</p> <pre><code>kubectl get pods -o json | jq '.items[].spec.containers[].env[]?.valueFrom.secretKeyRef.name' | grep -v null | sort | uniq </code></pre> <p>In the other h...
Ismael Clemente Aguirre
<p>I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, ... minutes), see log output:</p> <pre><code>2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: t...
JIST
<p>I solved the same issue and the problem was with different MLRun version between client side and server side. I had MLRun on client in version <strong>1.2.1rc2</strong> and server side in version <strong>1.2.1</strong> (these versions have different interfaces and it generates freez issue).</p> <p><strong>Please, sy...
JzD
<p>I am using VS Code with Google's Cloud Code plugin. I was using my personal email address which is tied to a personal instance of Google Cloud. I was given a sandbox instance of Google Cloud for a project at work. Although I have logged into Google Cloud with my work email address, whenever I try to run my project w...
Dshiz
<p><strong>According with @Dshiz the solution was:</strong></p> <blockquote> <p>It was definitely some kind of corruption of the plugin. I uninstalled/reinstalled it, then signed out and back in via the plugin's Help and Feedback menu (which coincidentally was missing before reinstall), and the error cleared.</p> </blo...
Ismael Clemente Aguirre
<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;...
TomerA
<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...
markalex
<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...
JBeach
<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...
markalex
<p><code>kubectl port-forward service/nginx 8080:443</code></p> <pre><code>Forwarding from 127.0.0.1:8080 -&gt; 443 Forwarding from [::1]:8080 -&gt; 443 Handling connection for 8080 E0314 16:38:47.834517 25527 portforward.go:406] an error occurred forwarding 8080 -&gt; 443: error forwarding port 443 to pod bb5e0e3b27...
newbie
<p>The command used is as follows:</p> <pre><code>kubectl port-forward pod/&lt;pod-name&gt; &lt;local-port&gt;:&lt;exposed-port&gt; </code></pre> <p>where <strong>local-port</strong> is the port from which the container will be accessed from the browser while the <strong>exposed-port</strong> is the port on which the c...
Kiran Kotturi
<p>Laravel application deployed on Kubernetes and making requests to <a href="https://maps.google.com/maps/api/geocode/json" rel="nofollow noreferrer">https://maps.google.com/maps/api/geocode/json</a> failing with:</p> <pre><code>SSL routines:tls_process_server_certificate:certificate verify failed </code></pre> <p>The...
user2881726
<p>According to the OP, the solution was:</p> <blockquote> <p>The issue was that our security team scans external certificates and re-package them with the company's own cert. Once I added the company's cert to the trust store, everything worked fine. It seems it's only an internal issue.</p> </blockquote>
Ismael Clemente Aguirre
<p>This is realy two questions in one - I think they are related.</p> <h2>What does the <code>kube_pod_status_phase</code> metric <em>value</em> represent?</h2> <p>When I view the <code>kube_pod_status_phase</code> metric in Prometheus, the metric value is always a 0 or 1, but it's not clear to me what 0 and 1 means. L...
Joseph Gagnon
<blockquote> <h5>What does the <code>kube_pod_status_phase</code> metric value represent?</h5> </blockquote> <p><code>kube_pod_status_phase</code> contains a set of metrics for every pod with label <code>phase</code> being set to &quot;Failed&quot;, &quot;Pending&quot;, &quot;Running&quot;, &quot;Succeeded&quot;, &quot...
markalex
<p>When managing a cluster, I might want to know how many tcp connections to one port on each node. This can help me to alert if some node's tcp connections number to some port are too many.</p> <p>I can use <code>netstat -nat | grep -i &quot;22&quot; | wc -l</code> on a linux node to see how many connections to port 2...
54vault
<p>I don't think it is possible through default metrics: netstat collector shows a summary with no detailing. From <a href="https://github.com/prometheus/node_exporter#enabled-by-default" rel="nofollow noreferrer">official docs</a>:</p> <blockquote> <p>Exposes network statistics from <code>/proc/net/netstat</code>. Thi...
markalex
<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: ...
Erika
<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...
Kiran Kotturi
<p>I have installed <code>Azure Workload Identity</code>, e.g. like that:</p> <p><code>az aks create -g myResourceGroup -n myAKSCluster --node-count 1 --enable-oidc-issuer --enable-workload-identity --generate-ssh-keys</code></p> <p>This has installed a mutating webhook that is of version <code>0.15.0</code> in <code>k...
Ilya Chernomordik
<p>yes, addons are maintained by Microsoft. Any update/upgrades will be rolled out automatically.</p> <p>As <a href="https://learn.microsoft.com/en-us/azure/aks/integrations#add-ons" rel="nofollow noreferrer">mentioned here</a>:</p> <blockquote> <p>Add-ons are a fully supported way to provide extra capabilities for you...
akathimi
<p>I have two pods, each with a LoadBalancer svc. Each service's IP address is working.</p> <p>My first service is:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: hello-world-1 spec: type: LoadBalancer selector: greeting: hello version: one ports: - protocol: TCP port: 60000 targe...
Davtho1983
<p>By default, when you create an ingress in your cluster, GKE creates an HTTP(S) load balancer and configures it to route traffic to your application, as stated in the following document [1]. So, you should not be configuring your services as LoadBalancer type, instead you need to configure them as NodePort.</p> <p>He...
Gabriel Robledo Ahumada
<p>I have elastic operator installed and running on my kubernetes cluster and I want to be able to access kibana through the <code>/kibana</code> subpath. I have an ingress that is configured like this:</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-kb annotations: kuberne...
Cake
<p>Try this:</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: kibana-ingress annotations: kubernetes.io/ingress.class: &quot;nginx&quot; spec: rules: - host: &quot;localhost&quot; #OR YOUR HOST http: paths: - pathType: Prefix path: &quot;/ki...
glv
<p>I hope somebody can help me out here.</p> <p>I have a basic configuration in azure which consists in a web app and database.</p> <p>The web app is able to connect to the database using managed identity adn everything here works just fine, but i wanted to try the same configuration using aks.</p> <p>I deployed AKS an...
Nayden Van
<ol> <li><a href="https://learn.microsoft.com/en-us/azure/aks/csi-secrets-store-driver#upgrade-an-existing-aks-cluster-with-azure-key-vault-provider-for-secrets-store-csi-driver-support" rel="nofollow noreferrer">Upgrade an existing AKS cluster with Azure Key Vault Provider for Secrets Store CSI Driver support</a></li>...
akathimi
<p>Imagine a scenario where I have 3 classes of worker node (A,B,C) and 2 master nodes (X,Y) as part of a Kubernetes cluster. There maybe multiple worker nodes of each class. Is it possible to route the traffic such that traffic arriving at the different master nodes is routed to a different set of worker nodes. For ex...
Richard Chester
<p>As correctly pointed out in the comments, the traffic is not handled by the master nodes; its responsibility, at a high level, is to observe and maintain the desired state of the Kubernetes resources deployed in the worker nodes, as well as to push any changes to them.</p> <p>That being said, yes, it is possible to ...
Gabriel Robledo Ahumada
<p>i defined a memory limit for one of my pods and a preStop hook that the running service can be gracefully shutdown, but the defined method for the preStop hook doesn't get exectuted when the pod got restarted after the memory limit got reached.</p> <pre><code> lifecycle: preStop: exec: ...
stereosupersonic
<p>OOM killed is not a graceful stop of the pod. Therefore, the prestop hook would not run. I suggest configuring the application to fail the health check when the memory limit is about to be reached.</p>
akathimi
<p>I've got a pod that restarts immediately. When I delete the pod <code>kubectl delete pod &lt;pod_name&gt;</code> it restarts immediately. However, I want this pod to be restarted after 1 min when I perform the delete operation.</p> <p><code>kubectl delete pod &lt;pod_name&gt;</code>... it waits 1 minute then it rest...
baris
<p>What you're asking for is not only not possible, but it also goes against one of the best qualities of Kubernetes, which is its resiliency.</p> <p>The reason your Pod tries to be rescheduled (after failure or voluntary shutdown) is because it is being managed via ReplicaSet.</p> <blockquote> <p>A ReplicaSet's purpos...
glv
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#networkpolicyingressrule-v1-networking-k8s-io" rel="nofollow noreferrer">K8s documentation on NetworkPolicy</a> states that if the <code>spec.ingress.from.ports</code> array is not specified, traffic is allowed from any <code>port</cod...
zerohedge
<p>You are passing an empty array to the ports when using:</p> <pre><code> ports: - {} </code></pre> <p>This means that no ports are allowed. Everything is blocked.</p> <p>When omitting the ports entry, you would allow traffic to all ports. kubectl describe output:</p> <pre><code> Allowing ingress traffic: To...
akathimi
<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...
Josh
<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>
glv
<p>I am using <code>kubectl</code>. How to find dangling resources by the namespace?</p> <p>For example, I have some namespaces.</p> <pre><code>kubectl get ingress --all-namespaces |awk '{print $1}' </code></pre> <p>That is supposed to be deleted. If I find those namespaces on GKE there is no result returned.</p> <p>So...
Rodrigo
<p>You can find dangling resources on a particular namespace with the following command:</p> <pre><code>kubectl api-resources --verbs=list --namespaced -o name \ | xargs -n 1 kubectl get --show-kind --ignore-not-found -n &lt;namespace&gt; </code></pre> <p>If you need to force the namespace deletion, you can do so by ...
Gabriel Robledo Ahumada
<p>I have a Google Cloud Composer 1 environment (Airflow 2.1.2) where I want to run an Airflow DAG that utilizes the <a href="https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html" rel="nofollow noreferrer">KubernetesPodOperator</a>.</p> <p>Cloud Composer <a href="https://cloud....
urig
<p>Cloud Composer uses FUSE to mount certain directories from Cloud Storage into Airflow worker pods running in Kubernetes. It mounts these with default permissions that cannot be overwritten, because that metadata is not tracked by Google Cloud Storage. A possible solution is to use a bash operator that runs at the be...
Jose Gutierrez Paliza
<p>I've been building and destroying couple of terraform projects and then after couple of hours came to a weird error saying:</p> <pre><code>kubectl get pods E0117 14:10:23.537699 21524 memcache.go:238] couldn't get current server API group list: Get &quot;https://192.168.59.102:8443/api?t E0117 14:10:33.558130 21...
zolo
<p>well I've fixed it by deleting the minikube cluster with &quot;minikube delete&quot; and then just &quot;minikube start&quot; and now it seems to work to me :)</p>
zolo
<p>I have a kubernetes cluster with two node groups in AWS. One for Spot instances and the other for on demand instances. I have installed Vault and CSI driver to manage the secrets.</p> <p>When I create this deployment everything works fine, the pods are created, run and the secrets are there.</p> <pre class="lang-yam...
Mateo Arboleda
<p>The problem is the vault CSI driver configuration, the <code>DaemonSet</code> is not running in all nodes because of the missing <code>tolerations</code>. I had to add the <code>tolerations</code> to the <code>DaemonSet</code> manifest so there is a <code>Pod</code> in all nodes, and this way all nodes know what vau...
Mateo Arboleda
<p>I want to monitor external transmit and receive traffics of pod. External traffic means traffic that send or receive from outside of k8s cluster.</p> <p>For example NodePort, LoadBalancer and ingress types of service. I have <code>container_network_receive_bytes_total</code> and <code>container_network_transmit_byte...
Ali Rezvani
<p>I think the only way to get the information you need is to install tcpdump in your Pod and exploit its potential.</p> <p>If you don't want to dirty your application, you can think of creating a management Deployment where you install the tools you need to manage this type of request and connect to that.</p> <p>I don...
glv
<p>The Node JS app that I'm trying to deploy in Kubernetes runs on <code>express js</code> as a backend framework.The repository is managed via <code>Bitbucket</code>. The application is a microservice and the pipeline manifest file for building the Docker image is written this way:</p> <pre><code>options: docker: tr...
Sebastian
<p>Eventually, I could resolve the issue. The issue was trivial yet bothering. In the <code>Dockerfile</code>, there was a missing script, i.e., <code>npm run build</code>. So, here is the final <code>Dockerfile</code> I used it for building the <code>dist</code> directory along with other requirements:</p> <pre><code>...
Sebastian
<p>I get the following message when I run the <code>skaffold dev</code> command:</p> <blockquote> <p>Build Failed. Cannot connect to the Docker daemon at unix: ///var/run/docker.sock. Check if docker is running.</p> </blockquote> <p>Tools versions:</p> <ol> <li>MacOS Desktop Docker: 4.13.0 (89412)</li> <li>Kubernetes: ...
Davide
<p>The solution was to set the variable DOCKER_HOST before launching the <code>skaffold dev</code> command:</p> <pre><code>DOCKER_HOST=&quot;unix:///Users/&lt;you&gt;/.docker/run/docker.sock&quot; skaffold dev </code></pre>
Davide
<p>I'm using the Apache Flink Kubernetes operator to deploy a standalone job on an Application cluster setup.</p> <p>I have setup the following files using the Flink official documentation - <a href="https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/deployment/resource-providers/standalone/kubernetes/" re...
user1386101
<p>You deployed the Kubernetes Operator in the namespace, but you did not create the CRDs the Operator requires. Instead you tried to create a standalone Flink Kubernetes cluster.</p> <p>The Flink Operator makes it a lot easier to deploy your Flink jobs, you only need to deploy the operator itself and <code>FlinkDeploy...
mateczagany
<p>I need the URI of requests that reach my <code>myapp</code> pods to be rewritten to remove the prefix <code>/foo</code> from the path. For example, a URI <code>/foo/bar</code> should be received as <code>/bar</code>. I am using a GCP load balancer that routes traffic directly to pods. I am not using Istio ingress, s...
Drago Rosson
<p>I found <a href="https://github.com/istio/istio/issues/22290#issuecomment-1317595537" rel="nofollow noreferrer">https://github.com/istio/istio/issues/22290#issuecomment-1317595537</a> which shows how to write a custom <code>EnvoyFilter</code> to do path rewriting and adapted it to my needs. I'm not at all sure if th...
Drago Rosson
<p>Is there a way to run a privileged pod that I can use to install RPMs and packages on the host where the pod is running?</p> <p>Thanks!</p> <p>If I just run privileged pod, exec into it and would try to run the command:</p> <pre><code>rpm -i &lt;package.rpm&gt; </code></pre> <p>I would install that RPM in the pod it...
Lorenzo Bassi
<p>Using a Pod that connects to the Node where it &quot;runs&quot; goes against the containerization pattern; take a look at the images below this link: <a href="https://www.docker.com/resources/what-container/" rel="nofollow noreferrer">https://www.docker.com/resources/what-container/</a></p> <p>However you can do som...
glv
<p>I want to run some gpu workloads on my bare metal k8s cluster. So I have installed the nvidia containerd runtime engine on my cluster. But the cilium cni pods crashes when I make nvidia the default runtime. (I'll post about that some other place)</p> <p>I'm thinking I should be able to work around this problem by sc...
d s
<p>well... I feel dumb for not reading the docs more closely. Here I am to answer my own question.</p> <ol> <li>create a RuntimeClass like this:</li> </ol> <pre><code>kind: RuntimeClass apiVersion: node.k8s.io/v1 metadata: name: nvidia handler: nvidia </code></pre> <ol start="2"> <li>add <code>runtimeClassName: nvi...
d s
<p>I want to store the data from a PostgreSQL database in a <code>persistentvolumeclaim</code>. (on a managed Kubernetes cluster on Microsoft Azure)</p> <p><strong>And I am not sure which access mode to choose.</strong></p> <p>Looking at the available <a href="https://kubernetes.io/docs/concepts/storage/persistent-volu...
zingi
<p>You are correct with the migration, where the access mode should be set to <code>ReadWriteMany</code>.</p> <p>Generally, if you have access mode <code>ReadWriteOnce</code> and a multinode cluster on microsoft azure, where multiple pods need to access the database, then the kubernetes will enforce all the pods to be ...
Pavol Krajkovič
<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...
Cake
<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...
glv
<p>My Rancher desktop was working just fine, until today when I switched container runtime from containerd to dockerd. When I wanted to change it back to containerd, it says:</p> <pre><code>Error Starting Kubernetes Error: unable to verify the first certificate </code></pre> <p>Some recent logfile lines:</p> <pre><code...
susgreg
<p><strong>TLDR: Try turning off Docker/Something that is binding to port 6443.</strong> Reset Kubernetes in Rancher Desktop, then try again.</p> <p>Try checking if there is anything else listening on port 6443 which is needed by kubernetes:rancher-desktop.</p> <p>In my case, <code>lsof -i :6443</code> gave me...</p> <...
Winston Boson
<p>pinniped cli is not working in widnows. pinniped-cli-windows-amd64.exe is downloaded but when i type pinniped, it's not recognized.</p> <p>C:\Users\hello&gt;pinniped pinniped is not recognized as a internal command or external command, operable program or batch file.</p> <p>Seem windows is not recognizing this .exe ...
Chai
<p>I have faced the same issue, so i had purged the cache here: C:\Users\user.kube\cache</p> <p>And then, i have modified the path of the program pinniped in the config file below, at the line <strong>command</strong> (obviously, the program pinniped itself has to be present in this path) :</p> <p>C:\Users\user.kube\c...
Lawar
<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...
tm1701
<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...
glv
<p>I want to copy files from kubernetes pod into the local machine, but shows error like tihs:</p> <pre><code>&gt; kubectl cp texhub-server-service-6f8d688c77-kvhgg:&quot;/app/core.21&quot; /Users/xiaoqiangjiang/core.21 tar: removing leading '/' from member names Dropping out copy after 0 retries error: unexpected EOF ...
Dolphin
<p>See if any of these two alternatives helps you</p> <pre><code>kubectl cp texhub-server-service-6f8d688c77-kvhgg:&quot;/app/core.21&quot; /Users/xiaoqiangjiang/core.21 --retries=-1 </code></pre> <p>retries=-1 (any negative value for infinite retrying)</p> <p>Or</p> <pre><code>kubectl exec texhub-server-service-6f8d68...
Raghu
<p>Since Kubernetes 1.25, the <a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container" rel="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 the conta...
dosmanak
<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...
glv
<p>I am trying to install Install Kubernetes offline (without an internet connection) on Ubuntu 16.04 machine. Is there any procedure or steps to follow for the installation without internet connectivity?</p>
CuriousCase
<p>If you have one machine with no external internet connectivity, then there is no option to install k8s. However if you download all the required software/images you need to install k8s beforehand, then it is possible. Simply transfer the data between machine. Please refer to <a href="https://gist.github.com/jgsqware...
Pavol Krajkovič
<p>I am trying to resolve this error from Kubernetes (here is the 'describe pod' output, redacted some parts to keep sensitive data out of this post):</p> <pre><code> ~ $ kubectl describe pod service-xyz-68c5f4f99-mn7jl -n development Name: service-xyz-68c5f4f99-mn7jl Namespace: development Priority: 0 N...
Nulla
<p>As per Gitlab documentation</p> <p><strong>CI_REGISTRY_PASSWORD</strong></p> <p>The password to push containers to the project’s GitLab Container Registry. Only available if the Container Registry is enabled for the project. This password value is the same as the CI_JOB_TOKEN and <strong>is valid only as long as the...
Raghu
<p>I want to build the the <code>secretName</code> dynamically base on the value of the <code>my-label</code> key (trough a <code>ENV</code>). Is this possible?</p> <p>I used the a similar approach to use label values as ARGs which worked.</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob metadata: name: my-cron...
Christoph Lang
<p>The fastest solution is surely to use kustomize.</p> <p>Following your data, first organize the repository by creating a folder called &quot;base&quot; and one called &quot;dev&quot;.</p> <p>Then move the &quot;my-cronjob&quot; manifest into the &quot;base&quot; folder and add a kustomization.yaml file that invokes ...
glv
<p>We are bringing up a Cassandra cluster, using k8ssandra helm chart, it exposes several services, our client applications are using the datastax Java-Driver and running at the same k8s cluster as the Cassandra cluster (this is testing phase)</p> <pre><code>CqlSessionBuilder builder = CqlSession.builder(); </code></pr...
Doron Levi
<p>The k8ssandra Helm chart deploys a CassandraDatacenter object and cass-operator in addition to a number of other resources. cass-operator is responsible for managing the CassandraDatacenter. It creates the StatefulSet(s) and creates several headless services including:</p> <ul> <li>datacenter service</li> <li>seeds ...
John Sanda
<p>Is it possible to create a kubernetes RBAC rule that allows creating a Job from an existing CronJob, but prevents creating a Job any other way?</p> <p>We want to keep our clusters tightly locked down to avoid arbitrary deployments not managed by CICD - but we also need to facilitate manual testing of CronJobs, or re...
Gavin Clarke
<p>In this scenario in order to successfully execute this command:</p> <pre><code>kubectl create job --from=cronjob/&lt;cronjob_name&gt; </code></pre> <p>User/ServiceAccount should have proper <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">RBAC</a> rules (at least tw...
RadekW
<p>I am getting error during applying YAML config to AWS K8s cluster:</p> <p>Error:</p> <pre><code>couldn't create node group filter from command line options: loading config file &quot;K8s-nodegroups/group_test.yaml&quot;: error unmarshaling JSON: while decoding JSON: json: unknown field &quot;fullEc2Access&quot; </...
prosto.vint
<p><strong>fullEc2Access</strong> does not exists as a property in the schema, <strong>spot</strong> is a property of <em>ManagedNodeGroup</em>, not <em>NodeGroup</em>.</p> <p>See <a href="https://eksctl.io/usage/schema/" rel="nofollow noreferrer">EKS Config File Schema</a> for further info, or you can print the defaul...
Filippo Testini
<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...
manymanymore
<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...
glv
<p>I have referred this tutorial to create deployable image:</p> <p><a href="https://medium.com/@javatechie/kubernetes-tutorial-run-deploy-spring-boot-application-in-k8s-cluster-using-yaml-configuration-3b079154d232" rel="nofollow noreferrer">https://medium.com/@javatechie/kubernetes-tutorial-run-deploy-spring-boot-app...
Peter Penzov
<p>Here you will need to create an image pull secret to pull an image from your own repository. I have reproduced your issue and pushed the image to my privet docker registry and then pulled the image successfully.</p> <p>This could be done by using the below command here I am assuming that you are using docker privet ...
sidharth vijayakumar
<p>I am trying to configure a prometheus to monitor a simple flask app, but its very weird that the prometheus does show the service in the drop down, but it shows nothing when I click in the dropdown:</p> <p><a href="https://i.stack.imgur.com/KeuEB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Keu...
user2459179
<p><code>servicemonitor</code> object looks for services with the label selectors that you give in the manifest , the name of the object is telling you exactly what it does. it looks for a <code>service</code> with the <code>app: flask-app</code> label not the <strong>pod</strong>. so if you look at your service manife...
AlirezaPourchali
<p>I am looking at this article. It mentions below query with below description.</p> <blockquote> <p>It is even more interesting monitoring the error rate vs the total amount of requests, this way you get the magnitude of the errors for the Kubernetes API server requests.</p> </blockquote> <pre><code>sum(rate(apiserver...
bunny
<p><code>rate</code> calculates per-second estimation of increase of your counter. <code>sum</code> than sums up all time series produced by <code>rate</code> into one.</p> <p>Consider <a href="https://prometheus.demo.do.prometheus.io/graph?g0.expr=node_cpu_seconds_total&amp;g0.tab=1&amp;g0.stacked=0&amp;g0.range_input...
markalex
<p>I am trying to configure a hello world application using ingress in GKE. I have been referring a GCP official documentation to deploy an application using Ingress.</p> <p><a href="https://cloud.google.com/community/tutorials/nginx-ingress-gke" rel="nofollow noreferrer">Deploying an app using ingress</a></p> <p>But t...
sidharth vijayakumar
<p>So I have installed Ingress-controller and used ingress controller ip as the host in my ingress file.</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-resource annotations: kubernetes.io/ingress.class: &quot;nginx&quot; nginx.ingress.kubernetes.io/ssl-redirect: &quot;...
sidharth vijayakumar
<p>I'm trying to install a simple helm chart and I got:</p> <p><code>Internal error occurred: failed calling webhook &quot;mservice.elbv2.k8s.aws&quot;: failed to call webhook: the server could not find the requested resource</code></p>
Padi
<p>Had the same issue suddenly on EKS v1.24 and with &quot;aws-load-balancer-controller&quot; v2.4.5 after working for over 1 month with that version with no issues until this week. The resources are created through Terraform and Helm. I suspect an upstream change affected underlying resources.</p> <p>Updating to <a hr...
hefnat
<p>While reading this blog-post <a href="https://raesene.github.io/blog/2023/04/08/lets-talk-about-kubelet-authorization/" rel="nofollow noreferrer">https://raesene.github.io/blog/2023/04/08/lets-talk-about-kubelet-authorization/</a></p> <p>Found that there are multiple authorisation modes supported, my understanding w...
Sumit Murari
<p>If you are using local cluster, to find out which authorization modes are supported in your Kubernetes cluster, you can use the <code>kubectl</code> command to retrieve this information. You can achieve this by checking the cluster configuration, specifically the <code>kube-apiserver</code> component.</p> <p>Here's ...
Saifeddine Rajhi
<p>Can i use different versions of cassandra in a single cluster? My goal is to transfer data from one DC(A) to new DC(B) and decommission DC(A), but DC(A) is on version 3.11.3 and DC(B) is going to be *3.11.7+</p> <p>* I Want to use K8ssandra deployment with metrics and other stuff. The K8ssandra project cannot deploy...
Samabo
<p>K8ssandra itself is purposefully an &quot;opinionated&quot; stack, which is why you can only use certain more recent and not-known to include major issues versions of Cassandra.</p> <p>But, if you already have the existing cluster, that doesn't mean you can't migrate between them. Check out this blog for an example...
Jeff DiNoto
<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...
Anup
<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...
glv
<p>I have setup K8s cluster on AWS. I have followed the Nginx Ingress setup using the link - <a href="https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/" rel="nofollow noreferrer">Ingress-Setup</a>. I then tried to deploy a coffee application using the link - <a href="https://gith...
zilcuanu
<p>Your application is listening on port 8080. In your Service file you need to use the targetPort as 8080.</p> <pre><code>apiVersion: v1 kind: Service metadata: name: nginx-ingress namespace: nginx-ingress annotations: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: &quot;tcp&quot; service...
Vishwas Karale
<p>I want to create large EBS volumes (e.g. 1TB) dynamically for each jenkins worker pod on my EKS cluster such that each <code>persistentVolume</code> representing an EBS volume only persists for the lifespan of the pod.</p> <p>I can't change the size of the nodes on the EKS cluster, so I'm trying to use external EBS ...
nyserq
<p>you use k8s 1.23+, then this is possible for <code>StatefulSets</code>, i.e if you can change pods by <code>StatefulSets</code>.</p> <p>The <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention" rel="nofollow noreferrer">PersistentVolumeClaim retention</a> fe...
Saifeddine Rajhi
<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 ...
Nora
<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...
glv
<p>I want to put my docker image running react into kubernetes and be able to hit the main page. I am able to get the main page just running <code>docker run --rm -p 3000:3000 reactdemo</code> locally. When I try to deploy to my kubernetes (running locally via docker-desktop) I get no response until eventually a timeou...
Damisco
<p>if you are using Kubernetes using minikube in your local system then it will not work with localhost:3000, because it runs in minikube cluster which has there owned private IP address, so instead of trying localhost:3000 you should try <code> minikube service &lt;servicename&gt;</code> this in your terminal and it s...
Ankush Limbasiya
<p>i m trying diff commands in aws eks and when there is wrong cmd it spits out too long of output.</p> <pre><code>aws kubectl get pod usage: aws [options] &lt;command&gt; &lt;subcommand&gt; [&lt;subcommand&gt; ...] [parameters ] To see help text, you can run: aws help aws &lt;command&gt; help aws &lt;command&g...
ERJAN
<p>There is no such command <code>aws kubectl get pod</code> !!</p> <p>It is either <code>kubectl get pod</code> to list pods in current namespace if you have <a href="https://kubernetes.io/docs/tasks/tools/#kubectl" rel="nofollow noreferrer">kubectl</a> cli installed and configured with the correct context or <code>aw...
Saifeddine Rajhi
<p>I have a question about Kubernetes containers and persistent volumes.</p> <p><strong>How can I make some of the preexisting folders of a Kubernetes container persistent?</strong></p> <p>I know the usage of PVCs in Kubernetes but the problem about mounting a PVC to a container is that this operation -naturally- delet...
tuna
<p>there is no way to mount a Volume in a certain folder without overwriting its contents.</p> <p>In my opinion the best approaches could be:</p> <ol> <li><p>The first one reported by you (for large content):</p> <p>a. Create PVC</p> <p>b. Add an initContainer to your Deployment that mount the Volume in a DIFFERENT pat...
glv
<p>thanks for checking out my topic.</p> <p>I'm currently working to have kustomize to download the resource and base files from our git repository. We have tried a few options some of them following the documentation and some of them not, see below. But anyhow still not able to download from our remote repo and while ...
Gabriele Hausmann
<p>After reaching some Kubernetes colleagues, we found out the reason for my problem. Basically, when running kubectl with version lower than 1.20 we have kustomize v2.0.3. My Jenkins agent was using a outdated kubectl version (1.17) and this was the root cause.</p> <p>In this case, there were two options:</p> <ol> <li...
Gabriele Hausmann
<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...
Soumik Laik
<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>
glv
<p>I am using Grafana Helm chart to install Grafana on K8s cluster. The procedure works quite good, also predefining dashboards, so that they are accessible after installation.On the other hand I didn’t find a solution to automate the creation of users &amp; teams so far. How can I specify/predefine users + teams , so ...
GeKo
<p>there isn't <code>helm install</code> available for creating user(s)/group(s) for grafana. the best way is through HTTP API, However, Ansible playbook might be an option too</p>
CA-CB-TellMe
<p>Hello I am trying to deploy a simple tomcat service. Below are the details:</p> <p>1.minikube version: v1.8.1</p> <p>2.OS: mac</p> <p>3.The <strong>deployment.yaml</strong> file (I am in the directory of the yaml file)</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: tomcat-deployment spec: ...
Nath
<p>Sara's answer above pointed me to the right direction. Copying the files works but this requires a restart of the tomcat service which reverts the changes. I had to use 'cp -r' on the deployment yaml as per below:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <...
dark swan
<p>I'm trying to setup a very simple 2 node k8s 1.13.3 cluster in a vSphere private cloud. The VMs are running Ubuntu 18.04. Firewalls are turned off for testing purposes. yet the initialization is failing due to a refused connection. Is there something else that could be causing this other than ports being blocked? I'...
Stavros_S
<p>In order to address the error (dial tcp 127.0.0.1:10248: connect: connection refused.), run the following:</p> <pre class="lang-sh prettyprint-override"><code>sudo mkdir /etc/docker cat &lt;&lt;EOF | sudo tee /etc/docker/daemon.json { &quot;exec-opts&quot;: [&quot;native.cgroupdriver=systemd&quot;], &quot;log-dr...
Kirik
<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 ...
mgcdrd
<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...
mgcdrd
<p>We have a Grafana Service with two Grafana PODs in our Kubernetes Cluster. Everytime an alert is triggered both instances will fire the alert.</p> <p>To prevent this from happening, we tried activating the HA alerting, which basically consists of the following configuration:</p> <pre><code>[unified_alerting] enabled...
elcaos
<p>As Jan Garaj already mentioned, headless services are the way to go.</p> <p>If the problem still occurs after using a headless service, it may have something to do with the network setup/firewall. Grafana uses gossip protocols to synchronize the pods. Gossip uses both TCP and UDP on port 9094. We only accepted TCP b...
Erik156
<p>I have a SpringBoot application with a class that has scheduled functions. I have another class 'ConditionalScheduler', that is supposed to manage the schedulers based on some properties in my application config.</p> <p>Code snippets:</p> <pre><code>@Configuration @EnableScheduling public class ConditionalScheduler ...
P D
<p>please check whether your configuration file is loaded correctly in Kubernetes. I suggest you to write a simple function to retrieve property value from configuration file to see if it works.</p>
U Ang
<p>I am trying to migrate a socket io service from GCP (App Engine) to a kubernetes cluster. Everything works fine on the GCP side (we have one instance of the server without replicas). The migration to k8s is going very well, except that when connecting the client socket to the server, it does not receive some informa...
Adrien DEBLOCK
<p>I found the solution in the day.and share it.</p> <p>In fact, the problem is not due to the kubernetes Cluster but due to the socket io and socket io redis adapter version.</p> <p>I was using <code>socket.io: 3.x.x</code> and using <code>socket.io-redis: 5.x.x</code> In fact, i need to use the <code>socket.io-redis:...
Adrien DEBLOCK
<p>I am trying to establish <code>SSH</code> authentication between Jenkins and GitHub. For the same, I am using the kubernetes secret to store the private and public key and I am mounting the secrets when the pod is created. Command I have used to create the secret:</p> <pre><code>kubectl create secret generic test-ss...
Prasann
<p>Secrets aren't mounts that allow for permissions to be alter, so you have to do some trickery to get it to work. Recently I ran into a similar issue, and had to make it work. We use a custom image to perform the ssh calls, so we added the .ssh dir and the known_hosts files to the image; setting the permissions in t...
mgcdrd
<p>I'm new to Pinot and K8s, I have setup Pinot in K8s environment using helm, and trying to add authentication properties using this instruction(<a href="https://docs.pinot.apache.org/operators/tutorials/authentication/basic-auth-access-control" rel="nofollow noreferrer">https://docs.pinot.apache.org/operators/tutoria...
aqqqqqq
<p>In your scenario you may try updating the ConfigMap by running</p> <p>‘<em>kubectl get configmap &lt;CONFIGMAP_NAME&gt; -o yaml &gt; configmap.yaml</em>’ After that, edit the config.yaml and look for pinot-controller.conf. Here you may edit the parameters as required. Then apply the changes by running ‘<em>kubectl a...
Ray John Navarro
<p>I'm currently using minikube and I'm trying to access my application by utilizing the <code>minikube tunnel</code> since the service type is <code>LoadBalancer</code>.</p> <p>I'm able to obtain an external IP when I execute the <code>minikube tunnel</code>, however, when I try to check it on the browser it doesn't ...
RebeloX
<p>In my case <code>minikube service &lt;serviceName&gt;</code> solved this issue.</p> <p>For further details look <a href="https://minikube.sigs.k8s.io/docs/handbook/accessing/" rel="nofollow noreferrer">here</a> in minikube docs.</p>
mkessler
<p>I recently deployed Minio stand-alone on a K0s pod. I can successfully use mc on my laptop to authenticate and create a bucket on my pod’s ip:9000.</p> <p>But when I try to access the web console and login I get a POST error to ip:9000 and I am unable to login.</p> <p>Would anyone know what’s causing this?</p>
user3720568
<p>I've just started a minio container to verify this and it fact there are two ports you need to publish which are <code>9000</code> and <code>9001</code>.</p> <p>You can reach the admin console on port <code>9001</code> and the API on port <code>9000</code>, hence your <code>mc</code> command which targets port <code...
Mushroomator
<p>I am new to k8s and need some help, plz.</p> <p>I want to make a change in a pod's deployment configuration and change readOnlyRootFilesystem to false.</p> <p>This is what I am trying to do, but it doesn't seem to work. Plz suggest what's wrong:</p> <pre class="lang-sh prettyprint-override"><code>kubectl patch deplo...
Nitisha
<p>Your JSON is invalid. You need to make sure you are providing valid JSON and it should be in the correct structure as defined by the k8s API as well. You can use <a href="https://jsonlint.com" rel="nofollow noreferrer">jsonlint.com</a>.</p> <pre class="lang-json prettyprint-override"><code>{ &quot;spec&quot;: { ...
Mushroomator