prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I want get name of resources from helm release. But I don't understand how.</p> <p>I don't find anything</p> <pre><code>helm get all RELEASE_NAME --template '{{range .items}}{{.metadata.name}}{{end}}' </code></pre>
<p><code>helm get all</code> has a somewhat constrained set of options for its <code>--template</code> option; it gets passed in a single <code>.Release</code> object, and the set of created Kubernetes options is stored in text in a <code>.Release.Manifest</code> field.</p> <pre class="lang-sh prettyprint-override"><co...
<p>Can any body explain istio Subsets and destination rules in a a simple manner and explain the problem they are trying to solve by introducing the subsets.</p>
<p><code>DestinationRule</code> is a resource that adds additional routing policies after routing happens to a <code>Service</code>, for example say that you have the following service:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: my-service namespace: default spec: selector: app: my-service ...
<p>I'm encountering a weird problem and not sure if I'm going crazy. I have the following rolebinding and clusterrolebinding yaml:</p> <pre><code># Standard CLI role, some executable dashboard permissions. kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: company-engineer-binding namespace:...
<ul> <li>rolebindings &amp; clusterrolebindings have got applied sucessfully</li> <li>It is more of a jsonpath query problem than applying rolebindgs.</li> </ul> <pre><code>kubectl get -f company-engineer-binding.yaml -o yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: creationTimestamp: &qu...
<p>I`m currently using the jboss/keycloak:12.0.4 container within my Kubernetes cluster with a single realm configuration. The configuration file is mounted through an configmap. The config file currently looks like {...realm1...}. Now I need three more realms and I have <a href="https://stackoverflow.com/questions/611...
<p>Since you are using <code>jboss/keycloak:12.0.4</code> I am assuming that you set <code>KEYCLOAK_IMPORT</code> environment variable, right?</p> <p>The docker container <a href="https://github.com/keycloak/keycloak-containers/blob/12.0.4/server/tools/docker-entrypoint.sh#L71" rel="nofollow noreferrer">maps this envir...
<p>I have a docker image with below entrypoint.</p> <pre><code>ENTRYPOINT [&quot;sh&quot;, &quot;-c&quot;, &quot;python3 -m myapp ${*}&quot;] </code></pre> <p>I tried to pass arguments to this image in my kubernetes deployments so that <code>${*}</code> is replaced with them, but after checking the logs it seem that th...
<p>First, your <code>command</code> has quoting problems -- you are effectively running <code>bash -c echo</code>.</p> <p>Second, you need to closely read the documentation for the <code>-c</code> option (emphasis mine):</p> <blockquote> <p>If the <code>-c</code> option is present, then commands are read from the first...
<p>can anyone help me with the command to view limits and requests of a pod or containers in a pod? I have tried <code>Kubectl describe pod</code> , <code>kubectl get pod --output=yaml</code> , <code>kubectl describe node</code> - shows the current limits but not the configured limits. I want to see the configured lim...
<p>-Try following command :</p> <pre><code>kubectl get pods &lt;podname&gt; -o jsonpath='{range .spec.containers[*]}{&quot;Container Name: &quot;}{.name}{&quot;\n&quot;}{&quot;Requests:&quot;}{.resources.requests}{&quot;\n&quot;}{&quot;Limits:&quot;}{.resources.limits}{&quot;\n&quot;}{end}' </code></pre> <pre><code>Exa...
<p>Just as a quick reminder, said option limits how many nodes can read / write to a volume, not how many pods can access it. You can have a RWO volume accesed by multiple pods as long as they are running in the same worker node.</p> <p>Having said that, when and why would you use a ReadWriteOnce over ReadWriteMany?</p...
<p>I would pretty much always pick a ReadWriteOnce volume.</p> <p>Mechanically, if you look at the list of <a href="https://kubernetes.io/docs/concepts/storage/volumes/#volume-types" rel="nofollow noreferrer">volume types</a>, the ones that are easier to set up tend to be ReadWriteOnce. If your infrastructure is runni...
<p>I have found several people asking about how to start a container running a DB, then run a different container that runs maintenance/migration on the DB which then exits. Here are all of the solutions I've examined and what I think are the problems with each:</p> <ol> <li><a href="https://kubernetes.io/docs/concepts...
<p>One option would be to use the <code>Sidecar pattern</code> with 2 slight changes to the approach you described:</p> <ol> <li>after the maintenance command is executed, you keep the container running with a <code>while : ; do sleep 86400; done</code> command or something similar.</li> <li>You set an appropriate <cod...
<p>I have applied the following pvc yaml.</p> <pre><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: name: ebs-claim spec: accessModes: - ReadWriteOnce storageClassName: ebs-sc resources: requests: storage: 4Gi </code></pre> <p>I now want my statefulset to use the PVC I have created. In...
<p>Specify it like normal in the <code>volumes</code> section of the pod spec template. But you won't get the special behavior of creating a new PVC for each replica since that requires creating new ones.</p>
<p>My k8s cluster initially have 2node and 1master and I deployed statefulset with 3pods, so 3pods with PVC are running on 2 nodes. Now I increased nodes from 2 to 3. So now k8s is 3nodes and 1master. I would like to move one of the statefulset pod to newly added node without deleting PVC so that 3 pods will spread on ...
<p>You can force a pod to be started on a different node by cordoning the node that the pod is running on and then redeploying the pod. That way kubernetes has to place it onto a different node. You can uncordon the node afterwards.</p>
<p>Excuse my relative networking ignorance, but I've read a lot of docs and still have trouble understanding this (perhaps due to lack of background in networks).</p> <p>Given this Dockerfile:</p> <pre><code>from node:lts-slim RUN mkdir /code COPY package.json /code/ WORKDIR /code RUN npm install COPY server.js /code/ ...
<p>There are two networking layers, which we could call &quot;inside the cluster&quot; and &quot;outside the cluster&quot;. The Pod and the Service each have their own IP address, but these are only inside the cluster. You need the NodePort to forward a request from outside the cluster to inside the cluster.</p> <p>I...
<p>From k8s docs and along with other answers I can find, it shows load balancer(LB) before the ingress. However I am confused that after matching the ingress rule, there can be still multiple containers that backed the selected services. Does LB happen again here for selecting one container to route to?</p> <p><a href...
<p>As you can see from the picture you posted, the Ingress choose a Service (based on a Rule) and not directly a Pod. Then, the Service may (or may not) have more than one Pod behind.</p> <p>The default Service type for Kubernetes is called <code>ClusterIP</code>. It receives a virtual IP, which then redirects requests...
<p>I know <code>k3d</code> can do this magically via <code>k3d cluster create myname --token MYTOKEN --agents 1</code>, but I am trying to figure out how to do the most simple version of that 'manually'. I want to create a server something like:</p> <pre><code> docker run -e K3S_TOKEN=MYTOKEN rancher/k3s:latest server ...
<p>The containers must &quot;see&quot; each other. Docker isolates the networks by default, so &quot;localhost&quot; in your agent container is the agent container itself.</p> <p>Possible solutions: Run both containers without network isolation using <code>--net=host</code>, map API port of the server to the host with ...
<p>I have an old kubernetes cluster on v1.8.6, using kOps I have been trying to upgrade the server to v1.20.8.</p> <p>I run into a CA cert/key issue where kOps was failing to rolling update the cluster returning an error <code>x509: certificate signed by unknown authority</code>.</p> <p>kOps had created a new ca secret...
<p>If you have not rotated the control plane/master nodes, you will find the certificates on there. The location for those files have changed over the years, but you should hopefully find them in <code>/srv/kubernetes/</code>.</p> <p>Or you can restore them if you have enabled <a href="https://docs.aws.amazon.com/Amazo...
<p>I'm running a K8S job, with the following flags:</p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: my-EP spec: template: metadata: labels: app: EP spec: restartPolicy: &quot;Never&quot; containers: - name: EP image: myImage </code></pre> <p>The Job star...
<p>The a non-zero exit code on <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/" rel="nofollow noreferrer">k8s jobs</a> will fall into the <code>Failed</code> pod status. There really isn't a way for you to have the exit code shown with <code>kubectl get pods</code> but you could output the pod s...
<p>I have a problem with authentication kubernetes webapp via oauth2-proxy/keycloak. You don't know what's wrong</p> <ul> <li>Webapp (test-app.domain.com)</li> <li>oauth2-proxy (oauth2-proxy.domain.com)</li> <li>keycloak (keycloak-test.domain.com)</li> </ul> <p>Those three app runs separately.</p> <p><strong>descriptio...
<p>You can try setting --insecure-oidc-allow-unverified-email in your oauth2-proxy configuration. Alternatively, in keycloak, mark user email verified in user settings..</p>
<p>I am using <code>helm upgrade xyz --install</code> command and my release were failing due to other helm issues. So no successful release is done yet.</p> <p>Then one time when the above command was in progress, I pressed <code>ctrl+c</code> command. And since then it is showing <code>Error: UPGRADE FAILED: another ...
<p>The solution is to use <code>helm rollback</code> to restore your previous revision:</p> <pre><code>helm rollback &lt;name&gt; &lt;revision&gt; </code></pre>
<p>So if I have 10 services that I need to expose to the outside world and use path-based routing to connect to different services, I can create an Nginx pod and service type <code>LoadBalancer</code></p> <p>I can then create Nginx configurations and can redirect to different services depending upon the URL path. After...
<p>In both cases, you are running an Nginx reverse proxy in a Kubernetes pod inside the cluster. There is not much technical difference between them.</p> <p>If you run the proxy yourself, you have complete control over the Nginx version and the configuration, which could be desirable if you have very specific needs an...
<p>I have a file in <code>/tmp/healthy</code> as mentioned in official documentation and YAML is available</p> <pre><code>livenessProbe: exec: command: - cat - /tmp/healthy </code></pre> <p>But in my case file always be here and it will contain message like Success or Failure</p> <p>It is possible with <c...
<p>The point of a liveness probe is usually just to check if a pod is up and reachable. <code>cat</code> is decent command to use for liveness probes because it always returns success as long as the file is there. It is just checking if Kubelet can reach the pod.</p> <p>If I'm understanding what you mean though, it is ...
<p>We are trying to use kubernetes persistent volume mapped with pod/container directory to have as backup. Container directory (/home) already have data from dockerimage but when we mount kubernetes persistent volume with container directory(/home) the container data get override or vanishes.</p> <p><em><strong>How to...
<p>I'm only at the beginning of my Kubernetes journey and still trying to grasp the best practices, but I think what you're trying to do is not possible (in the case of /home to /home). AFAIK the data is not overwritten, but exists &quot;under&quot; the mount. You can try this yourself by mounting a folder with <code>m...
<p>I have a file in <code>/tmp/healthy</code> as mentioned in official documentation and YAML is available</p> <pre><code>livenessProbe: exec: command: - cat - /tmp/healthy </code></pre> <p>But in my case file always be here and it will contain message like Success or Failure</p> <p>It is possible with <c...
<p>yes, you can use the <code>grep</code> command to search for <code>Success</code> string, if it is found it would return <code>0</code>(passing the probe) , however if <code>Success</code> string is not found by <code>grep</code> it would return <code>non-zero</code> rc(failing the probe)</p> <pre><code>livenessProb...
<p>Want to get the list of pods ussing ansible. HEre is the approach I did</p> <pre class="lang-yaml prettyprint-override"><code># tasks file for elasticsearch_secure - name: Fetch podd deatils k8s_info: kind: Pod field_selectors: - status.phase=Running namespace: &lt;ns&gt; register: pod_list become...
<p>I had the same issue and it seems to be a problem with Python's <code>kubernetes</code> module: <a href="https://github.com/kubernetes-client/python/issues/1333" rel="nofollow noreferrer">https://github.com/kubernetes-client/python/issues/1333</a></p> <p>What worked for me was to uninstall the <code>kubernetes</code...
<p>I am using nginx ingress with a setup like this:</p> <pre><code>nginx.ingress.kubernetes.io/auth-url: http://api/v1/introspect nginx.ingress.kubernetes.io/auth-method: POST nginx.ingress.kubernetes.io/auth-response-headers: X-User-Auth nginx.ingress.kubernetes.io/auth-snippet: | proxy_set_header auth-header &quot...
<p>You can use the annotation <code>nginx.ingress.kubernetes.io/auth-proxy-set-headers</code> <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#external-authentication" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annot...
<p>This is more of cost estimation question than how to use features like node affinity.</p> <p>So basically there are <code>m</code> pods with some constraints like:</p> <ul> <li>each pod of specific <code>Deployments</code> / <code>StatefulSets</code> should be on a different kubernetes node</li> <li>pods of specific...
<p>Kubernetes assigns the pods based on the many constraints like</p> <ul> <li>Resource requirement</li> <li>Resource existence (Node capacity)</li> <li>Node selectors if any or Affinity rules</li> <li>Weight of Affinity rules</li> </ul> <p>This is good article for same : <a href="https://kubernetes.io/docs/concepts/sc...
<p>This is more of cost estimation question than how to use features like node affinity.</p> <p>So basically there are <code>m</code> pods with some constraints like:</p> <ul> <li>each pod of specific <code>Deployments</code> / <code>StatefulSets</code> should be on a different kubernetes node</li> <li>pods of specific...
<p>By my knowledge the algorithm used by default by the kube-scheduler is described on github <a href="https://github.com/open-policy-agent/opa-kube-scheduler/blob/master/vendor/k8s.io/kubernetes/docs/devel/scheduler_algorithm.md" rel="nofollow noreferrer">here</a>.</p> <p>It explains how it works. It first filters nod...
<p>I am trying to isolate my pods in namespace from other namespaces. I have tried to create a NetworkPolicy:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: deny-from-other-namespaces spec: podSelector: matchLabels: ingress: - from:...
<p>You can allow all traffic but block the ones from internal network.</p> <p>The Network Policy below allow access to all, exept internal networks (192.168.0.0/16 and 172.23.40.0/24)</p> <pre><code>kind: NetworkPolicy apiVersion: networking.k8s.io/v1 metadata: name: allow-external namespace: dmz spec: podSelec...
<p>I am using Clair for Vulnerability checks in my harbor.</p> <p>Services like Clair that have thousands of hosts continually hitting the hosting git server(<a href="https://git.launchpad.net/ubuntu-cve-tracker/" rel="nofollow noreferrer">https://git.launchpad.net/ubuntu-cve-tracker/</a>) saturate the server, and so t...
<p>Check first if this is linked to <a href="https://github.com/goharbor/harbor/issues/14720" rel="nofollow noreferrer"><code>goharbor/harbor</code> issue 14720</a>: &quot;clair restarts repeatedly when there is some issue with vulnerability repos&quot;, with logs like</p> <pre class="lang-golang prettyprint-override">...
<p>We can check the service accounts in Kubernetes Cluster. Likewise, Is it possible to check the existing users and groups of my Kubernetes cluster with Cluster Admin privileges. If yes then how ? If no then why ?</p> <p>NOTE: I am using EKS</p>
<p>Posting this as a community wiki, feel free to edit and expand.</p> <hr /> <p>This won't answer everything, however there are some concepts and ideas.</p> <p>In short words there's no easy way. It's not possible to do using kubernetes itself. Reason for this is:</p> <blockquote> <p>All Kubernetes clusters have two c...
<p>I am using Cert manager with letsencrypt via below yaml code. What am I doing wrong. When I use &quot;kubectl get issuer&quot; it returns to me : &quot;No resources found in default namespace.&quot;</p> <pre><code>apiVersion: cert-manager.io/v1alpha2 kind: ClusterIssuer metadata: name: letsencrypt-prod spec: ac...
<p>I think you are entering incorrect name of resource <code>kubectl get issuer</code> but rather you should run <code>kubectl get ClusterIssuer</code>.</p> <p>Try it</p>
<p>I'm on MacOS and using <code>kind v0.10.0</code>. I've followed the instructions given at <a href="https://kind.sigs.k8s.io/docs/user/ingress/" rel="nofollow noreferrer">https://kind.sigs.k8s.io/docs/user/ingress/</a> for setting up <code>kind</code> with an <code>nginx</code> ingress controller (and a private docke...
<p>According to <a href="https://github.com/kubernetes/ingress-nginx/issues/2444" rel="nofollow noreferrer">kubernetes/ingress-nginx#2444</a> and <a href="https://github.com/kubernetes/ingress-nginx/issues/6313" rel="nofollow noreferrer">kubernetes/ingress-nginx#6313</a>, Nginx cannot multiplex HTTP/1.1 and HTTP/2 in P...
<p>I am trying to read the environment variable declared in deployment yaml of Kubernetes into springboot application.yaml</p> <p>Below is sample in deployment.yaml</p> <pre><code> spec: containers: env: - name: SECRET_IN value: dev </code></pre> <p>Below is sample in application.yaml...
<p>You can store the whole <code>application.YAML</code> config file into the <code>config map</code> or <code>secret</code> and inject it with the deployment only</p> <p>For example :</p> <pre><code>kind: ConfigMap apiVersion: v1 metadata: name: demo data: application.yaml: |- pool: size: core: 1...
<p>Trying to solve dependency between pods using postStart lifecycle.</p> <p>Use case: micro service A should start after the start of micro service B.</p> <p>For that we have added one container (curl) which will check if dependent service is up or not using curl command.</p> <p>But when we add any command in postStar...
<p>You can use readinessProbe as well with the livenessProbe like this:</p> <pre><code> readinessProbe: httpGet: path: /api/health port: 8080 initialDelaySeconds: 10 periodSeconds: 5 failureThreshold: 8 // for tcpSocket use: ...
<p>Trying to solve dependency between pods using postStart lifecycle.</p> <p>Use case: micro service A should start after the start of micro service B.</p> <p>For that we have added one container (curl) which will check if dependent service is up or not using curl command.</p> <p>But when we add any command in postStar...
<p>That is because your command in postStart is sleeping for 10 seconds and your <code>LivenessProbe</code> is configured to fail after 5 seconds.</p> <p>Maybe increase <code>initialDelaySeconds</code> or add a <code>failureThreshold</code>.</p>
<p>I'm looking for example, how to set up the provisioned notification channel and it's uid in the helm chart <a href="https://github.com/prometheus-operator/kube-prometheus" rel="nofollow noreferrer">https://github.com/prometheus-operator/kube-prometheus</a></p> <p>The dashboards are referencing the notification chann...
<p>Example YAML file : <a href="https://github.com/grafana/grafana/blob/main/conf/provisioning/notifiers/sample.yaml" rel="nofollow noreferrer">https://github.com/grafana/grafana/blob/main/conf/provisioning/notifiers/sample.yaml</a></p> <p>If you are using the HELM chart for same you can configure same from the <strong...
<p>I have 4 yaml file</p> <ol> <li>Deployment.yaml</li> <li>Service.yaml</li> <li>Ingress.yaml</li> <li>issuer.yaml</li> </ol> <p>I want to use letsencrypt-prod for my service for certification . But it doesn't work.</p> <p>When I use to be sure ingress is working or issuer is working both of them are done!</p> <pre><c...
<p>If you have setup your issuer correctly, which you have assured us, you will see in your namespace a pod belonging to cert manager. This creates a pod that will validate that the server requesting the certificate resolves to the DNS record.</p> <p>In your case, you would need to point your DNS towards your ingress.<...
<p>Why does <code>kubectl rollout restart &lt;deployment-name&gt;</code> doesn't get my latest image? I had rebuild my image but it seems that kubernetes doesn't update my deployment with the latest image.</p>
<h1 id="tldr-pznw">tl;dr</h1> <p>I just wanted to add an answer here regarding the failure of <code>kubectl rollout restart deployment [my-deployment-name]</code>. My problem was that I <strong>changed the image name</strong>, without running <code>kubectl apply -f [my-deployment-filename&gt;.yaml</code> first.</p> <h1...
<p>I'm setting up a service running on a kubernetes pod and subscribing to a pub/sub topic via a pull subscription. The service would consume messages pushed to the topic.</p> <p>Now I'm scaling my pods to 10 replicas and observing that sometimes when there's a new message pushed to the topic, several pods would receiv...
<p>There is no QOS 2 (deliver once and only once) at this time for Pub/Sub, so there's no way out of the box to do what you're talking about unfortunately.</p> <p>Official documentation on this is here: <a href="https://cloud.google.com/pubsub/docs/subscriber" rel="nofollow noreferrer">https://cloud.google.com/pubsub/d...
<p>I've created my own image just called <code>v2</code> but when I do <code>kubectl get pods</code>, it keeps erroring out...<code>with Failed to pull image &quot;v2&quot;: rpc error: code = Unknown desc = Error response from daemon: pull access denied for v2, repository does not exist or may require 'docker login': d...
<p>My suspicion is that you have built your container image against your local Docker daemon, rather than minikube's. Hence, because your <code>imagePullPolicy</code> is set to <code>IfNotPresent</code>, the node will try pulling it from Docker hub (the default container registry).</p> <p>You can run <code>minikube ssh...
<p>In grafana charts I try to add notifiers and getting the error. The notifiers conf is below:</p> <pre><code>notifiers: {} - name: email-notifier type: email uid: email1 # either: org_id: 1 # or org_name: Main Org. is_default: true settings: addresses: an_em...
<p>The critical part was missing there were</p> <p><strong>notifiers.yaml:</strong></p> <p><strong>notifiers:</strong></p> <p>in</p> <pre><code>notifiers: {} notifiers.yaml: notifiers: - name: email-notifier type: email uid: email1 # either: org_id: 1 # or org_name: Main Or...
<p>I'm trying to create an AWS EKS private cluster using Terraform with the private subnet in VPC in AWS region <code>us-west-2</code> region, with default terraform eks module configurations.</p> <p>When I set the <strong><code>endpoint_private_access=true</code></strong> and <strong><code>endpoint_public_access=false...
<p>When you are setting up your EKS Cluster and setting <code>endpoint_private_access = &quot;true&quot;</code> try using <code>public_access_cidrs = [&quot;&lt;your-ip&gt;/32&quot;, &lt;or-try 0.0.0.0/0&gt;]</code></p> <p>You can also refer to my terraform code which creates the whole EKS Cluster: <a href="https://git...
<p>I am currently using Kustomize. We are have multiple deployments and services. These have the same <code>spec</code> but different names. Is it possible to store the <code>spec</code> in individual files &amp; refer them across all the deployments files?</p>
<p>Helm is a good fit for the solution. However, since we were already using Kustomize &amp; migration to Helm would have needed time, we solved the problem using namePrefix &amp; label modifiers in Kustomize.</p>
<p>With the below yml file:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: my-nginx spec: containers: - name: my-nginx image: nginx:alpine </code></pre> <hr /> <p>On running <code>kubectl create -f nginx.pod.yml --save-config</code>, then as per the <a href="https://jamesdefabia.github.io/docs/user-g...
<p>Below command would print all the annotations present in the pod <code>my-nginx</code>:</p> <pre><code>kubectl get pod my-nginx -o jsonpath='{.metadata.annotations}' </code></pre> <p>Under <code>kubectl.kubernetes.io/last-applied-configuration</code> of the above output, your configuration used is stored.</p> <p>He...
<p>This is my Service yaml. When create the svc on GKE.I don't know how can I visit the svc.I can't find a external ip for visiting the svc. How can I visit this svc in standard flow. Is it need to create an ingress?</p> <pre><code>apiVersion: v1 kind: Service metadata: namespace: dev name: ui-svc labels: tar...
<p>If you don't use a <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept" rel="noreferrer">private cluster</a> where nodes don't have public IP addresses, you can access your <code>NodePort</code> services using any node's public IP address.</p> <p>What you can see in <code>Servic...
<p>Openshift provides by-default &quot;node-tuning-operator&quot; for tuning down system.</p> <p>We can create our custom profiles using custom resource (CR).</p> <p>But, the custom profiles are not being loaded/activated by the operator.</p> <p>Instead of activating my custom profile, it is activating default profiles...
<p>Documentation for tuned operator can be found at <a href="https://docs.openshift.com/container-platform/4.7/scalability_and_performance/using-node-tuning-operator.html" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/4.7/scalability_and_performance/using-node-tuning-operator.html</a>.</p> <p>...
<p>Im using the following file by helm</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: nginx-cfg data: default.conf: |- {{ .Files.Get &quot;config/nginx.conf&quot; | nindent 4 }} </code></pre> <p>and I got the following error:</p> <p><strong>Error: YAML parse error on ops/templates/config/nginx.conf...
<p>Try removing the colon after <code>server_name</code>.</p> <pre><code>server_name {{ print &quot;kiftb.&quot; .Values.global.host | quote }} </code></pre> <p>...</p>
<p>Can someone please help to spot the issue with <code>ingress-2</code> ingress rule? why <code>ingress-1</code> is working vs <code>ingress-2</code> is not working.</p> <p><strong>Description of my setup, I have two deployments:</strong></p> <p>1st deployment is of <code>nginx</code><br /> 2nd deployment is of <code>...
<h2 id="difference-between-ingresses">Difference between ingresses</h2> <p>I created a one node <code>microk8s</code> cluster <a href="https://microk8s.io/" rel="noreferrer">following official documentation</a> and I wasn't able to reproduce behaviour you described which is correct behaviour. Added two pods with <code>...
<p>I am running into an issue where <code>terraform plan</code> recreates resources that don't need to be recreated every run. This is an issue because some of the steps depend on those resources being available, and since they are recreated with each run, the script fails to complete.</p> <p>My setup is Github Actions...
<p>Regarding the actual error shown, <strong>Error: Kubernetes cluster unreachable: stat kibe-config: no such file or directory</strong>... which is referencing your outputs file... I found this which could help with your specific error: <a href="https://github.com/hashicorp/terraform-provider-helm/issues/418" rel="nof...
<p>I am following the ISTIO tutorial for Service Mesh, and I am having problems to copy one of the steps they do.</p> <pre><code>https://docs.huihoo.com/microservices/introducing-istio-service-mesh-for-microservices.pdf </code></pre> <p>They have a java application called Recommendation, which they deploy twice.</p> <p...
<blockquote> <p>How can I do it? Do I need to deploy the application twice with different Deployment.yaml?</p> </blockquote> <p>Basically - yes. At the end, what you need, are two service endpoints pointing to different pods. You may place the service endpoints into the same deployment file, but for sake of robustness ...
<p>As per: <a href="https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/" rel="nofollow noreferrer">https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/</a></p> <p>I'm trying to install ingress-nginx with custom ports, but it does not expose those ports wh...
<p>Assuming they mean what shows up in Pod definitions:</p> <pre class="lang-yaml prettyprint-override"><code>- port: 1234 name: alan </code></pre>
<p>Just deployed my docker image to Azure AKS and created nginx ingress controller. My image has the SSL certificate and handles SSL itself. So, I need a passthrough route to my container.</p> <p>When I navigate to <em><a href="https://just-poc.live" rel="nofollow noreferrer">https://just-poc.live</a></em> famous ngin...
<p><code>nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;</code> annotaion was missing. 502 error is gone!</p>
<p>Right now, I have a values.yaml with a section that looks a bit like this:</p> <pre><code>... imageName: ports: - containerPort: 7980 name: db0 protocol: TCP - containerPort: 7981 name: db1 protocol: TCP - containerPort: 7982 name: db2 protocol: TCP - containerPo...
<p>This should be possible. Say you configure your chart with the number of ports and the starting port:</p> <pre class="lang-yaml prettyprint-override"><code># values.yaml (or a `helm install -f` values file) numberOfPorts: 11 startingPort: 7980 </code></pre> <p>You can use the <a href="https://docs.helm.sh/docs/char...
<p>I want to connect a React Native application using Socket.io to a server that is inside a Kubernetes Cluster hosted on Google Cloud Platform (GKE).</p> <p>There seems to be an issue with the Nginx Ingress Controller declaration but I cannot find it.</p> <p>I have tried adding <code>nginx.org/websocket-services</code...
<p>The solution is to remove the <code>nginx.ingress.kubernetes.io/rewrite-target: /$1</code> annotation.</p> <p>Here is a working configuration: (please note that apiVersion has changed since the question has been asked)</p> <p><strong>Ingress configuration</strong></p> <p><code>ingress-service.yaml</code></p> <pre cl...
<p>TLDR: need an IP whitelist that is updated every five minutes to restrict access to services</p> <p>Hy there</p> <p>I'm currently migrating our VMs into two Kubernetes clusters (prod and dev). Till now we have managed the access to our system with network access policies that are updated every five minutes. Every en...
<blockquote> <p>Is it possible to keep an global ip whitelist, that is updated every five minutes, to limit access to some services? Are the updates distributed automatically?</p> </blockquote> <p>Yes, it is possible by managing the and whitelisting the traffic over the ingress or gateway (Istio, Kong, KrakenD) if you ...
<p>I need to compare yaml files that are generated from two different processes and are ordered differently and detect if they are logically the same ideally in python.</p> <p>yaml file 1:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3...
<p>The best solution I was able to arrive at is below script.</p> <pre><code>&quot;&quot;&quot; python path_to_dir/compare_yaml.py path_to_dir/file1.yaml path_to_dir/file2.yaml &quot;&quot;&quot; import argparse import yaml import dictdiffer parser = argparse.ArgumentParser(description='Convert two yaml files to dict ...
<p>I am writing the mutate and validate admission webhooks for the CRDs. I am using kubebuilder to setup the CRDs. Spec and status subresources are behaving correctly. </p> <p>As a part of mutation, I am having a requirement where I need to update the status subresources.</p> <p>For example, Exam is my CR and status....
<p>When a Custom Resource Definition (CRD) set in <code>.spec.versions[].subresources</code> a subresource the mutating and validating admission webhooks has to include in the <code>.webhooks[].rules[].resources</code> both <code>&lt;custom resource name&gt;</code> and <code>&lt;custom resource name&gt;/&lt;subresource...
<p>Suppose I have a service which rather than listening for http request, or gRPC procedure calls only consumes messages from a broker (Kafka, rabbitMQ, Google Pub/Sub, what have you). How should I go about healthchecking the service (eg. k8s liveness and readyness probes) ?</p> <p>Should the service also listen for ht...
<p>Having the service listen to HTTP solely to expose a liveness/readiness check (although in services that pull input from a message broker, readiness isn't necessarily something that a container scheduler like k8s would be concerned with) isn't really a problem (and it also opens up the potential to expose diagnostic...
<p>I'm trying to get all the deployments of a namespace to be restarted for implementation reasons.</p> <p>I'm using &quot;kubectl rollout -n restart deploy&quot; and it works perfectly, but I'm not sure it that command causes downtime or if it works as the &quot;rollout update&quot;, applying the restart one by one, ...
<p>@pcsutar 's answer is almost correct. <code>kubectl rollout restart $resourcetype $resourcename</code> restarts your deployment, daemonset or stateful set according to the its update strategy. so if it is set to <code>rollingUpdate</code> it will behave exactly as the above answer:</p> <blockquote> <ol> <li>After re...
<p>I'm looking to understanding the relationship of</p> <p><strong>container_memory_working_set_bytes</strong> vs <strong>process_resident_memory_bytes</strong> vs <strong>total_rss</strong> (container_memory_rss) + <strong>file_mapped</strong> so as to better equipped system for alerting on OOM possibility.</p> <p><a ...
<p>So the relationship seems is like this</p> <pre><code>container_working_set_in_bytes = container_memory_usage_bytes - total_inactive_file </code></pre> <p><code>container_memory_usage_bytes</code> as its name implies means the total memory used by the container (but since it also includes file cache i.e inactive_fil...
<p>I am working on a Terraform script to create a cluster (tf code below). It gets 90% done then errors. When trying to apply another change or delete this cluster, I run into lack of permission. I made every account in the project Owner and still have the issue. How do I clear this out?</p> <p>Error:</p> <pre><code>(1...
<p>You might require to enable API if you are forgetting any</p> <p>like</p> <pre><code>gcloud services enable container.googleapis.com </code></pre> <p>also, make sure service account you are have the role or policy attached.</p> <pre><code> --role roles/compute.admin </code></pre>
<p>So I'm dealing with a structure like this:</p> <pre><code>. ├── 1 │   ├── env-vars │   └── kustomization.yaml ├── 2 │   ├── env-vars │   └── kustomization.yaml ├── env-vars ├── kustomization.yaml └── shared ├── env-vars └── kustomization.yaml </code></pre> <p>while env-vars within each level has some env var...
<p>I believe this should solve your issue.</p> <p><code>kustomization.yaml</code> which is located in <code>base</code> or <code>/</code>:</p> <pre><code>$ cat kustomization.yaml resources: - ./1 - ./2 namePrefix: toplevel- configMapGenerator: - name: first-env-cm behavior: merge envs: - env-vars - n...
<p>As per an <a href="https://medium.com/icetek/preparing-for-ckad-aa00a94b0db7" rel="nofollow noreferrer">article</a> I read, while using the '<em>kubectl run</em>' command,</p> <ul> <li>--restart Always creates a deployment,</li> <li>--restart Never creates a pod</li> <li>--restart OnFailure creates a job</li> </ul> ...
<p>it should be like this</p> <p><code>kubectl create deployment ngingx --image=nginx -o yaml --dry-run=client</code></p> <p>Nope the <code>restart: Always</code> does not create pod or deplyoment it's about the container restart policy which is used for restarting container if pod crashes it tries restart.</p>
<p>I have an ArgoCD installation and want to add a GitHub repository using SSH access with an SSH key pair to it using the declarative DSL.</p> <p>What I have is:</p> <pre><code>apiVersion: v1 data: sshPrivateKey: &lt;my private ssh key base64 encoded&gt; url: &lt;url base64 encoded&gt; kind: Secret metadata: ann...
<p>I am not sure about helm, since I am working with the yaml files for now, before moving into helm. You could take a look at this <a href="https://github.com/argoproj/argo-cd/issues/1172" rel="nofollow noreferrer">Github issue</a> here to configure SSH Key for helm</p> <p>I had this issue, when I was working with man...
<p>I have a requirement of creating multiple workers in my kubernetes worker cluster which would make http calls to some external services. The workers are invoked using a rule engine. To avoid latency I would want to use a mechanism like unix domain sockets between the rule engine and the workers. I am aware that if I...
<p>There is no native way to do this in Kubernetes, however you may apply the same approach like the one described in <a href="https://serverfault.com/questions/881875/expose-a-unix-socket-to-the-host-system-from-inside-from-a-docker-container/881895#881895">this</a> Serverfault answer - theoretically should be achieva...
<p>I build a k8s cluster on my virtual Machines(CentOS/7) with Virtual Box:</p> <pre><code>kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME k8s-master Ready control-plane...
<p>Look at your event</p> <blockquote> <p>Warning Unhealthy 11s (x182 over 30m) kubelet Readiness probe failed: ls: cannot access /var/ready: No such file or directory</p> </blockquote> <p>Your readiness probe is failing- looks like it is checking for the existence of a file at <code>/var/ready</code>.</p...
<p>create a pod that runs two containers and ensure that the pod has shared volume that can be used by both containers to communicate with each other write an HTML file in one container and try accessing it from another container</p> <p>can anyone tell me how to do it</p>
<p>Example pod with multiple containers</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: two-containers spec: restartPolicy: Never volumes: - name: shared-data emptyDir: {} containers: - name: nginx-container image: nginx volumeMounts: - name: shared-data mountPath: /usr/sha...
<p>I wrote a k8s deployment yml sample, but it failed every time I apply it to the cluster, the logs is that</p> <blockquote> <p>standard_init_linux.go:228: exec user process caused: exec format error</p> </blockquote> <p>the yml file is as follows, I am new to kubernetes, and stuck here now, wish you could help me</p>...
<p><code>exec format error</code> means you're trying to run a binary on a platform other than the one for which it was compiled. Looking at your image, it appears the binaries are built for an ARM platform:</p> <pre><code>$ file bash bash: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, i...
<p>i have a terraform config that create a kubernetes(GKE) on GCP, install ingress and cert-manager using Helm. the only part missing is the letsencrypt ClusterIssuer (when i deploy the letsencrypt.yaml manually all works fine).</p> <p>my Terraform config:</p> <pre><code># provider provider &quot;kubernetes&quot; { h...
<p>You can apply the directly <strong>YAML</strong> file to the cluster</p> <pre><code>provisioner &quot;local-exec&quot; { command = &lt;&lt;EOT cat &lt;&lt;EOF | kubectl --server=${aws_eks_cluster.demo.endpoint} --insecure-skip-tls-verify=true --token=${data.aws_eks_cluster_auth.demo.token} create -f - apiVersion...
<p>Currently I have a locally running kubernetes cluster minikube for testing purposes which is using configmap via environment variables.</p> <p>When I do a get call(/path), I have a map of values that I create within Java.</p> <p>For example I have @Value(${homepage}) and then assign that to String homepage.</p> <p>I...
<blockquote> <p>Is there a way to pull ALL env variables in the configmap to Java?</p> </blockquote> <p>You can use the <strong>config map</strong> or <strong>secret</strong> to store all the environment variables</p> <pre><code>envFrom: - configMapRef: name: cred </code></pre> <p>adding the block into the <code>...
<p>In Kubernetes , is there a particular way I can check if a specific feature-gate is enabled/disabled. Say, I want to check if MountPropagation feature is enabled in my cluster. How do I do that.</p>
<ul> <li>05/21/2018: Solution #1. This particular approach does not work at the moment. It is outdated in other worlds.</li> <li>06/23/2021: Solution #2. The user can query the system using one or two commands. This is merely an updated solution.</li> </ul> <h2 id="one-command-5pyq">One Command</h2> <pre><code>#Use &qu...
<p>I want AKS POD to add and delete DNS records whenever a Service is created. I have achieved the same via GUI, But I want to use terraform to do the same.</p> <p>Created AKS Cluster:</p> <pre><code>resource &quot;azurerm_kubernetes_cluster&quot; &quot;aks_cluster&quot; { name = &quot;${azurerm_resour...
<p>Currently, It's not possible in Terraform. You have to use local-exec in Terraform and Azure CLI commands to achieve the same.</p> <pre><code>resource &quot;null_resource&quot; &quot;node-pool-name&quot;{ depends_on = [azurerm_kubernetes_cluster.aks_cluster,azurerm_role_assignment.assign-reader-to-manage-identity]...
<p>I would like to develop a simple webservice, which returns kubernetes metrics like node / pod CPU and RAM usage in percentage. In CLI there are commands like <code>kubectl top node</code> or <code>kubectl describe node</code> with all the metrics i need. However i am unable find such metrics in kubernetes REST api e...
<p>When you issue <code>kubectl top node</code>, kubectl makes multiple HTTP requests to multiple endpoints. You can see exact endpoints by adding <code>--v=9</code> flag to <code>kubectl</code>.</p> <p>For example, in my case</p> <pre class="lang-text prettyprint-override"><code>kubectl top node gke-cluster-1-default-...
<p>We have container per pod. Each container runs a service that listens on SIGTERM signal to initiate it's shutdown process.</p> <p>To initiate the shutdown process,</p> <ol> <li><p>does <code>kubectl delete pod [podname]</code> command needs to be initiated?</p> </li> <li><p>does container receive the SIGTERM signal ...
<p>When initiating a pod deletion request</p> <pre><code>kubectl delete pods &lt;POD&gt; </code></pre> <p>the container runtime would send a <code>TERM</code> signal <strong>to the main process in each container</strong>.</p> <p>When the <code>--force --grace-period=0</code> switch options are used, the container runti...
<p>So I created EKS Cluster using example given in<br /> <a href="https://github.com/cloudposse/terraform-aws-eks-cluster/tree/master/examples/complete" rel="nofollow noreferrer">Cloudposse eks terraform module</a></p> <p>On top of this, I created AWS S3 and Dynamodb for storing state file and lock file respectively an...
<p>Generally, it is not recommended to keep your S3 bucket that you use for Terraform's backend state management in the Terraform state itself (for this exact reason). I've seen this explicitly stated in Terraform documentation, but I've been unable to find it in a quick search.</p> <p>What I would do to solve this iss...
<p>After applying <code>ingress</code> in <code>k8s</code>, I see service address was set to <code>node's</code> IP address?</p> <p><strong>Firstly, I added ingress controller</strong></p> <pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/ba...
<p>If you are on bare metal, this is as per design. check <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/" rel="nofollow noreferrer">this</a> for more info.</p> <blockquote> <p>MetalLB provides a network load-balancer implementation for Kubernetes clusters that do not run on a supported cloud pro...
<p>I am writing a test to catch a case where a container fails after 5 minutes. Once crashed, it gets restarted. So if I wait 16 minutes, it will have crashed 3 times.</p> <p>I know I can see the logs of the current container like:</p> <pre><code>$ kubectl logs podname containername service starting at 00:15 ...
<p>The container must exist in the underlying runtime to get the logs, and they are cleaned up by kubernetes.</p> <p>A log aggregator like <a href="https://www.fluentd.org/" rel="nofollow noreferrer">fluentd</a> is the standard way to collect logs from each container runtime to a central location. You can write the log...
<p>How to SSH into a Kubernetes Node or Server hosted on AWS? I have hosted a Kubernetes Server and Node on AWS. I'm able to see the nodes and server from my local laptop with the kubectl get node command.</p> <p>I need to create a persistent volume for my node but I'm unable to ssh into it.</p> <p>Is there any speci...
<p>Use <code>kubectl ssh node NODE_NAME</code></p> <p>This kubectl addon is from here. <a href="https://github.com/luksa/kubectl-plugins" rel="noreferrer">https://github.com/luksa/kubectl-plugins</a>. And I have verified that. This works similarly to the <code>oc</code> command in openshift.</p> <p>P.S. This is connect...
<p>I can't connect Docker CLI to the remote Docker demon inside minikube.</p> <p>I've done <code>minikube delete</code> and then <code>minikube start --driver=hyperv</code> but when I do &amp; <code>minikube -p minikube docker-env | Invoke-Expression</code> it comes back with a weird error which is:</p> <pre><code>Yo...
<p>This is a community wiki answer posted for better visibility. Feel free to expand it.</p> <p>As already discussed in the comments the solution is to use the <a href="https://minikube.sigs.k8s.io/docs/commands/docker-env/" rel="nofollow noreferrer">minikube docker-env command</a>:</p> <blockquote> <pre><code>minikube...
<p>Is it possible to have array as environmental variable in deployment?</p> <pre><code>kind: Deployment metadata: name: array-deployment namespace: array-deployment spec: replicas: 1 selector: matchLabels: app: array-deployment template: metadata: labels: app: array-deployment ...
<p>Environment variables are plain strings and do not support arrays as input</p> <p>In order to achieve what you want, you would want to pass the values as a comma separated list. (You might want to use some other separator if your data contains <code>,</code>)</p> <p>so your yaml manifest would become</p> <pre><code>...
<p>We are storing secrets in GCP Secret Manager, during an app deployment we using an init container which fetches secrets and places them in volume (path). Going forward we need the requirement is to load the secrets as env variable on the main container needing the secrets from the init container, instead of the path...
<p>You can copy from GSM into a Kubernetes Secret and then use that in a normal <code>envFrom</code> or you can have the init container write a file into a shared emptyDir volume and then change the command on the main container to be something like <code>command: [bash, -c, &quot;source /shared/env &amp;&amp; exec ori...
<p>I would like to know the factors which AKS nodes considering for reserve memory and how it calculates the allocateable memory.</p> <p>In my cluster we have multiple nodes with (2 CPU, 7 GB RAM).</p> <p>What I observed is all the nodes (18+) showing only 4 GB allocateable memory out of 7 GB. And due to this our clust...
<p>This is an expected behavior of AKS to keep cluster safe and function properly.</p> <p>When you create a k8s cluster in AKS, it doesn't mean that you will get all the Memory/CPU that your VMs have. Depending on cluster configuration, it can consume even more than you shared. e.g. If you enabled OMS agents to get ins...
<p>I have a small problem with the labels to put in my pods. I use an EKS cluster and I followed the instructions to set up the Datadog APM. In the tutorial at <a href="https://app.datadoghq.com/apm/docs?architecture=container-based" rel="nofollow noreferrer">this address</a>.</p> <p>It is indicated to put these labels...
<p>So the solution is the following: Don't put the labels at the deployment level (as indicated in the Datadog doc) and put them at the <strong>Pod Template</strong> level (<code>spec -&gt; template -&gt; metadata -&gt; labels</code>). Concerning the update of the labels you have to launch the following command:</p> <p...
<p>As per the <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/" rel="nofollow noreferrer">syntax</a> mentioned, below is the Pod yaml using <code>args</code>:</p> <pre><code>apiVersion: v1 kind: Pod metadata: labels: test: liveness name: liveness-exec spec: ...
<p>&quot;Default command&quot; references the command set in your container image. In case of your image - <code>k8s.gcr.io/busybox</code> - this appears to be <code>/bin/sh</code>:</p> <pre><code>$ docker pull k8s.gcr.io/busybox Using default tag: latest latest: Pulling from busybox a3ed95caeb02: Pull complete 138cfc...
<p>Friends, I am learning here and trying to implement an init container which checks if MySQL is ready for connections. I have a pod running MySQL and another pod with an app which will connect to the MysSQL pod when its ready.</p> <p>No success so far. The error I am getting is the following: <code>sh: mysql: not fou...
<p>Please try using this.</p> <p>initContainers:</p> <pre><code> - name: init-cont image: busybox:1.31 command: ['sh', '-c', 'echo -e &quot;Checking for the availability of MySQL Server deployment&quot;; while ! nc -z mysql 3306; do sleep 1; printf &quot;-&quot;; done; echo -e &quot; &gt;&gt; MySQL DB...
<p>I'm developing an open-sourced cloud event gateway in .NET 5.0, backed by an EventStore channel, and am facing problems to connect the ProjectionsManager service.</p> <p>I deployed an EventStore service in its own namespace, and can successfully connect to it, and subscribe to streams. However, when I try to connect...
<p>We encountered the same issue running EventStoreDB on a Kubernetes cluster with Istio sidecar injection enabled.</p> <p>According to <a href="https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/" rel="nofollow noreferrer">Istio's documentation on protocol selection</a>, Istio will lo...
<p>The scenario is as follows:</p> <p>Our pods have a <code>terminationGracePeriodSeconds</code> of 60, which gives them ~60 seconds to do any necessary cleanup before Kubernetes will kill them ungracefully. In the majority of cases the cleanup happens well within the 60 seconds. But every now and then we (manually) ob...
<p>You can use container hooks and then you can monitor those hooks events. For example preStop hook which is called when a POD get destroyed, will fire FailedPreStopHook event if it can not complete its work until terminationGracePeriodSeconds</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: lifecycle-demo sp...
<p>Namespace isolated containers(Pod) &amp; Nodes hosting the Pods are part of data plane</p> <p><code>kubectl describe pod [pod-name]</code> command talks to API server and provide information like node details, date started, and the troubleshooting events etc...stored in <code>etcd</code></p> <p><code>kubelet</code>'...
<p>It is the <code>kube-controller-manager</code> under which kubernetes is running several type of controllers.</p> <blockquote> <p>The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes. In applications of robotics and automation, a control loop is a non-terminating l...
<p>I have a database in AWS that I need to connect to from Kubernetes, but security settings in that database prevent this. My solution is to SSH tunnel to a proxy from within the Kubernetes pod, and connect through that to the database in AWS.</p> <p>However, I'm not quite sure how to actually get this going in Kuber...
<p>So the problem was here:</p> <pre><code>volumes: - name: accounts-keys secret: defaultMode: 420 secretName: accounts-keys - name: spoonity-sql-proxy secret: defaultMode: 420 #&lt;----------- this is wrong secretName: spoonity-sql-proxy </code></pre>...
<p>i am hiting the issue resolver cannot be found, and read all the related topics, but got no answer</p> <p><strong>ENV:</strong></p> <ul> <li>kubernetes v1.20.6</li> <li>traefik: 2.4.9</li> </ul> <p>Traefik is beeing installed with <code>helm</code> chart. The <code>values.yaml</code> looks like:</p> <pre class="lang...
<p>For all who have a similar problem, check your debug logs very well. In my case between all the debug output was this line:</p> <pre><code>time=&quot;2021-07-26T09:56:43Z&quot; level=error msg=&quot;The ACME resolver \&quot;inwx\&quot; is skipped from the resolvers list because: unable to get ACME account: permissio...
<p>As I understood from the documentation , if you use azure portal to create AKS cluster , you can't use the basic load balancer ,which is free in my current subscription. So how can I then use the basic load balancer with aks.</p>
<p>You must use the CLI to create an AKS with a Basic load balancer.</p> <pre><code>az aks create -g MyRG -n MyCluster --load-balancer-sku basic </code></pre> <p>It's clearly stated in the infobox in the Portal.</p> <p><a href="https://i.stack.imgur.com/66J01.png" rel="nofollow noreferrer"><img src="https://i.stack.img...
<p>I am new to Kubernetes. I have a K8 cluster with multiple deployments (more than 150), each having more than 4 pods scaled. I have a requirement to increase resource limits for all deployments in the cluster; and I'm aware I can increase this directly via my deployment YAML. However, I'm thinking if there is any way...
<p>There are few things to point out here:</p> <ol> <li>There is a <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#patch" rel="noreferrer">kubectl patch</a> command that allows you to:</li> </ol> <blockquote> <p>Update field(s) of a resource using strategic merge patch, a JSON merge pat...
<p>We have an Airflow (Celery executor) setup that can run tasks on our K8s cluster. The tasks that use KubernetesPodOperator can access K8s secrets <a href="https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/operators.html#how-to-use-cluster-configmaps-secrets-and-volumes-with-pod" rel="no...
<p>You can map the secrets as volumes ot variables into your Worker Pods and they will be available for all tasks - either as specific directory or as environment variables.</p> <p>You just have to modify the Helm Chart (or whatever deployment you use) to use those.</p>
<p>I installed rancher into existing kubernetes cluster from this <a href="https://rancher.com/docs/rancher/v2.x/en/installation/install-rancher-on-k8s/" rel="noreferrer">tutorial</a>, using these commands:</p> <pre><code>helm repo add rancher-latest https://releases.rancher.com/server-charts/latest kubectl create name...
<p>Remove the cattle-system namespace where rancher install all its components. kubectl delete ns cattle-system</p>
<p>How do I make this work?</p> <pre><code>[alan@stormfather-0be642-default-1 ~]$ kubectl exec -it my-pod-0 -- bash -c &quot;/bin/bash &amp;&amp; cd /tmp&quot; [root@my-pod-0 /]# pwd / </code></pre>
<p>Change directory first and then sh into it.</p> <pre><code>kubectl exec -it my-pod-0 -- bash -c &quot;cd /tmp &amp;&amp; /bin/bash&quot; </code></pre>
<p>Currently I am using this in my pipeline</p> <pre><code>kubectl apply -f deployment.yaml &amp;&amp; kubectl rollout status -f deployment.yaml </code></pre> <p>With this in yaml</p> <pre><code> readinessProbe: tcpSocket: port: 90 initialDelaySeconds: 120 periodSeconds: 10 ...
<p>The criteria for this are <a href="https://github.com/kubernetes/kubectl/blob/24d21a0/pkg/polymorphichelpers/rollout_status.go#L76-L89" rel="noreferrer">in the <code>kubectl</code> source</a>. A deployment is &quot;complete&quot; if:</p> <ul> <li>It hasn't timed out</li> <li>Its updated-replica count is at least it...
<p>I have k8s cluster with two node, master and worker node, installed Calico.</p> <p>I initialized cluster and installed calico with following commands</p> <pre><code># Initialize cluster kubeadm init --apiserver-advertise-address=&lt;MatserNodePublicIP&gt; --pod-network-cidr=192.168.0.0/16 # Install Calico. Refer to...
<p>Ok. It's fault of firewall. I opened all of the following ports on my master node and recreated my cluster, then everything got fine and cni0 interface appeared. Although I still don't know why.</p> <p>During the proccessing of tring, I find cni0 interface is important. If there is no cni0, I could not ping pod runn...
<p>I installed my Spring Boot application with 2 or 3 pods on Kubernetes in Linux Server. And to monitor it, I installed Prometheus, too. Currently, the metrics from application to Prometheus go very well.</p> <p>But I suspect that Prometheus takes metrics from only one pod. With a job like below in Prometheus config f...
<p>Yes. In this case, you have to add few annotations in your pod (if it does not exist already) and use <code>kubernetes_sd_configs</code> instead of <code>static_configs</code>.</p> <p>You will find an example here: <a href="https://github.com/appscode/third-party-tools/blob/master/monitoring/prometheus/builtin/READM...
<p>I'm running a pod on an EKS node with 2500m of requests and no limits - it happily uses around 3000m typically. I wanted to test whether requests were really guaranteed, so I am running a CPU stress test pod on the same node, with 3000m requests and no limits again.</p> <p>This caused the original pod to not be able...
<p>Requests are not a guarantee that resources (especially CPU) will be available at runtime. If you set requests and limits very close together you have better expectations, but you need every pod in the system to cooperate to have a real guarantee.</p> <p>Resource requests only affect the initial scheduling of the p...
<p>When I try to send a request through my NGINX ingress with headers larger than 4k, it returns a 502 error:</p> <pre><code>[error] 39#39: *356 upstream sent too big header while reading response header from upstream, client: &lt;ip&gt;, server: &lt;server&gt;, request: &quot;GET /path/ HTTP/1.1&quot;, ...
<p>The proxy_buffering header wasn't being set on the /_external-auth-Lw endpoint in the NGINX config. Issue has been resolved as of v. 0.14.0.</p>
<p>I have the following YAML (test.yaml) file that allows me to create ingress router and middleware for traefik 2</p> <pre><code>apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: test namespace: qa spec: entryPoints: - web routes: - match: Host(`my-url.com`) &amp;&amp; PathPre...
<p>Try editing the IngressRoute to remove Middleware from IngressRoute first and then delete the Middleware and then the IngressRoute.</p> <pre><code>kubectl edit ingressroute test -n qa; kubectl delete middleware testmiddle -n qa; kubectl delete ingressroute test -n qa </code></pre> <p>since these are crd's, API-ser...
<p>I want to ask why the Kubernetes networking driver <a href="https://www.weave.works/docs/net/latest/overview/" rel="nofollow noreferrer">weave</a> container is generating a lot of logs?</p> <p>The log file size is 700MB after two days.</p> <p>How can I solve that?</p>
<h2 id="logs-in-kubernetes">Logs in kubernetes</h2> <p>As it was said in comment, kubernetes is not responsible for log rotation. This is from kubernetes documentation:</p> <blockquote> <p>An important consideration in node-level logging is implementing log rotation, so that logs don't consume all available storage on ...