prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Me and my colleague have an issue, whenever I type</p>
<pre class="lang-sh prettyprint-override"><code>helm install mystuff-nginx ingress-nginx/ingress-nginx --version 3.26.0
</code></pre>
<p>I have successfully deployed nginx in version <code>3.26.0</code>, however when he runs the same command on his laptop just ... | <p>According to Helm's documentation:</p>
<pre><code>helm install [NAME] [CHART] [flags]
</code></pre>
<p>The version flag:</p>
<pre><code>--version string specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ... |
<p>I would like to replicate volume data among multiple nodes for redundancy.</p>
<p>I saw that the CSI drivers support <a href="https://kubernetes.io/docs/concepts/storage/volume-snapshots/" rel="nofollow noreferrer">snapshots</a> but I was looking for something more <a href="https://linuxize.com/post/how-to-use-rsync... | <p>Having analysed the comments it looks like one of the options would be to deploy <code>rsync</code> as a container.</p>
<p>For example <code>rsync</code> deployments one can visit below links:</p>
<ul>
<li><a href="https://hub.docker.com/r/steveltn/rsync-deploy/" rel="nofollow noreferrer">rsync-deploy</a></li>
<li><... |
<p>You can find mentions of that resource in the following Questions: <a href="https://stackoverflow.com/questions/53230623/forbidden-to-access-kubernetes-api-server">1</a>, <a href="https://stackoverflow.com/questions/49396607/where-can-i-get-a-list-of-kubernetes-api-resources-and-subresources">2</a>. But I am not abl... | <p>Yes, it's true, the provided (in comments) link to the documentation might be confusing so let me try to clarify you this.</p>
<p>As per <a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#so-many-proxies" rel="nofollow noreferrer">the official documentation</a> the apiserver proxy:<... |
<p>I have a following <code>kubectl</code> command to obtain the credentials for my Azure cluster:</p>
<pre><code>kubectl config set-credentials token --token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" --auth-provider=azure
</code></pre>
<p>However, this throws the following error:</p>
<pre>... | <p>Command <code>kubectl config set-credentials</code> is used to <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts" rel="nofollow noreferrer">set credentials</a> as the name implies. If you want to get some information from your ... |
<p>In K8s, every cluster has a set of nodes, some are master and others are worker nodes.
How can we know if a node is a master or a worker?</p>
| <p>In general, the easiest way to check if node is master or worker is to check if it has label <code>node-role.kubernetes.io/control-plane</code> (<a href="https://v1-20.docs.kubernetes.io/docs/setup/release/notes/#urgent-upgrade-notes" rel="noreferrer">or before Kubernetes <code>v1.20</code></a>: <code>node-role.kube... |
<p>How do I solve this problem?</p>
<pre><code>$ go mod init
$ go get k8s.io/kubernetes@v1.15.5
go: k8s.io/kubernetes@v1.15.5 requires
k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0
</code></pre>
<p>Environment is:<br>
<code>go 1.13</code><br />
<code>ubuntu 16.04</code... | <p>Go to version go1.16.7 linux/amd64.</p>
<p>This issue occurs because the dependency for kubernetes requires k8s.io/api v0.0.0 which is not present- <a href="https://github.com/kubernetes/kubernetes/blob/ddc4ed03657d6c8c009a5d915265d00cadcb634c/go.mod#L155" rel="nofollow noreferrer">https://github.com/kubernetes/kube... |
<p>I'm trying to deploy traefik in Kubernetes with minikube. The deployment works well, the pod starts but when I look into pod logs, I get this :</p>
<pre><code>Failed to list *v1beta1.Ingress: the server could not find the requested resource (get ingresses.extensions)
</code></pre>
<p>My current kubectl & kuberne... | <p>You might want to look at a lot of examples that I have done for the same <a href="https://github.com/codeaprendiz/devops-essentials/tree/main/home/container-orchestration/kubernetes" rel="nofollow noreferrer">here</a></p>
<p>Try <a href="https://github.com/codeaprendiz/devops-essentials/tree/main/home/container-orc... |
<p>I have a brand new (so empty) AKS cluster. I want to install two instances of the nginx ingress controller, in different namespaces and with different ingress class, using helm.</p>
<p>I start with the first:</p>
<pre><code>helm install ingress1 ingress-nginx/ingress-nginx --namespace namespace1 --set controller.ing... | <p>I think that you're setting the wrong values, thus the class name is <code>nginx</code> in both installs. Take a look at the template here: <a href="https://github.com/kubernetes/ingress-nginx/blob/3ae09fd1fac381fce9f5066febf172a4a70c10a9/charts/ingress-nginx/templates/controller-ingressclass.yaml#L13" rel="noreferr... |
<h2>TLDR;</h2>
<p>Why bother settings <code>-Xmx</code> and <code>-Xms</code> in a kubernetes app?</p>
<hr />
<p>We've inherited a kubernetes app that is having out of memory errors. It looks like the initial devs set kubernetes resource limits (.95 CPU core and 4Gb memory) as shown below. However, they also set the ... | <p>If you don't set a maximum heap size the behavior depends on the java version used. Current JREs support determining the container limits and use that to guide their internal heuristics.</p>
<p>when running with an older version the memory to be used for the heap will be determined based on the physical memory visib... |
<p>I am having issues with a certain compiled binary file that has to run as a health check for a certain container in a deployment pod. On AWS environment it runs as expected, but on premises the script fails with a vague error (it's no use even sharing it). I understand that perhaps the problem is in the kubernetes e... | <p>Solved, keeping this up for reference if anyone needs it in the future.
You can list all files accessed by your program using <code>strace /path/to/bin 2>&1 | grep openat</code>. Very useful for debugging without source code.</p>
|
<p>We have a bunch of pods that use RabbitMQ. If the pods are shut down by K8S with SIGTERM, we have found that our RMQ client (Python Pika) has no time to close the connection to RMQ Server causing it to think those clients are still alive until 2 heartbeats are missed.</p>
<p>Our investigation has turned up that on S... | <p>We tested this extensively and found that new EKS clusters, with Calico installed (see below) will experience this problem, unless Calico is upgraded. Networking will be immediately killed when a pod is sent SIGTERM instead of waiting for the grace period. If you're experiencing this problem and are using Calico, pl... |
<p>I know that i can use <code>kubectl get componentstatus</code>
command to check the health status of the k8 cluster but some how the output i am receiving do not show the health. Below is the output from master server.</p>
<p><a href="https://i.stack.imgur.com/7Td5F.png" rel="nofollow noreferrer"><img src="https:... | <p><strong>Solved</strong> in kube-apiserver v1.17.0, also you should use command below in your older apiserver.</p>
<pre><code>kubectl get cs -o=go-template='{{printf "NAME\t\t\tHEALTH_STATUS\tMESSAGE\t\n"}}{{range .items}}{{$name := .metadata.name}}{{range .conditions}}{{printf "%-24s%-16s%-20s\n"... |
<p>I am trying to deploy a <code>Kubernetes</code> cluster on <code>AWS EKS</code> using <code>Terraform</code>, run from a <code>Gitlab CI</code> pipeline. My code currently gets a full cluster up and running, except there is a step in which it tries to add the nodes (which are created separately) into the cluster.</p... | <h1>Use <code>semver</code> to lock <code>hashicorp provider</code> versions</h1>
<p>That's why is so important to use <a href="https://semver.org" rel="nofollow noreferrer"><code>semver</code></a> in <code>terraform</code> manifests.</p>
<p>As per <a href="https://learn.hashicorp.com/tutorials/terraform/provider-versi... |
<p>Cards on the table, I'm a newcomer to <code>AWS</code> so my ignorance is likely the source of my issue.</p>
<p>Sharing the output from my terminal I think is the best way to describe my issue so:</p>
<p>I discovered my issue when I tried to spin up a 4 node <code>AWS EKS</code> cluster via <code>eksctl create clust... | <p>There are two great apps for listing and removing almost any <code>AWS</code> resource, including yours case.</p>
<ul>
<li><code>awsls</code> is for listing <code>AWS</code> resources</li>
<li><code>awsrm</code> is for removing <code>AWS</code> resources</li>
</ul>
<h1><code>awsls</code> is for listing <code>AWS</co... |
<p>We are planning to run our Azure Devops build agents in a Kubernetes pods.But going through the internet, couldn't find any recommended approach to follow.</p>
<p>Details:</p>
<ul>
<li>Azure Devops Server</li>
<li>AKS- 1.19.11</li>
</ul>
<p>Looking for</p>
<ul>
<li>AKS kubernetes cluster where ADO can trigger its pi... | <p><a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops" rel="nofollow noreferrer">This article</a> provides instructions for running your Azure Pipelines agent in Docker. You can set up a self-hosted agent in Azure Pipelines to run inside a Windows Server Core (for Windows ... |
<p>I can see from the pod description that my pod "Failed" due to being "Evicted" due to Memory Pressure. but how can i test for too many "Failed && Evicted" pods with prometheus alert rules or some other means?</p>
<p>I have Prometheus Operator installed, I can see metrics for Fai... | <p>So it seems I need to update my version of <code>kube-prometheus-stack</code> helm chart.</p>
<p>The "Evicted" <code>Reason</code> we see in pod description is hanging off podStatus
<a href="https://i.stack.imgur.com/Nolv6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Nolv6.png" alt="enter imag... |
<p>I want to prevent the Horizontal auto-scaler from scaling down too early.I came across a doc that mentions we can update <code>/etc/kubernetes/manifests/kube-controller-manager.yaml</code> file on master node and edit this flag <code>--horizontal-pod-autoscaler-downscale-stabilization</code>.
Is it possible for GKE... | <p>There is no way in GKE you can change the flag on the master node as it's a google managed service.</p>
<p>You can use other options like custom metrics or custom HPA solutions.</p>
<p>For implementing the <strong>custom HPA</strong> solution instead of <strong>default K8s HPA</strong> you can checkout the : <a href... |
<p>I'm totally new to Vault and what I want is to detect when a secret changes and execute some code in response. I've been googling for resources about how to do that but haven't found anything useful. From what I've read and learnt, I think the only way of achieving what I want is by implementing a custom secrets eng... | <p>There is no event option in the vault as of now, so on changes, we get notified it's natively changing the Key/value pairs.</p>
<p>i would recommend using the polling method if you have any such scenario with the vault.</p>
<p>Here is one nice CRD which also does the polling option and syncs the vault secret to Kube... |
<p>How to change CPU Limit for namespace <code>kube-system</code> in Azure Kubernetes? My pod could not be deployed successfully due to some pods from namespace <code>kube-system</code> using lots of resource.</p>
<p><a href="https://i.stack.imgur.com/8ccf0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur... | <p>Posting this as community wiki out of comment, feel free to edit and expand</p>
<hr />
<p>In short words, this is not possible to change limits for <code>coreDNS</code> and other critical resources located within <code>kube-system</code> namespace. (Technically it's possible to set custom values, but they will be ov... |
<p>I have an ingress resource like the following:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "app-ingress"
labels:
app: "app"
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backen... | <p>One way would be to user <a href="https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/" rel="nofollow noreferrer">sticky sessons</a>.<br />
If you want to make sure that connections from a particular client are passed to the same Pod each time, you can select the session affinity based on the client'... |
<p>In my /root/.kube/config I have a server: value of "https://my.reverse.proxy:6443".</p>
<p>If I don't set any certificates on the reverse proxy (traffic goes directly to backend and backend certificate is presented, SSL passthrough), I can run a kubectl command successfully (i.e sudo kubectl get pods -o wi... | <p>If the issue started after renewing kubernetes certificates, this caused the existing <strong>~/.kube/config</strong> to have outdated keys and certificate values in it.</p>
<p>The solution is to replace the values <strong>client-certificate-data</strong> and <strong>client-key-data</strong> in file <strong>~/.kube/... |
<p>I want to add a custom tag in Jaeger span, I tried to install Istio on my Kubernetes cluster with this command:</p>
<pre><code>istioctl install --set profile=demo --set meshConfig.accessLogFile=/dev/stdout --set meshConfig.outboundTrafficPolicy.mode=REGISTRY_ONLY -f .\tracing.yaml -y
</code></pre>
<p>and this is <co... | <p>When using Istio operator you have to initialize it first with</p>
<pre class="lang-text prettyprint-override"><code>istioctl operator init
</code></pre>
<p>By default Istio operator installs and watches only <code>istio-operator</code> namespace. If you want to specify another namespaces for it to watch (for exampl... |
<p>I have a main pod that accesses and makes Kubernetes API calls to deploy other pods (the code similar below). It works fine. Now, I don't want to use the config file. I know it's possible with a service account. <a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/" rel="nofollow noref... | <p>The official Java client has example for <a href="https://github.com/kubernetes-client/java/blob/master/examples/examples-release-13/src/main/java/io/kubernetes/client/examples/InClusterClientExample.java" rel="nofollow noreferrer">in-cluster client example</a>.</p>
<p>It is quite similar to your code, you need to u... |
<p>I am trying to host a web app in a container with read only file system. Whenever I try to configure the root file system as read only through the <code>SecurityContext</code> of the container I get the following error:</p>
<pre><code> Ports: 80/TCP, 443/TCP
Host Ports: 0/TCP, 0/TCP
State: ... | <p>I managed to replicate your issue and achieve read only filesystem with exception for one directory.</p>
<p>First, worth to note that you are using both solutions in your deployment - the AppArmor profile and SecurityContext. As AppArmor seems to be much more complex and needs configuration to be done per node I dec... |
<p>I got 2 spring app pods deployed in k8 cluster. 1 replica each. Both have their cluster-ip services exposing the services.</p>
<ol>
<li><em><strong>/upstream/agentLabs/makeotherTierCall</strong></em> should forward to prevlab deployment <em><strong>/agentLabs/makeOtherTierCall</strong></em></li>
<li><em><strong>/dow... | <p>Nevermind. I had done a very small but very stupid mistake. In case someone comes wandering around here: I had used the same label for my 2 backend services. And for each of the cluster-IP services used the same selector. Hence, I was seeing inconsistent behavior.</p>
|
<p>I have create two secret docker-registrys using with these step:</p>
<pre><code>$ kubectl create secret docker-registry my-secret --docker-username=burak --docker-password=deniz --docker-email=burak@...
$ kubectl create secret docker-registry secret --docker-username=burak --docker-password=deniz --docker-email=bu... | <p>I had the problem, I used the following steps to delete docker-secrets.</p>
<ol>
<li>Check available secrets
<pre><code>$kubectl get secrets
</code></pre>
</li>
<li>Delete using <em>name</em> :
<pre><code>$kubectl delete secrets mydockercredentials
</code></pre>
</li>
</ol>
<p>use the above command to delete secrets... |
<p>I'm facing a problem with the image <strong>groundnuty/k8s-wait-for</strong>. Project at <a href="https://github.com/groundnuty/k8s-wait-for" rel="nofollow noreferrer">github</a> and repo at <a href="https://hub.docker.com/r/groundnuty/k8s-wait-for" rel="nofollow noreferrer">dockerhub</a>.</p>
<p>I'm pretty sure tha... | <p>For anyone facing the same issue, I will explain my fix.</p>
<p>Problem was that the containers inside deployment.yaml had no permissions to use Kube API. So, groundnuty/k8s-wait-for:v1.3 container could not check has the job <strong>{{ .Release.Name }}-os-server-migration-{{ .Release.Revision }}</strong> completed ... |
<p>I'd like to run two instances of <code>k3s</code> on the same machine.</p>
<p>Let's say I have already two different master servers.</p>
<p>What I'd like to do is to install:</p>
<ol>
<li>A K3S instance to deal with Master #1.</li>
<li>A second instance to deal with Master #2.</li>
</ol>
<p>First instance will be ma... | <p>Running multiple instances of k3s is not supported out of the box.<br />
You can however use tools like <a href="https://k3d.io/" rel="nofollow noreferrer">k3d</a> (running inside docker container), or <a href="https://github.com/superseb/multipass-k3s" rel="nofollow noreferrer">multipass-k3s</a> (running inside a V... |
<p>I have run some standard Azure IaaS kubernetes clusters for 3 years in production (~ 40 nodes). Because of recent corporate security changes and kubernetes design improvements, in particular the management of CSINodes, I decided to move back from Azure file storages to Longhorn. This scenario has been validated on o... | <p>I have finally found the right sequence:</p>
<ol>
<li>Delete one PVC because of the nature of replica sets, volumes are persistent</li>
<li>Remove the corresponding instance</li>
<li>Create a new PVC which refers to the new storage class</li>
<li>The Replicaset will automaticall bind the new instance to this new PVC... |
<p>The API credentials for service accounts are normally mounted in pods as:</p>
<pre><code>/var/run/secrets/kubernetes.io/serviceaccount/token
</code></pre>
<p>This token allows containerized processes in the pod to communicate with the API server.</p>
<p>What's the purpose of a pod's service account (<code>serviceAcc... | <p><strong>A little of theory:</strong></p>
<p>Let's start with what happens when pod should be created.</p>
<blockquote>
<p>When you create a pod, if you do not specify a service account, it is
automatically assigned the default service account in the same
namespace</p>
</blockquote>
<p><a href="https://v1-24.docs.kub... |
<p>Github repo: <a href="https://github.com/oussamabouchikhi/udagram-microservices" rel="nofollow noreferrer">https://github.com/oussamabouchikhi/udagram-microservices</a></p>
<p>After I configured the kubectl with the AWS EKS cluster, I deployed the services using these commands</p>
<pre><code>kubectl apply -f env-con... | <p>From your <code>kubectl describe pod <podname></code></p>
<blockquote>
<p>Warning FailedScheduling 2m19s (x136 over 158m) default-scheduler 0/2 nodes are available: 2 Too many pods.</p>
</blockquote>
<p>When you see this, it means that your nodes in AWS EKS is full.</p>
<p><strong>To solve this, you need t... |
<p>I started implementing the Kuberenetes for my simple app. I am facing issue when i use <code>NodePort</code>. IF I use <code>LoadBalancer</code> I can open my url. If I use <code>NodePort</code> it will take long time for trying to load and getting error <code>connection refused</code>. Below is my simple yaml file.... | <p>what I found something in GitHub : <a href="https://github.com/kubernetes/minikube/issues/11193" rel="nofollow noreferrer">Kubernetes NodePort</a> which solved my issue partially.</p>
|
<p>I'm developing <a href="https://github.com/msrumon/microservice-architecture" rel="nofollow noreferrer">this dummy project</a> and trying to make it work locally via <code>Skaffold</code>.</p>
<p>There are 3 services in my project (running on ports <code>3001</code>, <code>3002</code> and <code>3003</code> respectiv... | <p>The error say it all:</p>
<pre><code>- `0/1 nodes are available: 1 Insufficient cpu.` (from deployments)
</code></pre>
<p>You are requesting or deploying more apps than your node can handle.<br />
In your deployment units (<code>Deployment</code>, <code>StatefulSet</code>, <code>DeamoSet</code> etc) you define the r... |
<p>My question is very short: <strong>how does the process look like to retrieve a ca certificate for an existing Kubernetes cluster to connect gitlab with this cluster?</strong></p>
<p>After studying the docs, everything is fine, but I don‘t understand which cluster certificate is meant.</p>
<p>Many thanks and have a ... | <p>In this <a href="https://docs.gitlab.com/ee/user/project/clusters/add_existing_cluster.html#how-to-add-an-existing-cluster" rel="nofollow noreferrer">gitlab documentation</a> you can find instructions how to add an existing cluster to the gitlab and what do you need to do so.</p>
<blockquote>
<p><strong>CA certifica... |
<p>this is most likely really simple but I can't figure it out for 2 hours now. I have the following Consul Ingress that I want to parameterize through a parent chart:</p>
<pre><code>spec:
rules:
{{- range .Values.uiIngress.hosts }}
- host: {{ . }}
http:
paths:
- backend:
... | <p>If your default configuration values for this chart that are defined in the <code>values.yaml</code> file for Consul has this structure:</p>
<pre><code>uiIngress:
enabled: false
annotations: {}
hosts: []
tls: {}
</code></pre>
<p>And when you are executing <code>helm</code> command you are sending values like... |
<p>Where does the NGINX ingress controller stores temporary files?</p>
<p>This is the message I receive and I am pretty sure it is storing the file on a volume attached to one of my pods:</p>
<pre><code>2021/09/27 20:33:23 [warn] 33#33: *26 a client request body is buffered to a temporary file /var/cache/nginx/client_t... | <p>Answering your question indirectly there seems to some ways to skip proxy buffering to achieve your goal of uploading a file directly to the pod memory, I've found an interesting article <a href="https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx" rel="nofollow noreferrer">here</a>, ha... |
<p>I'm developing <a href="https://github.com/msrumon/microservice-architecture" rel="nofollow noreferrer">this dummy project</a> and trying to make it work locally via <code>Skaffold</code>.</p>
<p>There are 3 services in my project (running on ports <code>3001</code>, <code>3002</code> and <code>3003</code> respectiv... | <pre><code>0/1 nodes are available: 1 Insufficient cpu. (from deployments)
</code></pre>
<p>This error clearly means your deployment doesn't have sufficient resources to startup.</p>
<p>i tried deploying the same on my environment same error, 2 CPU is not enough to start this image.</p>
<p>You might need a higher resou... |
<h3>TL;DR</h3>
<p>java.net.SocketException: Network is unreachable (connect failed) in simple Kubernetes pod that can curl to the internet.</p>
<h3>Short Description</h3>
<p>I've setup a simple Job object in Kubernetes, which spawns a simple pod to use the Slack-Api to poll for a conversation history via slack.</p>
<p>... | <p>Java does not inherit the proxy settings from the environment.</p>
<p>You need to specify the proxy using Java system properties</p>
<pre><code>-Dhttp.proxyHost=locahost -Dhttp.proxyPort=9900
</code></pre>
|
<p>I have what I would consider a common use case but I am really struggling to find a solution:</p>
<p>I want to reuse a variable in <code>Kustomize</code> patches in our deployments. Specifically, we are using commit IDs to reference image tags (Use Case A) and k8s Jobs related to the deployments (Use Case B).</p>
... | <blockquote>
<p>but I want to reuse a variable within the manifests.</p>
</blockquote>
<p>This is not how you typically work with Kustomize. Its a good thing that things are <em>declarative</em> and <em>explicit</em> when working with Kustomize.</p>
<blockquote>
<p>when developers do PRs for releases, they should only ... |
<p>While trying to add/update a dependency to a helm chart I'm getting this error. No helm plugins are installed with the name <code>helm-manager</code>.</p>
<pre class="lang-sh prettyprint-override"><code>$ helm dep update ... | <p>The stable and incubator repositories of the Helm charts have been moved to a new location.
You must updated URI in charts.yaml (or requirements.yaml) to point to the new repositories in order to let the Helm dependency resolver find the correct location.</p>
<div class="s-table-container">
<table class="s-table">
<... |
<p>I want to prevent the Horizontal auto-scaler from scaling down too early.I came across a doc that mentions we can update <code>/etc/kubernetes/manifests/kube-controller-manager.yaml</code> file on master node and edit this flag <code>--horizontal-pod-autoscaler-downscale-stabilization</code>.
Is it possible for GKE... | <p>Per the Kubernetes official documentation [1] tuning the global HPA settings exposed as flags for the <code>kube-controller-manager</code> component.
The flags for the <code>kube-controller-manager</code> are actually read from a configuration tar file when the master is created. The master node is managed by Google... |
<p>Here is my ingress:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: 8link-app-kubernetes-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host:... | <p>In order to clear things for anyone, who will try to figure out the answer.</p>
<p>The question was answered by the author.</p>
<p>The problem was not in <code>Kubernetes</code> resources of any kind, it was a browser-specific issue, clearing the browser storage solved the problem.</p>
<blockquote>
<p>my problem was... |
<p>I'm currently using the Python APIs for Kubernetes and I have to:</p>
<ul>
<li><p>Retrieve the instance of a custom resource name <code>FADepl</code>.</p>
</li>
<li><p>Edit the value of that instance.</p>
</li>
</ul>
<p>In the terminal, I would simply list all <code>FADepls</code> with <code>kubectl get fadepl</code... | <p>You're right. Using <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CustomObjectsApi.md#get_namespaced_custom_object" rel="nofollow noreferrer"><strong><code>get_namespaced_custom_object</code></strong></a> you can retrieve the instance. This method returns a namespace scoped custom ... |
<p>I have pod A (it's actually the kube-scheduler pod) and pod B (a pod that has a REST API that will be invoked by pod A).</p>
<p>For this purpose, I created a ClusterIP service.</p>
<p>Now, when I exec into pod A to perform the API call to pod B, I get:
<code>curl: (6) Could not resolve host: my-svc.default.svc.clust... | <p>Try setting the <code>DNSPolicy</code> for pod A (or whatever deployment, statefulset, etc.) defines its template to <code>ClusterFirst</code> or <code>ClusterFirstWithHostNet</code>.</p>
<p>The behavior of this setting depends on how your cluster and kubelet are set up, but in most default configurations this will ... |
<p><code>Fluxcd</code> <code>ImageRepository</code> authentication with <code>AWS Elastic Container Registry</code> Not working on <code>ARM64 graviton</code> node.</p>
<p>After debugging I found that the image used in the <code>init container</code> to get cred credentials is not supporting <code>Arm64</code> instance... | <p>There are some workarounds, provided on the <code>fluxcd</code> documentation portal:</p>
<ul>
<li><a href="https://fluxcd.io/docs/guides/image-update/#aws-elastic-container-registry" rel="nofollow noreferrer">AWS Elastic Container Registry</a></li>
<li><a href="https://fluxcd.io/docs/guides/image-update/#using-a-js... |
<p>I have a PV <code>alpha-pv</code> in the kubernetes cluster and have created a PVC matching the PV specs. The PV uses the <code>Storage Class: slow</code>. However, when I check the existence of Storage Class in Cluster there is no Storage Class existing and still my PVC was <code>Bound</code> to the PV.</p>
<p>How ... | <h2>Short answer</h2>
<p>It depends.</p>
<h2>Theory</h2>
<p>One of the main purpose of using a <code>storageClass</code> is <a href="https://kubernetes.io/blog/2016/10/dynamic-provisioning-and-storage-in-kubernetes/" rel="nofollow noreferrer">dynamic provisioning</a>. That means that persistent volumes will be automati... |
<p><code>Istio-citadel</code> pods of <code>istio 1.4.10 helm</code> release, are restarted periodically.</p>
<p>2 replicas of <code>istio-citadel</code> are running.</p>
<p>This happens once in every 4-5 days, when the number of CSR requests reaches 28.3k and memory reaches 9.8G. Memory increases steadily after the re... | <p>@p10l is right: <code>citadel</code> was replaced by <code>Istio CA</code></p>
<p>There is a commit more than year ago: <a href="https://github.com/istio/istio.io/pull/6825" rel="nofollow noreferrer"> replace Citadel with Istio CA by istio-testing · Pull Request #6825 · istio/istio.io</a></p>
<p>Also, there are comm... |
<p>I have an (internal) K8s deployment (Python, TensorFlow, Guinicorn) with around 60 replicas and an attached K8s service to distribute incoming HTTP requests. Each of these 60 pods can only actually process one HTTP request at a time (because of TensorFlow reasons). Processing a request takes between 1 and 4 seconds.... | <p>Can't you implement the pub/sub or message broker in between?</p>
<p>saver data into a queue based on the ability you worker will fetch the message or data from queue and request will get processed.</p>
<p>You can use Redis for creating queues and in queue, you can use pub/sub also possible using the library. i used... |
<p>I have a deployment on Minikube for a .Net Core 5 API that is not returning response when I try to invoke it from Postman. When I run a GET from Postman to the exposed port (32580) and endpoint <code>http:// localhost:32580/api/platforms/</code> I get:</p>
<pre><code>Error: getaddrinfo ENOTFOUND
</code></pre>
<p>Odd... | <p>First thing which is worth to note that generally minikube has a lot of possible <a href="https://minikube.sigs.k8s.io/docs/drivers/" rel="nofollow noreferrer">drivers to choose from</a> - in my case I found the <code>docker</code> drive to be most easiest to use.</p>
<p>My setup is:</p>
<ul>
<li>WSL2</li>
<li>Docke... |
<p>I was trying to add permission to view nodes to my admin IAM using information in this article (<a href="https://aws.amazon.com/premiumsupport/knowledge-center/eks-kubernetes-object-access-error/" rel="nofollow noreferrer">https://aws.amazon.com/premiumsupport/knowledge-center/eks-kubernetes-object-access-error/</a>... | <p>How did you create your cluster? The IAM user, or IAM role, that you used to actually create it, is grandfathered in as a sysadmin. So long as you use the same credentials that you used for</p>
<p><code>aws eks create-cluster</code></p>
<p>You can do</p>
<p><code>aws eks update-kubeconfig</code>, followed by using k... |
<p>I would like to specify dependent environment variables on a Cloud Run service.</p>
<p>If the environment variables have been defined in a <code>.env</code> file it would look like this</p>
<pre><code>DATABASE_NAME=my-database
DATABASE_USER=root
DATABASE_PASSWORD=P4SSw0rd!
DATABASE_PORT=5432
DATABASE_HOST="/soc... | <p>It's likely this may work in Knative open source (which uses Kubernetes to execute pods) but not on Google Cloud Run (fully hosted), which runs on a proprietary execution engine.</p>
|
<p>Today when I create the PVC and PV in kubernetes cluster v1.15.x, the kubernetes dashboard shows the PVC is in lost state, this is the error message of PVC:</p>
<pre><code>this claim is in lost state.
</code></pre>
<p>this is my PVC define:</p>
<pre><code>{
"kind": "PersistentVolumeClaim",
&q... | <p>try to delete the PVC's annoation will make the PVC rebind:</p>
<pre><code>"annotations": {
"pv.kubernetes.io/bind-completed": "yes"
},
</code></pre>
<p>I copied the PVC from another PVC and forget to remove the annotation.</p>
|
<p>I've been reading through docs and can't find a clear answer on how to do this.</p>
<p>I have an AWS EFS claim and a storage class which i have applied. I have a PV and PVC that are in a namespace and can see the storage class, which i assume is cluster wide.</p>
<p>If i try to apply the same PV and PVC manifests to... | <p>Presumed you can do <code>aws efs describe-file-systems</code> to see your EFS is correctly configured and you have the <code>FileSystemId</code> ready for mount.</p>
<p>You have also installed the AWS EFS CSI driver and all driver pods are running with no issue.</p>
<p>For StorageClass you only create <strong>once<... |
<p>I have a pod attached to a daemonset node and which also contains several containers. I want to update the container images inside the pod. Therefore I am curious to know if restarting the the daemonset will do the job (because image Pull Policy is currently set to always) and restarting the daemonset will pull the ... | <p>Use <code>kubectl set image -n <namespace> daemonset <ds name> <container name>=<image>:<tag></code> will do the trick and does not require restart command.</p>
<p>To see the update status <code>kubectl rollout status -n <namespace> daemonset <ds name></code></p>
|
<p>I'm trying to deploy postgres as a <code>StatefulSet</code> on <code>k3d</code>.</p>
<p>I set the environment variable <code>POSTGRES_USER</code>, but when I try to connect to the db, it isn't taken into account and I see that authentication has failed. I can login with the password <code>pgpassword</code> and defau... | <blockquote>
<p>but when i try to connect to the db, it isn't taken into account, and i see that authentication has failed.</p>
</blockquote>
<p>It works exactly as it should. The <code>POSTGRES_USER</code> and <code>POSTGRES_PASSWORD</code> system variables are used to create the default user and password when creatin... |
<p>I am trying to adapt the quickstart guide for Mongo Atlas Operator here <a href="https://www.mongodb.com/blog/post/introducing-atlas-operator-kubernetes" rel="nofollow noreferrer">Atlas Operator Quickstart</a> to use secure env variables set in TravisCI.</p>
<p>I want to put the quickstart scripts into my deploy.sh,... | <p>Looks like the <code>echo</code> approach is fine, I've found a similar use-case to yours, have a look <a href="https://drew-buckman.medium.com/use-travis-ci-to-automate-the-deployment-of-a-python-app-to-ibm-code-engine-4b534b503055" rel="nofollow noreferrer">here</a>.</p>
|
<p>When the pod is Evicted by disk issue, I found there are two reasons:</p>
<ol>
<li>The node had condition: <code>[DiskPressure]</code></li>
<li>The node was low on resource: ephemeral-storage. Container NAME was using 16658224Ki, which exceeds its request of 0.</li>
</ol>
<p>I found <a href="https://kubernetes.io/do... | <p>Both reasons are caused by the same error - that the worker node has ran out of disk space. However, the difference is when they are exactly happening.</p>
<p>To answer this question I decided to dig inside <a href="https://github.com/kubernetes/kubernetes" rel="noreferrer">Kubernetes source code</a>.</p>
<p>Startin... |
<p><a href="https://github.com/oussamabouchikhi/udagram-microservices" rel="nofollow noreferrer">Github repo</a></p>
<p>After I configured the <code>kubectl</code> with the AWS EKS cluster, I deployed the services using these commands:</p>
<pre><code>kubectl apply -f env-configmap.yaml
kubectl apply -f env-secret.yaml
... | <p>As <a href="https://stackoverflow.com/users/10008173/david-maze" title="75,885 reputation">David Maze</a> very rightly pointed out, your problem is not reproducible. You haven't provided all the configuration files, for example. However, the error you received clearly tells about the problem:</p>
<pre><code>host not... |
<p>Trying to patch my custom resource to add extra element into an Array.</p>
<p>Works fine using kubectl:</p>
<pre><code>kubectl patch my-resource default --type=json -p '[ { "op":"add", "path": "/spec/data/-", "value": "3342, 43243.343, 434343" } ]' -v 9
</code></pre>
<p>but can't make it work using Python:</p>
<... | <p>Might be too late for this, but here it goes anyway...</p>
<p>Kubernetes Python API supports JSON-merge patching strategy only: <a href="https://github.com/kubernetes-client/python/blob/96dade6021dc2e9ee1430172e1b65d9e9e232b10/kubernetes/client/api/custom_objects_api.py#L2943" rel="nofollow noreferrer">https://githu... |
<p>Iam trying to set up aws cluster. I installed kubectl and configured aws with credentials. When I tried to display pods or any kubectl commands, Iam getting this error</p>
<pre><code>revaa@revaa-Lenovo-E41-25:~$ kubectl get pod
Unable to connect to the server: dial tcp 10.0.12.77:443: i/o timeout
</code></pre>
<p>Ho... | <p>The ip used is a private, it cannot be accessed outside the aws. Change your cluster's api server endpoint access to public. It worked.</p>
|
<p>I have the following <code>pv.yaml</code> Kubernetes/Kustomization file:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: myapp-common-pv
namespace: myapp
labels:
app.kubernetes.io/name: myapp-common-pv
app.kubernetes.io/component: common-pv
app.kubernetes.io/part-of: myapp
spec... | <blockquote>
<p>quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]<em>[-+]?[0-9]</em>)$', error found in #10 byte of ...|ge":"30gi"}}</p>
</blockquote>
<p>Change</p>
<pre><code>storage: 30gi
</code></pre>
<p>to</p>
<pre><code>storage: 30Gi
</code></pre>
<p>The <code>Gi</code> pa... |
<p>Does the Kubernetes scheduler assign the pods to the nodes one by one in a queue (not in parallel)?</p>
<p>Based on <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/scheduler-perf-tuning/#how-the-scheduler-iterates-over-nodes" rel="nofollow noreferrer">this</a>, I guess that might be the case since i... | <h2>Short answer</h2>
<p>Taking into consideration all the processes <code>kube-scheduler</code> performs when it's scheduling the pod, the answer is <strong>yes</strong>.</p>
<h2>Scheduler and pods</h2>
<blockquote>
<p>For <strong>every newly created pod or other unscheduled pods</strong>, kube-scheduler
selects an op... |
<p>I have k8tes cluster in which I am facing issues while mounting the existing volume to the pod in the new deployment. I have the existing deployments where I am mounting the same existing PV and PVCs. But facing issues only new deployment.</p>
<p>What could be the reason? How can I mount(NFS) volume to the new deplo... | <p>you can not ideally If your mount mode is set to <strong>ReadWriteOnce</strong>.</p>
<p>If you are planning to use the NFS and want to attach multiple PODs to a single mount you have to use the <strong>ReadWriteMany</strong>.</p>
<p>Example :</p>
<pre><code>---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
... |
<p>I am running my docker image in my local machine (executing my performance test based on the arguments provided) with the following command
<a href="https://i.stack.imgur.com/tYGgL.png" rel="nofollow noreferrer">like this</a></p>
<p>whereas, satheeshpandianj/my-perf-app is my image name and rest (QA Commerce ListMar... | <p>You are getting this error because the spec.containers, expects a list.
You have to update your yaml to this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: perf
name: perf
spec:
replicas: 1
selector:
matchLabels:
app: perf
template:
metadata:
labels:
app... |
<p>I have an app that get data from a third-party data source, it will send data to my app automatically and I can't filter it, I can only receive all. When data arrive, my app will transmit this data to a rocketmq topic.</p>
<p>Now I have to make this app a container and deploy it in k8s deployment with 3 replica. But... | <blockquote>
<p>Now I have to make this app a container and deploy it in k8s deployment with 3 replica. But these pods will all get same data and send to the same rocketmq topic.</p>
</blockquote>
<blockquote>
<p>There is no request. My app connect to a server and it will send data to app by TCP. Every Pod will connect... |
<p>I have deployed my Kubernetes cluster on EKS. I have an ingress-nginx which is exposed via load balancer to route traffic to different services. In ingress-nginx first request goes to auth service for authentication and if it is a valid request then I allow it to move forward. This is done using ingress-nginx annota... | <p>Here's a solution that worked for me. It allows the auth service to return a custom error message for each request.</p>
<p>The caveat is that because nginx can't access auth response body, the <code>pth-auth</code> service needs to put the data in <code>Pth-Auth-Error</code> header (base64-encoded).</p>
<p>This exam... |
<p>I have a k8s cluster with an ingress nginx as a reverse proxy. I am using letsencrypt to generate TLS certificate</p>
<pre><code>apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: ******
privat... | <p><em>Warning! Please plan OS upgrade path. The below advice should be applied only in emergency situation to quickly fix a critical system.</em></p>
<p>Your team missed OS update or <code>ca-certificates</code> package update.
Below solution works on old Debian/Ubuntu systems.</p>
<p>First check if you have offending... |
<p>We've just received an e-mail from GCP informing us that our clusters are currently using deprecated Beta APIs and that we need to upgrade to the newest API version.</p>
<p>We have 3 clusters running multiple resources in multiple namespaces so it would be a bit painful having to go through all of them detecting whi... | <p>In order to view which API are supported by your cluster</p>
<pre><code># Print out supported API's in the cluster
kubectl api-versions
</code></pre>
<p>In order to view deprecated API, you can use this tool.<br />
it's exactly what you asked for, it will print list of resources with the deprecated API's.</p>
<p><a ... |
<p>I'm new with Azure infrastructure and I'm trying to deploy Jenkins on AKS and be able to preserve all of my Jenkins data if the container stopped working and I run with a permissions issue for my newly created PVC.</p>
<p>I want to change the permissions for a specific folder and files in the PVC and the "chmod... | <blockquote>
<p>I want to change the permissions for a specific folder and files in the PVC and the "chmod" command looks like running but doesn't do anything and the permissions are still set to 777 instead of my wanted permissions.</p>
</blockquote>
<p>If you want to configure permissions in Kubernetes, you... |
<p>I am having below questions related to Ingress resource in Kubernetes</p>
<ol>
<li>Can a single Ingress controller (ex: NginxIngress Controller) be mapped to multiple Ingress resources?</li>
<li>If the Ingress resources are mapped to single namespace, how to requested be routed in case of multiple ingress resources?... | <ol>
<li>Yes, it's possible, you can have a look here: <a href="https://stackoverflow.com/questions/65171303/is-it-possible-to-have-multiple-ingress-resources-with-a-single-gke-ingress-cont">Is it possible to have multiple ingress resources with a single GKE ingress controller</a></li>
<li>Considering ingress resources... |
<p>I wish to filter Filebeat autodiscover using Kubernetes Namespaces.</p>
<p>Kubernetes is running on EKS v1.20.7</p>
<p>ECK versions:</p>
<ul>
<li>Elasticsearch v7.7.0</li>
<li>Kibana v7.7.0</li>
<li>Filebeat v7.10.0</li>
</ul>
<p>Filtering is not working based on the following config:</p>
<pre><code>filebeatConfig:
... | <p>The working config is :</p>
<pre><code>filebeatConfig:
filebeat.yml: |-
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
templates:
- config:
- type: container
paths:
... |
<p>I have a Docker image that contains an application in python, running in Kubernetes as a deployment, I want to pass to that application some data. I used env vars but I would like to use annotations but I'm not sure how to read them, I saw that <code>V1ObjectMeta</code> has a field called <code>annotations</code> bu... | <p>All you need is to get the pod object from Kubernetes API. It has the same structure as in <code>YAML</code> format, so once you have the data, the rest is trivial. See below:</p>
<pre class="lang-py prettyprint-override"><code>from kubernetes import client, config
config.load_incluster_config()
c = client.CoreV1Ap... |
<p>This example is specifically about Nextcloud, although I had the same (unsolved issue) in the past with others.</p>
<p>What I simply want to do, is to access nextcloud under <code>www.myserver.com/nextcloud</code>.</p>
<p>I am able to kind of accessing Nextcloud front page with my present setup, but everything that'... | <p>You should have to use the relative path in backend or HTML if you are using that.</p>
<p>However you can do one thing</p>
<p>if your all request getting by the application at : <code>www.myserver.com/core</code> and there is no other folder exist or endpoint</p>
<p>you can create some redirection rules like :</p>
<... |
<p>we are currently still running our Kubernetes cluster in region <code>europe-west2</code> (London) but have to use a new ipaddress for an ingress on the cluster from <code>europe-west3</code> (Frankfurt).</p>
<p>After trying to deploy our new ingress on the cluster in region <code>europe-west2</code> I get the follo... | <p>I've tried to replicate your issue but couldn't find any solution.</p>
<p>However, note that from the <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip#use_an_ingress" rel="nofollow noreferrer">official documentation</a>:</p>
<blockquote>
<p>Regional IP addresses do... |
<p>You can simply interact with K8s using its REST API. For example to get pods:</p>
<pre><code>curl http://IPADDR/api/v1/pods
</code></pre>
<p>However I can't find any example of authentication based only on curl or REST. All the examples show the usage of <code>kubectl</code> as proxy or as a way to get credentials.<... | <p>The <code>kubeconfig</code> file you download when you first install the cluster includes a client certificate and key. For example:</p>
<pre><code>clusters:
- cluster:
certificate-authority-data: ...
server: https://api.cluster1.ocp.virt:6443
name: cluster1
contexts:
- context:
cluster: cluster1
u... |
<p>I'm using Google Cloud Build to CI/CD my application, which rely on multiple cronjobs. The first step of my build is like:</p>
<pre class="lang-yaml prettyprint-override"><code> # validate k8s manifests
- id: validate-k8s
name: quay.io/fairwinds/polaris:1.2.1
entrypoint: polaris
args:
- audit
... | <p>Polaris may be asking you to explicitly set those attributes to false. Try this:</p>
<pre><code>...
jobTemplate:
spec:
backoffLimit: 3
template:
spec:
hostIPC: false
hostNetwork: false
hostPID: false
...
containers:
- worker-foo
...
...
</cod... |
<p>Trying to set a custom seccomp profile when using <code>kubectl apply</code> and despite the file being there in the container, the pod will not start with the following error:</p>
<pre><code>Error: failed to create containerd container: cannot load seccomp profile "/var/lib/kubelet/seccomp/custom_profile.json&... | <p>If <code>type: Localhost</code> seccomp profile is used, then the <code>seccomp</code> profiles must be present over the node on which the pod is getting scheduled. Also, the path is relative to the path <code>/var/lib/kubelet/seccomp</code>. Here <code>/var/lib/kubelet/</code> is the default path for <code>kubelet<... |
<p>I have a k8s cluster with an ingress nginx as a reverse proxy. I am using letsencrypt to generate TLS certificate</p>
<pre><code>apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: ******
privat... | <p>This is related to the expired DST Root CA X3, which expired Sep 30 14:01:15 2021 GMT.</p>
<p>The DST CA Root X3 certificate is part of the "cacert-bundle".
As of today the "cacert-bundle" can be found here: <a href="https://curl.se/docs/caextract.html" rel="nofollow noreferrer">https://curl.se/d... |
<p>We run gitlab-ee-12.10.12.0 under docker and use kubernetes to manage the gitlab-runner</p>
<p>All of a sudden a couple of days ago, all my pipelines, in all my projects, stopped working. NOTHING CHANGED except I pushed some code. Yet ALL projects (even those with no repo changes) are failing. I've looked at every c... | <p>Turns out something DID change. gitlab-runner changed and kubernetes pulled gitlab/gitlab-runner:latest between runs. Seems gitlab-runner 14.3 has a problem with my kubernetes. I went back through my pipelines and the last successful one was using 14.1</p>
<p>So, after a day of working through it, I edited the relev... |
<p>I'm trying to set some alarms based on replica set metrics but Prometheus cannot find <a href="https://github.com/kubernetes/kube-state-metrics/blob/master/docs/replicaset-metrics.md" rel="nofollow noreferrer">replicaset kube state metrics</a> while browsing expressions. What would be the problem with that? On Prome... | <p>This is a community wiki answer posted for better clarity. Feel free to expand it.</p>
<p>As @ cosmos-1905-14 described, he checked the kube-state-metric logs and found that the ServiceAccount did not have sufficient rights to access the ReplicaSets. After he added the necessary rights, the issue was resolved.</p>
|
<p>So I am deploying an EMR application using EKS, following the EMR-EKS workshop by AWS, declaring the Fargate profile.</p>
<p>I tried everything to be serverless, so even my EKS Cluster runs on Fargate (kube-sytem, default, etc).</p>
<p>I created a custom namespace with a Fargate profile, and submit a Spark job. The ... | <p>Your situation:</p>
<p><code>...created fargate-profile with the same namespace: Job completed</code></p>
<p><code>... created fargate-profile with the same namespace but with labels...Job stucked in Pending </code></p>
<p>If a namespace is associated with >1 profile, EKS will randomly choose a profile. When it p... |
<p>I have one laravel docker container which is build with a custom nginx + php-fpm docker image.</p>
<p>I have deployed successfully to a k8s cluster and can access properly, also logging into the pod and running <code>env</code> I can see all the environment variables being set successfully from my k8s <code>configma... | <p>I encountered this problems only when there are <code>redis</code> or caching system.</p>
<p>But you already state that</p>
<blockquote>
<p>(I am not caching laravel config so that case we can exclude, also tried with the command php artisan config:clear beforehand, still same result cannot fetch the env vars within... |
<p>I'm creating a pod for Databse server first and then an application server pod in openshift.
And I'm doing it in Jenkinsfile, with openshift deployments handled by Kustomize.</p>
<p>And the database routeurl varibale -DATABASE_DYNAMIC_ROUTEURL is in jenkinsfile.</p>
<p>Below are my manifest files for deployment.</p>... | <p>You can try out something like</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: demo
labels:
app: demo
spec:
selector:
matchLabels:
app: demo
template:
metadata:
name: demo
annotations: {} # initially unset. You may provide default values if you wish.
la... |
<p>I want to start practicing with k8s for the CKAD exam. I run on ubuntu 18.04.
I noticed everywhere that I need to download <em>Virtualbox</em> for <em>minikube</em>. I believe that <em>VB</em> is needed in case I don't start my cluster with a driver but if I use the <em>Docker</em> driver when I start my cluster sho... | <p>It seems that the preferred way is use --driver=docker driver instead of --driver=none for minikube, although <strong>it is technically not baremetal</strong> as it is significantly easier to configure and does not require root access. The ‘none’ driver is recommended for advanced users only. (info below from <a hre... |
<p>Below is the report for liveness & readiness after running <code>kubectl -n mynamespace describe pod pod1</code>:</p>
<pre><code>Liveness: http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3
Readiness: http-get http://:8080/a/b/c/.well-known/heartbeat delay=3... | <p>The results are completely right:</p>
<ul>
<li>http://:8080 indicates that it will try an http-get in port 8080 inside your pod</li>
<li>#success=1 indicates a success threshold of 1 (the default), so the first time it gets an answer it will mark the pod as live or ready</li>
<li>#failure=3 indicates a failure thres... |
<p>I have a service providing an API that I want to only be accessible over <code>https</code>. I don't want <code>http</code> to redirect to <code>https</code> because that will expose credentials and the caller won't notice. Better to get an error response.</p>
<p>How to do I configure my ingress.yaml? Note that I wa... | <p>In the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-side-https-enforcement-through-redirect" rel="nofollow noreferrer">documentation</a>: you can read the following sentence about HTTPS enforcement through redirect:</p>
<blockquote>
<p>By default the controll... |
<p>I've stumbled upon a problem when using some more complex argo workflows with initialization and clean-up logic. We are running some initialization in one of the initial steps of the workflow (e.g. creation of some resources) and we'd like to perform a clean-up regardless of the status of the workflow. <code>onExit<... | <p>You can mark output parameters as global using the <code>globalName</code> field. A global output parameter, assuming it has been set, can be accessed from anywhere in the Workflow, including in an exit handler.</p>
<p>The example file for writing and consuming global output parameters should contain all the informa... |
<p>I have a few applications hosted on a single <code>Amazon Load Balancer</code>, at different endpoints on the <code>ALB</code> etc. This is server and generated through <code>Kubernetes EKS</code>.</p>
<pre><code> - path: /*
backend:
serviceName: ssl-redirect
... | <p>Server-side and client side routings are completely different.</p>
<p>You want to make server-side routing. I.e, server-side rules should exist.
Server app doesn't know neither <code>/path1</code> nor <code>/path2</code>. Therefore, you get <code>404</code> from the server.</p>
|
<p>I would like to access a Windows file share share (SMB3) from a docker container, but I do not want to compromise the security of the host machine. All the guides I have read state that I need to use either the <code>--privileged</code> flag or <code>--cap-add SYS_ADMIN</code> capability.</p>
<p>Here is the command... | <p>After more research I have figured out how to do this. There is a Container Storage Interface (CSI) driver for SMB called <strong>SMB CSI Driver for Kubernetes</strong> (<a href="https://github.com/kubernetes-csi/csi-driver-smb" rel="noreferrer">https://github.com/kubernetes-csi/csi-driver-smb</a>).</p>
<p>After i... |
<p>I have a k8s cluster running locally on an arm Mac. I have client and server pods. The client is a React frontend. The server is an express server connecting to a mongodb Atlas cluster.</p>
<p>So far the images build fine and all pods are running.</p>
<p>The problem is the internal port routing is not working. All I... | <p>Ideally, you should be using the service name to communicate with different services inside the cluster.</p>
<p>If you react server want to talk with the express server, you have to the <code>express-service-name</code> as host into the <strong>react</strong> service. Kubernetes will auto manage the resolution.</p>
... |
<p>I'm trying to deploy a hello world container in kubernetes using Pulumi and GCP</p>
<p>Basically I just want this local helloworld container to be deployed in an existing k8s cluster on GCP made following <a href="https://www.pulumi.com/docs/tutorials/gcp/gcp-ts-gke-hello-world/" rel="nofollow noreferrer">this tutor... | <p>It looks like you're trying to extract the repository URL from the promise instead of it's resolution.<br />
Going by this <a href="https://www.pulumi.com/docs/reference/pkg/gcp/container/getregistryrepository/" rel="nofollow noreferrer">example</a> from the Pulumi docs, it looks like changing your code from</p>
<pr... |
<p>I have set up my application to be served by a Kubernetes NGINX ingress in AKS. Today while experimenting with the Azure API management, I tried to set it up so that all the traffic to the ingress controller would go through the API management. I pointed its backend service to the current public address of the ingre... | <p>There are two modes of <a href="https://learn.microsoft.com/en-us/azure/api-management/api-management-using-with-vnet" rel="nofollow noreferrer">deploying API Management into a VNet</a> – External and Internal.</p>
<p>If API consumers do not reside in the cluster VNet, the External mode (Fig below) should be used. I... |
<p>In the below yaml syntax:</p>
<pre><code> readinessProbe:
httpGet:
path: /index.html
port: 80
initialDelaySeconds: 3
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 3
</code></pre>
<hr />
<p>Readiness probe is used during initial deployments of ... | <blockquote>
<p>using rolling deployment strategy, Is readiness probe used for rolling deployment?</p>
</blockquote>
<p>Yes, the new version of Pods is rolled out and older Pods are not terminated until the new version has Pods in <em>ready</em> state.</p>
<p>E.g. if you roll out a new version, that has a bug so that t... |
<pre><code>kubectl create secret docker-registry $SECRET_NAME \
--dry-run=client \
--docker-server="$ECR_REGISTRY" \
--docker-username=AWS \
--docker-password="$(</token/ecr-token)" \
-o yaml
</code></pre>
<p>fil... | <p>The <code>$(< /path/to/a/file)</code> syntax is a special form of command substitution that is supported by several UNIX shells, including <a href="https://docs.oracle.com/cd/E36784_01/html/E36870/ksh-1.html" rel="nofollow noreferrer">ksh</a> (Oracle online documentation), <a href="https://www.gnu.org/savannah-ch... |
<p>Pod lifecycle is managed by Kubelet in data plane.</p>
<p>As per the definition: If the liveness probe fails, the kubelet kills the container</p>
<p>Pod is just a container with dedicated network namespace & IPC namespace with a sandbox container.</p>
<hr />
<p>Say, if the Pod is single app container Pod, then u... | <p>A pod is indeed the smallest element in Kubernetes, but that does not mean it is in fact "empty" without a container.</p>
<p>In order to spawn a pod and therefore the container elements needed to attach further containers a very small container is created using the <code>pause</code> image.
This is used to... |
<p>After deploying to <code>AWS EKS</code> I get this error <br/></p>
<p>Gtihub repo: <a href="https://github.com/oussamabouchikhi/udagram-microservices" rel="nofollow noreferrer">https://github.com/oussamabouchikhi/udagram-microservices</a></p>
<p><br/>Steps to reproduce</p>
<ol>
<li>Create <code>AWS EKS</code> cluste... | <h1>Use <code>resolver</code> in <code>nginx</code> config</h1>
<p>The <code>nginx</code> <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver" rel="nofollow noreferrer"><code>resolver</code></a> directive is required.</p>
<p>Nginx is a multiplexing server (many connections in one OS process), so ... |
<p>We have several resources deployed as part of a helm (v3) chart. Some time ago, I made changes to resources deployed by that helm chart manually, via <code>kubectl</code>. This caused some drift between the values in the yaml resources deployed by the helm release (as show by <code>helm get values <release></c... | <p>This is a community wiki answer posted for better visibility. Feel free to expand it.</p>
<p>According to the <a href="https://github.com/helm/helm/issues/2730" rel="nofollow noreferrer">Helm issue 2730</a> this feature will not be added in the Helm, as it is outside of the scope of the project.</p>
<p>It looks like... |
<p>I'm using <a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus" rel="nofollow noreferrer">prometheus-community/prometheus</a> chart</p>
<p>I'd like to add the following labels automatically to any alert manager rule firing</p>
<ul>
<li>env=<strong>prod</strong></li>
<li>cluster=<s... | <p>You can add <code>external_labels</code> to your <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/" rel="nofollow noreferrer">prometheus.yml</a>:</p>
<pre class="lang-yaml prettyprint-override"><code>global:
# The labels to add to any time series or alerts when communicating with
... |
<p>I have created a helm chart named "abc" with the command
<code>helm create abc</code>
Now when I install this chart, all the kuberenets resources created will have a name containing "abc".</p>
<p>Now I have to rename the chart "abc" to "xyz".
If i use
<code>helm install --name xyz ./abc</code>
only the chart name... | <p>I met this problem many times and I found the simplest solution.
Just 2 steps:</p>
<ol>
<li>find and replace the name in the chart files.</li>
<li>rename chart directory name</li>
</ol>
<p>Very simple if your chart name is quite unique.</p>
<p>By default chart name is used in the files:
<strong>Chart.yaml,
templates... |
<p>I have a persistent volume defined as</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ghost-cms-content
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: do-block-storage
</code></pre>
<p>and a deployment defined as</p>
<pre><code>---... | <p>PVC with permission</p>
<pre><code>accessModes:
- ReadWriteOnce
</code></pre>
<p>Each pod will get the one volume or PVC, as it's readwrite once.</p>
<p>If you want to keep shared volume across replicas you can use the <strong>NFS</strong> with <strong>accessMode</strong> <strong>ReadWriteMany</strong></p>
<pre><c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.