prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I have a kubernetes cluster in GKE. Inside the cluster there is an private docker registry service. A certificate for this service is generated inside a docker image by running:</p> <pre class="lang-sh prettyprint-override"><code>openssl req -x509 -newkey rsa:4096 -days 365 -nodes -sha256 -keyout /certs/tls.key -out...
<p>TL;DR: Almost all modifications you need to perform to nodes in GKE, like adding trusted root certificates to the server, can be done using Daemonsets.</p> <p>There is an amazing guide that the user <a href="https://github.com/samos123" rel="nofollow noreferrer">Sam Stoelinga</a> created about how to perform what yo...
<p>I am trying to set up a <code>Mongo DB</code>on a specific node on <code>GKE</code>. I upgraded my current cluster using</p> <pre><code> gcloud container node-pools create mongo --cluster drogo --num-nodes 1 --region us-east1 </code></pre> <p>It created a new node-pool in the cluster with the name <code>mongo</code>...
<p>There were two issues with the deployment setup:</p> <p>The <code>nodeSelector</code> specified in the Deployment manifest was using wrong label</p> <pre><code> nodeSelector: cloud.google.com/gke-nodepool: mongo </code></pre> <p>Whereas the created node had a label pair <code>mongo: mongo</code>. Either changin...
<h1>Suspending &amp; resuming my virtual-machine does break the k8s deployment</h1> <p>When I suspend with <code>minikube stop</code> and then resume the Virtual Machine with <code>minikube start</code>, Minikube re-deploys my app from scratch.</p> <p>I see this behaviour with newer versions of Minikube higher than <em...
<p>In short words there are two ways to achieve what you want:</p> <ul> <li>On current versions of <code>minikube</code> and <code>virtualbox</code> you can use <code>save state</code> option in Virtual box directly.</li> <li>Move initContianer's code to a separate <code>job</code>.</li> </ul> <p><strong>More details a...
<p>I have an OpenShift/Tekton pipeline which in <code>Task A</code> deploys an application to a test environment. In <code>Task B</code>, the application's test suite is run. If all tests pass, then the application is deployed to another environment in <code>Task C</code>.</p> <p>The problem is that <code>Task A</code>...
<p>After your <em>step</em> that do <code>oc apply</code>, you can add a step to wait for the deployment to become &quot;available&quot;. This is for <code>kubectl</code> but should work the same way with <code>oc</code>:</p> <pre><code>kubectl wait --for=condition=available --timeout=60s deployment/myapp </code></pre>...
<p>I use <code>kubectl exec -it</code> for logging into a single Kubernetes pod.</p> <p>Is there any way to log in to multiple pods in a cluster, at the same time with a single command (just like <code>csshX</code>)?</p>
<p>There is a plugin that could help you with this. It's called <a href="https://github.com/predatorray/kubectl-tmux-exec" rel="nofollow noreferrer">kubectl-tmux-exec</a>:</p> <blockquote> <p>A kubectl plugin that controls multiple pods simultaneously using <a href="https://github.com/tmux/tmux" rel="nofollow noreferre...
<p>We are running an application on k8s cluster on GKE.</p> <p>We are using an <code>nginx-ingress-controller</code> as external load-balancer Service which is reachable on, let's say, <a href="https://12.345.67.98" rel="nofollow noreferrer">https://12.345.67.98</a> . We are facing an issue that when we directly access...
<p>You need to define a secret with your CA signed certificate and the private key. These will have to be base64 encoded in the secret. You will then use this secret in the &quot;tls&quot; section of the ingress manifest.</p> <p>Ensure that the certificate chain (cert -&gt; intermediate CA -&gt; root CA) is established...
<p>I have a cluster of Artemis in Kubernetes with 3 group of master/slave:</p> <pre><code>activemq-artemis-master-0 1/1 Running activemq-artemis-master-1 1/1 Running activemq-artemis-master-2 1/1 Running activemq-artem...
<p>I've taken your simplified configuration with just 2 nodes using a non-wildcard queue with <code>redistribution-delay</code> of <code>0</code>, and I reproduced the behavior you're seeing on my local machine (i.e. without Kubernetes). I believe I see <em>why</em> the behavior is such, but in order to understand the ...
<p>I'm building a little k8s controller based on the <a href="https://github.com/kubernetes/sample-controller" rel="nofollow noreferrer">sample-controller</a>.</p> <p>I'm listening for ServiceAccount events with the following event handler:</p> <pre><code>... serviceAccountInformer.Informer().AddEventHandler(cache.Reso...
<p>You can use a <a href="https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go#L44" rel="noreferrer">MetaAccessor</a>:</p> <pre class="lang-golang prettyprint-override"><code>import ( metav1 &quot;k8s.io/apimachinery/pkg/apis/meta/v1&quot; &quot;k8s.io/ap...
<p>My certificates for rancher server expired and now I can not log in to UI anymore to manage my k8s clusters.</p> <p>Error:</p> <pre><code>2021-05-26 00:57:52.437334 I | http: TLS handshake error from 127.0.0.1:43238: remote error: tls: bad certificate 2021/05/26 00:57:52 [INFO] Waiting for server to become availabl...
<p>This was the missing piece: <a href="https://github.com/rancher/rancher/issues/26984#issuecomment-818770519" rel="nofollow noreferrer">https://github.com/rancher/rancher/issues/26984#issuecomment-818770519</a></p> <p>Deleting the dynamic-cert.json and running kubectl delete secret</p>
<p>when I run the cronjob into Kubernetes, that time cron gives me to success the cron but not getting the desired result</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob metadata: name: {{ $.Values.appName }} namespace: {{ $.Values.appName }} spec: schedule: &quot;* * * * *&quot; concurrencyPolicy: Forbi...
<p>Cronjob run in one specific container, if you want to remove the file or directory from another container it won't work.</p> <p>If your main container running under deployment while when your job or cronjob gets triggered it create a <strong>new container</strong> <strong>(POD)</strong> which has a separate file sys...
<p>I am trying to setup my Helm chart to be able to deploy a <code>VirtualService</code>. My deploy user has the <code>Edit</code> ClusterRole bound to it. But I realized that because Istio is not part of the core Kubernetes distro, the <code>Edit</code> ClusterRole does not have permissions to add a <code>VirtualSer...
<p>I ended up using these ClusterRoles. They merge with the standard Kubernetes roles of admin, edit and view. (My edit role only allows access to the VirtualService because that fit my situtation.)</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: istio-admin labels: ...
<p>Major features of service meshes are</p> <ol> <li>Service Discovery</li> <li>Configuration management</li> </ol> <p>both of them are provided by Kubernetes.<br /> <strong>Why do we need a service mesh then?</strong></p> <p>*I understand that for more complex tasks e.g. zoning, security, complex load balancing and ro...
<p>In short, applying a service mesh, for example Istio help establish and manage communication between services (microservices) easier especially when you have a large number of services, and also provide security and other features. But if you had just couple of services, you might not need it for example.</p>
<p>When I upgrade kubernetes version 1.20.X to 1.21.1, all containers related is up to date. But the pause container is still in use, I can not force update it to the latest version.</p> <pre><code># docker ps XXX/pause:3.2 # docker images XXX/pause:3.2 XXX/pause:3.4.1 # docker rmi -f XXX/pause:3.2 Error response from ...
<p>When you upgrade the cluster using <code>kubeadm</code> you will probably get the notification about the <code>kubelet</code> manual upgrade requirement:</p> <pre><code>Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply': COMPONENT CURRENT TARGET k...
<blockquote> <p>prometheus-prometheus-kube-prometheus-prometheus-0 0/2 Terminating 0 4s alertmanager-prometheus-kube-prometheus-alertmanager-0 0/2 Terminating 0 10s</p> </blockquote> <p>After updating EKS cluster to 1.16 from 1.15 everything works fine except these two pods, they keep on te...
<p>If someone needs to know the answer, in my case(the above situation) there were 2 Prometheus operators running in different different namespace, 1 in default &amp; another monitoring namespace. so I removed the one from the default namespace and it resolved my pods crashing issue.</p>
<p>I have a workflow on Github action that builds, tests, and pushes a container to GKE. I followed the steps outlined in <a href="https://docs.github.com/en/actions/guides/deploying-to-google-kubernetes-engine" rel="nofollow noreferrer">https://docs.github.com/en/actions/guides/deploying-to-google-kubernetes-engine</a...
<p>The kustomization file, as explained in it's <a href="https://github.com/kubernetes-sigs/kustomize#usage" rel="nofollow noreferrer">repository</a>, should be in the next file structure:</p> <pre><code>~/someApp ├── deployment.yaml ├── kustomization.yaml └── service.yaml </code></pre>
<p>I'm trying to deploy the ELK stack to my developing kubernetes cluster. It seems that I do everything as described in the tutorials, however, the pods keep failing with Java errors (see below). I will describe the whole process from installing the cluster until the error happens.</p> <p>Step 1: Installing the cluste...
<p>What you are experiencing is not an issue related to Elasticsearch. It is a problem resulting from the cgroup configuration for the version of containerd you are using. I haven't unpacked the specifics, but the exception in the Elasticsearch logs relates to the JDK failing when attempting to retrieve the required cg...
<p>im trying to a loop with a range in helm but using 2 variables, what i have..</p> <p><strong>values.yaml</strong></p> <pre><code>master: slave1: - slave1value1 - slave1value2 slave2: - slave2value1 - slave2value2 </code></pre> <p>My actual loop.</p> <pre><code>{{- range .Values.master.slave1 }...
<p>Almost...you need a nested loop to do this. The top-level data structure is a map, where the keys are the worker names and the values are the list of values. So you can iterate through the top-level map, then for each item iterate through the value list.</p> <pre><code>{{- $key, $values := range .Values.master -}}...
<p>I want to use kind other than Deployment for Autoscaling in Kubernetes is it possible ? the reason I don't want to use kind:Deployment is the restart policy, as per as k8s documentation the only valid field for restart policy is &quot;Always&quot;, and If put &quot;Never&quot; I am getting an error.</p> <p>In my sce...
<p>HPA can be used with the following resources: <code>ReplicationController</code>, <code>Deployment</code>, <code>ReplicaSet</code> or <code>StatefulSet</code>. However HPA doesn't support scaling to 0.</p> <p>There are some serverless frameworks that support scalability to zero in kubernetes such as <a href="https:/...
<p>I am trying to install docker inside an openshift pod like below.</p> <pre><code>sh-4.2$ yum install docker Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this c...
<p>You should specify &quot;0&quot; using &quot;runAsUser&quot; as follows. Because &quot;anyuid&quot; is using UID which is configured when an image builds if you do not specify the UID in your container. I think your image is build with 1001 UID initially as far as I can see the result.</p> <pre><code> containers...
<p>I am trying to setup an LXC container (debian) as a Kubernetes node. I am so far that the only thing in the way is the kubeadm init script...</p> <pre class="lang-sh prettyprint-override"><code>error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR SystemVerification]: failed to pars...
<p>To allow load with modprobe any modules inside privileged proxmox lxc container, you need add this options to container config:</p> <pre><code>lxc.apparmor.profile: unconfined lxc.cgroup.devices.allow: a lxc.cap.drop: lxc.mount.auto: proc:rw sys:rw lxc.mount.entry: /lib/modules lib/modules none bind 0 0 </code></pre...
<p>I am deploying some web app on kubernetes and I want to set liveness probe for this application. When I configure my deployment with liveness probe, kubelet start health check. I was defined httpGet with scheme &quot;HTTP&quot; parameter but kubelet using https schema randomly.</p> <p>This is my liveness probe confi...
<p>Since you are explicitly stating livenessProbe to use HTTP, it's probably your application that redirects traffic to HTTPS. Make sure that your application returns a <code>200 OK</code> on basepath <code>/</code>, and not a redirection (any of <code>3xx</code> codes).</p> <p>You can either fix that, or use <a href="...
<p>im trying to a loop with a range in helm but using 2 variables, what i have..</p> <p><strong>values.yaml</strong></p> <pre><code>master: slave1: - slave1value1 - slave1value2 slave2: - slave2value1 - slave2value2 </code></pre> <p>My actual loop.</p> <pre><code>{{- range .Values.master.slave1 }...
<p>Hi @DavidMaze i made it work changing the order of the &quot;range&quot; in the loop.</p> <p>This doesn't work.</p> <pre><code>{{- $key, $values := range .Values.master -}} {{- $value := range $values -}} name: http://{{ $key }}-{{ $value }} {{ end -}} {{- end -}} </code></pre> <p>This work as expected :)</p> <pre><...
<p>I frequently encounter issues will kubectl port forwarding and want to write a bash script to auto-reconnect. How do you grep for something on a stream and &quot;fail&quot; when it's found? I've found questions like <a href="https://stackoverflow.com/questions/31816132/how-to-grep-a-continuous-stream-from-the-cli-an...
<p>How about.</p> <pre><code>#!/usr/bin/env bash if kubectl port-forward deployment/haproxy 8080:8080 2&gt;&amp;1 | grep -Fq --line-buffered error; then printf &gt;&amp;2 &quot;port forwarding failed trying again!\n&quot; &amp;&amp; exit fi </code></pre> <p>If it is inside a loop, replace <code>exit</code> wit...
<p>Istio can route traffic based off headers and such. There are <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/" rel="nofollow noreferrer">great examples</a> of how to do this in the Istio docs.</p> <p>Istio can also validate your JWT. The Istio docs also <a href="https://istio.io/...
<p>You can implement this using the <strong>Istio authorization policy</strong>. I did something similar with Keycloak and Kong to restrict user traffic at API gateway level if claim or roles were not there.</p> <p><a href="https://github.com/binc75/istio-jwt#inspect-jtw-token" rel="nofollow noreferrer">Here</a> is one...
<p>I am trying to create a helm chart of kind ConfigMap that will replace the following command from kubernates.</p> <pre><code>kubectl create configmap my-config -n $namespace --from-file=./my-directory </code></pre> <p><code>my-directory</code> contains around 5 files, 2 of them are properties file and 2 of them jpg ...
<p>JPG files are binary, and should be added as such.</p> <pre><code>data: binaryData: {{ .Files.Get &quot;/path/to/file.jpg&quot; }} </code></pre> <p>Files in <code>binaryData</code> field must be encoded with base64, so:</p> <pre><code>{{ .Files.Get &quot;/path/to/file.jpg&quot; | b64enc }} </code></pre> <p>Don...
<p>We are just getting started with k8s (bare metal on Ubuntu 20.04). Is it possible for ingress traffic arriving at a host for a load balanced service to go to a pod running on that host (if one is available)?</p> <p>We have some apps that use client side consistent hashing (using customer ID) to select a service inst...
<p>I finally got this figured out. This was way harder than it should be IMO! <strong>Update: It's not working. Traffic frequently goes to the wrong pod.</strong></p> <p>The service needs <code>externalTrafficPolicy: Local</code> (see <a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-...
<p>I have Django Channels (with Redis) served by Daphne, running behind Nginx ingress controller, proxying behind a LB, all setup in Kubernetes. The Websocket is upgraded and everything runs fine... for a few minutes. After between 5-15min (varies), my daphne logs (set in -v 2 to debug) show:</p> <pre><code>WARNING dro...
<p>I ended up adding a ping internal on the client and increasing nginx timeout to 1 day, which changed the problem but also shows it's probably not a nginx/daphne configuration problem.</p>
<p>I am working on an angular application and deployed it in kubernetes. I can access my application through Nginx Ingress.</p> <p>I am using angular router to enable navigation through different components in my app.</p> <p><em>Using the deployed application i tried to navigate through different components, when I cli...
<p><strong>Save This code as web.config then paste the web.config file in the dist folder</strong></p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;compilation targetFramework=&quot;4.0&quot; /&gt; &lt;customErrors mode=&quot;On&quot;...
<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>For anyone looking in the future for this solution, and doesn't want to dredge through deep github discussions, my solution was this:</p> <p>Change <code>hostPath:</code> to <code>local:</code> when defining the path. hostPath is apparently for if your kubernetes node providers have external persistent disks, like G...
<pre><code>[root@kubemaster ~]# kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod1deployment-c8b9c74cb-hkxmq 1/1 Running 0 12s 192.168.90.1 kubeworker1 &lt;none&gt; &lt;none&gt; ...
<p><strong>I was facing the same issue so this is what I did and it worked:</strong></p> <p><strong>Brief:</strong> I am running 2 VMs for a 2 Node cluster. 1 Master Node and 1 Worker Node. A Deployment is running on the worker node. I wanted to curl from the master node so that I can get response from my application r...
<p>We have recently set up a AKS cluster with a NGINX controller.</p> <p>Access <em>seemed</em> ok, but then we found that occasional requests are unable to connect.</p> <p>To demonstrate the problem we use a short powershell script which makes repeated requests to the URL, writes out the response's status code, waits ...
<p>I can't explain <em>why</em> but we found out that if we changed the VMs in our node pool from burstable VMs to non-burstable (from 'B' class to 'D' class) then the problem went away.</p>
<p>we <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/gpus#cos" rel="noreferrer">followed this guide</a> to use GPU enabled nodes in our existing cluster but when we try to schedule pods we're getting <code>2 Insufficient nvidia.com/gpu error</code></p> <p><strong>Details:</strong></p> <p>We are trying ...
<p>The <code>nvidia-gpu-device-plugin</code> should be installed in the GPU node as well. You should see <code>nvidia-gpu-device-plugin</code> DaemonSet in your <code>kube-system</code> namespace.</p> <p>It should be automatically deployed by Google, but if you want to deploy it on your own, run the following command: ...
<p>When I try to retrieve logs from my pods, I note that K8s does not print all the logs, and I know that because I observe that logs about microservice initialization are not present in the head of logs.</p> <p>Considering that my pods print a lot of logs in a long observation period, does someone know if K8s has a li...
<p>The container runtime engine typically manages container (pod) logs. Do check the settings on the runtime engine in use.</p>
<p>My pod has a volume as:</p> <pre class="lang-json prettyprint-override"><code> &quot;volumes&quot;: [ { &quot;name&quot;: &quot;configs&quot;, &quot;secret&quot;: { &quot;defaultMode&quot;: 420, &quot;secretName&quot;: &quot;s...
<p>It gives you the error because you initialise <code>V1PodSpec</code> without any arguments. <code>V1PodSpec</code> used to create pods, not to read them.</p> <p>To read pod <code>spec</code> from Kubernetes:</p> <pre class="lang-py prettyprint-override"><code>from kubernetes import client,config config.load_kube_co...
<p>I am new to K8s autoscaling. I have a stateful application I am trying to find out which autoscaling method works for me. According to the documentation:</p> <blockquote> <p>if pods don't have the correct resources set, the Updater component of VPA kills them so that they can be recreated by their controllers with t...
<p>There are few things to clear out here:</p> <ul> <li><p>VPA does not create nodes, <a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#cluster-autoscaler" rel="nofollow noreferrer">Cluster Autoscaler</a> is used for that. Vertical Pod Autoscaler allocates more (or less) CPUs and memory t...
<p>I attempted but there is an error..i also see See <strong>'kubectl run --help' for usage.</strong> but i can't fix it..</p> <pre><code>kubectl run pod pod4 --image=aamirpinger/helloworld:latest --port=80 --annotaions=createdBy=&quot;Muhammad Shahbaz&quot; --restart=Never </code></pre> <p><strong>Error: unknown fla...
<p><code>kubectl run</code> supports specifying annotations via the <code>--annotations</code> flag that can be specified multiple times to apply multiple annotations.</p> <p>For example:</p> <pre><code>$ kubectl run --image myimage --annotations=&quot;foo=bar&quot; --annotations=&quot;another=one&quot; mypod </code></...
<p>I have a rabbit mq pod and I configured to use a persistence storage incase of pod restart/deletion by mounting a volume.</p> <p>I configured everything but not able to get through this error:</p> <pre><code>/usr/lib/rabbitmq/bin/rabbitmq-server: 42: /usr/lib/rabbitmq/bin/rabbitmq-server: cannot create /var/lib/ra...
<p>The volume you mounted in <code>/var/lib/rabbitmq/mnesia</code> is owned by root.</p> <p>The rabbitmq process is running as <code>rabbitmq</code> user and doesn't have write access to this directory.</p> <p>In your <code>start.sh</code> add:</p> <pre><code>chown rabbitmq:rabbitmq /var/lib/rabbitmq/mnesia </code></pr...
<p>I am trying to create cluster by using <a href="https://gridscale.io/en/community/tutorials/kubernetes-cluster-with-kubeadm/" rel="nofollow noreferrer">this article</a> in my WSl Ubuntu. But It returns some errors.</p> <p>Errors:</p> <pre><code>yusuf@DESKTOP-QK5VI8R:~/aws/kubs2$ sudo systemctl daemon-reload System h...
<p>Tutorial you're following is designed for cloud Virtual machines with Linux OS on them (this is important since WSL works a bit differently). E.g. SystemD is not presented in WSL, behaviour you're facing is currently <a href="https://github.com/MicrosoftDocs/WSL/issues/457" rel="nofollow noreferrer">in development p...
<p>Need help on how to configure TLS/SSL on k8s cluster for internal pod to pod communication over https. Able to curl http://servicename:port over http but for https i am ending up with NSS error on client pod.</p> <p>I generated a self signed cert with CN=*.svc.cluster.local (As all the services in k8s end with this)...
<p>You can store your self-signed certificate inside the secret of Kubernetes and mount it to the volume of the pod.</p> <p>If you don't want to use the CRD or cert-manager you can use the native Kubernetes API to generate the Certificate which will be trusted by all the pods by default.</p> <p><a href="https://kuberne...
<p>my natural thought is that if nginx is just a daemon process on the k8s node, but not a pod(container) in the k8s cluster, looks like it still can fullfill ingress controller jobs. because: if it's a process, because it is on the k8s node, it still can talk to apiserver to fetch service backend pods information, li...
<blockquote> <p>why Nginx ingress controller has to be a pod?</p> </blockquote> <p>it is possible to run the Nginx controller as a daemon set in Kubernetes however I am not sure about the running on the node.</p> <p>Manging the POD using daemon set and deployment of Kubernetes easy compare to process on Node.</p> <p>By...
<p>I am using EKS Fargate and created a fargate profile based on this doc: <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html</a>.</p> <p>In the doc it says Fargate is used to allocate what pods ...
<p>Consider that today Fargate profiles are immutable and they do not support wild-cards. So practically you end up using more than a Fargate profile when you have a rather dynamic environment and you want to selectively include/exclude namespaces / pod tags etc. There are other reasons why you <em>may</em> want to use...
<p>I am new to kubernetes and trying to create a deployment. So first I created a replicaset named rs.yml shown below.</p> <pre><code>apiVersion: apps/v1 kind: ReplicaSet metadata: name: web labels: env: dev role: web spec: replicas: 4 selector: matchLabels: role: ...
<p>You can create single YAMl file and add both thing deployment service inside it.</p> <pre><code>apiVersion: apps/v1 kind: ReplicaSet metadata: name: web labels: env: dev role: web spec: replicas: 4 selector: matchLabels: role: web template: metadat...
<p>We are trying to analyze specific requirement for container implementation and would like to know the limit of maximum number of labels that can be created for the given pods in kubernetes? Does such limit exists or it is not defined.</p> <p>Thanks in advance.</p>
<p>Based on <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">official Kubernetes documentation</a> there should be no limit of independent labels in pod. But you should know, that each valid label:</p> <blockquote> <ul> <li>must be 63 characters or less (can ...
<p>When I deploy the new release of the Kubernetes app I got that error</p> <pre><code>Error: secret &quot;env&quot; not found </code></pre> <p><a href="https://i.stack.imgur.com/7TbF4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7TbF4.png" alt="enter image description here" /></a></p> <p>even I h...
<p>You ran <code>kubeseal</code> against the wrong Kubernetes cluster or you tried to edit the name or namespace after encrypting without enabling those in the encryption mode. More likely the first.</p>
<p>I have a Spring boot application, that now I generated a helm chart for it. I am using the ConfigMap from k8s to create this application properties. But When I inspect the pod I see the error below:</p> <blockquote> <p>2021-05-31 09:39:31.815 WARN 1 --- [ost-startStop-1] o.s.b.a.orm.jpa.DatabaseLookup : U...
<p>You can't inject files as env-var. Only simple key=value entries.</p> <p>If you want to keep your configMap as-is you should instead mount it as a volume inside your container.</p> <pre><code> volumeMounts: - name: application-config mountPath: &quot;/config&quot; readOnl...
<p>I have been trying to deploy a hyperledger fabric model with 3 CAs 1 orderer and 2 peer nodes. I am able to create the channel with OSADMIN command of fabric but when I try to join the channel with peer node, I get Error: <code>error getting endorser client for channel: endorser client failed to connect to peer-govt...
<p>I have fixed it. The issue I was facing was because of not setting the <code>CORE_PEER_TLS_ENABLED = true</code> for CLI pod.</p> <p>One thing I have got learn from this whole model, whenever you see TLS issue, first to check for would be checking <code>CORE_PEER_TLS_ENABLED</code> variable. Make sure you have set i...
<p>I'm using Azure Container Insights for an AKS cluster and want to filter some logs using Log Analytics and Kusto Query Language. I do it to provide a convenient dashboard and alerts.</p> <p>What I'm trying to achieve is list only not ready pods. Listing the ones not Running is not enough. This can be easily filtered...
<p>You can do it for pods as below for last 1h.</p> <pre><code>let endDateTime = now(); let startDateTime = ago(1h); KubePodInventory | where TimeGenerated &lt; endDateTime | where TimeGenerated &gt;= startDateTime | where PodStatus != &quot;Running&quot; | distinct Computer, PodUid, TimeGenerated, PodStatus </code><...
<p>Now I read this config in kubernetes:</p> <pre><code> containers: - name: canal-admin-stable image: 'dolphinjiang/canal-admin:v1.1.5' ports: - name: http containerPort: 8089 protocol: TCP resources: limits: cpu: '...
<p>I was using init-containers to pass a config file to the main container and discovered the use behind the mountPath and subPath as it was confusing to me too at first. The mountPath is always the destination inside the Pod a volume gets mounted to. However, I discovered that if your mountPath has other config files ...
<p>tl;dr: I have a server that handles WebSocket connections. The nature of the workload is that it is necessarily stateful (i.e., each connection has long-running state). Each connection can last ~20m-4h. Currently, I only deploy new revisions of this service at off hours to avoid interrupting users too much.</p> <p>I...
<p>This is already how things work with normal Services. Once a pod is terminating, it has already been removed from the Endpoints. You'll probably need to tune up your max burst in the rolling update settings of the Deployment to 100%, so that it will spawn all new pods all at once and then start the shutdown process ...
<p>Currently I am using a script to renew Kubernetes certificates before they expire. But this is a manual process. I have to monitor expiration dates carefully and run this script beforehand. What's the recommended way to update all control plane certificates automatically without updating control plane? Do kubelet's ...
<p>Answering following question:</p> <blockquote> <p>What's the recommended way to update all control plane certificates automatically without updating control plane</p> </blockquote> <p>According to the k8s docs and best practices the best practice is to use &quot;Automatic certificate renewal&quot; with control plane...
<p>my natural thought is that if nginx is just a daemon process on the k8s node, but not a pod(container) in the k8s cluster, looks like it still can fullfill ingress controller jobs. because: if it's a process, because it is on the k8s node, it still can talk to apiserver to fetch service backend pods information, li...
<p>Because Pods are how you run daemon processes (or really, all processes) inside Kubernetes. That's just how you run stuff. I suppose there is nothing stopping you from running it outside the cluster, manually setting up API configuration and authentication, doing all the needed networking bits yourself. But ... why?...
<p>Now my kubernetes (<code>v1.15.x</code>) deployment keeps restarting all the time. From the log ouput with kubernetes dashboard I could not see anything useful. Now I want to log into the pod and check the log from log dir of my service. But the pod keeps restarting all the time and I have no chance to log into the ...
<p>if you are running the <strong>GKE</strong> and <strong>logging</strong> is enabled you can get all container log by default into the dashboard of stack driver logging.</p> <p>As of now you can run the <code>kubectl describe pod &lt;pod name&gt;</code> to check the status code of the container which got exited. Stat...
<p>while evaluating the network security using nmap on Kubernetes server, we noticed a warning as below</p> <p>~]# nmap xxx.xx.xx.xx -p 6443 -sVC --script=ssl*</p> <pre><code>. . . ssl-enum-ciphers: | TLSv1.2: | ciphers: | TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 2048) - A | TLS_RSA_WITH_AES_256_GCM_SH...
<p>You can use the <code>--cipher-suites</code> CLI option to etcd. See <a href="https://etcd.io/docs/v3.4/op-guide/security/" rel="nofollow noreferrer">https://etcd.io/docs/v3.4/op-guide/security/</a> for a summary of all their TLS config options. The default ciphers is based on the version of Go used to compile it.</...
<p><strong>Story</strong>: in my java code i have a few ScheduledFuture's that i need to run everyday on specific time (15:00 for example), the only available thing that i have is database, my current application and openshift with multiple pods. I can't move this code out of my application and must run it from there.<...
<p>I would suggest to use a ready-to-use solution. Getting those things right, especially covering all possible corner-cases wrt. reliability, is hard. If you do not want to use quartz, I would at least suggest to use a database-backed solution. Postgres, for example, has <a href="https://www.postgresql.org/docs/curren...
<p>I am trying to add custom alert-routing config to my alertmanager, deployed as a part of kube-prometheus-stack. But prometheus-operator pod, while trying to generate the alertmanager configmap, fails due to the following error:</p> <pre><code>level=error ts=2021-05-31T06:29:38.883470881Z caller=klog.go:96 component=...
<p>Try to change from:</p> <pre><code> routes: - matchers: - severity=~&quot;warning|critical&quot; receiver: slack-notifications </code></pre> <p>To:</p> <pre><code> routes: - match_re: severity: &quot;warning|critical&quot; receiver: slack-notifications </code></pre>
<p>I'm stepping through Kubernetes in Action to get more than just familiarity with Kubernetes.</p> <p>I already had a Docker Hub account that I've been using for Docker-specific experiments.</p> <p>As described in chapter 2 of the book, I built the toy "kubia" image, and I was able to push it to Docker Hub. I verif...
<p>I faced same issue couple of time. Updating here, might be useful for someone.</p> <p>First describe the POD(kubectl describe pod &lt;pod_name&gt;),</p> <p><strong>1. If you see <em>access denied/repository does not exist</em> errors like</strong></p> <blockquote> <p>Error response from daemon: pull access denied fo...
<p>When I put the application into production with pod-managed Kubernetes architecture where it has the possibility of scaling so today it has two servers running the same application, hangfire recognizes both but returns an error 500</p> <pre><code>Unable to refresh the statistics: the server responded with 500 (erro...
<p>You can now add <code>IgnoreAntiforgeryToken</code> to your service which should resolve this issue.</p> <p>According to <a href="https://github.com/HangfireIO/Hangfire/issues/1248#issuecomment-517357213" rel="nofollow noreferrer">this github post</a>, the issue occured when you had multiple servers running the dash...
<p>I am trying to write a high-level CDK construct that can be used to deploy Django applications with EKS. I have most of the k8s manifests defined for the application, but I am struggling with the Ingress part. Looking into different options, I have decided to try installing the AWS Load Balancer Controller (<a href=...
<p>I got some help on the CDK.dev slack channel. I had the wrong <code>version</code>. It should be 1.2.0, the version of the Helm Chart. 2.2.0 is the version of the Controller.</p> <p>Here's an official example of how to do this from the <code>aws-samples</code> GitHub repo: <a href="https://github.com/aws-samples/nex...
<p>I have a cluster on GKE currently on version v1.19.9-gke.1400. Accordingly do kubernetes release notes, on 1.20 dockershim will be deprecated. My cluster is configured to auto-upgrades and in one specific application I use docker socket mapped to the application, where I run direct containers through their API.</p> ...
<p>Yes, if you use the non-containerd images. In the node pool config you can choose which image type you want and COS vs COS_Containerd are separate choices there. At some point later in 2021 we may (if all goes according to plan) remove Docker support in Kubernetes itself for 1.23. However Google may choose to remove...
<p>I have multiple Testcafe scripts (<code>script1.js</code>, <code>script2.js</code>) that are working fine. I have Dockerized this code into a Dockerfile and it works fine when I run the Docker Image. Next, I want to invoke this Docker Image as a CronJob in Kubernetes. Given below is my <code>manifest.yaml</code> fil...
<p>adding the containerPort configuration to your kubernetes resource should do the trick.</p> <p>for example:</p> <pre><code> spec: containers: - name: script1-job image: testcafe-minikube imagePullPolicy: Never args: [&quot;chromium:headless&quot;, &quot;script1.js&quot;...
<p>I am using Azure Kubernetes Service (AKS) and want to make sure pods inside a specific namespace can only receive ingress traffic from other pods in the same namespace.</p> <p>I found this network policy to achieve this namespace isolation (from <a href="https://github.com/ahmetb/kubernetes-network-policy-recipes/bl...
<p>Looks like you hit a known problem in AKS clusters v1.19+ around &quot;Pod IP SNAT/Masquerade behavior&quot;.</p> <p>How it affects clusters using Calico's plugin for Network Policies was explained there by other users:</p> <blockquote> <p>Just for information of other users, this issue causes problem for a NetworkP...
<p>I have an Kubernetes Cluster with a working Ingress config for one REST API. Now I want to add a port forward to my mqtt adapter to this config, but I have problems finding a way to add an TCP rule to the config. The Kubernetes docs only show a HTTP example. <a href="https://kubernetes.io/docs/concepts/services-netw...
<p>the Ingress system only handles HTTP traffic in general. A few Ingress Controllers support custom extensions for non-HTTP packet handling but it's different for each. <a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="noreferrer">https://kubernetes.github.io/ingress-nginx...
<p>I am trying to create some persistent space for my Microk8s kubernetes project, but without success so far.</p> <p>What I've done so far is:</p> <p>1st. I have created a PV with the following yaml:</p> <pre><code>apiVersion: v1 kind: PersistentVolume metadata: name: dev-pv-0001 labels: name: dev-pv-0001 spec:...
<p>the issue is that you are using the <strong>node affinity</strong> while creating the PV.</p> <p>Which think something like you say inform to Kubernetes my disk will attach to this type of node. Due to affinity your disk or PV is attached to one type of specific node only.</p> <p>when you are deploying the workload ...
<p>I am new to skaffold, k8s, docker set and I've been having trouble building my application on a cluster locally.</p> <p>I have a code repository that is trying to pull a private NPM package but when building it loses the .npmrc file or the npm secret.</p> <pre><code>npm ERR! code E404 npm ERR! 404 Not Found - GET ht...
<p>Building and deploying an image to Kubernetes is at three levels:</p> <ol> <li>Your local system where you initiate the building of an image</li> <li>The Docker build that populates the image and then stores that image somewhere</li> <li>The Kubernetes cluster that loads and starts running that image</li> </ol> <p>D...
<p>when I run the cronjob into Kubernetes, that time cron gives me to success the cron but not getting the desired result</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob metadata: name: {{ $.Values.appName }} namespace: {{ $.Values.appName }} spec: schedule: &quot;* * * * *&quot; concurrencyPolicy: Forbi...
<p>You need to have the persistence volume attached with you pod and cronjob that you are using so it can remove all the files when the script get executed. You need to mount and provide path accordingly in your script. For adding kubernetes cronjobs kindly go through this <a href="https://stackoverflow.com/questions/4...
<p>I am successfully configure my service monitor to monitor the API that provide metrics that is running in the kubernetes pod. However, I also would like to add external service to my service monitor target. This external service is arangoDB oasis exporter metrics (<a href="https://www.youtube.com/watch?v=c8i7K4HUPF4...
<p>Create the <strong>Kubernetes</strong> service and use the Prometheus <strong>ServiceMonitor</strong> same way.</p> <p>create the K8s service</p> <pre><code>kind: Service apiVersion: v1 metadata: name: arangoDB spec: type: ClusterIP ports: - name: metrics port: 9000 targetPort: 9000 </code></pre> <p>create...
<p>I have created a new GKE Cluster in the region 'us-west-1' and gave full access to the cloud services. I want to deploy the kubeflow pipeline on the cluster. I am getting the following error when I click the deploy button...</p> <p>Error: Failed to create CustomResourceDefinition.</p> <pre><code>{&quot;metadata&quot...
<p>Which version of <strong>Kubernetes</strong> you are running in your cluster.</p> <p>Error you are getting is due to wrong API version in CRD files</p> <p>you can check the supported API version of your kubernetes by running the command :</p> <pre><code>kubectl api-resources </code></pre> <p><a href="https://i.stack...
<p>I have taken up the challenge of automating the deployment of my company's Django-based application that is done with AKS but I am very new to it. My initial idea is to accomplish it by upgrading the steps in a GitHub workflow that acts on the release of a new version.</p> <p>I have structured it with three jobs. <c...
<p>You can rub db migrations from Kubernetes cluster itself.</p> <ol> <li>Create a Kubernetes Job, which basically runs db migration. and</li> <li>Deploy an init container before main container(application), which periodically checks db migration job completion.</li> </ol>
<h1>Question:</h1> <p>I try to create a kubernetes cluster, namespace and secrets via terraform. The cluster is created, but the resources building upon the cluster fail to be created.</p> <h1>Background information</h1> <h2>Error message:</h2> <p>This is the error message thrown by terraform after creation of the...
<p>Eventually got this to work, without any requiredment to use AZ LOGIN, or AZ AKS GET-CREDENTIALS null_resource or local-exec provisioners as suggested above etc.</p> <p>Instead used a data block in main.tf to obtain the AKS Cluster (output from AKS module), and use the KUBE ADMIN CONFIG from the DATA as credentials ...
<p>I'm new to Kubernetes and wondering, if there's a <code>kubectl</code> command to figure out what namespace I'm currently working in?</p> <p>Running the <code>kubectl get ns</code> command prints out all the namespaces but doesn't show which one I'm in at present.</p>
<p>You want to inspect the local config for <code>kubectl</code> and see current context. This shows your current context with namespace.</p> <pre><code>kubectl config get-contexts </code></pre> <p>Example output - can also be multiple clusters, but only one &quot;current&quot;:</p> <pre><code>$kubectl config get-cont...
<p>In my scenario, our package from gitlab is already implemented pipeline to deploy kubernetes pod on remote host server. If I want to edit/open folder on kubernetes pod of the container using vscode, is it doable for vscode?</p>
<p>Official Visual Studio Code documentation <a href="https://code.visualstudio.com/docs/remote/attach-container#_attach-to-a-container-in-a-kubernetes-cluster" rel="nofollow noreferrer">shows</a> how to attach to a running container, also <a href="https://code.visualstudio.com/docs/remote/attach-container#_attach-to-a...
<p>We run Airflow on K8s on DigitalOcean using Helm Chart. Tasks are written using <code>airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator</code>. On a regular basis we see that pods are failing with the following messages (but the issue is not constant, so the majority of time it works fine):</p>...
<p>That are most likely just DigitalOcean Registry issues I suggest to try dockerhub</p>
<p>As part of writing logic for listing pods within a give k8s node I've the following api call:</p> <pre><code>func ListRunningPodsByNodeName(kubeClient kubernetes.Interface, nodeName string (*v1.PodList, error) { return kubeClient. CoreV1(). Pods(&quot;&quot;). List(context.TODO(), metav1.ListOptions{ ...
<p>The fake k8s client does not support filtering by field selector (see <a href="https://github.com/kubernetes/client-go/issues/326#issuecomment-412993326" rel="nofollow noreferrer">this comment</a>). When unit testing with the fake k8s client, it's best to assume that the k8s client will work as expected in the real ...
<p>I am using the WordCountProg from the tutorial on <a href="https://www.tutorialspoint.com/apache_flink/apache_flink_creating_application.htm" rel="nofollow noreferrer">https://www.tutorialspoint.com/apache_flink/apache_flink_creating_application.htm</a> . The code is as follows:</p> <p><strong>WordCountProg.java</st...
<p>If using minikube you need to first mount the volume using</p> <pre><code>minikube mount /Users/my-user/Documents/semafor/apache_flink/PV:/tmp/PV </code></pre> <p>Then use /tmp/PV in your hostPath configuration in the volumes section</p> <p><strong>Refer to these threads:</strong> <a href="https://stackoverflow.com...
<p>I noticed that one of AKS services is in the failed state. When I went to diagnostics, I found out that current version is not supported anymore. So I tried to follow instructions stated here: <a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster" rel="nofollow noreferrer">https://learn.microsoft.com/...
<p>So after hours of trying different solutions and failing, I found fix for this among the answers here: <a href="https://github.com/Azure/AKS/issues/542" rel="nofollow noreferrer">https://github.com/Azure/AKS/issues/542</a></p> <p>In order to fix failed state because of outdated version, I had to simply do the follo...
<p>I got this error after the upgrade for my ingress from <code>networking.k8s.io/v1beta</code> to <code>networking.k8s.io/v1</code></p> <pre><code>ComparisonError: failed to convert *unstructured.Unstructured to *v1beta1.Ingress: no kind &quot;Ingress&quot; is registered for version &quot;networking.k8s.io/v1&quot; in...
<p>my bad I updated the ingress file without run <code>helm upgrade</code> I revert it back to <code>v1beta1</code> for now</p>
<p>I have a GKE Ingress that creates a L7 Load Balancer. I'd like to use a Cloud Tasks Queue to manage asynchronous tasks for one of the web applications running behind the GKE Ingress. This documentation says it is possible to use Cloud Tasks with GKE <a href="https://cloud.google.com/tasks/docs/creating-http-target-t...
<p>The HTTP endpoint is the public URL that you want to call to run your async task. Use the public IP/FQDN of your L7 load balancer, following by the correct path to reach your service and trigger the correct endpoint on it.</p> <p>You can't use internal HTTP load balancer (even if it's a pleasant solution to increase...
<p>Following the instructions on the Keycloak docs site below, I'm trying to set up Keycloak to run in a Kubernetes cluster. I have an Ingress Controller set up which successfully works for a simple test page. Cloudflare points the domain to the ingress controllers IP.</p> <p>Keycloak deploys successfully (<code>Admin ...
<p>The following configuration is required to run <strong>keycloak</strong> behind <strong>ingress controller</strong>:</p> <pre><code>- name: PROXY_ADDRESS_FORWARDING value: &quot;true&quot; - name: KEYCLOAK_HOSTNAME value: &quot;my.domain.com&quot; </code></pre> <p>So I think adding correct <strong>KEYCLOAK_HOSTN...
<p>I've an operator which run a reconcile for some object changes, now I want to add ability to reconcile when specific <code>configmap</code> is changing, (my operator <strong>doesn't</strong> responsible on this CM just needs to listen to it and read on changes...) from the docs I think I need to use the <code>Owns(&...
<p>I haven't used this specific operator framework, but the concepts are familiar. Create a predicate function like this and use it when you are creating a controller by passing it into the SDK's <code>WithEventFilter</code> function:</p> <pre><code>func specificConfigMap(name, namespace string) predicate.Predicate { ...
<p>Previously I was using the <code>extensions/v1beta1</code> api to create ALB on Amazon EKS. After upgrading the EKS to <code>v1.19</code> I started getting warnings:</p> <pre><code>Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress </code></pre> <p>So...
<p>Your ingress should work fine even if you use newest Ingress. The warnings you see indicate that a new version of the API is available. You don't have to worry about it.</p> <p>Here is the <a href="https://github.com/kubernetes/kubernetes/issues/94761" rel="nofollow noreferrer">explanation</a> why this warning occur...
<p>Below is our current application architecture, we are using CA Workload Automation ESP for batch scheduling</p> <p><a href="https://i.stack.imgur.com/1o42O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1o42O.png" alt="enter image description here" /></a></p> <p>and we are moving to this applicat...
<p>You'll need to build a custom docker image with CA Workload Automation ESP Agent installed on it before adding your Java application.</p>
<p>I was installing Keycloak using <a href="https://operatorhub.io/operator/keycloak-operator" rel="nofollow noreferrer">Operator</a> (version 13.0.0). The updated code has theme related stuff <a href="https://github.com/keycloak/keycloak-operator" rel="nofollow noreferrer">github repository</a> and supports custom the...
<p><strong>We can add custom keycloak themes in keycloak operator (v13.0.0) using the below steps:</strong></p> <ol> <li>Create a jar file for your custom theme using step shown here <a href="https://www.keycloak.org/docs/latest/server_development/#deploying-themes" rel="nofollow noreferrer">Deploying Keycloak Themes</...
<p>I need to create a deployment descriptor &quot;A&quot; yaml in which I can find the endpoint IP address of a pod (that belongs to a deployment &quot;B&quot;) . There is an option to use Downward API but I don't know if I can use it in that case.</p>
<p>What you are looking for is an <code>Headless service</code> (see <a href="https://kubernetes.io/docs/concepts/services-networking/service/#headless-services" rel="nofollow noreferrer">documentation</a>).</p> <p>With an headless service, the service will not have an own IP address. If you specify a selector for the ...
<p>According to the [documentation][1] Kubernetes variables are expanded using the previous defined environment variables in the container using the syntax $(VAR_NAME). The variable can be used in the container's entrypoint.</p> <p>For example:</p> <pre class="lang-yaml prettyprint-override"><code>env: - name: MESSAGE ...
<blockquote> <p>Is this possible though to use bash expansion aka <code>${Var1:-${Var2}}</code> inside the container's entrypoint ?</p> </blockquote> <p>Yes, by using</p> <pre><code>command: - /bin/bash - &quot;-c&quot; - &quot;echo ${Var1:-${Var2}}&quot; </code></pre> <p>but not otherwise -- kubernetes is not a wrapp...
<p>I need to download chart which is located external OCI repository, when I download it using click on the link of the chart and version and provide user and password it works but not with the following code, this is what I tried and get an error</p> <p><strong>failed to download &quot;https://fdr.cdn.repositories.amp...
<p>I think you need to update your repository before locating the chart.</p> <p><a href="https://github.com/helm/helm/blob/main/cmd/helm/repo_update.go#L64-L89" rel="nofollow noreferrer">This</a> is the code the CLI uses to update the repositories.</p> <p>And <a href="https://github.com/helm/helm/blob/main/cmd/helm/rep...
<p>We are running a Spark Streaming application on a Kubernetes cluster using spark 2.4.5. The application is receiving massive amounts of data through a Kafka topic (one message each 3ms). 4 executors and 4 kafka partitions are being used.</p> <p>While running, the memory of the driver pod keeps increasing until it is...
<p>In brief, the Spark memory consists of three parts:</p> <ul> <li>Reversed memory (300MB)</li> <li>User memory ((all - 300MB)*0.4), used for data processing logic.</li> <li>Spark memory ((all-300MB)*0.6(<code>spark.memory.fraction</code>)), used for cache and shuffle in Spark.</li> </ul> <p>Besides this, there is als...
<p>How do I make the <code>celery -A app worker</code> command to consume only a single task and then exit.</p> <p>I want to run celery workers as a kubernetes Job that finishes after handling a single task.</p> <p>I'm using KEDA for autoscaling workers according to queue messages. I want to run celery workers as jobs ...
<p>There's not really anything specific for this. You would have to hack in your own driver program, probably via a custom concurrency module. Are you trying to use Keda ScaledJobs or something? You would just use a ScaledObject instead.</p>
<p>I was trying readiness probe in kubernetes with a springboot app. After the app starts, lets say after 60 seconds I fire <code>ReadinessState.REFUSING_TRAFFIC</code> app event.</p> <p>I use port-forward for kubernetes service(Cluster-Ip) and checked /actuator/health/readiness and see <code>&quot;status&quot;:&quot;O...
<p>This is expected behavior as:</p> <ul> <li><code>$ kubectl port-forward service/SERVICE_NAME LOCAL_PORT:TARGET_PORT</code></li> </ul> <p>is not considering the state of the <code>Pod</code> when doing a port forwarding (directly connects to a <code>Pod</code>).</p> <hr /> <h3>Explanation</h3> <p>There is already a g...
<p>Given the following appliction.conf :</p> <pre><code>akka { loglevel = debug actor { provider = cluster serialization-bindings { &quot;sample.cluster.CborSerializable&quot; = jackson-cbor } } remote { artery { canonical.hostname = &quot;127.0.0.1&quot; canonical.port = 0 ...
<p>If you're going to assign different roles to different nodes, those nodes cannot use the same configuration. The easiest way to accomplish this is through n1 having <code>&quot;testRole1&quot;</code> in its <code>akka.cluster.roles</code> list and n2 having <code>&quot;testRole2&quot;</code> in its <code>akka.clust...
<p>I am trying to map kubernetes secret value to a environment variable . My secret is as shown below</p> <pre><code>apiVersion: v1 kind: Secret metadata: name: test-secret type: opaque data: tls.crt: {{ required &quot;A valid value is required for tls.crt&quot; .Values.tlscrt }} </code></pre> <p>Mapped the key to...
<h2>If the configMap is used to store pod environment variables</h2> <blockquote> <p><strong>ConfigMaps consumed as environment variables are not updated automatically and require a pod restart.</strong></p> </blockquote> <p>There are ways to automate pod restarts on configMap changes, see here for example: <a href="ht...
<p>I need to create a deployment descriptor &quot;A&quot; yaml in which I can find the endpoint IP address of a pod (that belongs to a deployment &quot;B&quot;) . There is an option to use Downward API but I don't know if I can use it in that case.</p>
<p>If I understand correctly, you want to map the <code>test.api.com</code> hostname to the IP address of a specific Pod.<br /> As <strong>@whites11</strong> rightly pointed out, you can use <a href="https://kubernetes.io/docs/concepts/services-networking/service/#with-selectors" rel="nofollow noreferrer">Headless Serv...
<p>I read about Knative private and public service. Private service always point to the actual deployment's endpoint while public service can either point to - where private service is pointing or it can point to activator.</p> <p>But in my case public service always points to the activator (no matter if we are in serv...
<p>You're noticing an optimization added last year -- in the case of small amounts of traffic (basically, less than 10-15 pods), the activator can often perform better request-weighted list balancing than the typical ingress in terms of queueing and managing <code>concurrencyCount</code> for existing pods and routing d...
<p>I am learning how to use an ingress to expose my application GKE v1.19. I followed the tutorial on GKE docs for Service, Ingress, and BackendConfig to get to the following setup. However, my backend services still become UNHEALTHY after some time. My aim is to overwrite the default &quot;/&quot; health check path fo...
<p>The ideal way to use the ‘BackendConfig’ is when the serving pods for your service contains multiple containers, if you're using the Anthos Ingress controller or if you need control over the port used for the load balancer's health checks, then you should use a BackendConfig CDR to define <a href="https://cloud.goog...
<p>I have obtained a cert from name.com.</p> <pre class="lang-sh prettyprint-override"><code>➜ tree . . ├── ca.crt ├── vpk.crt ├── vpk.csr └── vpk.key </code></pre> <p><strong>How I created the secrets</strong></p> <p>I added ca.crt content at the end of vpk.crt file.</p> <pre class="lang-sh prettyprint-override">...
<p><strong>Optional_no_ca</strong> does the optional client certificate validation and it does not fail the request when the client certificate is not signed by the CAs from <strong>auth-tls-secret</strong>. Even after specifying the optional_no_ca parameter, it is necessary to provide the client certificate. As mentio...
<p>I need to get the metadata-&gt;labels-&gt;app.kubernetes.io/version value from my pods. But I can't seem to find the <code>jsonpath</code> that will allow the label key to have the slash and periods.</p> <p>I have a basic command that is working: <code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata...
<p>Escape dots in key name:</p> <pre><code>.metadata.labels.app\.kubernetes\.io/version </code></pre> <pre><code>kubectl get pods -o=jsonpath=&quot;{range .items[*]}{.metadata.labels.app\.kubernetes\.io/version}{end}&quot; -A </code></pre>
<p>I have implemented Liveness Probe in C# based Kubernetes Application. When I am removing InitialDelaySeconds in my <em>livenessconfig</em> (at code level using <a href="https://github.com/kubernetes-client/csharp/blob/225bb1f59b650e6849858f52608ef917b2484ddb/src/KubernetesClient/generated/Models/V1Probe.cs#L66" rel=...
<p>By providing <code>initialDelaySeconds</code> you basically giving enough time to your container so that your container can be up perfectly. You want your probe to start executing command as soon as your container is up, and how would you do that? by providing <code>initialDelaySeconds</code>.</p> <p>If a container ...
<p>We are developing a simulation software which is deployed and scaled between multiple pods using kubernetes. When a user makes a simulation request, a pod is selected which starts doing the job and is considered as busy. When another user makes a simulation request, it should be routed to the next free pod. Currentl...
<p>I think you can make use of <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes" rel="nofollow noreferrer">readiness probes</a>:</p> <blockquote> <p>Sometimes, applications are temporarily unable to serve traffic. For example, an appl...
<p>I've setup the <a href="https://kubernetes.github.io/ingress-nginx/deploy/#using-helm" rel="nofollow noreferrer">ingress-nginx</a> Helm chart to setup ingress controllers on my cluster, however by default it only runs a single pod instance.</p> <p>Since we're running on Digital Ocean's k8s cluster, we're running wit...
<p>If you want to run the POD on each node you can use the <strong>daemonset</strong>.</p> <p>Deamon set : <a href="https://github.com/nginxinc/kubernetes-ingress/blob/master/deployments/helm-chart/templates/controller-daemonset.yaml" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress/blob/master/...
<p>I have the <code>minikube</code> environment as the following: -</p> <ul> <li>Host OS: <code>CentOS Linux release 7.7.1908 (Core)</code></li> <li>Docker: <code>Docker Engine - Community 20.10.7</code></li> <li>minikube: <code>minikube version: v1.20.0</code></li> </ul> <p>I would like to add some additional host ma...
<p>Minikube has a <a href="https://minikube.sigs.k8s.io/docs/handbook/filesync/" rel="nofollow noreferrer">built-in sync mechanism</a> that could deploy a desired /etc/hosts with the following example:</p> <pre><code>mkidr -p ~/.minikube/files/etc echo 127.0.0.1 localhost &gt; ~/.minikube/files/etc/hosts minikube start...
<p>I am trying to install my rancher(RKE) kubernetes cluster bitnami/mongodb-shared . But I couldn't create a valid PV for this helm chart.</p> <p>The error that I am getting: no persistent volumes available for this claim and no storage class is set</p> <p>This is the helm chart documentation section about Persistence...
<p>I am giving the <code>bitnami/mongodb-sharded</code> installation instruction with NFS server on Rancher(v2.5.8).</p> <p>I have three Centos 8 VM. One NFS server(lets we say 1.1.1.1), two k8s nodes(lets we say 8.8.8.8 and 9.9.9.9) on k8s-cluster, i am using RKE(aka Rancher K8S Engine)</p> <ol> <li>We will create a N...