prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I used helm chart to install Postgresql in Kubernetes.</p> <p>I cannot connect to my Postgres inside my app server. When I tried to connect to db. Server throw to me a error about HostNotFoundError.</p> <p>Anyone have any experience about install the database on the Kubernetes. Please help me.</p> <p>Thanks!</p> <pr...
<p>if in case what @AndD pointed out is cleared and still didn't work..</p> <ol> <li><p>I would check my coreDNS pod under kube-system if there is an issue.</p> </li> <li><p>You could also try using the FQDN (fully qualified domain name) postgres-postgresql.[YOURNAMESPACE].svc.cluster.local</p> </li> <li><p>the postgre...
<p>I have tried desperately to apply a simple pod specification without any luck, even with this previous answer: <a href="https://stackoverflow.com/questions/48534980/mount-local-directory-into-pod-in-minikube">Mount local directory into pod in minikube</a></p> <p>The yaml file:</p> <pre class="lang-yaml prettyprint-o...
<p><strong>OP has said, that problem is solved:</strong></p> <blockquote> <p>changing from /tmp/ to a different folder helped in minikube. Something to do with MacOs For some reason minikube doesn't like <code>/tmp/</code></p> </blockquote> <p><strong>An explanation of this problem:</strong> You cannot mount <code>/tmp...
<p>Pod lifecycle is managed by Kubelet in data plane.</p> <p>As per the definition: If the liveness probe fails, the kubelet kills the container</p> <p>Pod is just a container with dedicated network namespace &amp; IPC namespace with a sandbox container.</p> <hr /> <p>Say, if the Pod is single app container Pod, then u...
<p>The kubelet uses liveness probes to know when to restart a container (<strong>NOT</strong> the entire Pod). If the liveness probe fails, the kubelet kills the container, and then the container may be restarted, however it depends on its <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#resta...
<p>I have a role which has full privilege to access EKS, Ec2, IAM which is attached to an Ec2 Instance.</p> <p>I am trying to access my EKS cluster from this Ec2 Instance. I did add the Ec2 instance arn like below to the Trusted relationship of the role which the instance assumes as well. However, still I get the error...
<p>Community wiki answer for better visibility.</p> <p>The problem is solved by taking a good tip from the comment:</p> <blockquote> <p>Don't specify <code>role-arn</code> if you want it to use the instance profile.</p> </blockquote> <p>OP has confirmed:</p> <blockquote> <p>thanks @jordanm that helped</p> </blockquote>...
<p>I am trying to host my own Nextcloud server using Kubernetes.</p> <p>I want my Nextcloud server to be accessed from <code>http://localhost:32738/nextcloud</code> but every time I access that URL, it gets redirected to <code>http://localhost:32738/login</code> and gives me <code>404 Not Found</code>.</p> <p>If I repl...
<p>In your case there is a difference between the exposed URL in the backend service and the specified path in the Ingress rule. That's why you get an error.</p> <p>To avoid that you can use rewrite rule.</p> <p>Using that one your ingress paths will be rewritten to value you provide. This annotation <code>ingress.kube...
<p>I uses a Kubernetes application with a Service that has a single Endpoint. If using <code>curl</code> I retrieve it, I got something like this:</p> <pre><code>{ &quot;kind&quot;: &quot;Endpoints&quot;, &quot;apiVersion&quot;: &quot;v1&quot;, &quot;metadata&quot;: { ... &quot;subsets&quot;: [ { &q...
<p>After a lot of tries and errors, I found the solution below.</p> <p>A solution like this is used in Patroni (but there is written in Python) where the Service has one Endpoint that always references the master node. When a failover o switchover occurs the Patroni code update the Service Endpoint. A code like this ca...
<p>I am using a manually created Kubernetes Cluster (using <code>kubeadm</code>) deployed on AWS ec2 instances (manually created ec2 instances). I want to use AWS EBS volumes for Kubernetes persistent volume. How can I use AWS EBS volumes within Kubernetes cluster for persistent volumes?</p> <p>Cluster details:</p> <ul...
<p>Posted community wiki for better visibility with general solution as there are no further details / logs provided. Feel free to expand it.</p> <hr /> <p>The official supported way to mount <a href="https://aws.amazon.com/ebs/" rel="nofollow noreferrer">Amazon Elastic Block Store</a> as <a href="https://kubernetes.io...
<h2>Current Architecture</h2> <p>I have a microservice (Let's call it the publisher) which generates events for a particular resource. There's a web app which shows the updated list of the resource, but this view doesn't talk to the microservice directly. There's a view service in between which calls the publisher whe...
<p>There is no easy solution. First of all, in websocket pattern, the pod is responsible to send the event to the web app. And therefore to gather the correct backend events to the web app. In this design, the pod need to filter the correct messages to deliver.</p> <p>The most naive implementation will be to duplicate ...
<p>I am running this command in my mac terminal,want to submit my test spark job on to one of our k8s cluster:</p> <pre><code>ID_TOKEN=`kubectl config view --minify -o jsonpath='{.users[0].user.auth-provider.config.id-token}'` ./bin/spark-submit \ --master k8s://https://c2.us-south.containers.cloud.ibm.com:30326 ...
<p>I am not sure if you already figure it out the issue. Hope my input is still useful.</p> <p>There are two places which whill check against RBAC.</p> <p>First, when you execute the spark-submit, it will call k8s web api to create the driver pod. Later the driver pod will call k8s api to create executor pod.</p> <p>I ...
<p>We are using AKS 1.19.11 version and would like to know whether we could enable the configurable scaling behavior in AKS also as <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">Horizontal Pod Autoscaler</a>.</p> <p>If yes, the current hpa setting used is...
<p>If you ask specifically about <code>behavior</code> field, the answer is: <strong>no, it's not available in <code>apiVersion: autoscaling/v1</code></strong> and if you want to leverage it, you need to use <code>autoscaling/v2beta2</code>. It's clearly stated <a href="https://kubernetes.io/docs/tasks/run-application/...
<p>I have deployed mongodb as a StatefulSets on the K8S. It is not connecting, when I try to connect the DB using connection string URI(Ex: mongodb://mongo-0.mongo:27017,mongo-1.mongo:27017/cool_db), but it is connecting and getting the results when I use Endpoint IP Address. </p> <pre><code># kubectl get sts NAME ...
<p>Had the same issue in a spring java connection when I used the mongodb-community-operator. Solution was, don't use the aggregated String, just use the service. So, in your case, instead of using a concatinated String of the pods like this</p> <pre><code>mongodb://mongo-0.mongo:27017,mongo-1.mongo:27017/cool_db </cod...
<p>I recently evaluated Kubernetes with a simple test project and I was able to update image of StatefulSet with command like this:</p> <pre><code>kubectl set image statefulset/cloud-stateful-set cloud-stateful-container=ncccloud:v716 </code></pre> <p>I'm now trying to get our real system to work in Kubernetes and th...
<p>in my case imagePullPolicy was set to Always already:</p> <pre><code>kubectl patch statefulset web --type='json' -p='[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/template/spec/containers/0/image&quot;, &quot;value&quot;:&quot;gcr.io/google_containers/nginx-slim:0.8&quot;}]' </code></pre> <p>h...
<p>I have created an <code>Elasticsearch</code> resource using the below yaml manifest after installing the eck-operator as mentioned <a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html" rel="nofollow noreferrer">here</a>.</p> <pre><code>apiVersion: elasticsearch.k8s.elastic.co/v...
<p>The client includes an <a href="https://github.com/kubernetes-client/csharp/tree/master/examples/customResource" rel="nofollow noreferrer">example</a> of how to interact with custom resources.</p> <p>It will require you to define the classes described in the files <code>cResource.cs</code> and <code>CustomResourceDe...
<p><strong>Update #2:</strong> I have checked the health status of my instances within the auto scaling group - here the instances are titled as &quot;healthy&quot;. (Screenshot added)</p> <p>I followed <a href="https://docs.aws.amazon.com/de_de/elasticloadbalancing/latest/classic/ts-elb-healthcheck.html#ts-elb-health...
<p>Unfortunately, there is a known issue in <code>AWS</code></p> <p><a href="https://github.com/kubernetes/kubernetes/issues/80579" rel="nofollow noreferrer">externalTrafficPolicy: Local with Type: LoadBalancer AWS NLB health checks failing · Issue #80579 · kubernetes/kubernetes</a></p> <blockquote> <p>Closing this for...
<p>Do anyone know what's the libraries load order based on, in a single folder on Tomcat 8?</p> <p>Here is my situation:<br /> There is this customer java application deployed on tomcat that, for some reasons, has a class in multiple libraries in the same webapp-shared folder. I know it's wrong, everyone knows that, bu...
<p>The only ordering specified by the Servlet Specification is that classes in <code>/WEB-INF/classes</code> have precedence over <code>/WEB-INF/libs/*.jar</code>.</p> <p>In Tomcat 7 and earlier the order of libraries in the <code>libs</code> depended on the underlying filesystem, so that it would break when you move y...
<p>I'm new to Kubernetes and plan to use Google Kubernetes Engine. Hypothetically speaking, let's say I have a K8s cluster with 2 worker nodes. Each node would have its own pod housing the same application. This application will grab a file from some persistent volume and generate an output file that will be pushed bac...
<blockquote> <p>Do the pods inherently know NOT to grab the same file that one pod is already using?</p> </blockquote> <p>Pods are just processes. Two separate processes accessing files from a shared directory are going to run into conflicts unless they have some sort of coordination mechanism.</p> <h2>Option 1</h2> <p...
<p>I'm trying to code a bash function to get and decode a kubernetes secret's data in just one short command. My idea is to have something like <code>kgsecd -n &lt;namespace&gt; &lt;secret-name&gt; &lt;secret-data&gt;</code> that is just mapped to <code>kubectl get secret -n &lt;namespace&gt; &lt;secret-name&gt; -o &qu...
<p>If you are using <code>bash</code> try the following, only change is the way <code>kubectlParams</code> is assigned. Here, <code>kubectlParams</code> is assigned with 1st arg to penultimate(<code>$#-1</code>) arguments.</p> <p>Also, <code>&quot;${kubectlParams}&quot;</code> if quoted, then will be considered as a co...
<p>I am trying to access a helm value dynamically though another variable as I am utilizing the range functionality to create multiple deployments. Take for example this section of my deployment file</p> <pre><code>{{- range $teams := .Values.teams }} . . . ports: - containerPort: {{ .Values.deployment....
<p>Helm itself provides a number of functions for you to manipulate the value.</p> <p>Here is one way to handle the your use case with <code>get</code> function.</p> <pre><code>{{- $ := . -}} {{- range $teams := .Values.teams }} . . . ports: - containerPort: {{ (get $.Values.deployment.backend $teams.ta...
<p>I am new to Kubernetes and I am experimenting with some of these in my local development. Before I give my problem statement here is my environment and the state of my project.</p> <ol> <li>I have Windows 10 with WSL2 enable with Ubuntu running through VS Code.</li> <li>I have enabled the required plugins in VS Code...
<p>In &quot;It has required mapping like <code>5000:80</code> and <code>5000:443</code>&quot;, actually it should be <code>5001:443</code> (as the port 5001 is used to map to the https 443 port).</p> <p>Based on this error message</p> <blockquote> <p>&quot;nterop+Crypto+OpenSslCryptographicException: error:2006D080:BIO...
<p>I have a Rancher running inside a Kubernetes cluster. It is installed using helm chart. The Rancher web UI is exposed using an ingress.</p> <p>There is a DNS record for this ingress in an external DNS: rancher.myexample.com (this is just en example! DNS name)</p> <p>I have a wildcard TLS certificate that covers *.my...
<p>You can add the certificate from Resources &gt; Secrets &gt; Certificates. Click Add Certificate.</p> <p>You can check same path based on the version of the rancher you are using.</p> <p>Read more at : <a href="https://rancher.com/docs/rancher/v2.5/en/k8s-in-rancher/certificates/" rel="nofollow noreferrer">https://...
<p>I have a .Net Core Api that returns data from SQL and a respective pdf/document from Azure Blob container/storage. I am developing a Proof of Concept to host this Api in AKS (Azure Kubernetes). My prototype returns data successfully from SQL (on Linux). However, I am unable to pull the document/pdf from blob storage...
<p>You can use Blobfuse to access Blob storage from AKS.</p> <p>Blobfuse works by creating a virtual file system on a Linux host. Whenever a file on that system is requested, the driver will retrieve it from Blob Storage and put it in a temporary folder so the operations can be completed, then it writes the changed fil...
<pre><code>Warning FailedMount 23m (x55 over 3h) kubelet, ip-172-31-3-191.us-east-2.compute.internal Unable to attach or mount volumes: unmounted volumes=[mysql-persistent-storage], unattached volumes=[mysql-persistent-storage default-token-6vkr2]: timed out waiting for the condition Warning FailedMount 4m (x105 over 3...
<p>There are at least three possible solutions:</p> <ul> <li>check your <code>k8s</code> version; maybe you'll want to update it;</li> <li>install <code>NFS</code> on your infrastructure;</li> <li>fix <code>inbound</code> CIDR rule</li> </ul> <h1><code>k8s</code> version</h1> <p>There is a known issue: <a href="https:/...
<p>I've set up an nfs server that serves a RMW pv according to the example at <a href="https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs" rel="nofollow noreferrer">https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs</a></p> <p>This setup works fine for me in lots of production en...
<p>In case the pod gets kicked out of the node because the mount is too slow, you may see messages like that in logs.</p> <p>Kubelets even inform about this issue in logs.<br /> <strong>Sample log from Kubelets:</strong><br /> Setting volume ownership for /var/lib/kubelet/pods/c9987636-acbe-4653-8b8d- aa80fe423597/volu...
<p>I have a question regarding Kubernetes. In the non-container world, I have observed that a JVM with too less of RAM allocated will consume 100% CPU on all cores, because the garbage collector does not have enough memory and thus is run more often (I guess).</p> <p>In Kubernetes, I often see containers used now. Can ...
<p>A kubernetes pod usually runs an application as a regular container which is basically a regular process. It depends on the scheduler how to handle high load.</p> <p>Nevertheless you can limit the maximum resources that can be used and you should do that: For each container you can specify the resource limits (preve...
<p>My ingress.yml file is bellow</p> <pre><code>apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: example-ingress annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-body-size: &quot;0&quot; nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;600&quot; ...
<p>Try bellow</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example-ingress annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-body-size: &quot;0&quot; nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;600&quot; nginx.ingress.kuberne...
<p>I am running FPM and nginx as two containers in one pod. My app is working, I can access it but the browser do not render the CSS files. No errors in the console. My deployment file:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: test labels: app: test spec: replicas: 1 selector: ...
<p>In order to resolve your issue, please change <code>configMap</code> to its exact name as <code>nginx-configmap</code> and in your <em>configMap</em> nginx configuration file can be as the following:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: &quot;nginx-configmap&quot; data: nginx.conf: | ...
<p>Commands used:</p> <pre><code>git clone https://github.com/helm/charts.git </code></pre> <hr /> <pre><code>cd charts/stable/prometheus </code></pre> <hr /> <pre><code>helm install prometheus . --namespace monitoring --set rbac.create=true </code></pre> <p>After Running the 3rd command I got below error:</p> <p><a hr...
<p>On the <a href="https://github.com/helm/charts/tree/master/stable/prometheus#prometheus" rel="nofollow noreferrer">GitHub page</a> you can see that this repo it deprecated:</p> <blockquote> <p>DEPRECATED and moved to <a href="https://github.com/prometheus-community/helm-charts" rel="nofollow noreferrer">https://gith...
<p>I am using Docker Desktop version 3.6.0 which has Kubernetes 1.21.3.</p> <p>I am following this tutorial to get started on Istio</p> <p><a href="https://istio.io/latest/docs/setup/getting-started/" rel="nofollow noreferrer">https://istio.io/latest/docs/setup/getting-started/</a></p> <p>Istio is properly installed as...
<p>The CRDs for istio should be installed as part of the istioctl install process, I'd recommend re-running the install if you don't have them available.</p> <pre><code>&gt;&gt;&gt; ~/.istioctl/bin/istioctl install --set profile=demo -y ✔ Istio core installed ✔ Istiod installed ✔ Egress gateways installed ✔ Ingress gat...
<p>Is there a way to load any kernel module ("modprobe nfsd" in my case) automatically after starting/upgrading nodes or in GKE? We are running an NFS server pod on our kubernetes cluster and it dies after every GKE upgrade</p> <p>Tried both cos and ubuntu images, none of them seems to have nfsd loaded by default.</p...
<p>I faced the same issue, existing answer is correct, I want to expand it with working example of <code>nfs</code> pod within kubernetes cluster which has capabilities and libraries to load required modules.</p> <p>It has two important parts:</p> <ul> <li>privileged mode</li> <li>mounted <code>/lib/modules</code> dire...
<p>I have a python program that fetches the client IP using request.client.host headers and Fast API. This program is running on a kubernetes pod(ip-pod). I have another Gateway API implemented using KrakenD and this runs on another pod in kubernetes cluster. The Kubernetes yaml files for both(ip-pod and KrakenD) have ...
<p>You can use the no-op with krakenD which will forward request to the backend</p> <p><a href="https://www.krakend.io/docs/endpoints/no-op/" rel="nofollow noreferrer">https://www.krakend.io/docs/endpoints/no-op/</a></p> <p>you can check parameter forwarding config in your YAML of KrakenD also</p> <pre><code>&quot;head...
<p>I am trying to execute the <code>kubectl</code> command using python script but keep getting error. I have requirement to execute the <code>kubectl</code> command to create pod and check the <code>pod</code> log for any failure.</p> <p>What am I doing wrong here?</p> <pre><code>import subprocess command = 'kubectl ...
<p>You can execute <code>kubectl</code> commands with Python, but you can also use the <a href="https://github.com/kubernetes-client/python" rel="noreferrer">Python client</a> for the Kubernetes API.</p> <p>Below I will give examples for both options.</p> <h3>Executing kubectl commands with Python.</h3> <p>You can use ...
<p>My frontend runs on nginx, and I'm serving a bunch of <code>.chunk.js</code> files that are built from react.</p> <p>Every time I update my frontend, I rebuild the docker image and update the kubernetes deployment. However, <strong>some users might still be trying to fetch the old js files.</strong></p> <p>I would <...
<p>I have this issue as well, if you find a way to set it up on Google CDN please let me know.</p> <p>Here is my Workaround:</p> <ol> <li><p>Choose <code>Use origin settings based on Cache-Control headers</code></p> </li> <li><p>Since most browsers cache static JS assets, I reduce my <code>Cache-Control</code> header f...
<p>Whenever a job run fails I want to suspend cronjob so that no further jobs are started. Is their any possible way? k8s version: 1.10</p>
<p>you can configure it simply using <code>suspend: true</code></p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: my-job spec: suspend: true parallelism: 2 completions: 10 template: spec: containers: - name: my-container image: busybox command: [&quot;sleep&quot;, &...
<p>I'm trying to create an Istio ingress gateway (istio: 1.9.1, EKS: 1.18) with a duplicate <code>targetPort</code> like this:</p> <pre><code>apiVersion: install.istio.io/v1alpha1 kind: IstioOperator metadata: name: istio spec: components: ingressGateways: - name: ingressgateway k8s: ser...
<p>Had to use different targetPorts in the end to get this working</p>
<p>I created a private Docker registry POD in my Kubernetes cluster.</p> <p>Here are the relevant settings for the pod:</p> <pre><code>$ kubectl get pods NAME READY STATUS RESTARTS AGE private-repository-k8s-686564966d-8grr8 1/1 Running 2 (7h10m ago) 9d $ kube...
<p>First, I found the CN (Common Name) was not setup property in the certificate (reference: <a href="https://github.com/docker/for-linux/issues/248" rel="nofollow noreferrer">https://github.com/docker/for-linux/issues/248</a>). Once I regenerated the certificate I hit this issue:</p> <pre><code>$ docker push k8s-mast...
<p>I'm working on an umbrella chart which has several child charts. On the top level, I have a file values-ext.yaml which contains some values which are used in the child charts.</p> <pre><code>sql: common: host: &lt;SQL Server host&gt; user: &lt;SQL user&gt; pwd: &lt;SQL password&gt; </code></pre> <p>The...
<p>When the child charts are rendered, their <code>.Values</code> are <a href="https://docs.helm.sh/docs/topics/charts/#scope-dependencies-and-values" rel="nofollow noreferrer">a subset of the parent chart values</a>. Using <code>$.Values</code> to &quot;escape&quot; the current scope doesn't affect this at all. So w...
<p>we have a basic AKS cluster setup and we need to whitelist this AKS outbound ipadress in one of our services, i scanned the AKS cluster setting in Azure portal, i was not able to find any outbound IpAddress.</p> <p>how do we get the outboud IP ?</p> <p>Thanks -Nen</p>
<p>If you are using an AKS cluster with a <strong>Standard SKU Load Balancer</strong> i.e.</p> <pre><code>$ az aks show -g $RG -n akstest --query networkProfile.loadBalancerSku -o tsv Standard </code></pre> <p>and the <code>outboundType</code> is set to <code>loadBalancer</code> i.e.</p> <pre><code>$ az aks show -g $RG...
<p>I have a similar issue like <a href="https://stackoverflow.com/questions/66772611/kubernetes-ingress-nginx-controller-is-not-found">Kubernetes Ingress Nginx Controller is Not Found</a>.</p> <p>I'm trying to deploy project for local. I have 404 for backend <a href="http://posts.com/posts" rel="nofollow noreferrer">ht...
<p>I solved my problem. Needed to stop the local apache web server.</p>
<p>I have an on-premise kubernetes cluster v1.22.1 (1 master &amp; 2 worker nodes) and wanted to run jenkins slave agents on this kubernetes cluster using kubernetes plugin on jenkins. Jenkins is currently hosted outside of K8s cluster, running 2.289.3. For Kubernetes credentials in Jenkins Cloud, I have created new s...
<p>I understand that rootCAConfigMap publishes the kube-root-ca.crt in each namespace for default service account. Starting from kubernetes version 1.22, RootCAConfigMap is set to true by default and hence when creating pods, this certificate for default account is being used. Please find more info on bound service acc...
<p>I have a requirement to rewrite all URLs to lowercase.</p> <p>E.g. <code>test.com/CHILD</code> to <code>test.com/child</code></p> <p>Frontend application is developed on docker on azure kubernetes services. Ingress is controlled on nginx ingress controller.</p>
<p>You can rewrite URLs using Lua as described in the <a href="https://www.rewriteguide.com/nginx-enforce-lower-case-urls/" rel="nofollow noreferrer">Enforce Lower Case URLs (NGINX)</a> article.</p> <p>All we need to do is add the following configuration block to nginx:</p> <pre><code>location ~ [A-Z] { rewrite_by_...
<p>I have built a structure for a microservice app. auth is the first Dockerfile I have made and as far as I can tell is not building.</p> <pre><code>C:\Users\geeks\Desktop\NorthernHerpGeckoSales\NorthernHerpGeckoSales\auth&gt;docker build -t giantgecko/auth . [+] Building 0.1s (9/9) FINISHED =&gt; [internal] load bui...
<p>I was able to resolve this by changing my Dockerfile to:</p> <pre class="lang-sh prettyprint-override"><code>FROM node:alpine WORKDIR /app COPY package.json . RUN npm install COPY . . CMD [&quot;npm&quot;, &quot;start&quot;] </code></pre> <p>The fix came after I changed <code>COPY</code> from the absolute path to ...
<p>I am developing an application which uses Pod Identity to connect to Azure Sql Database.</p> <p>After deploying it on Azure Kubernetes Service (<strong>AKS</strong>), POD(application) connects to Azure Sql using PodIdentity (Managed Identity).</p> <p><strong>How can I assign the same identity to POD while running on...
<p>You can deploy <a href="https://azure.github.io/aad-pod-identity/" rel="nofollow noreferrer"><code>aad-pod-identity</code></a> on your local cluster using <a href="https://azure.github.io/aad-pod-identity/docs/getting-started/installation/#helm" rel="nofollow noreferrer">helm</a> or the <a href="https://azure.github...
<p>I am using <strong>DirectXMan12/k8s-prometheus-adapte</strong> to push the external metric from Prometheus to Kubernetes.</p> <p>After pushing the external metric how can I verify the data is k8s?</p> <p>When I hit <strong>kubectl get --raw /apis/external.metrics.k8s.io/v1beta1 | jq</strong> I got the following re...
<p>The metric is namespaced, so you will need to add the namespace into the URL. Contrary to what the other answer suggests, I believe you don't need to include pods into the URL. This is an external metric. External metrics are not associated to any kubernetes object, so only the namespace should suffice:</p> <ul> <li...
<p>Let's say I've a deployment. For some reason it's not responding after sometime. Is there any way to tell Kubernetes to rollback to previous version automatically on failure?</p>
<p>You mentioned that:</p> <blockquote> <p>I've a deployment. For some reason it's not responding after sometime.</p> </blockquote> <p>In this case, you can use <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="noreferrer">liveness and readiness</a> pro...
<p>I have 15 pods that run different PHP applications in a Kubernetes cluster, each application must include a PHP library updated regularly, it's always the same lib/version for all pods. What is the best approach to share a library with all pods?</p> <p>I tried to find out a solution but my doubts persist. What I tho...
<p>Always make your images be self-contained. Don't build an image that can't run unless something outside the container space is present, or try to use a volume to share code. (That is, pick your first option over the second.)</p> <hr /> <p>Say you have your shared library, and you have your 15 applications A throug...
<p>I'm aiming to mount a persistent volume onto a postgres stateful set. To test persistence, I:</p> <ul> <li>deploy the stateful set, with mounted volume (<code>kubectl apply -f postgres.yml</code>)</li> <li>create a table and insert a row</li> <li>rescale the stateful set to 0, then delete it (<code>kubectl scale st...
<p>Issue could be possible due to</p> <pre><code>volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data subPath: pgdata </code></pre> <p>however this is what i am using for postgres</p> <p><a href="https://github.com/harsh4870/Keycloack-postgres-kubernetes-deployment/blob/main/postgres.yaml" rel="n...
<p>In Kubernetes (using a filter) we can limit the output from k8s on interesting resource and I wonder whether it is possible to list top 5 latest created pods using only filter.</p> <p>The current example mostly list all pods and pipe to another unix (<code>head</code> command)</p> <pre><code>kubectl get pods --sort-...
<p>There are several aspects which prevent you to solve this question using only <code>filter</code>:</p> <ol> <li><p><code>Filter</code> itself:</p> <blockquote> <p>Field selectors are essentially resource filters. By default, no selectors/filters are applied, meaning that all resources of the specified type are selec...
<p>I was trying to use the netshoot image with Nginx server image on the same pod.</p> <p>If I do not include sleep argument to netshoot container,</p> <pre><code>args: - sleep - '9999999999999999999' </code></pre> <p>the pod status always becomes CrashLoopBackOff. I did not figure out why I have to put...
<p>Containers are a wrapper around a command, and they run until that command exits. The default command for netshoot is <code>zsh</code>. Like other shells, they run until they reach an exit command, a signal interrupts them, or the input they process returns an EOF. Without any stdin input defined, a container will r...
<p>I want to run two containers on a single pod.</p> <p><code>container1</code> is a test that tries to connect to a SQL Server Database that runs on <code>container2</code>.</p> <p>How can I make sure that the sql container (<code>container2</code>) will run and be ready before <code>container1</code> starts?</p> <p><...
<p>In order to make sure that <code>container1</code> will start only after <code>container2</code>'s SQL Server is up the only way I found is to use <code>postStart</code> container's lifecycle event. <code>postStart</code> triggered after after the container is create, it is true that there is no guarantee, that the...
<p>Assuming that there is only one admission controller Pod running, and the admission controller has a webhook that will be triggered by Pod deletion events.</p> <p><strong>Example Scenario</strong></p> <p>There are 2 Pods (Pod A and Pod B) within a namespace. 2 different users (Alice and Bob) perform Pod deletion at ...
<p>Since in <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/#options" rel="nofollow noreferrer">kube-api options</a> we can see <code>--max-mutating-requests-inflight</code> and <code>--max-requests-inflight</code> flags, which are used to determine the server's total conc...
<p>The <code>help</code> of the <code>kubectl port-forward</code> says <code>The forwarding session ends when the selected pod terminates, and rerun of the command is needed to resume forwarding.</code></p> <p>Although it does not auto-reconnect when the pod terminates the command does not return either and just hangs ...
<p>Based on the information, described on <a href="https://github.com/kubernetes/kubernetes/issues/67059" rel="nofollow noreferrer">Kubernetes Issues page on GitHub</a>, I can suppose that it is a normal behavior for your case: port-forward connection cannot be canceled on pod deletion, since there is no a connection m...
<p>My airflow service runs as a kubernetes deployment, and has two containers, one for the <code>webserver</code> and one for the <code>scheduler</code>. I'm running a task using a KubernetesPodOperator, with <code>in_cluster=True</code> parameters, and it runs well, I can even <code>kubectl logs pod-name</code> and al...
<p>Creating a Persistent Volume and storing logs on them might help.</p> <pre><code>-- kind: PersistentVolume apiVersion: v1 metadata: name: testlog-volume spec: accessModes: - ReadWriteMany capacity: storage: 2Gi hostPath: path: /opt/airflow/logs/ storageClassName: standard --- kind: PersistentVo...
<p>I have this mixed cluster which shows all the nodes as Ready (both Windows &amp; Linux ones). However, only the Linux nodes have aws-node &amp; kube-proxy pods. I RDPed into a Windows node and can see a kube-proxy service.</p> <p>My question remains: do the Windows nodes need aws-node &amp; kube-proxy pods in the ku...
<p><code>kube-proxy</code> pods are part of default installation of Kubernetes. They are automaticaly created, and are needed on both Linux and Windows.</p> <blockquote> <p>kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.</p> <p>kube-proxy mainta...
<p>I have three nodes and have pod replica 9. When I am trying to deploy, Pods are unevenly scheduled on nodes.</p> <p>How can I make sure that Pods are evenly scheduled on three nodes?</p>
<p>You should configure <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/" rel="nofollow noreferrer">topology spread constraints</a>. These control how pods are scheduled across your Kubernetes cluster based on regions, zones, nodes.</p> <p>For spreading across nodes, you coul...
<p>I'm confused with the relationship between two parameters: <code>requests</code> and <code>cpu.shares</code> of the cgroup which is updated once the Pod is deployed. According the readings I've done so far, <code>cpu.shares</code> reflects some kind of priority when trying to get the chance to consume the CPU. And i...
<p>Answering your questions from the main question and comments:</p> <blockquote> <p>So my question why kubernetes considers the <code>request</code> value of the CPU as an absolute value when scheduling?</p> </blockquote> <blockquote> <p>To my knowledge, there's no such thing called giving such amounts of CPUs (1CPU, ...
<p>I want to use vars without ConfigMaps or Secrets. Declaring a value would be sufficient for me. But I couldn't see any documentation regarding vars attributes or how I can use. Do you know any docs about this? Thanks!</p> <pre><code>vars: - name: ROUTE_HOST objref: kind: ConfigMap name: template-va...
<p>Summarizing Jonas's comments:</p> <blockquote> <p>WARNING: There are plans to deprecate vars. For existing users of vars, we recommend migration to <a href="https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/replacements/" rel="nofollow noreferrer">replacements</a> as early as possible. There is a...
<p>I am not sure if the issue is related to promtail (helm chart used) or to helm itself.</p> <p>I want to update the default host value for loki chart to a local host used on kubernetes, so I tried with this:</p> <pre><code>helm upgrade --install --namespace loki promtail grafana/promtail --set client.url=http://loki:...
<p>I don't think <code>client.url</code> is a value in the helm chart, but rather one inside a config file that your application is using.</p> <p>Try setting <a href="https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml#L223-L239" rel="nofollow noreferrer"><code>config.lokiAddress</code></a>:</p...
<p>In my scenario user has access to four namespaces only, he will switch between namespaces using contexts below. How can I give him access to CRD's along with his exiting access to four namespaces.</p> <pre><code>CURRENT NAME CLUSTER AUTHINFO NAMESPACE * dev-cr...
<p>You need to create <a href="https://v1-18.docs.kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example" rel="nofollow noreferrer">Role</a> and <a href="https://v1-20.docs.kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-example" rel="nofollow noreferrer">RoleBinding</a> for each service a...
<p>How to <em>list all</em> certificates &amp; make a <em>describe</em> in the particular namespaces using <a href="https://github.com/kubernetes-client/python/tree/release-18.0" rel="nofollow noreferrer">kubernetes python cli</a>?</p> <pre><code># list certificates kubectl get certificates -n my-namespace # describe ...
<p>Kubernetes by default doesn't have a kind <code>certificate</code>, you must first install <a href="https://cert-manager.io/docs/" rel="nofollow noreferrer">cert-manager's</a> <code>CustomResourceDefinition</code>.</p> <p>Considering the above means that in Kuberentes Python client we must use <a href="https://githu...
<p>I'm trying to create an Istio ingress gateway (istio: 1.9.1, EKS: 1.18) with a duplicate <code>targetPort</code> like this:</p> <pre><code>apiVersion: install.istio.io/v1alpha1 kind: IstioOperator metadata: name: istio spec: components: ingressGateways: - name: ingressgateway k8s: ser...
<p>Until the istio 1.8 version, this type of configuration worked (although with initial problems) - <a href="https://github.com/kubernetes/kubernetes/issues/53526" rel="nofollow noreferrer">github #53526</a>.</p> <p>As of version 1.9 an error is generated and you can no longer use two of the same ports in one definiti...
<p>In my umbrella Helm chart, I defined a dependency to Redis:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v2 appVersion: &quot;1.0&quot; description: A Helm chart for Kubernetes name: my-project version: 0.1.0 dependencies: - name: redis version: ~6.2.x repository: https://charts.bitna...
<p>K8s version <strong>1.21</strong> have deployment latest API</p> <p>Simple ref : <a href="https://stackoverflow.com/a/66164857/5525824">https://stackoverflow.com/a/66164857/5525824</a></p> <p>While the chart you are using the Older API you might need to some changes or use the latest chart for installation.</p> <p>T...
<p>When I'm learning kubernetes with book <em>KubernetesInAction</em> Ch.09 and make some pratice.</p> <hr /> <p>I use <code>kubectl rolling-update kubia-v1 kubia-v2 --image=luksa/kubia:v2</code></p> <p>and he tell me <code>Error: unknown command &quot;rolling-update&quot; for &quot;kubectl&quot;</code></p> <p>I find i...
<p>The reason is that in production, you cannot guarantee the network is always stable. If the network lost, you'd end up in a immediate state where different version of pods running together.</p> <p>Another important thing is that kubernetes is designed for you telling kubernetes the final status and it help you do it...
<p>I'm trying to adapt my Spring boot application to k8s environment and want to use ConfigMaps as property sources. I faced that if I'm using</p> <pre><code> kubernetes: config: sources: - name: application-config </code></pre> <p>for application with name <code>appName</code> then a...
<p>After some debugging through ConfigMapPropertySource achieved this by</p> <pre><code> kubernetes: config: sources: - name: application-config - name: @project.artifactId@ name: @project.artifactId@ </code></pre> <p>Now it loads <code>application-config</code>, <code>appli...
<p>Below is an example <code>IngressRoute</code>.</p> <p>I would like to have something like this where the first part of the domain would map to a Kubernetes service without having to statically define the service name.</p> <p>service1.api.test.com -&gt; service1</p> <p>service2.api.test.com -&gt; service1</p> <pre><c...
<p>No it's not possible. Because even if you are able to match the host regular expression it will not know under the hood which service the request needs to go to.</p> <p>So you will need create two separate matches for different services in the same ingressRoute</p> <pre class="lang-yaml prettyprint-override"><code>a...
<p>I'm trying to deploy vernemq on kubernetes and want to access it with subdomain with ssl but ssl should be terminated before request go to vernemq on port 1883.</p>
<p>create file <code>haproxy-ingress-values.yaml</code> with following content</p> <pre><code>controller: tcp: &quot;1883&quot;: &quot;default/vernemq:1883:::default/mqtt-tls&quot; </code></pre> <p><code>default/vernemq:1883</code> is service of <code>vernemq</code> with port 1883 and <code>default/mqtt-tls</code...
<ul> <li>My service (tomcat/java) is running on a kubernetes cluster (AKS).</li> <li>I would like to write the log files (tomcat access logs, application logs with logback) to an AzureFile volume.</li> <li>I do not want to write the access logs to the stdout, because I do not want to mix the access logs with the appli...
<p>If you want to send your access logs to Elastic Search, you just need to extend the <a href="https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/catalina/valves/AbstractAccessLogValve.html" rel="nofollow noreferrer"><code>AbstractAccessLogValve</code></a> and implement the <code>log</code> method.</p> <p>The <co...
<p>I am creating an <code>EKS-Anywhere</code> local cluster by following these steps: <a href="https://anywhere.eks.amazonaws.com/docs/getting-started/local-environment/" rel="nofollow noreferrer">Create local cluster | EKS Anywhere</a></p> <p>Getting the following error after executing this command.</p> <p><code>eksct...
<h1>Upgrade your <code>cert-manager</code></h1> <p>There is known issue: <a href="https://github.com/kubernetes-sigs/cluster-api/issues/3836" rel="nofollow noreferrer">clusterctl init fails when existing cert-manager runs 1.0+ · Issue #3836 · kubernetes-sigs/cluster-api</a></p> <p>And there is a solution: <a href="http...
<p>We are getting warnings in our production logs for .Net Core Web API services that are running in Kubernetes.</p> <blockquote> <p>Storing keys in a directory '{path}' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.&quot;,&quot;@l&quot;:&quot;Warning...
<p>After analysis how our applications are using protected data(authentication cookies, CSRF tokens etc) our team decided , that “Protected data will be unavailable when container is destroyed.&quot; is just a warning and would have no customer impact, so we ignore it.</p> <p>But <a href="https://www.howtogeek.com/6931...
<p>I created a new kubernetes cluster (GKE) and installed an application using helm.</p> <p>I was able to locate the gke-node on which my pod was deployed using the command, <code>kubectl get pod -n namespace -o wide</code></p> <p>Post that i logged on to the kubernetes-node, however on this node i am unable to view th...
<p>Starting with GKE node version 1.19, the default node image for Linux nodes is the Container-Optimized OS with containerd (cos_containerd) variant instead of the Container-Optimized OS with Docker (cos) variant.</p> <p>Now instead of <code>docker</code> commands you can use <code>crictl</code>. Refer to the <a href=...
<p>We need to use the <strong>proxy protocol V2</strong> on GCP and we were not able to find the way to do it. Any idea if its supported? if yes, how we can do it?</p> <p>Something similar to this configuration on AWS <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.h...
<p>Google Cloud TCP Proxy Load Balancers support <strong>Proxy Protocol Version 1</strong>.</p> <p>Version 2 is not supported at this time.</p> <p>Refer to the documentation for supported versions in this command:</p> <p><a href="https://cloud.google.com/sdk/gcloud/reference/compute/target-tcp-proxies/create" rel="nofo...
<p>For the needs of a project i have created 2 Kubernetes clusters on GKE.</p> <p><strong>Cluster 1</strong>: 10 containers in <em>one Pod</em></p> <p><strong>Cluster 2</strong>: 10 containers in 10 <em>different Pods</em></p> <p>All containers are connected and constitute an application.</p> <p>What i would like to do...
<p>Not sure you mean it when you say this</p> <blockquote> <p>Cluster 1: 10 containers in one Pod</p> <p>Cluster 2: 10 containers in different Pods</p> </blockquote> <p>At very first you are not following best practice, ideally, you should be keeping the single container in a single POD</p> <p>Running 10 containers in ...
<p>I get this error when trying to get ALB logs:</p> <pre><code>root@b75651fde30e:/apps/tekton/deployment# kubectl logs -f ingress/tekton-dashboard-alb-dev error: cannot get the logs from *v1.Ingress: selector for *v1.Ingress not implemented </code></pre> <p>The load balancer YAML:</p> <pre><code>apiVersion: networking...
<p><strong>The error you received means that the logs for your object are not implemented. It looks like you're trying to get logs from the wrong place.</strong></p> <p>I am not able to reproduce your problem on AWS, but I tried to do it on GCP and the situation was very similar. You cannot get logs from <code>ingress/...
<p>I'm developing <a href="https://github.com/msrumon/microservice-architecture" rel="nofollow noreferrer">this dummy project</a> and trying to make it work locally via <code>Skaffold</code>.</p> <p>There are 3 services in my project (running on ports <code>3001</code>, <code>3002</code> and <code>3003</code> respectiv...
<p>The main reason of issues like this one is that you are setting <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/#if-you-specify-a-cpu-limit-but-do-not-specify-a-cpu-request" rel="nofollow noreferrer">only CPU limit (without setting CPU request) so Kubernetes automatically assign...
<p>For example, I have an internal docker registry for my kube cluster, hosted on <code>internal-docker-registry.io:5000</code>.</p> <p>When the pod from the kube cluster pulling image <code>busybox</code>, I don't want to pull from docker hub <code>docker.io</code>. But instead I want it to pull from <code>internal-do...
<p>I have posted community wiki answer to summarize the topic:</p> <p>As <a href="https://stackoverflow.com/users/10008173/david-maze" title="76,777 reputation">David Maze</a> well mentioned in the comment:</p> <blockquote> <p><strong>there is no &quot;image registry search list&quot;</strong>; an image name without a ...
<p>I have microk8s v1.22.2 running on Ubuntu 20.04.3 LTS.</p> <p>Output from <code>/etc/hosts</code>:</p> <pre><code>127.0.0.1 localhost 127.0.1.1 main </code></pre> <p>Excerpt from <code>microk8s status</code>:</p> <pre><code>addons: enabled: dashboard # The Kubernetes dashboard ha-cluster ...
<p>To fix the error <code>error: unable to recognize &quot;ingress.yaml&quot;: no matches for kind &quot;Ingress&quot; in version &quot;extensions/v1beta1</code> you need to set <code>apiVersion</code> to the <code> networking.k8s.io/v1</code>. From the <a href="https://kubernetes.io/blog/2019/07/18/api-deprecations-in...
<p>Ever since I upgraded my EKS cluster to <code>v1.21</code>, I get the following error when triggering Cronjobs manually:</p> <pre><code>➜ ~ kubectl create job --from=cronjob/elt-dim-customer-new test-1 -n dwh-dev error: from must be an existing cronjob: no kind &quot;CronJob&quot; is registered for version &quot;ba...
<p>Please upgrade your kubectl to 1.21 as well.</p>
<p>i have a question about kubernetes networking.</p> <p>My working senario:</p> <ul> <li>I have a Jenkins container my localhost and this container up and running. Inside Jenkins, i have a job. Access jenkins , i use &quot;http://localhost:8080&quot; url. (jenkins is not runing inside kubernetes)</li> <li>My flask ap...
<p>I create an endpoint.yml file and add in this file below commands, this solve my problem:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 kind: Endpoints metadata: name: jenkins-server subsets: - addresses: - ip: my-ps-ip ports: - port: 8080 </code></pre> <p>Then, I c...
<p>How can I schedule a Kubernetes <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">cron job</a> to run at a specific time and just once?</p> <p>(Or alternatively, a Kubernetes job which is not scheduled to run right away, but delayed for some amount of time – wha...
<p>You can always put specific minute, hour, day, month in the schedule cron expression, for example 12:15am on 25th of December:</p> <pre><code>apiVersion: batch/v1 kind: CronJob metadata: name: hello spec: schedule: &quot;15 0 25 12 *&quot; jobTemplate: spec: template: spec: containe...
<p>I have a Raspberry Pi Cluster consisting of 1-Master 20-Nodes:</p> <ul> <li>192.168.0.92 (Master)</li> <li>192.168.0.112 (Node w/ USB Drive)</li> </ul> <p>I mounted a USB drive to <code>/media/hdd</code> &amp; set a label <code>- purpose=volume</code> to it.</p> <p>Using the following I was able to setup a NFS serve...
<p>When seeing <strong><code>mount.nfs: requested NFS version or transport protocol is not supported</code></strong> error there are three main reasons:</p> <blockquote> <ol> <li>NFS services are not running on NFS server</li> <li>NFS utils not installed on the client</li> <li>NFS service hung on NFS server</li> </ol> ...
<p>I'm trying to spread my <code>ingress-nginx-controller</code> pods such that:</p> <ul> <li>Each availability zone has the same # of pods (+- 1).</li> <li>Pods prefer Nodes that currently run the least pods.</li> </ul> <p>Following other questions here, I have set up Pod Topology Spread Constraints in my pod deployme...
<p><code>kubectl rollout restart</code> spins up new pods and then terminate old pods <strong>after</strong> all the new pods are up and running.</p> <p>From the pod topology spread constraints <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#known-limitations" rel="nofollow ...
<p>Trying to run a pod based on an image with this <code>Dockerfile</code>:</p> <pre><code>... ENTRYPOINT [ &quot;./mybashscript&quot;, &quot;;&quot;, &quot;flask&quot; ] CMD [ &quot;run&quot; ] </code></pre> <p>I would be expecting the full command to be <code>./mybashscript; flask run</code>. However, in this exampl...
<p>In both cases you show here, you use the JSON-array <a href="https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example" rel="nofollow noreferrer">exec form</a> for <code>ENTRYPOINT</code> and <code>CMD</code>. This means no shell is run, except in the second case where you run it explicitly. T...
<p>My container code needs to know in which environment it is running on GKE, more specifically what cluster and project. In standard kubernetes, this could be retrieved from current-context value (<code>gke_&lt;project&gt;_&lt;cluster&gt;</code>).</p> <p>Kubernetes has a downward api that can push pod info to containe...
<p>You can query the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#gke_mds" rel="nofollow noreferrer">GKE metadata server</a> from within your code. In your case, you'd want to query the <code>/computeMetadata/v1/instance/attributes/cluster-name</code> and <code>/computeMetadata/v1/...
<p>What is the different between</p> <pre><code>--dry-run --dry-run=client --dry-run=server </code></pre> <p>opportunities?</p> <p>And is there any purpose other than create a definition file?</p> <p>Thank you for your time.</p>
<p>Passage from the <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands" rel="nofollow noreferrer">official Kubernetes <code>kubectl</code> references</a>:</p> <blockquote> <p>[--dry-run] Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client strategy, only print the...
<p>First I installed lens on my mac, when I try to shell one of the pods, there's message said that I don't have any kubectl installed, so I install kubectl and it works properly.</p> <p>Now I try to change configmaps but I get an error</p> <blockquote> <p>kubectl/1.18.20/kubectl not found</p> </blockquote> <p>When I c...
<p>You can set kubectl path at File -&gt; Preference -&gt; Kubernetes -&gt; PATH TO KUBECTL BINARY. Or you can also check &quot;Download kubectl binaries matching the Kubernetes cluster version&quot;, this way Lens will use the same version as your target cluster.</p> <p>By the way, you should use latest v5.2.5.</p>
<p>When I run skaffold this is the error I get. Skaffold generates tags, checks the cache, starts the deploy then it cleans up.</p> <pre><code>- stderr: &quot;error: error parsing C: ~\k8s\\ingress-srv.yaml: error converting YAML to JSON: yaml: line 20: mapping values are not allowed in this context \n&quot; - cause: ...
<p>Take a closer look at your Ingress definition file (starting from line 19):</p> <pre class="lang-yaml prettyprint-override"><code>- path: /?(.*) pathType: Prefix backend: service: name: front-end-srv port: number: 3000 </code></pre> <p>You have unnecessary indents from the lin...
<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...
<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...
<p>In the documentation <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/" rel="noreferrer">here</a> it is stated that deleting a pod is a voluntary disruption that <code>PodDisruptionBudget</code> should protect against.</p> <p>I have created a simple test:</p> <pre class="lang-yaml prettyprint-...
<p>The link in your question refer to static pod managed by kubelet, guess you want this <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/" rel="nofollow noreferrer">link</a> instead.</p> <p><code>...if I run apply and then delete pod test, there is no trouble deleting this pod</code></p> <p>PDB ...
<p>I am trying to call k8s api in one k8s pod. But hit the following permission issue:</p> <pre><code>User &quot;system:serviceaccount:default:flink&quot; cannot list resource &quot;nodes&quot; in API group &quot;&quot; at the cluster scope. </code></pre> <p>In my yaml file, I already have specified the <code>Role</cod...
<p>You are deploying zeppelin-server on Kubernetes, right? Your yaml file with the service account looks good as I suppose, however to be sure that this works, you should follow the next steps:</p> <ul> <li><code>kubectl get clusterrole</code></li> </ul> <p>and you should get <code>zeppelin-server-role</code> role.</p>...
<p>I have deployed on prod 10+ java/js microservices in GKE, all is good, none use external volumes, its a simple process in pipeline of generating new image, pushing to container registry and when upgrading the app to new version, just deploy new deployment with the new image and pods using rolling update are upgraded...
<p>I would probably generate an image with the compiled code, and possibly a post-dump image, then rely on Kubernetes to restart pods in your Deployment or StatefulSet in a sensible way. If necessary (and web-based), use Readiness checks to gate what pods will be receiving requests.</p> <p>As an aside, the projected co...
<p>An existing nginx ingress named <code>nginx-proxy</code> running on the K8 cluster.</p> <p>Now, there is a requirement from the Dev team to disable TLS 1.0, 1.1 support.</p> <p>Upon searching, I could see <a href="https://kubernetes.github.io/ingress-nginx/user-guide/tls/" rel="nofollow noreferrer">this solution</a>...
<blockquote> <p>To provide the most secure baseline configuration possible,</p> <p>nginx-ingress defaults to using TLS 1.2 and 1.3 only, with a <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#ssl-ciphers" rel="nofollow noreferrer">secure set of TLS ciphers</a>. <sup>[<a hre...
<p>I have a dotnet application, which is not working as non-root user even though I am exposing it on port 5000, greater then the 1024 requirement. </p> <pre><code>WORKDIR /app EXPOSE 5000 COPY app $local_artifact_path RUN chown www-data:www-data /app /app/* RUN chmod 777 /app USER www-data ENTRYPOINT dotnet $app_e...
<p>In my case the <code>ASPNETCORE_URLS</code> setting in environment variables or <code>appsettings.json</code> was set to <code>http://+:80</code>.</p> <p>Changing it to <code>http://+:5000</code> worked. Make sure you change your Docker port bindings as well, or load balancer settings if using AWS.</p>
<p>I uninstalled nginx-ingress from my AKS cluster and almost all the resources got deleted my main service which is a type of LoadBalancer is still there I tried deleting manually by using the delete command but still, it's not deleting. I don't know what is the issue please help me out with this.</p> <p>Thanks in adv...
<p>It may happen due to <code>service.kubernetes.io/load-balancer-cleanup</code> finalizer.</p> <p>Check <a href="https://stackoverflow.com/questions/66067108/azure-k8s-not-able-to-delete-load-balancer-service">Azure-k8s: Not able to delete Load Balancer service?</a>, it can happen LB type service stuck in such way.</p...
<p>To define a VPC Link into API Gateway we have to declare an NLB in eks (LoadBalancer service) to access the pod in the VPC.</p> <p>When we define ingress resource, we can group them into one ALB with the annotation <code>alb.ingress.kubernetes.io/group.name</code></p> <p>It seems not possible to do the same with mul...
<p>Quick answer: Not possible as of today</p> <p>AWS LB ingress controller supports ALB and NLB, but keep in mind that the ALB ingress controller:</p> <ul> <li>watches the <code>Ingress</code> objects with <code>alb.ingress.kubernetes.io/*</code> annotations for ALB</li> <li>also watches <code>Service</code> objects wi...
<p>An existing nginx ingress named <code>nginx-proxy</code> running on the K8 cluster.</p> <p>Now, there is a requirement from the Dev team to disable TLS 1.0, 1.1 support.</p> <p>Upon searching, I could see <a href="https://kubernetes.github.io/ingress-nginx/user-guide/tls/" rel="nofollow noreferrer">this solution</a>...
<p>You can follow this official document or disabling the TLS 1.0</p> <pre><code>kind: ConfigMap apiVersion: v1 metadata: name: nginx-config data: ssl-ciphers: &quot;ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDH...
<p>One of the pods in my local cluster can't be started because I get <code>Unable to attach or mount volumes: unmounted volumes=[nats-data-volume], unattached volumes=[nats-data-volume nats-initdb-volume kube-api-access-5b5cz]: timed out waiting for the condition</code> error.</p> <pre><code>$ kubectl get pods NAME ...
<p><code>...if I remove nats-data-volume and keep nats-initdb-volume, it's started successfully.</code></p> <p>This PVC cannot be mounted twice, that's where the condition cannot be met.</p> <p>Looking at your spec, it seems you don't mind which worker node will run your postgress pod. In this case you don't need PV/PV...
<p>I've done this a dozen times before but this time, I cannot seem to connect to my web server using HTTPS. I created an <code>AWS EKS</code> cluster using <code>eksctl</code>. I deployed my deployments and services using <code>kubectl</code>. I have service URLs which are resolving on port <code>80</code>.</p> <p>I t...
<p>Since your cluster works and accepts traffic, then the most probable reason is that <code>Encription mode</code> is enabled in yours Cloudflare config.</p> <p>And, according to your post, you are going to disable <code>https</code> at all on the origin side:</p> <blockquote> <p>The thing that confuses me is I though...
<p>I have a jenkins service deployed in EKS v 1.16 using helm chart. The PV and PVC had been accidentally deleted so I have recreated the PV and PVC as follows:</p> <p>Pv.yaml</p> <pre><code>apiVersion: v1 kind: PersistentVolume metadata: name: jenkins-vol spec: accessModes: - ReadWriteOnce awsElasticBlockStore...
<p>Add a nodeSelector to your deployment file, which will match it to a node in the needed availability zone (in your case us-east-2b):</p> <pre><code> nodeSelector: topology.kubernetes.io/zone: us-east-2b </code></pre>
<p>So, I'm trying to install a chart with helm3 to kubernetes cluster(EKS). I have a terraform configuration bellow. The actual cluster is active and visible</p> <pre><code>variable "aws_access_key" {} variable "aws_secret_key" {} locals { cluster_name = "some-my-cluster" } provider "aws" { region = "eu-central-...
<p>The solution to this problem has to do with the kubectl provider. The only workaround that I could find that works is to replace the token request with the one I put below</p> <pre><code>provider &quot;kubernetes&quot; { version = &quot;~&gt;1.10.0&quot; host = data.aws_eks_c...
<p>I have a simple pod with a nginx container which returns text <code>healthy</code> on path <code>/</code>. I have prometheus to scrape port 80 on path <code>/</code>. When I ran <code>up == 0</code> in the prometheus dashboard it showed this pod which means this pod is not healthy. But I tried ssh into the container...
<p>When you configure these annotations to pods, the Prometheus expects that the given path returns Prometheus-readable metrics. But <code>'healthy\n'</code> is not a valid Prometheus metrics type.</p> <pre class="lang-yaml prettyprint-override"><code> annotations: prometheus.io/scrape: &quot;true&quot; ...
<p>I'm wondering about an approach one has to take for our server setup. We have pods that are short lived. They are started up with 3 pods at a minimum and each server is waiting on a single request that it handles - then the pod is destroyed. I'm not sure of the mechanism that this pod is destroyed, but my question...
<p>It's impossible to give only one way to solve this and your question is more &quot;opinion-based&quot;. However there is an useful <a href="https://stackoverflow.com/questions/68176705/how-to-get-active-connections-count-of-a-kubernetes-pod">similar question on StackOverFlow</a>, please check the comments that can g...