prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>After creating a deployment for a web-application, consisting of pod, internal service and ingress, the ingress can't be created. When executing <code>kubectl apply -f web-app.yaml</code>, I get the error: <code>error when creating &quot;web-app.yaml&quot;: Internal error occurred: failed calling webhook &quot;valid...
<p>The error you are getting is from the webhook trying to validate your ingress, and not the ingress object itself you are trying to apply.</p> <p>The validation webhook is set by default to <a href="https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/templates/admission-webhooks/validating-webh...
<p>In k8s, a pod starts with a container named <code>pause</code>.<br /> Pause container helps other containers share network namespace.<br /> I know it but have a question.</p> <p>What is the lifecycle of the pause container?<br /> What I want to know is that when a pod gets <code>crashloopbackoff</code> or temporally...
<blockquote> <p>When a pod gets <code>crashloopbackoff</code> or temporally doesn't work, does the pause container also stop?</p> </blockquote> <p>No. A <a href="https://sysdig.com/blog/debug-kubernetes-crashloopbackoff/" rel="nofollow noreferrer">CrashloopBackOff</a> is independent of <code>pause</code> containers. I ...
<p>In k8s, a pod starts with a container named <code>pause</code>.<br /> Pause container helps other containers share network namespace.<br /> I know it but have a question.</p> <p>What is the lifecycle of the pause container?<br /> What I want to know is that when a pod gets <code>crashloopbackoff</code> or temporally...
<p>The pause container is a fully independent container like the others in the pod (other than the places where the namespaces overlap, as you mentioned). It starts when the pod is started up by the kubelet and is torn down when the pod is gone (deleted, scheduled elsewhere, whatever).</p>
<p>Can anyone explain to me why when running my load test on one pod it gives better TPS rather than when scaling to two pods.</p> <p>I expected that when running the same scenario with the same configuration on 2 pods the TPS will be increased but this is not what happened.</p> <p>Is this normal behaviour that scaling...
<pre><code>...my load test on one pod it gives better TPS rather than when scaling to two pods. </code></pre> <p>This can happen when 2 pods race for same resource and create a bottleneck.</p> <pre><code>Is this normal behaviour that scaling horizontal not improve the total number of requests? </code></pre> <p>Client (...
<p>I've installed <code>kong-ingress-controller</code> using yaml file on a 3-nodes k8s cluster. but I'm getting this (the status of pod is <code>CrashLoopBackOff</code>):</p> <pre><code>$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS ...
<p>Having analysed the comments it looks like changing <code>apiVersion</code> from <code>rbac.authorization.k8s.io/v1beta1</code> to <code>rbac.authorization.k8s.io/v1</code> has solved the problem temporally, an alternative to this solution is to downgrade the cluster.</p>
<p>I have a service running as a <code>DaemonSet</code> across a number of kubernetes nodes. I would like to make some policy decisions based on the labels of the node on which each <code>DaemonSet</code> pod is running. From within a container, how do I know on which node this pod is running? Given this information, l...
<p>Answering your question <em>&quot;How do I know what node I'm on?&quot;</em>:</p> <p>Your approach seems to be the best one - to use <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#the-downward-api" rel="nofollow noreferrer">the DownWard API</a> which al...
<p>I'm trying to deploy a mysql instance in k8s through a StatefulSet using the official Mysql image from DockerHub. I'm following the image documentation from DockerHub and providing <code>MYSQL_ROOT_PASSWORD</code>, <code>MYSQL_USER</code> and <code>MYSQL_PASSWORD</code> env vars, so the user should be automatically ...
<p>I was finally able to find out the root cause of the problem and it had nothing to do with secrets... The problem was related with the &quot;complexity&quot; of the value picked for the password. I chose a strong password autogenerated by an online tool, something similar to <code>!6Y*]q~x+xG{9HQ~</code>, and for so...
<p>ok I am banging my head now agaainst he wall for serveral days...</p> <p>my usecase: I am on my own bare metal cloud, I am running ubuntu machines and setup kubernetes on 4 machines one master 3 workers. I created a private registry and cert-manager etc etc. </p> <p>also nfs shares are on the worker nodes</p> <p>...
<p><strong>I will try to answer in very simple steps:</strong></p> <p><strong>1. You can even make root_squash to work for k8s :</strong></p> <pre><code>- run your containers as non root user: 1023 in your case - chown -R 1023:1023 &lt;nfs dir&gt; </code></pre> <p><strong>2. You can make no_root_squash to work for k8s...
<p>I'm trying to get access to my kubernetes cluster in my self hosted gitlab instance as it is described in the <a href="https://gitlab.jaqua.de/help/user/project/clusters/deploy_to_cluster.md#deployment-variables" rel="noreferrer">docs</a>.</p> <pre><code>deploy: stage: deployment script: - kubectl create se...
<p>Kubernetes makes use of a Role-based access control (RBAC) to prevent Pods and Users from being able to interact with resources in the cluster, unless they are not authorized.</p> <p>From the error, you can see that Gitlab is trying to use the <code>secrets</code> resource and also that it is using as <code>ServiceA...
<p>I'm working on a library to read secrets from a given directory that I've got easily up and running with Docker Swarm by using the /run/secrets directory as the defined place to read secrets from. I'd like to do the same for a Kubernetes deployment but looking online I see many guides that advise using various Kuber...
<p>Please read the <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">documentation</a></p> <p>I see 2 practical ways to access the k8s secrets:</p> <ol> <li>Mount the secret as a file</li> </ol> <pre><code>apiVersion: v1 kind: Pod metadata: name: mypod spec: containers: ...
<p>I'm not asking how to create a rootless container from scratch. Rather, I've been given some software deployed as pre-built Docker container images that run as root by default. I need to modify these containers so they can be deployed on Kubernetes, which means I need to make these containers rootless. To be clear, ...
<p>Create users in the container and switch users;</p> <pre><code> Add a new user, named user; Let this user have root privileges; Set its password to password; After the Container is started, log in as user and go directly to the user's home directory; </code></pre> <p>Put the following code snippet in the Dockerfi...
<p>when a SIGTERM is received from k8s I want my sidecar to die only after the main container is finished. How do I create a dependency chain for shutdown routine?</p> <p>I can use a <code>preStop</code> and wait for say 120 secs, but it is going to a constant 120 secs for the pods to be cleaned up.</p> <p>I am wonderi...
<p>In your <code>preStop</code> hook, check if your main container is still running (instead of just waiting a fixed amount of time.</p> <p>If the main container has an existing healthprobe (for example an http endpoint) you can call that from within the <code>preStop</code> hook.</p> <p>Another option is to edit the e...
<ol> <li><p>Once I register the crd into the k8s cluster, I can use .yaml to create it, without operator running. Then What happends to these created resouces?</p> </li> <li><p>I have seen the <code>Reconciler</code> of operator, but it's more like an async status transfer. When we create a pod, we can directly get the...
<p>That's a big story for kubernetes <code>crd</code>/<code>controller</code> life cycle, I try to make a simple representation.</p> <ol> <li>After register a new CRD, and create CR, <code>kube-api-server</code> do not care if there is a related <code>controller</code> existed or not. see the process: <a href="https://...
<p>I try to get a general understanding of OOMKilled events and I've found 2 different reasons:</p> <ol> <li><p><strong>Pod</strong> memory limit exceeded: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/#exceed-a-container-s-memory-limit" rel="noreferrer">If the Container conti...
<p>Both problems result in different error states:</p> <p>1: An exceeded pod memory limit causes a <code>OOMKilled</code> termination</p> <p>2: Node out of memory causes a <code>MemoryPressure</code> and and pod eviction.</p> <pre><code>kubectl describe pod mypod-xxxx ... Reason: Evicted Message: Pod Th...
<p>I can't access to public IP assigned by MetalLB load Balancer</p> <p>I created a Kubernetes cluster in Contabo. Its 1 master and 2 workers. Each one has its own public IP. </p> <p>I did it with kubeadm + flannel. Later I did install MetalLB to use Load Balancing. </p> <p>I used this manifest for installing nginx:...
<p>I am having the very same hardware layout:</p> <ul> <li>a 3-Nodes Kubernetes Cluster - here with the 3 IPs: | 123.223.149.27 | 22.36.211.68 | 192.77.11.164 |</li> <li>running on (different) VPS-Providers (connected to a running cluster(via JOIN), of course)</li> </ul> <p><strong>Target: &quot;expose&quot; the nginx ...
<p>I'm using <a href="https://github.com/Unitech/pm2" rel="nofollow noreferrer">pm2</a> to watch the directory holding the source code for my app-server's NodeJS program, running within a Kubernetes cluster.</p> <p>However, I am getting this error:</p> <pre><code>ENOSPC: System limit for number of file watchers reached...
<p>I found a solution: use a privileged Daemon Set that runs on each node in the cluster, which has the ability to modify the <code>fs.inotify.max_user_watches</code> variable.</p> <p>Add the following to a <code>node-setup-daemon-set.yaml</code> file, included in your Kubernetes cluster:</p> <pre><code>apiVersion: app...
<p>So I've been trying to fix this for days now and I'm beyond stuck.</p> <p>My app is running, and I can access the site when I go to the default url (example.com). I can refresh on this url without issues, and I can navigate through the pages being rendered through react router as long as I don't refresh on any other...
<p>Alright, so I found the real problem.</p> <p>My domain uses both DigitalOcean and Microsoft name servers. I had the A record added on DO, but I guess it needs to be on both. So I added the A record to the other and now my config in my question works perfectly.</p>
<p>At first, I set limit range for namespace <code>kube-system</code> as below:</p> <pre><code>apiVersion: v1 kind: LimitRange metadata: name: cpu-limit-range namespace: kube-system spec: limits: - default: cpu: 500m memory: 500Mi defaultRequest: cpu: 100m memory: 100Mi type: Con...
<p>Not sure if your <code>kube-system</code> namespace has a limit set. You can confirm it checking the namespace itself:</p> <pre><code>kubectl describe namespace kube-system </code></pre> <p>If you have a limit range or a resource quota set, it will appear in the description. Something like the following:</p> <pre><c...
<p>I've installed <code>kong-ingress-controller</code> using yaml file on a 3-nodes k8s cluster. but I'm getting this (the status of pod is <code>CrashLoopBackOff</code>):</p> <pre><code>$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS ...
<p>I had installed <code>kubernetes:1.22</code> and tried to use <code>kong/kubernetes-ingress-controller:1.3</code> .</p> <p>as @mdaniel said in the comment:</p> <blockquote> <p>Upon further investigation into that repo, 1.x only works up to k8s 1.21 so I'll delete my answer and you'll have to downgrade your cluster(!...
<p>I already have on my Ingress a lot of domains with so many paths as this is an environment with many microservices.</p> <p>How can I edit my ingress in some way that when someone access to path <code>/servicex</code> it gets instead <code>/serviceb</code> for example</p> <p>My current ingress is as follow (for simpl...
<p>NGINX ingress is almost the same as in the NGINX. In most of the cases, the built-in annotation helps you to configure the standard operation in NGINX.</p> <p>However, if you have encountered any kind of customization like your case, you are also free to input the server or configuration snippet through these two an...
<p>I want to route through Istio virtual Service to my microservice. When I use <code>@RequestParam</code> based input in prefix or even in exact it throws <code>404</code> for <code>/api/cities/{city_id}/tours</code> but the rest works fine.</p> <pre><code>apiVersion: networking.istio.io/v1alpha3 kind: VirtualService ...
<p>This fragment</p> <pre class="lang-yaml prettyprint-override"><code> - uri: prefix: &quot;/api/cities/{city_id}/tours&quot; - uri: prefix: &quot;/api/countries/{country_id}/cities&quot; </code></pre> <p>will be taken literally. The <code>{city_id}</code> and <code>{country_id}</code> will not...
<p>We have been happily using ArgoCD with public repositories for a while, but we've run into problems trying to connect ArgoCD to a private repository. We have an <code>Application</code> that looks like this:</p> <pre><code>apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: example-app namespace: ...
<p>You can review possible causes from <a href="https://github.com/argoproj/argo-cd/issues/1172" rel="nofollow noreferrer"><code>argoproj/argo-cd</code> issue 1172</a></p> <p>Since you have the proper URL (<code>ssh://git@github.com/...</code>, as requested by <a href="https://github.com/operate-first/argocd-apps/pull/...
<p>I want to route through Istio virtual Service to my microservice. When I use <code>@RequestParam</code> based input in prefix or even in exact it throws <code>404</code> for <code>/api/cities/{city_id}/tours</code> but the rest works fine.</p> <pre><code>apiVersion: networking.istio.io/v1alpha3 kind: VirtualService ...
<p>Prefix matching matches literal strings.</p> <p><code>/api/countries</code> also matches what you intend to match with <code>/api/countries/{country_id}/cities</code></p> <p><code>/api/cities/{city_id}/tours</code> however, does not work.</p> <p>For more complex matching, you can use an exact and regex, as describe...
<p>I installed WSL2 on Windows10 followed these instructions: <a href="https://learn.microsoft.com/en-us/windows/wsl/install-win10" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/windows/wsl/install-win10</a>, manual install.</p> <p>All commands worked for me however at the end when I open wsl terminal and...
<p>The <strong>answer</strong> was in one of the comments, clarifying it so it will be useful to others as well</p> <pre><code># run this command in order to enable kubectl in your wsl terminal wsl --setdefault Ubuntu-20.04 </code></pre>
<p>I am trying to create a local cluster on a centos7 machine using eks anywhere. However I am getting below error. Please let me know if I am missing anything? Here is the link I am following to create the cluster. I have also attached the cluster create yaml file</p> <p>Link: <a href="https://aws.amazon.com/blogs/aws...
<p>The default spec will look for external etcd. To test it locally remove the <code>externalEtcdConfiguration</code>:</p> <pre><code>apiVersion: anywhere.eks.amazonaws.com/v1alpha1 kind: Cluster metadata: name: dev-cluster spec: clusterNetwork: cni: cilium pods: cidrBlocks: - 192.168.0.0/16 ...
<p>I would like to deploy Airflow locally on Minikube and have a local folder mounted for DAGs handling.</p> <p>Airflow is deployed like this:</p> <pre><code>helm install $AIRFLOW_NAME apache-airflow/airflow \ --values values.yml \ --set logs.persistence.enabled=true \ --namespace $AIRFLOW_NAMESPACE \ ...
<p>Assuming that you have some dags in /path/dags already, you should mount your dags folder to scheduler not to webserver (if you are using Airflow 2). Scheduler is the one to parse dags, webserver only displays them based on information stored in the DB so it does not actually need DAGs (it used to need it Airflow 1....
<p>Given this yaml:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress-2 annotations: nginx.ingress.kubernetes.io/rewrite-target: /$1 spec: rules: - host: test.com http: paths: - backend: serviceName: admin servicePort: 8080 p...
<p>You can separate out ingress file or config, just make sure you keep the different name</p> <p>So you can you create <strong>TWO</strong> ingress</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress-1 annotations: nginx.ingress.kubernetes.io/rewrite-target: /$1 spec: rul...
<h3>Bug Description</h3> <p>My cluster uses Istio and one of service (java) which is deployed in mesh needs to connect to external resource <code>x.cmp.net/doc.pdf</code> with http and 443 port. This external resource using trusted wildcard cert (DigiCert) with subjects <code>*.cmp.net</code> and <code>cmp.net</code>. ...
<p>Your problem seems to be linked to double TLS (you can read more <a href="https://istio.io/latest/docs/ops/common-problems/network-issues/#double-tls" rel="nofollow noreferrer">here</a>). There are two possible solutions:</p> <h3>Solution 1</h3> <p>In <code>ServiceEntry</code> define protocol as HTTP with redirectio...
<p>I would like to install kubectx on Ubuntu 20.04. I couldn't find any info on how to do it. Any comment is much appreciated. Thanks!</p>
<p>This package contains in <code>deb http://ftp.de.debian.org/debian buster main</code> repo which is not available in ubuntu.</p> <p>First you need to do add this to <code>/etc/apt/sources.list</code> like below</p> <pre><code>#for kubectlx deb [trusted=yes] http://ftp.de.debian.org/debian buster main </code></pre> <...
<p>I would like to deploy Airflow locally on Minikube and have a local folder mounted for DAGs handling.</p> <p>Airflow is deployed like this:</p> <pre><code>helm install $AIRFLOW_NAME apache-airflow/airflow \ --values values.yml \ --set logs.persistence.enabled=true \ --namespace $AIRFLOW_NAMESPACE \ ...
<p>I was completely mistaking the <code>hostPath</code> parameter for my local machine. <code>hostPath</code> refers to the Minikube node running the pod.</p> <pre><code> extraVolumes: - name: dags hostPath: path: /mnt/airflow/dags type: Directory extraVolumeMounts: - name: dags m...
<p>I'm beginning to build out a kubernetes cluster for our applications. We are using Azure for cloud services, so my K8s cluster is built using AKS. The AKs cluster was created using the portal interface for Azure. It has one node, and I am attempting to create a pod with a single container to deploy to the node. Wher...
<p>As of now, the aks run command adds a <a href="https://learn.microsoft.com/en-gb/azure/aks/private-clusters#options-for-connecting-to-the-private-cluster" rel="nofollow noreferrer">fourth option</a> to connect to private clusters extending <a href="https://stackoverflow.com/users/7001697/darius">@Darius</a>'s <a hre...
<p>I have a Python application and it utilizes environment variables in Kubernetes configuration such as:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: my-config namespace: default data: var1: foo var2: bar --- apiVersion: v1 kind: Pod metadata: name: my-pod namespace: default spec: con...
<p>In a shell, you could also simply temporarily assign the value(s) for the environment variable(s) right before calling the script. No need to change your script at all.</p> <p>Consider the following <code>app.py</code> which just prints the environment variables <code>ENV_PARAM</code> and <code>ENV_PARAM2</code>:</p...
<p>I have a cluster with MySQL database which is a <strong>StatefulSet</strong>.</p> <p>I would like to scale up my database with hpa.</p> <p>The problem is that the second database that has been created is <strong>empty</strong>. I don't know how to synchronize the second with the first replica.</p> <p>Someone told me...
<p>You need to use volumes which mean <code>PersistanceVolume</code> in K8S.</p> <p>Here is a working sample with all the required resources.</p> <p><a href="https://github.com/nirgeier/KubernetesLabs/tree/master/Labs/09-StatefulSet" rel="nofollow noreferrer">https://github.com/nirgeier/KubernetesLabs/tree/master/Labs/...
<p>What I have, are multi similar and simple <code>dockerfile</code>s</p> <p>But what I want is to have a single base <code>dockerfile</code> and my <code>dockerfile</code>s pass their variables into it.</p> <p>In my case the only difference between <code>dockerfile</code>s are simply their <code>EXPOSE</code>, so I th...
<h1><code>IMPORT</code> directive will never be implemented</h1> <p>A long time ago there was proposed <code>IMPORT</code> directive for <code>Docker</code></p> <p>Unfortunately, issues are closed while PR's are still open:</p> <ul> <li><a href="https://stackoverflow.com/questions/69234878/using-shared-dockerfile-for-m...
<p>I've installed kong-ingress-controller using yaml file on a 3-nodes k8s cluster( bare metal ) (you can see the file at the bottom of question) and every thing is up and runnig:</p> <pre><code>$kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE...
<p>the short answer is what @iglen_ said <a href="https://stackoverflow.com/a/69177863/12741668">in this answer</a> but I decided to explain the solution.</p> <p>When using a cloud provider the <code>LoadBalancer</code> type for Services will be managed and provisioned by the environment (see <a href="https://kubernete...
<p>I have a multi-container pod running on AWS EKS. One web app container running on port 80 and a Redis container running on port 6379.</p> <p>Once the deployment goes through, manual curl probes on the pod's IP address:port from within the cluster are always good responses.<br /> The ingress to service is fine as wel...
<p>Let's go over your probes so you can understand what is going and might find a way to fix it:</p> <pre class="lang-yaml prettyprint-override"><code> ### Readiness probe - &quot;waiting&quot; for the container to be ready ### to get to work. ### ### Liveness is executed once the pod is running which means that ### y...
<p><strong>Can't replicate <code>kubectl apply -f</code> functionality with Python client</strong></p> <p>I have created a deployment using <code>create_namespced_deployment</code> (<a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/AppsV1Api.md#create_namespaced_deployment" rel="nofollow ...
<p>In order to supply a full answer, let's start by explaining the difference between<br /> <code>kubectl apply</code> to <code>kubectl create</code></p> <hr /> <h3><code>kubectl apply</code> vs <code>kubectl create</code></h3> <p>The key difference between <code>kubectl apply</code> and <code>kubectl create</code> is ...
<p>Up to now, Helm is the only package manager that I know for K8s. It can help deploy and manage k8s application dependencies seamlessly. Why are so many K8s applications still not adopting or prioritizing it?</p> <p>I have used quite a few popular ones like Argo, Istio, etc. They seem to promote the default installat...
<p>There are a several aspects to that question.</p> <h1>Cluster Security</h1> <p>Historically, the first one was security.</p> <p>Prior Helm3, Helm did rely on some Tiller container, running in your cluster, some kind of cluster admin able to create resources on your behalf.</p> <p>Back then, one of the main argument ...
<p>I find some usecases of k8s in production which work with the Public Cloud will put a LoadBalancer type of Service in front of the Nginx Ingress. (You can find an example from the below yaml.)</p> <p>As I known, ingress can be used to expose the internal servcie to the public, so what's the point to put a loadbalanc...
<pre><code>...so what's the point to put a loadbalancer in front of the ingress? </code></pre> <p>This way allows you to take advantage of the cloud provider LB facilities (eg. multi-az etc), then with Ingress you can further control routing using path or name-based virtual host for services in the cluster.</p> <pre><c...
<p>I am using EKS with node group for K8S.<br /> The desired node is 1 and the maximum is 3.</p> <p>Currently, there is only one ec2 (t3.xlarge) is running.<br /> When I deploy two pods in one namespace, each requests 8G memory and 2 CPU, the first one is deployed successfully but the second one failed with the error <...
<p>With Amazon EKS you need to follow those rules prior to use AutoScaler</p> <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html</a></p> <h3>From the Official Docs above:</h3> <p><strong...
<p>Does containers in a Kubernetes Pod run in different &quot;mount&quot; namespaces? As per what i read in few online resources , when a container is launched , each container points to an isolated file system and the only thing that can be used to share file directories across containers is Kubernetes volumes. Hence,...
<p>It's right, containers can share files between each others only by using the volumes.</p> <p>Assume that volume mounting is just the same as mounting network partition. So there is no conflicts with OS or namespaces (we are talking about presistent volumes).</p>
<p>I have several containers in my pod which are executing specific tasks. Two of the containers act as daemons and if they fail they should be restarted. On the other side, the 3 other containers are meant to execute specific tasks only once.</p> <p>My intuitive approach was to make them explicitly quit with <code>exi...
<p><strong>solution #1</strong></p> <p>Assuming you are using some sort of package manager for k8s deployment. You can use similar feature like helm hooks <a href="https://helm.sh/docs/topics/charts_hooks/" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts_hooks/</a> to execute specific tasks at specific lif...
<p>Checking the latest image used in the metrics-server <a href="https://github.com/kubernetes-sigs/metrics-server/releases/tag/v0.5.0" rel="nofollow noreferrer">Github repo</a>, the tag used is <strong>v0.5.0</strong>, for arm64 I would usually add <em>arm64</em> to the image name and pull it.</p> <p>But the image doe...
<p>There's no need to append <em>arm64</em> starting v0.3.7, the image support multiple architectures. See official FAQ <a href="https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md#how-to-run-metric-server-on-different-architecture" rel="nofollow noreferrer">here</a> with complete image url.</p>
<p>Why there is restriction while expanding and reducing the storage config size in cassandra operator- Datastax</p> <p><a href="https://github.com/datastax/cass-operator/issues/390" rel="nofollow noreferrer">https://github.com/datastax/cass-operator/issues/390</a></p> <p>Why there is a validation/restriction in statef...
<p>The exact same question was asked on <a href="https://community.datastax.com/questions/12269/" rel="nofollow noreferrer">https://community.datastax.com/questions/12269/</a> so I'm reposting my answer here.</p> <p>Jim Dickinson already answered this question in <a href="https://github.com/datastax/cass-operator/issue...
<p>I am trying to learn how to use Kubernetes and tried following the guide <a href="https://minikube.sigs.k8s.io/docs/start/" rel="nofollow noreferrer">here</a> to create a local Kubernetes cluster with Docker driver.</p> <p>However, I'm stuck at step 3: Interact with your cluster. I tried to run <code>minikube dashbo...
<p>I have installed the minikube according to the same guide, both locally and with the help of cloud providor and ... it works for me :) If you are just learning and starting your adventure with Kubernetes, try to install everything from scratch.</p> <p>The error you are getting is related to different versions of Cli...
<p>When I am accessing a Istio gateway <code>NodePort</code> from the Nginx server using <code>curl</code>, I am getting response properly, like below:</p> <pre><code>curl -v &quot;http://52.66.195.124:30408/status/200&quot; * Trying 52.66.195.124:30408... * Connected to 52.66.195.124 (52.66.195.124) port 30408 (#0) ...
<p>HTTP 426 error means <a href="https://httpstatuses.com/426" rel="nofollow noreferrer">upgrade required</a>:</p> <blockquote> <p>The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.</p> </blockquote> <p>or <a href="https:...
<p>I have a network with 3 ordering nodes running on a Kubernetes cluster. I am using NFS for persistence storage. The Kubernetes cluster is running on bare metal machines. I onboarded a new organization into the network, added that organization into the constortium. As soon as I execute d the command <code>peer channe...
<p>This bug is fixed in <a href="https://github.com/hyperledger/fabric/pull/2934" rel="nofollow noreferrer">https://github.com/hyperledger/fabric/pull/2934</a>, you can look at the issue <a href="https://github.com/hyperledger/fabric/issues/2931" rel="nofollow noreferrer">https://github.com/hyperledger/fabric/issues/29...
<p>I have an application using Azure Kubernetes. Everything was working fine and the API gave me 200 response all the time, but last week I started receiving 500 internal server errors from the API management, and it indicated that its a backend error. I ran the server locally and sent requests to the API and it worked...
<p>In general, it all depends specifically on the situation you are dealing with. Nevertheless, you should always start by looking at the logs (application event logs and server logs). Try to look for information about the error in them. Error 500 is actually the effect, not the cause. If you want to find out what may ...
<p>I noticed that all the documentations on deploying operators in kubernetes always use a simple <code>kubectl create -f /point/to/some/big/blob/deploying/the/operator.yaml</code> as the &quot;newer&quot; alternative to a plain helm chart. That made me wonder why operator deployments are not usually managed by helm so...
<p>A problem with helm dependencies is that they cannot be shared between multiple projects. So operator-as-helm-dependency would break anyway as soon as you would have multiple helm charts depending on the same operator: helm would try to deploy multiple instances of that operator, which is probably not what you want....
<p>I've begun testing Google Cloud's Kubernetes Engine new Autopilot feature, and I'm having a fair number of issues with the autoscaling backend.</p> <p>I have a fairly standard cluster configuration with basically all of the defaults selected. I'm attempting to deploy a number of microservices backed by a single ngi...
<p>Using default configuration will give you a public cluster. The public cluster will assign external IP to each node, which might cause your cluster to hit the IP address quota.</p> <p>What do you want is to configure the cluster to be a private cluster. Private does not mean it can not be accessed via public, it jus...
<p>I'm having an application which stores data in a cloud instance of mongoDB. So If I explain further on requirement, I'm currently having data organized at collection level like below.</p> <pre><code>collection_1 : [{doc_1}, {doc_2}, ... , {doc_n}] collection_2 : [{doc_1}, {doc_2}, ... , {doc_n}] ... ... collection_n...
<p>I think you have honestly already hinted at the simplest answer.</p> <p>First, update your data access layer to handle both the new and old schema: Inserts and updates should update both the new and old in order to keep things in sync. Queries should only look at the old schema as it's the source of record at this...
<p>Upon submitting few jobs (say, 50) targeted on a single node, I am getting pod status as &quot;OutOfpods&quot; for few jobs. I have reduced the maximum number of pods on this worker node to &quot;10&quot;, but still observe above issue. Kubelet configuration is default with no changes.</p> <p>kubernetes version: v1....
<p>I have realized this to be a known issue for kubelet v1.22 as confirmed <a href="https://github.com/kubernetes/kubernetes/issues/104560" rel="nofollow noreferrer">here</a>. The fix will be reflected in the next latest release.</p> <p>Simple resolution here is to downgrade kubernetes to v1.21.</p>
<p>There are lot of fields out there in the library but it basically talks about job finished or not, but how to check if a job is finished and successful or job is finished and failure</p> <pre><code>if con.Type == v1.JobComplete &amp;&amp; con.Status == corev1.ConditionTrue &amp;&amp; job.Status.Succeeded &gt; 0 { ...
<p>Similar to <code>Bharath</code>s answer except it handles the race condition where this function is called after the job is created but before the job pod is active.</p> <pre><code>func getJobStatus(jobName string) error { // k8sClient := initialize k8s client job, err := k8sClient.BatchV1().Jobs(h.namespac...
<p>I am trying to convert an Istio service mesh running on k8s from <code>http</code> to <code>https</code> but stumbled upon many problems. I don't really understand what are all the steps required to do that.</p> <p>As I know, there are 2 kinds of traffic that requires TLS in a mesh:</p> <ul> <li><p><strong>between i...
<p>In general, if you need a good explanation of the issues related to Istio (also with pictures), I recommend that you check the documentation. You can find around <a href="https://istio.io/latest/search/?q=tls&amp;site=docs" rel="nofollow noreferrer">540 topics</a> related to TLS in Istio.</p> <p>Istio is a very we...
<p>I am replacing a Kubernetes secret and I want to make sure I am catching all places in the cluster which use it.</p> <p>Is there a way to tell without reading all deployment YAMLs using K8s or helm?</p> <p>We have multiple services deployed on the same cluster and sharing secrets. Some using Helm, some don't.</p>
<p>You can use secrets in several different ways, it's not always bound as volume. So the most convenient way is to check the secret's namespace for all objects that could use secret in their specs.</p> <p>For manual check here are two commands, one for checking for the certain secret name references among k8s objects,...
<p>I have installed cert manager on a k8s cluster:</p> <pre><code>helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.3 --set installCRDs=true </code></pre> <p>My objective is to do mtls communication between micro-services running in same name-space.</p> <p>For th...
<h2>Short answer</h2> <p>Based on logs and details from certificate you provided it's safe to say <strong>it's working as expected</strong>.</p> <p>Pay attention to <code>revision: 5</code> in your certificate, which means that certificate has been renewed 4 times already. If you try to look there now, this will be 6 o...
<p>I have tried using the Patch Class to scale the Deployments but unable to do so. Please let me know how to do it. i have researched a lot but no proper docs on it/Example to achieve.</p> <pre><code>public static async Task&lt;V1Scale&gt; Scale([FromBody] ReplicaRequest request) { try { ...
<p>The <code>JsonPatchDocument&lt;T&gt;</code> you are using generates Json Patch, but you are specifying ApplyPatch.</p> <p>Edit as of 2022-04-19:<br /> The <a href="https://github.com/kubernetes-client/csharp" rel="nofollow noreferrer">kubernetes-client/csharp</a> library changed the serializer to <code>System.Text....
<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...
<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...
<p>I am trying to migrate our cassandra tables to use <code>liquibase</code>. Basically the idea is trivial, have a <code>pre-install</code> and <code>pre-upgrade</code> job that will run some <code>liquibase</code> scripts and will manage our database upgrade.</p> <p>For that purpose I have created a custom docker ima...
<p>It turns out that <code>helm</code> hooks can be used for other things, not only jobs. As such, I can mount this file into a <code>ConfigMap</code> <em>before</em> the Job even starts (the file I care about resides in <code>resources/databaseChangelog.json</code>):</p> <pre><code>apiVersion: v1 kind: ConfigMap metad...
<p>I am new to stackoverflow, so pardon if I have not followed all rules for asking this question.</p> <p>So, I am using this helm chart: <a href="https://github.com/helm/charts/tree/master/stable/mysql" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/mysql</a> for deploying mysql for our pr...
<p>It looks like the Readiness probe failed &amp; the Liveness probe is failing in your case. For MySQL, please try with the below (in <code>templates/deployment.yaml</code>) for Readiness &amp; Liveness:</p> <pre class="lang-yaml prettyprint-override"><code>ports: - name: mysql containerPort: {{ .Values.service....
<p>Below is kubernetes POD definition</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: static-web labels: role: myrole spec: containers: - name: web image: nginx ports: - name: web containerPort: 80 protocol: TCP </code></pre> <p>as I have not specified the r...
<p>If resources are not specified for the Pod, the Pod will be scheduled to any node and resources are not considered when choosing a node.</p> <p>The Pod might be &quot;terminated&quot; if it uses more memory than available or get little CPU time as Pods with specified resources will be prioritized. It is a good pract...
<p>I'm trying to understand why this particular <code>socat</code> command isn't working in my case where I run it in a IPv6 only Kubernetes cluster.</p> <p>Cluster is build on top of AWS with Calico CNI &amp; containerd. Provisioned using <code>kubeadm</code> and Kubernetes 1.21.</p> <p>I have run the following <code>...
<p>For those of you running into a similar issue with your IPv6 only Kubernetes clusters heres what I have investigated found so far.</p> <p><strong>Background:</strong> It seems that this is a generic issue relating to IPv6 and CRI. I was running <code>containerd</code> in my setup and <code>containerd</code> versions...
<p>Can anyone guide if we monitoring out <code>EKS</code> cluster using <code>prometheus</code></p> <p>Then what would be the units for the metric <code>kube_metrics_server_pods_cpu</code> by default.</p>
<h1>CPU is measured in nanocores.</h1> <p><code>kube_metrics_server_pods_cpu</code> is measured in nanocores.</p> <p>I agree with @noam-yizraeli</p> <p>As per the <a href="https://github.com/olxbr/metrics-server-exporter/blob/bdf831c4e9d794e2f760edf217cf923a7c461d21/app.py#L130" rel="nofollow noreferrer">source code</...
<p>I am trying to output the value for .metadata.name followed by the student's name in .spec.template.spec.containers[].students[] array using the regex in JsonPath for a Kubectl query.</p> <p>I had actually asked a similar question linked here for this in jq.</p> <p><a href="https://stackoverflow.com/questions/692603...
<p>The documentation for JSONPath Support clearly describes that it is not possible with JSONPath and you can use jq.</p> <p><a href="https://kubernetes.io/docs/reference/kubectl/jsonpath/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/kubectl/jsonpath/</a></p> <p><a href="https://i.stack.imgur.com/VKr...
<p>I'm running a MySQL image in my one-node cluster for local testing purposes only.</p> <p>I would like to be able to delete the database when needed to have the image build a new database from scratch, but I can't seem to find where or how I can do that easily.</p> <p>I am on Windows, using Docker Desktop to manage m...
<p>A brilliant work-around to Docker Desktop's inability to easily support persistent volumes using WSL2 and KinD when the host file system is Windows.</p> <p>I could not get hostpath to work either. To make this a generic solution when using KinD and Docker Desktop, I simply modified this entry:</p> <p>/run/desktop/mn...
<p>I deployed a k3s cluster into 2 raspberry pi 4. One as a master and the second as a worker using the script k3s offered with the following options:</p> <p>For the master node:</p> <pre><code>curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='server --bind-address 192.168.1.113 (which is the master node ip)' sh - </cod...
<p>Moving this out of comments for better visibility.</p> <hr /> <p>After creation of small cluster, I wasn't able to reproduce this behaviour and <code>metrics-server</code> worked fine for both nodes, <code>kubectl top nodes</code> showed information and metrics about both available nodes (thought it took some time t...
<p>I'm running a simple Spark job on Kubernetes cluster that writes data to HDFS with Hive catologization. For whatever reason my app fails to run Spark SQL commands with the following exception:</p> <pre><code>21/09/22 09:23:54 ERROR SplunkStreamListener: |exception=org.apache.spark.sql.AnalysisException org.apache.sp...
<p>Try add this before setting up the spark context</p> <pre><code>System.setProperty(&quot;HADOOP_USER_NAME&quot;, &quot;root&quot;) </code></pre>
<p>I've created a Kubernetes cluster on Google Cloud and even though the application is running properly (which I've checked running requests inside the cluster) it seems that the NEG health check is not working properly. Any ideas on the cause?</p> <p>I've tried to change the service from NodePort to LoadBalancer, dif...
<p>Apparently, you didn’t have a GCP firewall rule to allow traffic on port 5000 to your GKE nodes. <a href="https://cloud.google.com/vpc/docs/using-firewalls#creating_firewall_rules" rel="nofollow noreferrer">Creating an ingress firewall rule</a> with IP range - 0.0.0.0/0 and port - TCP 5000 targeted to your GKE node...
<p>I'm trying to run a minimalistic sample of oauth2-proxy with Keycloak. I used oauth2-proxy's <a href="https://github.com/oauth2-proxy/oauth2-proxy/tree/master/contrib/local-environment/kubernetes" rel="nofollow noreferrer">k8s example</a>, which uses dex, to build up my keycloak example. The problem is that I don't ...
<p>Turned out that I needed to add keycloak to <code>custom-dns.yaml</code>.</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 data: Corefile: | .:53 { errors health { lameduck 5s } ready kubernetes cluster.local in-addr.arpa ip6.arpa { ...
<p>I'm trying to figure it out, how to change one string inside configmap in Kubernetes. I have pretty simple configmap:</p> <pre><code>apiVersion: v1 data: config.cfg: |- [authentication] USERNAME=user PASSWORD=password [podname] PODNAME=metadata.podName kind: ConfigMap metadata: name: n...
<p>I do not think it could be done with ConfigMap. But you can set environment variables in your pod spec that references a pod fields.</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: test-ref-pod-name spec: containers: - name: test-container image: busybox command: [ &quot;sh&quot;, &quot;-...
<p>Is there a way that I can get release logs for a particular K8s release within my K8s cluster as the replica-sets related to that deployment is no longer serving pods?</p> <p>For an example <code>kubectl rollout history deployment/pod1-dep</code> would result</p> <p>1</p> <p>2 &lt;- failed deploy</p> <p>3 &lt;- Late...
<p><em>This is a Community Wiki answer, posted for better visibility, so feel free to edit it and add any additional details you consider important.</em></p> <p>As David Maze rightly suggested in his comment above:</p> <blockquote> <p>Once a pod is deleted, its logs are gone with it. If you have some sort of external l...
<p>I deployed a brand new k8s cluster using kubespray, everything works fine but all of the calico related pods are not ready. And after many hours of debugging I couldn't find the reason why calico pods are crashing. I even disabled/stopped the entire firewalld service but nothing changed.</p> <p>One other important t...
<p>Fortunately increasing <code>timeoutSeconds</code> for both <code>livenessProbe</code> &amp; <code>readinessProbe</code> from <strong>1</strong> to <strong>60</strong> fixes the issue.</p> <pre><code>kubectl edit -n kube-system daemonset.apps/calico-node kubectl edit -n kube-system deployment.apps/calico-kube-contro...
<p>I am following <a href="https://learn.microsoft.com/en-us/azure/aks/azure-files-volume" rel="nofollow noreferrer">setting up the Azure File share to the pod</a>.</p> <ul> <li>created the namespace</li> <li>created the secrets as specified</li> <li>pod configuration</li> </ul> <pre class="lang-yaml prettyprint-overri...
<p>Probably you are working default namespace, that's why Kubelet first checks the default namespace. Please try to switch to your created namespace with the command:</p> <blockquote> <p>kubens storage-test</p> </blockquote> <p>Try to run your pod under storage-test namespace once again.</p>
<p>I have started using KubernetesExecutor and I have set up a PV/PVC with an AWS EFS to store logs for my dags. I am also using s3 remote logging.</p> <p>All the logging is working perfectly fine after a dag completes. However, I want to be able to see the logs of my jobs as they are running for long running ones.</p>...
<p>I had the same issue and those are things that helped me - worth checking them on your end</p> <ul> <li><code>PYTHONUNBUFFERED=1</code> is not enough, but necessary to view logs in realtime. Please keep it</li> <li>have EFS mounted in web, scheduler, and pod_template (executor).</li> <li>Your experience with log fil...
<p>Any ideas how can I replace variables via Kustomize? I simply want to use a different ACCOUNT_ID and IAM_ROLE_NAME for each overlay.</p> <pre><code>apiVersion: v1 kind: ServiceAccount metadata: annotations: eks.amazonaws.com/role-arn: arn:aws:iam::${ACCOUNT_ID}:role/${IAM_ROLE_NAME} </code></pre> <p>Thanks in ...
<p>Kustomize doesn't use &quot;variables&quot;. The way you would typically handle this is by patching the annotation in an overlay. That is, you might start with a base directory that looks like:</p> <pre><code>base ├── kustomization.yaml └── serviceaccount.yaml </code></pre> <p>Where <code>serviceaccount.yaml</code> ...
<p>I have a YAML file defining multiple Kubernetes resources of various types (separated with <code>---</code> according to the YAML spec):</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # ... spec: # ... --- apiVersion: rbac.author...
<p>I was finally able to make it work! Here's how:</p> <pre class="lang-golang prettyprint-override"><code>import ( &quot;k8s.io/client-go/kubernetes/scheme&quot; &quot;sigs.k8s.io/controller-runtime/pkg/client&quot; apiextensionsv1 &quot;k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1&quot; a...
<p>I tested those queries. The first query was half the value of the second query:</p> <p><code>sum(container_memory_working_set_bytes{image!=&quot;&quot;,name=~&quot;^k8s_.*&quot;,pod=~&quot;$pod&quot;}) by (pod)</code></p> <p>and</p> <p><code>sum (container_memory_working_set_bytes{pod=~&quot;$pod&quot;}) by (pod)</c...
<p>That's because <code>cAdvisor</code> takes these values from <code>cgroups</code>. The structure of cgroups looks like a tree, where there are branches for each pod, and every pod has child cgroups for each container in it. This is how it looks (<code>systemd-cgls</code>):</p> <pre><code>├─kubepods │ ├─podb0c98680-4...
<p>I'm just adding the containers part of the spec. Everything is otherwise set up and working fine and values are hardcoded here. This is a simple Postgres pod that is part of a single replica deployment with its own PVC to persist state. But the problem is having nothing to do with my pod/deployment setup.</p> <pre><...
<p>With your pod spec, you've replaced the default command -- which starts up the postgres server -- with your own command, so the server never starts. The proper way to perform initialization tasks with the official Postgres image is <a href="https://github.com/docker-library/docs/blob/master/postgres/README.md#initia...
<p><strong>ENVIRONMENT:</strong></p> <pre><code>Kubernetes version: v1.16.3 OS: CentOS 7 Kernel: Linux k8s02-master01 3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux </code></pre> <p><strong>WHAT HAPPENED:</strong></p> <p>I have a Wordpress Deployment running a conta...
<p>Just to give another way - wordpress will try to redirect because you are missing the X-Forwarded http headers that you should have if you are connecting to wordpress via a proxy.</p> <p>Something like this works without the need for custom php:</p> <pre><code> livenessProbe: initialDelaySeconds: 10 h...
<p>I have been trying to watch some resources in my K8s cluster and after reading some blogs about watch vs informers, i've decided to go with Informers.</p> <p>I came across this example of how to use one: <a href="https://github.com/Netflix-Skunkworks/kubernetes-client-java/blob/master/examples/src/main/java/io/kuber...
<p>Well it's a ride down a rabbit hole.</p> <blockquote> <p>I suggest to keep the diagrams <a href="https://github.com/huweihuang/kubernetes-notes/blob/master/code-analysis/kube-controller-manager/sharedIndexInformer.md" rel="nofollow noreferrer">from the official docs</a> open in separate tab/window in order to apprec...
<p>I need to reproduce the case when the one service in k8s because of pure resource management acts as the slow socket attack and thus causing the wrong and unexpected behavior to another service, not handling this slow socket response/requests well. But currently it is impossible to to put the slow socket service int...
<p>Kubernetes does not provide a built-in functionality to test against what you mention.</p> <p>Instead, the failure you mentioned can be tested against with 3rd party tools. One tool you can use is Litmus Chaos. It is an application designed with chaos engineering principle.</p> <p>Inside Litmus Chaos, different &qu...
<p>We are accessing shared database from multiple pods in kubernetes. All the pods may writes/updates and reads from the db. How to handle data integrity in this case ? Is JPA isolation levels are enough for handling this or need to go with pessimistic locking ? Can you also help me with the difference between both ?<...
<p>Your question has nothing to do with Kubernets. This simply concurrent database access that you'll get if more than one connection is accessing your database.</p> <p>If you want to avoid problems like <a href="https://www.geeksforgeeks.org/concurrency-problems-in-dbms-transactions/#:%7E:text=In%20the%20lost%20update...
<p>I'm trying to configure a single ALB across multiple namespaces in aws EKS, each namespace has its own ingress resource.</p> <p>I'm trying to configure the ingress controller <code>aws-loadbalancer-controller</code> on a k8s v1.20.</p> <p>The problem i'm facing is that each time I try to deploy a new service it alw...
<p>I was able to make it work using only one ALB, @YYashwanth, Using Nginx was my fallback plan, I'm trying to make the configuration as simple as possible, maybe in the future when we will try to deploy our solution in other cloud providers we will use nginx ingress controller.</p> <p>1- To start the service type shou...
<p>I am using a ReplicationController to create a pod running redis container.</p> <p>The redis container is monitored by Redis Sentinel. And there is a problem, if redis crashed and restart too fast, it may cause trouble to Redis Sentinel when the voting is in progress. </p> <pre><code>{ "apiVersion": "v1", "ki...
<p>Better alternatives to <code>sleep</code>:</p> <ol> <li><code>terminationGracePeriodSeconds</code>:</li> </ol> <pre class="lang-yaml prettyprint-override"><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: test spec: replicas: 1 template: spec: containers: ...
<p>I want to know a brief explanation or an example of how to migrate a <code>Kubernetes</code> application to <code>GCP</code> from <code>AWS</code>.</p> <p>What services are implicated like <code>EKS</code> or <code>EC2</code> and <code>GKE</code> or <code>Compute Engine</code>.</p> <p>I'm very new to migration, I do...
<p>It depends.</p> <h1>At first, <code>AWS</code> -&gt; <code>GCP</code> resources mapping:</h1> <p>At first, you'll want to know the mapping between <code>AWS</code> and <code>GCP</code> resources. There are several articles:</p> <ul> <li><a href="https://osamaoracle.com/2020/06/19/services-mapping-aws-azure-gcp-oc-ib...
<p>We are using <code>kubernetes/ingress-nginx</code> for our Azure AKS instance. I have a URI that is 9kb long approximately (it contains a <code>post_logout_redirect_uri</code> and a very long <code>id_token_hint</code> for our Identity server, running in .Net core 2.2).</p> <p>However, I cannot get past the ingress...
<p>I also tried the following annotations:</p> <pre><code>nginx.ingress.kubernetes.io/large_client_header_buffers: 200m nginx.ingress.kubernetes.io/proxy-body-size: 200m </code></pre> <p>They didn't help, what did help is the snippet I added in the Ingress controller yaml:</p> <pre><code>nginx.ingress.kubernetes.io/ser...
<p>I followed the steps from <code>AWS</code> knowledge base to create persistent storage: <a href="https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/" rel="noreferrer">Use persistent storage in Amazon EKS</a></p> <p>Unfortunately, <code>PersistentVolume</code>(PV) wasn't created:</p> <pre><...
<pre><code>storageclass.storage.k8s.io &quot;ebs-sc&quot; not found failed to provision volume with StorageClass &quot;ebs-sc&quot; </code></pre> <p>You need to create the storage class &quot;ebs-sc&quot; after EBS CSI driver is installed, example:</p> <pre><code>cat &lt;&lt; EOF | kubectl apply -f - apiVersion: stora...
<p>GKE version - 1.14 Currently I have two private gke cluster ( Vault cluster and app cluster)</p> <p>Getting following errors:</p> <pre><code>vault errors - auth.kubernetes.auth_kubernetes_b0f01fa6: login unauthorized due to: Post &quot;https://10.V.V.194:443/apis/authentication.k8s.io/v1/tokenreviews&quot;: dial tcp...
<p>Curious as to which version of k8s you're using. I was having the same issue using <code>v1.21.1</code>. I had to add an issuer to the per the docs (<a href="https://www.vaultproject.io/docs/auth/kubernetes" rel="nofollow noreferrer">https://www.vaultproject.io/docs/auth/kubernetes</a>)</p> <blockquote> <p>Kubernete...
<p>I'm running my application EKS cluster, few days back we encounter the issues, let say we have application pod is running with one replicas count in different AWS node lets call vm name as like below.</p> <pre><code>ams-99547bd55-9fp6r 1/1 Running 0 7m31s 10.255.114.81 ip-10-255-12-...
<p>ideally, instead of using the AWS IP you should be using the <code>0.0.0.0/0</code> <a href="https://discuss.kubernetes.io/t/security-implications-of-binding-server-to-127-0-0-1-vs-0-0-0-0-vs-pod-ip/13880" rel="nofollow noreferrer">Refrence doc</a></p> <p>example in Node</p> <pre><code>const cors = require(&quot;cor...
<p>I am tasked with integrating ouath2 proxy into an existing kubernetes deployment in order to secure the application's endpoints. We are using Azure as the IDP and HC Vault sidecar to inject secrets into the pod. The existing app is one container, and the oauth2 will be another container, in same pod. The Vault secr...
<p>ideally, you should be using the vault-injector to add or inject the variables into to POD</p> <p><a href="https://learn.hashicorp.com/tutorials/vault/kubernetes-sidecar" rel="nofollow noreferrer">https://learn.hashicorp.com/tutorials/vault/kubernetes-sidecar</a></p> <p>simple helm command : <code>helm install vault...
<p>This is the simplest config straight from the docs, but when I create the service, kubectl lists the target port as something random. Setting the target port to 1337 in the YAML:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: sails-svc spec: selector: app: sails ports: - port: 1337 t...
<p>Kubectl get services output includes <strong>Port:NodePort:Protocol</strong> information.By default and for convenience, the Kubernetes control plane will allocate a port from a range default: <strong>30000-32767</strong>(Refer the example in this <a href="https://kubernetes.io/docs/concepts/services-networking/serv...
<p>I am deploying a kubernetes app via github on GCP clusters. Everything works fine then.. I came across <code>cloud deploy delivery pipeline</code>..now I am stuck.</p> <p>Following the <a href="https://cloud.google.com/deploy/docs/quickstart-basic?_ga=2.141149938.-1343950568.1631260475&amp;_gac=1.47309141.163186876...
<p>The correct way to declare the manifests was this. The wildcard probably didn't work. The folder name here would be <code>k8s-manifests</code>.</p> <pre><code>deploy: kubectl: manifests: - k8s-manifests/redis-deployment.yml - k8s-manifests/node-depl.yml - k8s-manifests/node-service.yml </c...
<p>I am deploying a kubernetes app via github on GCP clusters. Everything works fine then.. I came across <code>cloud deploy delivery pipeline</code>..now I am stuck.</p> <p>Following the <a href="https://cloud.google.com/deploy/docs/quickstart-basic?_ga=2.141149938.-1343950568.1631260475&amp;_gac=1.47309141.163186876...
<p>@Abhishek Rai, I agree with your answer. Google Cloud Deploy uses <strong>skaffold render</strong> to render your Kubernetes manifests, replacing untagged image names with the tagged image names of the container images you're deploying. Then when you promote the release, Google Cloud Deploy uses skaffold apply to a...
<p>I have a resource task to create nodes in EKS. My problem begin when I'm trying to define some tags according to the value of a specific variable and if not, don't declare the tag. Something like that:</p> <pre><code>resource &quot;aws_eks_node_group&quot; &quot;managed_workers&quot; { for_each = var.nodegroups[te...
<p>Yes, you can do this. For example:</p> <pre><code>resource &quot;aws_eks_node_group&quot; &quot;managed_workers&quot; { for_each = var.nodegroups[terraform.workspace] cluster_name = aws_eks_cluster.cluster.name node_group_name = each.value.Name node_role_arn = aws_iam_role.managed_workers.arn subnet_...
<p>We have the page which has some of the larger Javascript files. When we hit the page, all the small files get downloaded. However, one of the large files was not downloaded fully and failed with <strong>net::ERR_HTTP2_PROTOCOL_ERROR</strong> most of the time. We need to open the page using only a VPN connection as i...
<p>I solved this by changing the configuration for the Nginx Ingress as following:</p> <pre><code>data: client-max-body-size: 50M keep-alive: &quot;3600&quot; proxy-buffer-size: 500m proxy-buffers-number: &quot;8&quot; </code></pre> <p>Glad if this is time-saving for anyone.</p>
<p>I'm using GKE and want to restrict my external load balancers from unwanted traffic. I found two options that problematic for me:</p> <ol> <li>Nginx plus + maxmind solution for geo filtering - I'm looking for an open source solution (and the maxmind lite is not available anymore).</li> <li>GKE Ingress + Cloud armor,...
<p>i would suggest checking out : <a href="https://lab.wallarm.com/how-to-protect-your-kubernetes-cluster-with-wallarm-configuration-and-finetuning-part-2-of-3/" rel="nofollow noreferrer">https://lab.wallarm.com/how-to-protect-your-kubernetes-cluster-with-wallarm-configuration-and-finetuning-part-2-of-3/</a></p> <p>And...
<p>I am following this doc <a href="https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-deploy-elasticsearch.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-deploy-elasticsearch.html</a> to deploy Elasticsearch on Kuberenete. I have created the spec file:</p> <pre class="lang...
<p>it looks like you may have omitted to install the <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/" rel="nofollow noreferrer">custom resource definition (CRD)</a> for elastic.</p> <p><code>Kubectl</code> version 1.16 and above:</p> <pre><code>kubectl create -f https://do...
<p>A couple of weeks ago i published similar question regarding a Kubernetes deployment that uses Key Vault (with User Assigned Managed identity method). The issue was resolved but when trying to implemente everything from scratch something makes not sense to me.</p> <p>Basically i am getting this error regarding mount...
<p>After doing some tests, it seems that the process that I was following was correct. Most probably, I was using <code>principalId</code> instead of <code>clientId</code> in role assignment for the AKS managed identity.</p> <p>Key points for someone else that is facing similar issues:</p> <ol> <li><p>Check what the ma...
<p>How to negate exit code status to be used in <code>Kubernetes</code> <code>livenessProbe</code>?</p> <p>I'll be using the <code>grep</code> command and I would like to do below as a check.</p> <ul> <li>Return exit value 0, if <code>grep</code> has no hit</li> <li>Return exit value 1, if <code>grep</code> has a hit</...
<p>Yes you can give it try</p> <p>example :</p> <pre><code> livenessProbe: exec: command: - /bin/bash - -c - cat filet.txt | grep keyword initialDelaySeconds: 10 periodSeconds: 10 </code></pre> <p>you should checkout if helpful</p> <pre><code>-v, --invert-match Invert the sense of mat...
<p>I'm running Apache Flink in Standalone Kubernetes (sesion) mode without Job Manager HA. But I need to deploy Job Manager HA, because only in HA mode, Flink can be persistent (can save job's after job manager restart). Flink runs in dedicated kubernetes namespace, and I have permissions only to namespace.</p> <p>HA a...
<p>Problem solved - possibility to tell Flink in with kubernetes namespace is running I found in Flink source code. So, to solve this problem you should set this in config:</p> <p><em>kubernetes.namespace: YOUR_NAMESPACE_NAME</em></p>