prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I have a cronjob that keeps restarting, despite its <code>RestartPolicy</code> set to <code>Never</code>:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: cron-zombie-pod-killer
spec:
schedule: "*/9 * * * *"
successfulJobsHistoryLimit: 1
jobTemplate:
spec:
template:
... | <p>That is by design. <code>restartPolicy</code> is not applied to a CronJob, but a Pod it creates.</p>
<p>If <code>restartPolicy</code> is set to <code>Never</code>, it will ust create new pods, if the previous failed. Setting it to <code>OnFailure</code> causes the Pod to be restarted, and prevents the stream of new ... |
<p>I am learning the Google Cloud platform, trying to implement my first project and am getting lost in the tutorials. I am stuck at the trying to implement an nginx ingress. My ingress is stuck in CrashLoopBackoff and the logs show the following error.</p>
<p>I know how to do this task with DockerCompose, but not here... | <p>Instead of using that and following setup of GCP CA setup i would suggest using <a href="https://cert-manager.io/docs/" rel="nofollow noreferrer">cert-manager</a> with the ingress.</p>
<p>Cert-manager will get the <strong>TLS</strong> cert from <strong>let's-encrypt CA</strong> , cert-manager will create the secret ... |
<p>I am new to Kubernetes and AWS and I have a problem. I am trying to run parallel Kubernetes jobs on an EKS cluster. How can I get the environment variable JOB_COMPLETION_INDEX?
I have tested my Java code before with Minikube "locally", there everything works fine. But when I switch to the EKS cluster, Syst... | <p>This is a v1.22 beta feature which currently not available on EKS v1.21.x.</p>
|
<p>I need to create kubernetes job that will run below script on mongo shell:</p>
<pre><code>var operations = [];
db.product.find().forEach(function(doc) {
var documentLink = doc.documentLink;
var operation = { updateMany :{
"filter" : {"_id" : doc._id},
"update" : {$set:{"d... | <p>You can solve it much easier with <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer"><code>configMap</code></a> and then mount the <code>configMap</code> as a volume which will be resolved in a file.</p>
<p>Below is example how to proceed with it (No... |
<p>I've setup a very <strong>simple local kubernetes cluster</strong> for development purposes, and for that I aim to pull a docker image for my pods from ECR.</p>
<p>Here's the code</p>
<pre><code> terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
... | <p>After a while, I figured out the cleanest way to achieve this;</p>
<p><strong>First</strong> retrieve your <strong>ECR authorization token</strong> data;</p>
<pre><code>data "aws_ecr_authorization_token" "token" {
}
</code></pre>
<p><strong>Second</strong>, create a <strong>secret for your kubern... |
<p>In my project, I need to test if Guaranteed Application pods should evict any dummy application pods which are running. How do I achieve that application pods always have the highest priority?</p>
| <p>The answer provided by the <a href="https://stackoverflow.com/users/6309601/p">P....</a> is very good and useful. By <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/" rel="nofollow noreferrer">Pod Priority and Preemption</a> you can achieve what you are up to.</p>
<p>However,... |
<p>Kubernetes has a support of Pod load-balancing, session affinity through its <code>kube-proxy</code>. Kubernetes’ kube-proxy is essentially an L4 load balancer so we cannot rely on it to load balance L7-transport, e.g. muliple gRPC live connections or load-balancing based on http-headers, cookies, etc.</p>
<p>Servic... | <p>Let me refer first to the following statement of yours:</p>
<blockquote>
<p>My assumption always was that Kubernetes applications should be able
to work on both vanilla Kubernetes without Mesh (e.g. for
development/testing) or with a Mesh on. Adding this advanced traffic
management on L7 breaks this assumption.</p>
... |
<p>I need to create a <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer"><code>NetwrokPolicy</code></a> for my pod which from the network aspects needs
to access to <strong>only one specific endpoint</strong> outside the cluster, only this endpoint.</p>
<p>The ... | <p>As you defined egress with ports:</p>
<pre><code>ports:
- protocol: TCP
port: 8080
</code></pre>
<p>which means allowing connections to ip 140.224.232.236 on <strong>TCP port</strong> 8080.</p>
<p>However, <code>ping</code>(ICMP) doesnot know the port. Ping will fail every time.</p>
<p><a href="https://i.stack.img... |
<p>Can traefik act as a reverse proxy for some external endpoint ? Like nginx's proxy path for a specific location.
For example, I'd like to perform transparent reverse-proxying to <a href="https://app01.host.com" rel="nofollow noreferrer">https://app01.host.com</a> which is in another datacenter</p>
<pre><code>apiVers... | <p>I found that external name services are per default disabled when using traefik with helm. Note that this has to be set for <code>kubernetesCRD</code> and for <code>kubernetesIngress</code> seperately. This is not explained well in the documentation: <a href="https://doc.traefik.io/traefik/routing/providers/kubernet... |
<p>Concerning the <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale" rel="nofollow noreferrer">Kubernetes Horizontal Autoscaler</a>, are there any metrics related to the number of changes between certain time periods?</p>
| <p>Kubernetes does not provide such metrics, but you can get <code>events</code> for a k8s resource.</p>
<blockquote>
<p>An event in Kubernetes is an object in the framework that is automatically generated in response to changes with other resources—like nodes, pods, or containers.</p>
</blockquote>
<p>The simplest way... |
<h1>Overview</h1>
<p>I am writing a Kubernetes controller for a VerticalScaler CRD that can vertically scale a Deployment in the cluster. My spec references an existing Deployment object in the cluster. I'd like to enqueue a reconcile request for a VerticalScaler if the referenced Deployment is modified or deleted.</p>... | <p>As an alternative to <code>EnqueueRequestsFromMapFunc</code>, you can use:</p>
<pre class="lang-golang prettyprint-override"><code>ctrl.NewControllerManagedBy(mgr).
For(&v1beta1.VerticalScaler{}).
Watches(
&source.Kind{Type: &appsv1.Deployment{}},
handler.Funcs{CreateFunc: r.Creat... |
<p>I am running a <strong>3 Node Kubernetes cluster with Flannel as CNI</strong>. I used kubeadm to setup the cluster and the version is 1.23.</p>
<p>My pods need to talk to external hosts using DNS addresses but there is no DNS server for those hosts. For that, I have added their entries in /etc/hosts on each node in ... | <p>Environments in the container should be separated from other containers and machines (including its host machine), and the same goes for /etc/hosts.</p>
<p>If you are using coreDNS (the default internal DNS), you can easily add extra hosts information by modifying its configMap.</p>
<p>Open the configMap <code>kubec... |
<p>I have a multi-node cluster setup. There are Kubernetes network policies defined for the pods in the cluster. I can access the services or pods using their clusterIP/podIP only from the node where the pod resides. For services with multiple pods, I cannot access the service from the node at all (I guess when the ser... | <p>No, it is not the expected behavior for Kubernetes. Pods should be accessible for all the nodes inside the same cluster through their internal IPs. <code>ClusterIP</code> service exposes the service on a cluster-internal IP and making it reachable from within the cluster - it is basically set by default for all the... |
<p>Basically, I had installed Prometheues-Grafana from the <a href="https://github.com/prometheus-operator/kube-prometheus" rel="noreferrer">kube-prometheus-stack</a> using the provided helm chart repo <a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack" rel="noreferrer">... | <p>It's not enough to simply install them, you need to <strong>integrate</strong> <code>prometheus</code> with <code>thanos</code>.</p>
<p>Below I'll describe all steps you need to perform to get the result.</p>
<p>First short theory. The most common approach to integrate them is to use <code>thanos sidecar</code> cont... |
<p>I have tried setting max nodes per pod using the following upon install:</p>
<pre class="lang-sh prettyprint-override"><code>curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--max-pods 250" sh -s -
</code></pre>
<p>However, the K3s server will then fail to load. It appears that the <code>--max-pods</code> ... | <p>To update your existing installation with an increased max-pods, add a kubelet config file into a k3s associated location such as <code>/etc/rancher/k3s/kubelet.config</code>:</p>
<pre><code>apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
maxPods: 250
</code></pre>
<p>edit <code>/etc/systemd/sys... |
<p>I'm trying to scale up & down deployments from within a pod.<br />
To do that, I've created a service account, clusterrolebinding with the following rbac:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
namespace: backups-scripts
name... | <p>I think the error message you pasted suggests it well:</p>
<pre><code>$ kubectl scale --replicas="$replicas" deployment -n "vm-catalogue" "mysql"
Error from server (Forbidden): deployments.extensions "mysql" is forbidden: User "system:serviceaccount:backups-scripts:backu... |
<p>We are using AWS EKS, i deployed Promethus using the below command:</p>
<pre><code>kubectl create namespace prometheus
helm install prometheus prometheus-community/prometheus \
--namespace prometheus \
--set alertmanager.persistentVolume.storageClass="gp2" \
--set server.persistentVolume.stora... | <p>This is because you're targeting the wrong service. You're using the alert manager url instead of the prometheus server.<br />
The URL should be this one :</p>
<pre class="lang-yaml prettyprint-override"><code>url: http://prometheus-server.prometheus.svc.cluster.local
</code></pre>
|
<p>I'm trying to create a GKE Ingress that points to two different backend services based on path. I've seen a few posts explaining this is only possible with an nginx Ingress because gke ingress doesn't support rewrite-target. However, this Google documentation, <a href="https://cloud.google.com/kubernetes-engine/docs... | <p>GCP Ingress supports multiple paths. This is also well described in <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">Setting up HTTP(S) Load Balancing with Ingress</a>. For my test I've used both Hello-world v1 and v2.</p>
<p>There are 3 possible issues.</p>... |
<p>Good afternoon everyone, I have a question about adding monitoring of the application itself to prometheus.
I am using spring boot actuator and see the values for prometheus accordingly: <a href="https://example.com/actuator/prometheus" rel="nofollow noreferrer">https://example.com/actuator/prometheus</a>
I have rai... | <p>In prometheus-operator,</p>
<p><code>additionalScrapeConfigs</code> is not used in this way.</p>
<p>According to documentation <a href="https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/additional-scrape-config.md" rel="nofollow noreferrer">Additional Scrape Configuration</a>:
<stron... |
<p>I've update my Airbyte image from <code>0.35.2-alpha</code> to <code>0.35.37-alpha</code>.
[running in kubernetes]</p>
<p>When the system rolled out the db pod wouldn't terminate and I [a terrible mistake] deleted the pod.
When it came back up, I get an error -</p>
<pre><code>PostgreSQL Database directory appears to... | <p><em>Warning</em> - there is a potential for data loss</p>
<p>This is a test system, so I wasn't concerned with keeping the latest transactions, and had no backup.</p>
<p>First I overrode the container command to keep the container running but not try to start postgres.</p>
<pre><code>...
spec:
containers:
... |
<p>Apologies for a basic question. I have a simple Kubernetes deployment where I have 3 containers (each in their own pod) deployed to a Kubernetes cluster.</p>
<p>The <code>RESTapi</code> container is dependent upon the <code>OracleDB</code> container starting. However, the <code>OracleDB</code> container takes a whil... | <p><em>This is a community wiki answer posted for better visibility. Feel free to expand it.</em></p>
<p>The best approach in this case is to improve your “RESTapi” application to provide a more reliable and fault-tolerant service that will allow it reconnect to the database anyway.</p>
<p>From <a href="https://github.... |
<p>I am trying to make a Kubernetes deployment script using helm.
I created following 2 jobs (skipped the container template since I guess it does not matter)</p>
<p>templates/jobs/migrate.yaml</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Release.Name }}-migrate
namespace: {{ .Release.Namespace... | <p>Replying to your last comment and thanks to @HubertNNN for his idea:</p>
<blockquote>
<p>Can I run a suspended job multiple times? From documentation it seems
like a one time job that cannot be rerun like normal jobs</p>
</blockquote>
<p>It's normal job, you just editing yaml file with the <code>.spec.suspend: true<... |
<p>we are planning to introduce AWS spot instances in production ( non-prod is running with spot already ). In order to achieve HA we are running HPA with minimum replicas 2 for all critical deployments. Because of the spot instances behaviour we want to run on-demand instances and one pod should be running on on-deman... | <p>Following up on your last message:</p>
<blockquote>
<p>Will check the two deployments with same label in non-prod then we will update here.</p>
</blockquote>
<p>Just wondering how this went. Was there any issues/gotchas from this setup that you could share. Are you currently using this setup, or have you moved on to... |
<p>I'm unable to launch new pods despite resources seemingly being available.</p>
<p>Judging from the below screenshot there should be room for about 40 new pods.</p>
<p><a href="https://i.stack.imgur.com/CHW8S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CHW8S.png" alt="enter image description he... | <p>Your problem is "volume node affinity conflict".</p>
<p>From <a href="https://stackoverflow.com/a/55514852">Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict</a>:</p>
<blockquote>
<p>The error "volume node affinity conflict" happens when the persistent volume claims that the pod... |
<p>We had a major outage when both our container registry and the entire K8S cluster lost power. When the cluster recovered faster than the container registry, my pod (part of a statefulset) is stuck in <code>Error: ImagePullBackOff</code>.</p>
<p>Is there a config setting to retry downloading the image from the CR pe... | <p>The <code>BackOff</code> part in <code>ImagePullBackOff</code> status means that Kubernetes is keep trying to pull the image from the registry, with an exponential back-off delay (10s, 20s, 40s, …). The delay between each attempt is increased until it reaches a compiled-in limit of 300 seconds (5 minutes) - more ... |
<p>I am trying to build and tag a docker image in Github Actions runner and am getting this error from the runner</p>
<pre class="lang-sh prettyprint-override"><code>unable to prepare context: path " " not found
Error: Process completed with exit code 1.
</code></pre>
<p>I have gone through all other similar ... | <p>The problem was basically a white-spacing issue. Nothing could show this. Thanks to <a href="https://stackoverflow.com/a/69033092/16069603">This Github answer</a></p>
|
<p>I'm currently evaluating Knative but I've definitely find no way to use path instead of subdomain in the URL for accessing service.</p>
<p>By default, when creating an service, the URL is made like this: <a href="http://Name.Namespace.Domain" rel="nofollow noreferrer">http://Name.Namespace.Domain</a> and what I woul... | <p>Knative uses subdomains rather than URL paths because the underlying container could handle many different URLs, and might encode requests with absolute URLs (which might point to a different function depending on deployment) or relative URLs (which would point within the current application).</p>
<p>If you want to ... |
<p>The docs show <code>argocd login <ARGOCD_SERVER></code> but they never say what ARGOCD_SERVER is. How can we login to ArgoCD on a kind cluster?</p>
| <p><code>ARGOCD_SERVER</code>: IP or domain to access in dashboard of ArgoCD.<br />
Example:</p>
<pre><code>argocd login 10.12.156.99:8443
argocd login argocd.xxx.com
</code></pre>
|
<p>I have hard time getting this working with NLB using ingress controller :
<a href="https://kubernetes.github.io/ingress-nginx/deploy/#network-load-balancer-nlb" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#network-load-balancer-nlb</a></p>
<p>Even subnets are not taking effect here ,... | <p>The number of <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/service/annotations/#eip-allocations" rel="nofollow noreferrer">eip allocations</a> must match the number of subnets in the <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/service/annot... |
<p>I am using AWS Opensearch to retrieve the logs from all my Kubernetes applications.
I have the following pods: <code>Kube-proxy</code>, <code>Fluent-bit</code>, <code>aws-node</code>, <code>aws-load-balancer-controller</code>, and all my apps (around 10).</p>
<p>While fluent-bit successfully send all the logs from <... | <p>Finally, I did two things that solved my issue:</p>
<ol>
<li>Modified this configuration:</li>
</ol>
<pre><code># before
output-elasticsearch.conf: |
[OUTPUT]
Name es
Match *
Host search-blacaz-logs-szzq6vokwwm4y5fkfwyngjwjxq.ap-southeast-1.es.amazonaws.co... |
<p>I am trying to understand where do these username field is mapped to in the Kubernetes cluster.</p>
<p>This is a sample configmap:</p>
<pre><code>apiVersion: v1
data:
mapRoles: |
- rolearn: arn:aws:iam::111122223333:role/eksctl-my-cluster-nodegroup
username: system:node:{{EC2PrivateDNSName}}
groups... | <p>Posting the answer as a community wiki, feel free to edit and expand.</p>
<hr />
<ol>
<li>As you can read in <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#core-component-roles" rel="nofollow noreferrer">documentation</a>, <code>system:node</code> require to have prefix <code>system</code>. I... |
<p>I create a k8s deployment script with python, and to get the configuration from <code>kubectl</code>, I use the python command:</p>
<pre><code>from kubernetes import client, config
config.load_kube_config()
</code></pre>
<p>to get the azure aks configuration I use the following <code>az</code> commands:</p>
<pre... | <p>Yes, this can be done with the Azure Python SDK.</p>
<pre class="lang-py prettyprint-override"><code>from azure.identity import DefaultAzureCredential
from azure.mgmt.containerservice import ContainerServiceClient
credential = DefaultAzureCredential(exclude_cli_credential=True)
subscription_id = os.environ["AZ... |
<p>we have a <strong>deamonset</strong> and we want to make it HA (not our deamonset), does the following is applicable for HA for deamaon set also?</p>
<ul>
<li>affinity (anti affinity)</li>
<li>toleration's</li>
<li>pdb</li>
</ul>
<p>we have on each cluster 3 worker nodes
I did it in the past for deployment but not s... | <p>You have asked two, somewhat unrelated questions.</p>
<blockquote>
<p>does the following is applicable for HA for deamaon set also?</p>
<ul>
<li>affinity (anti affinity)</li>
<li>toleration's</li>
<li>pdb</li>
</ul>
</blockquote>
<p>A <a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/" rel... |
<p>I am using K8S with helm.</p>
<p>I need to run pods and dependencies with a predefined flow order.</p>
<p>How can I create helm dependencies that run the pod only once (i.e - populate database for the first time), and exits after first success?</p>
<p>Also, if I have several pods, and I want to run the pod only on c... | <p>You can achieve this using helm hooks and K8s Jobs, below is defining the same setup for Rails applications.</p>
<p>The first step, define a k8s job to create and populate the db</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "my-chart.name" . }}-db-prepare
annotations:
&... |
<p>I am using K8S with helm.</p>
<p>I need to run pods and dependencies with a predefined flow order.</p>
<p>How can I create helm dependencies that run the pod only once (i.e - populate database for the first time), and exits after first success?</p>
<p>Also, if I have several pods, and I want to run the pod only on c... | <p>There is a fixed order with which helm with create resources, which you cannot influence apart from <a href="https://helm.sh/docs/topics/charts_hooks/" rel="nofollow noreferrer">hooks</a>.</p>
<p>Helm hooks can cause more problems than they solve, in my experience. This is because most often they actually rely on re... |
<p>Running microk8s v1.23.3 on Ubuntu 20.04.4 LTS. I have set up a minimal pod+service:</p>
<pre><code>kubectl create deployment whoami --image=containous/whoami --namespace=default
</code></pre>
<p>This works as expected, curl <code>10.1.76.4:80</code> gives the proper reply from <code>whoami</code>.
I have a service ... | <p>Ok, figured it out.
I had forgotten to specify the <code>ingress.class</code> in the annotations-block.
I updated <code>ingress-whoami.yaml</code>:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whoami-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: publi... |
<p>Kubernetes newbie here.</p>
<p>I have some strange Skaffold/Kubernetes behavior. I'm working in Google Cloud but I've changed to the local environment just for test and it's the same. So probably it's me how's doing something wrong. The problem is that though I see Skaffold syncing changes these changes aren't refle... | <p>What worked for me was using <code>--poll</code> flag with <code>ts-node-dev</code>.
My script looks like this</p>
<pre class="lang-json prettyprint-override"><code>"start" : "ts-node-dev --respawn --poll --inspect --exit-child src/index.ts
</code></pre>
|
<p>I'm trying to start minikube on ubuntu 18.04 inside nginx proxy manager docker network in order to setup some kubernetes services and manage the domain names and the proxy hosts in the nginx proxy manager platform.</p>
<p>so I have <code>nginxproxymanager_default</code> docker network and when I run <code>minikube s... | <p>A similar error was reported with <a href="https://github.com/kubernetes/minikube/issues/12894" rel="nofollow noreferrer">kubernetes/minikube issue 12894</a></p>
<blockquote>
<p>please check whether there are other services using that IP address, and try starting minikube again.</p>
</blockquote>
<p>Considering <a h... |
<p>I have the following cronjob which deletes pods in a specific namespace.</p>
<p>I run the job as-is but it seems that the job doesn't run for each 20 min, it runs every few (2-3) min,
what I need is that on each 20 min the job will start deleting the pods in the specified namespace and then terminate, any idea what ... | <p>This cronjob pod will delete itself at some point during the execution. Causing the job to fail and additionally resetting its back-off count.</p>
<p>The <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy" rel="nofollow noreferrer">docs</a> say:</p>
<blockquote>
<p>The... |
<p>The application is in Azure Functions,</p>
<p>The error that we are getting from container Pod logs is "Could not load type 'Microsoft.Azure.WebJobs.Host.Scale.ConcurrencyManager' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.26.0".</p>
<p>In our application version all of the dll ver is 3.0.30.... | <p>For me this was happening because <strong>Azure Functions Core Tools</strong> version mismatched due to upgradation of <strong>Visual Studio</strong> to latest version.
Removing the Azure Function Tools from the system path <code>C:\Users\user.name\AppData\Local\AzureFunctionsTools</code> and Let Visual Studio autom... |
<p><strong>nginx Ingress</strong> is mainly used for <em>path based routing</em> and <em>sub domain based routing</em> to route the request to particular pod and <strong>Cloud provider load balancer</strong> will provide external ip address to get the requests from external world and which in turn points to ingress.</p... | <p>Yes you are correct, so the flow goes like</p>
<p>You create the LB on any Cloud provider which gives you endpoint to the <strong>internet</strong> you can use it with ingress controller. (You can further use the SSL/TLS certificate also with LB to run HTTPS)</p>
<p>If you are using the <strong>Nginx ingress control... |
<p>I am creating a program that gets a list of all deployments from Kubernetes as a <code>*v1.DeploymentList</code>. I managed to do that and it works. Then I do some processing of this list and execute many actions afterwards. Now, I have a new requirement; need to also be able to pull just ONE deployment and apply th... | <p>when you look at the definition of v1.DeploymentList you can see where the Deployment is located:</p>
<pre><code>// DeploymentList is a list of Deployments.
type DeploymentList struct {
metav1.TypeMeta `json:",inline"`
// Standard list metadata.
// +optional
metav1.ListMeta `json:"meta... |
<p>I have an Azure kubernetes cluster, but because of the limitation of attached default volumes per node (8 at my node size), I had to find a different solution to provision volumes.<br />
The solution was to use Azure files volume and I followed this article <a href="https://learn.microsoft.com/en-us/azure/aks/azure-... | <p>It appears to be the permissions of volumes mounted this way that is causing the issue.</p>
<p>If we modify your storage class to match the uid/gid of the mysql user, the pod can start:</p>
<pre><code>apiVersion: storage.k8s.io/v1
kind: StorageClass
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=999
- gid=999
... |
<p>I've got an issue, I'm trying to install linkerd on my cluster, all is going well</p>
<p>I went exactly with this official README</p>
<pre class="lang-sh prettyprint-override"><code>https://linkerd.io/2.11/tasks/install-helm/
</code></pre>
<p>installed it via helm</p>
<pre class="lang-sh prettyprint-override"><code>... | <p>From your problem descripiton:</p>
<blockquote>
<p>‼ linkerd-viz pods are injected
could not find proxy container for grafana-8d54d5f6d-cv7q5 pod
see <a href="https://linkerd.io/2.11/checks/#l5d-viz-pods-injection" rel="nofollow noreferrer">https://linkerd.io/2.11/checks/#l5d-viz-pods-injection</a> for hints</p>
</b... |
<p>I'm getting below error whenever I'm trying to apply an ingress resource/rules yaml file:</p>
<p><em><strong>failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": EOF</strong></em... | <p>Ok, I got this working now:
I was getting the status as "OOMKilled" (Out Of Memory). So what I did is I've added the "limits:" section under "resources:" section of Deployment yaml as below:</p>
<pre><code> resources:
requests:
cpu: 100m
memory: 90Mi
... |
<p>Is it possible to create a kubernetes RBAC rule that allows creating a Job from an existing CronJob, but prevents creating a Job any other way?</p>
<p>We want to keep our clusters tightly locked down to avoid arbitrary deployments not managed by CICD - but we also need to facilitate manual testing of CronJobs, or re... | <p>In this scenario in order to successfully execute this command:</p>
<pre><code>kubectl create job --from=cronjob/<cronjob_name>
</code></pre>
<p>User/ServiceAccount should have proper <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">RBAC</a> rules (at least tw... |
<p>I have deployed ambassador edge stack and I am using hosts and mapping resources to route my traffic. I want to implement the mapping in such a way that if there is any double slash in the path, using regex (or any other available way) to remove one slash from it.
For example, if client request <code>https://a.test.... | <p>There is the <a href="https://www.getambassador.io/docs/emissary/1.14/topics/running/ambassador/#the-module-resource" rel="nofollow noreferrer">Module Resource</a> for emissary ingress.</p>
<blockquote>
<p>If present, the Module defines system-wide configuration. This module can be applied to any Kubernetes service ... |
<p>service type : Nodeport</p>
<p>problem : can't access clusterIP:Nodeport</p>
<p>and find kube-proxy pod log like below</p>
<p>"can't open port, skipping it" err="listen tcp4 :32060: bind: address already in use" port={Description:nodePort for default/network-example2 IP: IPFamily:4 Port:32060 Pro... | <p>This seems to be caused by a reported <a href="https://github.com/kubernetes/kubernetes/issues/107170" rel="nofollow noreferrer">bug</a> in the kube-proxy versions after v1.20.x (mine is v1.23.4). This <a href="https://github.com/kubernetes/kubernetes/pull/107413" rel="nofollow noreferrer">fix</a> is merged in the u... |
<p>With k3d, I am receiving a DNS error when the pod tries to access a URL over the internet.</p>
<pre><code>ERROR:
getaddrinfo EAI_AGAIN DNS could not be resolved
</code></pre>
<p>How can I get past this error?</p>
| <p>It depends on your context, OS, version.</p>
<p>For instance, you will see various proxy issue in <a href="https://github.com/k3d-io/k3d/issues/209" rel="nofollow noreferrer"><code>k3d-io/k3d</code> issue 209</a></p>
<p>this could be related to the way k3d creates the docker network.</p>
<blockquote>
<p>Indeed, k3d ... |
<p>I am getting this error in clusterissuer (cert-manager version 1.7.1):</p>
<p>"Error getting keypair for CA issuer: error decoding certificate PEM block"</p>
<p>I have the ca.crt, tls.crt and tls.key stored in a Key Vault in Azure.</p>
<p><strong>kubectl describe clusterissuer ca-issuer</strong></p>
<pre><... | <p>I figured it out just uploading the certificate info <strong>ca.crt</strong>. <strong>tls.crt</strong> and <strong>tls.key</strong> <strong>in plain text, without BASE64 encoding</strong> in the Key Vault secrets in Azure.</p>
<p>When AKV2K8S retrives the secrets from the Key Vault and stored in Kubernetes, automati... |
<p>I am trying to backup a database from a kubernetes cluster to my computer as a bson file. I have connected my mongodb compass to the kubernetes cluster using port-forwarding. Can anyone help me with the command I need to download a particular Collection (450gb) from a databank to my desktop?</p>
<p>I've been trying ... | <p>From the mongodb official docs:</p>
<blockquote>
<p>Run <a href="https://docs.mongodb.com/database-tools/mongodump/#mongodb-binary-bin.mongodump" rel="nofollow noreferrer"><code>mongodump</code></a> from the system command line, not the <a href="https://docs.mongodb.com/manual/reference/program/mongo/#mongodb-bin... |
<p>Let's assume I have a node labeled with the labels <code>myKey1: 2</code>, <code>myKey2: 5</code>, <code>myKey3: 3</code>, <code>myKey4: 6</code>. I now want to check if one of those labels has a value greater than 4 and if so schedule my workload on this node. For that I use the following <code>nodeAffinity</code> ... | <p>As <a href="https://stackoverflow.com/users/1909531/matthias-m" title="9,753 reputation">Matthias M</a> wrote in the comment:</p>
<blockquote>
<p>I would add an extra label to all nodes, which should match. I think that was the simplest solution. Was that also a solution for you? <a href="https://kubernetes.io/docs/... |
<p>I want to force the interface, setting the <code>IP_AUTODETECTION_METHOD</code>:</p>
<pre><code>$ kubectl set env daemonset/calico-node -n calico-system IP_AUTODETECTION_METHOD=interface=ens192
daemonset.apps/calico-node env updated
</code></pre>
<p>But nothing happens:</p>
<pre><code>$ kubectl set env daemonset/c... | <p>On my cluster, running this:</p>
<pre><code>kubectl set env daemonset/calico-node -n kube-system IP_AUTODETECTION_METHOD=interface=vbmgt0
</code></pre>
<p>from the control node did the trick as expected.</p>
<p>Are you running kubectl from the proper node ?</p>
|
<p>All I have is a GKE cluster and there are 3 node pools and the machine size is <code>e2-standard-2</code> but when I push my deployment into this cluster I got this error on gke dashboard
<a href="https://i.stack.imgur.com/FDVOl.png" rel="nofollow noreferrer">error image</a></p>
<p>Although I have enabled the node a... | <p>From what I understand, you are using <code>Standard GKE</code> not <code>Autopilot GKE</code>.</p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning" rel="nofollow noreferrer">Using node auto-provisioning</a> GKE documentation provides much information about this feature.</p>... |
<p>The Minikube cluster on my Debian system removes all resources which have been up and running after I run <code>minikube stop</code> or shutting down the system.</p>
<p>What could possibly be the reason? How can I persist it?</p>
<p>Kubernetes & Kubectl version 1.23.1.</p>
| <p>Posting it as an answer: the issue with removing all deployed resources in Minikube cluster after <code>minikube stop</code> and system shutdown was raised <a href="https://github.com/kubernetes/minikube/issues/12655" rel="nofollow noreferrer">here</a>. It is currently fixed in the newest release, upgrading your Min... |
<p>We are working with Akka and have an application which uses Akka Cluster that we deploy to AWS EKS environment. When we run a load test against the application we observe heartbeat intervals between the components growing large and pods getting restarted. Akka documentation mentions not to use CPU resource limit, an... | <p>So, I know the docs do make this recommendation to not use limits so the following is just "unofficial" advice you are getting from StackOverflow. (And thus, if you want support from Lightbend you will have to debate this with them.)</p>
<p>Firstly, I agree with you. For many reasons, you absolutely shoul... |
<p>database-deployment.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: postgres
name: postgres-db
spec:
replicas:
selector:
matchLabels:
app: postgres-db
template:
metadata:
labels:
app: postgres-db
spec:
containers:
- name: pos... | <p>According to the error you are having:</p>
<p><code>Driver org.postgresql.Driver claims to not accept jdbcUrl</code></p>
<p>It seems that there are a few issues with that URL, and a latest PSQL driver may complain.</p>
<ol>
<li><code>jdbc:postgres:</code> isn't right, use <code>jdbc:postgresql:</code>instead</li>
<l... |
<p>When adding a kustomize patch to a <code>kustomization.yaml</code> the double quotes are replaced with single quotes that lead to error</p>
<p>I am using the following:</p>
<pre class="lang-sh prettyprint-override"><code>kustomize edit add patch --patch "- op: add\n path: /metadata/annotations/argocd.argoproj.... | <p>Since I had hundreds of kustomization files that needed to be updated with the annotations for ArgoCD sync-waves, I worked around the problem by using <code>commonAnnotations</code> instead (I believe this is the right way of doing it as well). So instead of adding a patch, I did the following:</p>
<pre><code>kustom... |
<p>I have installed minikube in my windows 10. I was able to create deployment and work. But when i stop minikube everything(including deployment) is lost. How to run minikube as a service startup in windows?</p>
| <p>I've reproduced your problem on <code>1.25.1</code> version - indeed, all resources that were deployed in the cluster are deleted on <code>minikube stop</code>.</p>
<p>As I already mentioned in the comments, this issue was raised <a href="https://github.com/kubernetes/minikube/issues/12655" rel="nofollow noreferrer"... |
<p>I'm trying to setup a Google Kubernetes Engine cluster with GPU's in the nodes loosely following <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/gpus#gcloud" rel="nofollow noreferrer">these instructions</a>, because I'm programmatically deploying using the Python client.</p>
<p>For some reason I can ... | <p>According the docker image that the container is trying to pull (<code>gke-nvidia-installer:fixed</code>), it looks like you're trying use Ubuntu daemonset instead of <code>cos</code>.</p>
<p>You should run <code>kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/mas... |
<p>For two Statefulsets <code>sts1</code> and <code>sts2</code>, would it be possible to schedule:</p>
<ul>
<li>sts1-pod-0 and sts2-pod-0 on the same node,</li>
<li>sts1-pod-1 and sts2-pod-1 on the same node,</li>
<li>...</li>
<li>sts1-pod-n and sts2-pod-n on the same node,</li>
</ul>
<p>An in addition do not collocate... | <pre><code>sts1-pod-0 and sts2-pod-0 on the same node,
sts1-pod-1 and sts2-pod-1 on the same node,
...
sts1-pod-n and sts2-pod-n on the same node,
</code></pre>
<p>One possible way is run the paired containers in the same StatefulSet, this has the same effect as running side by side as pod on the same node. In this cas... |
<p>We are <strong>Prometheus version 2.26.0</strong> and <strong>kubernetes verion 1.21.7 in Azure</strong>. We mount the data in <strong>Azure storage NFS</strong> and it was working fine. From last few days Prometheus container is crash-looping and below are the logs</p>
<pre><code>level=info ts=2022-01-26T08:04:14.3... | <p><em><strong>Thank You <a href="https://stackoverflow.com/users/3781502/ywh">YwH</a> for your suggestion, Posting this an answer so it can help other community member if they encounter the same issue in future.</strong></em></p>
<p>As stated in this <a href="https://istio.io/latest/docs/ops/integrations/prometheus/" ... |
<p>I got an alert while configuring the monitoring module using <code>prometheus/kube-prometheus-stack 25.1.0</code>.</p>
<p><strong>Alert</strong></p>
<pre><code>[FIRING:1] KubeProxyDown - critical
Alert: Target disappeared from Prometheus target discovery. - critical
Description: KubeProxy has disappeared from Prome... | <p>This is what worked for me in AWS EKS cluster v1.21:</p>
<pre><code>$ kubectl edit cm/kube-proxy-config -n kube-system
---
metricsBindAddress: 127.0.0.1:10249 ### <--- change to 0.0.0.0:10249
$ kubectl delete pod -l k8s-app=kube-proxy -n kube-system
</code></pre>
<p>Note, the name of the config map is <code>kube-... |
<p>I have several Windows servers available and would like to setup a Kubernetes cluster on them.
Is there some tool or a step by step instruction how to do so?</p>
<p>What I tried so far is to install DockerDesktop and enable its Kubernetes feature.
That gives me a single node Cluster. However, adding additional nodes... | <p>You can always refer to the official kubernetes documentation which is the right source for the information.</p>
<p>This is the correct way to manage this question.</p>
<p>Based on <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/" rel="nofollow noreferrer">Adding Windows nod... |
<p>I am connecting to pod via client-Go and I want to get the properties of the file directory</p>
<pre><code>func GetPodFiles(c *gin.Context) {
client, _ := Init.ClusterID(c)
path := c.DefaultQuery("path", "/")
cmd := []string{
"sh",
"-c",
fm... | <p>In a Kubernetes pod you can execute the <code>stat</code> linux command instead of <code>ls</code> command.</p>
<pre><code>$ stat yourFileOrDirName
</code></pre>
<p>The output of this command by default is like this:</p>
<pre class="lang-yaml prettyprint-override"><code> File: yourFileOrDirName
Size: 346 ... |
<p>We are working with Akka and have an application which uses Akka Cluster that we deploy to AWS EKS environment. When we run a load test against the application we observe heartbeat intervals between the components growing large and pods getting restarted. Akka documentation mentions not to use CPU resource limit, an... | <p>There are two basic flavors of CPU limiting that Kubernetes supports: CFS and shares.</p>
<p>CFS places a hard limit on the host CPU time that a give container (or more properly the cgroup associated with the container) can consume: typically X milliseconds in every 100 milliseconds. Once the container has had X mi... |
<p>I made an app for video and audio transcoding using node.js, PostgreSQL, rabbitmq, EC2 with EBS, and Kubernetes.<br />
I am a little bit worried about storage size and computing power. Computing power is easy to solve but storage is more problematic.
The best will be a solution that automatically scales storage size... | <p>So one thing you can consider since you are on AWS is to use EFS (elastic file system) as a volume type. By adding the EFS provisioner and EFS storage class to your cluster, you can make use the dynamic sizing that EFS gives you. you wont have to worry about running out of space.</p>
<p>You can check out the efs pro... |
<p>I want to expose a few webapps in EKS to the internet in a centrally managed secure way.</p>
<p>In AWS, using an ALB is nice, as it for example allows you to terminate TLS and add authentication using Cognito. (<a href="https://aws.amazon.com/blogs/containers/how-to-use-application-load-balancer-and-amazon-cognito-t... | <p>I think I found a good solution.</p>
<p>I set up my environment using terraform.
After I set up the alb ingress controller, I can create a suitable ingress object, wait until the ALB is up, use terraform to extract the address of the ALB and use <code>publish-status-address</code> to tell nginx to publish exactly th... |
<p>Creating jobs like the following for example:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: batch/v1
kind: Job
metadata:
name: test-job-sebas
spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-... | <p>This sounds very similar to what I encountered when we had a misbehaving webhook.</p>
<p>If you have a massive number of jobs all showing as active, but no pods appearing, or pods taking a long time to appear, then that's a sign of an admission webhook interfering with the pod creation. If it's a cronjob affected, y... |
<p>I am using official Helm chart for airflow. Every Pod works properly <strong>except Worker node</strong>.</p>
<p>Even in that worker node, 2 of the containers (git-sync and worker-log-groomer) works fine.</p>
<p>The error happened in the 3rd container (worker) with CrashLoopBackOff. Exit code status as 137 OOMkilled... | <p>The issues occurs due to placing a <strong>limit</strong> in "<strong>resources</strong>" under helm chart - values.yaml in any of the pods.</p>
<p>By <strong>default</strong> it is -</p>
<pre><code>resources: {}
</code></pre>
<p>but this causes an issue as pods can access unlimited memory as required.</p>... |
<p>I need to retrieve SA token using output in my pipeline, i found an solution in here</p>
<p><a href="https://stackoverflow.com/questions/56080359/retrieve-token-data-from-kubernetes-service-account-in-terraform">Retrieve token data from Kubernetes Service Account in Terraform</a></p>
<p>but still dont work and get t... | <p>it seems that you missing the namespace declaration on your data object, you need it to look like that:</p>
<pre><code>data "kubernetes_secret" "deploy_user_secret" {
metadata {
name = kubernetes_service_account.deploy_user.default_secret_name
namespace = var.namespace
}
}
</code></pr... |
<p>In Terraform I wrote a resource that deploys to AKS. I want to apply the terraform changes multiple times, but don't want to have the error below. The system automatically needs to detect whether the resource already exists / is identical. Currently it shows me 'already exists', but I don't want it to fail. Any sugg... | <p>Thats the ugly thing with deploying thing inside Kubernetes with terraform....you will meet this nice errors from time to time and thats why it is not recommended to do it :/</p>
<p>You could try to just <a href="https://www.terraform.io/cli/commands/state/rm" rel="nofollow noreferrer">remove the record from the sta... |
<p>I am new to AKS and trying to set up the cluster and expose it via an app gateway ingress controller. While I was able to set up the cluster using az commands and was able to deploy and hit it using HTTP. I am having some challenges in enabling HTTPS over 443 in-app gateway ingress and looking to get some help.</p>
... | <p>This link can help you with KV add-on certificate on App GW: <a href="https://azure.github.io/application-gateway-kubernetes-ingress/features/appgw-ssl-certificate/" rel="nofollow noreferrer">https://azure.github.io/application-gateway-kubernetes-ingress/features/appgw-ssl-certificate/</a></p>
<p>I use different con... |
<p>I am trying to get the maximum capacity of pod per node. I am running <code>kubectl describe node nodename</code> and trying to grep the pods limit in capacity section. Any help would be appreciated. The output is like this.</p>
<pre><code>Capacity:
attachable-volumes-azure-disk: 8
cpu: ... | <p>if you want to use just native ooptions of kubectl command</p>
<p><code>kubectl get nodes <nodename> -o jsonpath='{.status.capacity.pods}{"\n"}'</code></p>
<p>If you dont need trailing newline character after the output:</p>
<p><code>kubectl get nodes <nodename> -o jsonpath='{.status.capacity.p... |
<p>After a <strong>mongodump</strong> I am trying to restore using <strong>mongorestore</strong>.</p>
<p>It works locally in seconds. However, when I <strong>kubectl exec -it</strong> into the pod of the primary mongodb node and run the same command it gets stuck and endlessly repeats the line with the same progress an... | <p>I found my answer here:
<a href="https://stackoverflow.com/a/41352269/18358598">https://stackoverflow.com/a/41352269/18358598</a></p>
<p><code>--writeConcern '{w:0}'</code>
works.</p>
|
<p>I want to deploy a MariaDB Galera instance onto a local Minikube cluster with 3 nodes via Helm.
I used the following command for that:</p>
<pre><code>helm install my-release bitnami/mariadb-galera --set rootUser.password=test --set db.name=test
</code></pre>
<p>The problem is, if I do that I get the following error ... | <p>In any case someone has issues with this, may I suggest running a initContainer before.</p>
<pre><code> initContainers:
- name: mariadb-create-directory-structure
image: busybox
command:
[
"sh",
"-c",
"mkdir -p /bitnami/mari... |
<p>In the below manifest yaml:</p>
<pre><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-operator
rules:
- apiGroups: [apiextensions.k8s.io]
resources: [customresourcedefinitions]
verbs: ['*']
- apiGroups: [monitoring.coreos.com]
resources:
- alertmanagers
- prome... | <p>In Kubernetes resources can be either <code>grouped resources</code> or <code>individual resources</code> .</p>
<p>Example :</p>
<pre><code>kubectl api-resources | grep 'crds\|pods\|NAME'
NAME SHORTNAMES APIVERSION NAMESPACED KIND
pods ... |
<p>I have a etcd cluster running on coreOS. The leader was set to the first member I've started (as expected), but I started the wrong one first, so the leader isn't who it's supposed to be.</p>
<p>How do I change the role of a leader to a different member?</p>
| <p>To change the leader in the etcd cluster you need to run a command:</p>
<pre><code>etcdctl move-leader id-of-the-node-you-want-to-be-the-leader
</code></pre>
<p>To get <code>id-of-the-node-you-want-to-be-the-leader</code> you need to run a command:</p>
<pre><code>etcdctl endpoint status -w table
</code></pre>
<p>Ful... |
<p>I am able to access my django app deployment using LoadBalancer service type but I'm trying to switch to ClusterIP service type and ingress-nginx but I am getting 503 Service Temporarily Unavailable when I try to access the site via the host url. Describing the ingress also shows <code>error: endpoints "django-... | <p>I think you forgot to make the link with your deployment in your service.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: django-service
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8000
selector:
app: your-deployment-name
</code></pre>
<p>Your la... |
<p>Is there a way to set quotas for directories inside each bucket in a MinIO server and monitor the size and quota with the API of each directory in the bucket?</p>
| <p>I have found <a href="https://docs.min.io/minio/baremetal/reference/minio-mc-admin/mc-admin-bucket-quota.html#mc-admin-bucket-quota" rel="nofollow noreferrer">this documentation</a> about bucket quota, but unfortunately it is just for buckets.</p>
<blockquote>
<p>The <a href="https://docs.min.io/minio/baremetal/refe... |
<p>I'm am trying to set up a kubernetes service where multiple pods share the same directory on an NFS volume. The NFS volume has a bunch of data pre-generated outside kubernetes in a specific directory for the pods to both read & write.</p>
<p>I can think of two ways to try this, neither of which are working prop... | <p>NFS volume support the <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">access mode</a> <code>ReadWriteMany</code>. Meaning you can mount it multiple times.</p>
<p>Since a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#lifecycl... |
<p>I have a simple setup that is using OAuth2 Proxy to handle authentication. It works fine locally using minikube but when I try to use GKE when the oauth callback happens I get a 403 status and the the following message...</p>
<blockquote>
<p>Login Failed: Unable to find a valid CSRF token. Please try again.</p>
</bl... | <p>In my case it was because I needed to set the cookie to <code>secure = false</code>. Apparently I could still have secure true no problem with http and an IP but once I uploaded with a domain it failed.</p>
|
<p>I just switched from ForkPool to gevent with concurrency (5) as the pool method for Celery workers running in Kubernetes pods. After the switch I've been getting a non recoverable erro in the worker:</p>
<p><code>amqp.exceptions.PreconditionFailed: (0, 0): (406) PRECONDITION_FAILED - delivery acknowledgement on chan... | <p>For future reference, it seems that the new RabbitMQ versions (+3.8) introduced a tight default for <code>consumer_timeout</code> (15min I think).</p>
<p>The solution I found (that has also been added to Celery docs not long ago <a href="https://docs.celeryproject.org/en/stable/userguide/calling.html" rel="noreferre... |
<p>I am aware about the hierarchical order of k8s resources. In brief,</p>
<ol>
<li><strong>service:</strong> a service is what exposes the application to outer world (or with in cluster). (The <strong>service</strong> <strong>types</strong> like, CluserIp, NodePort, Ingress are not so much relevant to this question. )... | <p>Both essentially serves the same purpose. Deployments are a higher abstraction and as the name suggests it deals with creating, maintining and upgrading the deployment (collection of pods) as a whole.
Whereas, ReplicationControllers or Replica sets primary responsibility is to maintain a set of identical replicas (w... |
<p>I wasn't really sure how to label this question, because i'll be good with any of the solutions above (inheritance of containers or defining parameters for the entire workflow without explicitly setting them in each step template).</p>
<p>i am currently working with argo yaml's and i want to define certain values th... | <p>just realised i haven't updated, so for anyone interested, what i ended up doing is setting an anchor inside a container template:</p>
<pre><code>templates:
#this template is here to define what env parameters each container has using an anchor.
- name: env-template
container:
env: &env_parameters
... |
<p>I'm currently migrating a DAG from airflow version 1.10.10 to 2.0.0.</p>
<p>This DAG uses a custom python operator where, depending on the complexity of the task, it assigns resources dynamically.
The problem is that the import used in v1.10.10 (<strong>airflow.contrib.kubernetes.pod import Resources</strong>) no lo... | <p>The proper syntax is for example:</p>
<pre><code>from kubernetes import client
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator
KubernetesPodOperator(
...,
resources = client.V1ResourceRequirements(
requests={"cpu": "1000m", "memor... |
<p>I'm following <a href="https://aws.amazon.com/it/blogs/security/how-to-use-aws-secrets-configuration-provider-with-kubernetes-secrets-store-csi-driver/" rel="nofollow noreferrer">this AWS documentation</a> which explains how to properly configure AWS Secrets Manager to let it works with EKS through Kubernetes Secret... | <p>Finally I realized why it wasn't working. As explained <a href="https://secrets-store-csi-driver.sigs.k8s.io/troubleshooting.html#common-errors" rel="nofollow noreferrer">here</a>, the error:</p>
<pre><code> Warning FailedMount 3s (x4 over 6s) kubelet, kind-control-plane MountVolume.SetUp failed for volume &quo... |
<p>I am new to Argo Workflows and following along with <a href="https://youtu.be/XySJb-WmL3Q?t=1247" rel="nofollow noreferrer">this tutorial</a>.</p>
<p>Following along with it, we are to create a service account and then attach the pre-existing <code>workflow-role</code> to the service account, like this:</p>
<pre cla... | <p>Actually, I think I got it, but if someone sees this, a confirmation would be nice.</p>
<p>I created a role file as follows:</p>
<pre class="lang-sh prettyprint-override"><code>role.yaml:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: workflow
rules:
- apiGroups:
- ""
resources:... |
<p>I am working with logs in my system.<br />
I want to use a log sidecar to collect business container's log.</p>
<p>And my business container's log will write to its <strong>STDOUT</strong>.</p>
<p>So I want to redirect this STDOUT to pod's volume file, because in a pod all containers share the same volume, so my sid... | <p>Adding this <code>2>&1 > /<your_path_to_volume_inside_pod>/file.log</code> to your <code>command</code> would redirect <code>STDOUT</code> and <code>STDERR</code> to a file</p>
|
<p>I have a java process which is running on k8s.</p>
<p>I set Xms and Xmx to process.</p>
<pre><code>java -Xms512M -Xmx1G -XX:SurvivorRatio=8 -XX:NewRatio=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -jar automation.jar
</code></pre>
<p>My expectation is that pod should consume 1.5 or 2 gb ... | <p>A Java process may consume much more physical memory than specified in <code>-Xmx</code> - I explained it in <a href="https://stackoverflow.com/questions/53451103/java-using-much-more-memory-than-heap-size-or-size-correctly-docker-memory-limi/53624438#53624438">this answer</a>.</p>
<p>However, in your case, it's not... |
<p>We are using Linkerd 2.11.1 on Azure AKS Kubernetes. Amongst others there is a Deployment using using an Alpine Linux image containing Apache/mod_php/PHP8 serving an API. HTTPS is resolved by Traefik v2 with cert-manager, so that in coming traffic to the APIs is on port 80. The Linkerd proxy container is injected as... | <p>Found it : Kubernetes sends asynchronuously requests to shutdown the pods and to no longer send traffic to them. And if the pod shuts down faster than it's removal from the IP lists, it can receive requests when already being dead.</p>
<p>To fix this, I added a <code>preStop</code> lifecycle hook to the application ... |
<p>I am trying to deploy ArgoCD and applications located in subfolders through Terraform in an AKS cluster.</p>
<p>This is my Folder structure tree:</p>
<p><em>I'm using app of apps approach, so first I will deploy ArgoCD (this will manage itself as well) and later ArgoCD will let me SYNC the cluster-addons and applica... | <p>The issue was with the values identation in TF code.</p>
<p>The issue was resolved when I resolve that:</p>
<pre><code>resource "helm_release" "argocd_applicationset" {
name = "argocd-applicationset"
repository = https://argoproj.github.io/argo-helm
chart = "argocd... |
<p>is there a set of commands to change the docker image name/tag in an existing deployment in a project in an OpenShift cluster?</p>
| <p>You can use the <code>oc set image</code> command to change the image for a container in an existing Deployment / DeploymentConfig:</p>
<pre><code>oc set image dc/myapp mycontainer=nginx:1.9.1
</code></pre>
<p>Try <code>oc set image --help</code> for some examples.</p>
|
<p>I'm using the SeleniumGrid in the most recent version <code>4.1.2</code> in a Kubernetes cluster.</p>
<p>In many cases (I would say in about half) when I execute a test through the grid, the node fails to kill the processes and does not go back to being idle. The container then keeps using one full CPU all the time ... | <p>If you don't need to use Xvfb you can remove it from your code and your problem will be resolved.</p>
<blockquote>
<p>Apparently the issue resolves when removing the <code>START_XVFB</code> parameter. With a node with only the timezone config I did not yet have the problem.</p>
</blockquote>
<p>For the workaround yo... |
<p>I'm trying to run this, after creating the folder \data\MongoDb\database and sharing it with everyone (Windows 10 doesn't seem to want to share with localsystem, but that should work anyway)</p>
<p>It crashes trying to Create the container with a 'Create Container error' I think that somehow I've specified the mappi... | <p>Adding this from comments so it will be visible to a community.</p>
<p>Docker Desktop for Windows provides an ability to access Windows files/directories from Docker containers. The windows directories are mounted in a docker container in <code>/run/desktop/mnt/host/</code> dir.</p>
<p>So, you should specify the pat... |
<p>I have a <a href="https://github.com/kubernetes-sigs/metrics-server" rel="nofollow noreferrer">metrics-server</a> and a horizontal pod autoscaler using this server, running on my cluster.<br />
This works perfectly fine, until i inject linkerd-proxies into the deployments of the namespace where my application is run... | <p>The problem was apparently a bug in the cAdvisor stats provider with the CRI runtime. The linkerd-init containers keep producing metrics after they've terminated, which shouldn't happen. The metrics-server ignores stats from pods that contain containers that report zero values (to avoid reporting invalid metrics, li... |
<p>I am using this link to have a Keycloak setup on my K8s cluster in Azure cloud.
<a href="https://www.keycloak.org/getting-started/getting-started-kube" rel="nofollow noreferrer">https://www.keycloak.org/getting-started/getting-started-kube</a></p>
<p>Even after following all the steps successfully, unable to get the... | <p>You can check out my YAML files to deploy the Keycloak on Kubernetes.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: keycloak
labels:
app: keycloak
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app: keycloak
type: ClusterIP
---
apiVersion: apps/v1
kind: Depl... |
<p>I'm using OVH cloud and K8S (with ingress/loadbalancer/nginx)</p>
<p>How can I route all my node traffic (my containers) to ingress (Loadbalancer)? Actually I got one Public IP by Node, (and they change every time I setup/delete node)</p>
<p><strong>The Goal</strong> : have always same public IP when I request exter... | <p>You can proxy container or proxy DNS option with each running pod which will pass the traffic to specific DNS pod and that will manage your traffic from one single Node.</p>
<p>However it's not scalable solution.</p>
<p>If you are using the <strong>istio</strong> also thn also you have to create the Egress gateway P... |
<p>I have a Minikube cluster setup in WSL 2 of Windows 10 pro, where the docker-for-windows is used with WSL2 integration. Minikube was started with default docker driver.</p>
<pre><code>$ minikube version
minikube version: v1.25.2
commit: 362d5fdc0a3dbee389b3d3f1034e8023e72bd3a7
</code></pre>
<p>If I follow the <a hre... | <p>Minikube in WSL2 with docker driver, creates a docker container with name <code>minikube</code> when <code>minikube start</code> command is executed. That container has some port mappings that helps kubectl and clients to connect to the server.</p>
<p>Notice that <code>kubectl cluster-info</code> connects to one of ... |
<p>I need to install Grafana Loki with Prometheus in my Kubernetes cluster. So I followed the below to install them. It basically uses Helm to install it. Below is the command which I executed to install it.</p>
<pre><code>helm upgrade --install loki grafana/loki-stack --set grafana.enabled=true,prometheus.enabled=tru... | <p>Well, I was able to get through my issue. The issue was "PodSecurityPolicy". I deleted the existing Grafana PodSecurityPolicy and it worked.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.