Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p>I used this line o get the failed pods: <code>workflow.failures</code> , so I would like to get the same info about the nodes that have finished successfully. Is there a command to get the information about the ones that ended correctly??. I'm using Argo 3</p>
| javier_orta | <p>There is no <code>workflow.nodes</code> <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/variables.md#exit-handler" rel="nofollow noreferrer">global variable</a>. But if you have kubectl access to get the JSON representation of the workflow, you can get information about executed nodes.</p>
<pre ... | crenshaw-dev |
<p>I created a <code>WorkflowTemplate</code> in which I want to pass result of a script template as an input parameter to another task</p>
<p>Here is my <code>WorkflowTemplate</code></p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: dag-wft
spec:
entrypoint: whalesay
templates... | Biru | <p><strong>1. Fully define your output parameters</strong></p>
<p>Your output parameter spec is incomplete. You need to specify <em>where</em> the output parameter comes from.</p>
<p>Since you have multiple output parameters, you can't just use standard out (<code>{{tasks.prepare-lst.outputs.parameters.result}}</code>)... | crenshaw-dev |
<p>I'm setting up a kubernetes cluster with many different components for our application stack and I'm trying to balance storage requirements while minimizing the number of components.</p>
<p>We have a web <strong>scraper</strong> that downloads tens of thousands of HTML files (and maybe PDFs) every day and I want to ... | Prefer Anon | <p>Are you in a cloud? If in AWS S3 would be a good spot, object storage sounds like what you might want, but not sure of your requirements. </p>
<p>If not in a cloud, you could run Minio (<a href="https://www.minio.io/" rel="nofollow noreferrer">https://www.minio.io/</a>) which would give you the same type of object ... | Steve Sloka |
<p>I am trying to install Argo CLI by following this (<a href="https://github.com/argoproj/argo-workflows/releases" rel="nofollow noreferrer">https://github.com/argoproj/argo-workflows/releases</a>) documentation.</p>
<pre><code># Download the binary
curl -sLO https://github.com/argoproj/argo/releases/download/v3.1.3/a... | Pratik Patil | <p>The download links on the Releases page are incorrect. Try this one:</p>
<pre><code>curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.1.3/argo-linux-amd64.gz
</code></pre>
<p>I've submitted an <a href="https://github.com/argoproj/argo-workflows/issues/6440" rel="nofollow noreferrer">issue</a>... | crenshaw-dev |
<p>I'm trying to make argocd cli output yaml/json to prep it for script ingestion.</p>
<p>According to this PR: <a href="https://github.com/argoproj/argo-cd/pull/2551" rel="nofollow noreferrer">https://github.com/argoproj/argo-cd/pull/2551</a>
It should be available but I can't find the option in cli help nor in docume... | Vano | <p>Some commands accept the <code>-o json</code> flag to request JSON output.</p>
<p>Look in the <a href="https://github.com/argoproj/argo-cd/tree/master/docs/user-guide/commands" rel="nofollow noreferrer">commands documentation</a> to find commands which support that flag.</p>
<p><code>argocd cluster list -o json</cod... | crenshaw-dev |
<p>I'm working on deploying the Thanos monitoring system and one of its components, the metric compactor, warns that there should <em>never</em> be more than one compactor running at the same time. If this constraint is violated it will likely lead to corruption of metric data.</p>
<p>Is there any way to codify "Exact... | Sammitch | <p>Be careful with Deployment, because they can be configured with two update strategy:</p>
<ul>
<li><em>RollingUpdate</em>: new pods are added while and old pods are terminated. This mean that, depending on the <code>maxSurge</code> option, if you set your replicas to <code>1</code>, you may still be have <em>at most... | Federkun |
<p>Is there a way in Argo CD to suspend sync globally? For example, my company occasionally does deployment freezes in which no one is allowed to ship to production. Is there a way to turn off sync globally in Argo CD to prevent new versions of apps from deploying?</p>
| David Ham | <p>As LostJon commented, you can scale the application controller down. But then you won't see the current state of resources in the UI - only the state as of the moment the controller was shut down.</p>
<p>Instead of scaling down the controller, you can set a <a href="https://argo-cd.readthedocs.io/en/latest/user-guid... | crenshaw-dev |
<p>I have an Argo workflow with dynamic fan-out tasks that do some map operation (in a Map-Reduce meaning context). I want to create a reducer that aggregates their results. It's possible to do that when the outputs of each mapper are small and can be put as an output parameter. See <a href="https://stackoverflow.com/q... | Alexander Reshytko | <p>Artifacts are more difficult to aggregate than parameters.</p>
<p>Parameters are always text and are generally small. This makes it easy for Argo Workflows to aggregate them into a single JSON object which can then be consumed by a "reduce" step.</p>
<p>Artifacts, on the other hand, may be any type or size... | crenshaw-dev |
<p>I'm developing a Blazor WebAssembly app with PWA enabled, and with files <code>appsettings.json</code>, <code>appsettings.Development.json</code> and <code>appsettings.Production.json</code>. The last one is empty because it would contain secrets to replace when production environment is deployed to a kubernetes clu... | isierra | <p>I edited the <code>wwwroot/service-worker.published.js</code> file, which first lines are as follow:</p>
<pre class="lang-js prettyprint-override"><code>// Caution! Be sure you understand the caveats before publishing an application with
// offline support. See https://aka.ms/blazor-offline-considerations
self.impo... | isierra |
<p>I have this argo application :</p>
<pre><code>project: myproject
destination:
server: 'https://kubernetes.default.svc'
namespace: myns
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true
sources:
- repoURL: >-
https://gitlab.co... | titter | <p>No, you cannot. The <code>$values</code> feature is very specific to sharing the values file, not arbitrary config files.</p>
<p>This PR intends to implement the more general feature you need: <a href="https://github.com/argoproj/argo-cd/pull/12508" rel="nofollow noreferrer">https://github.com/argoproj/argo-cd/pull/... | crenshaw-dev |
<p>I am trying to access the content(json data) of a file which is passed as input artifacts to a script template. It is failing with the following error <code>NameError: name 'inputs' is not defined. Did you mean: 'input'?</code></p>
<p>My artifacts are being stored in aws s3 bucket. I've also tried using environment ... | Biru | <p>In the last template, replace <code>{{inputs.artifacts.result}}</code> with <code>”/tmp/templates_lst.txt”</code>.</p>
<p><code>inputs.artifacts.NAME</code> has no meaning in the <code>source</code> field, so Argo leaves it as-is. Python tries to interpret it as code, which is why you get an exception.</p>
<p>The pr... | crenshaw-dev |
<p>I am trying to perform a <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer" title="Kubernetes Performing a Rolling Update">Kubernetes Rolling Update</a> using <a href="https://v2.helm.sh/docs/" rel="nofollow noreferrer" title="Helm v2 Docs">Helm v2</a>; ho... | h q | <p>Unlike <code>Deployment</code>, <code>StatefulSet</code> does not start a new pod before destroying the old one during a rolling update. Instead, the expectation is that you have multiple pods, and they will be replaced one-by-one. Since you only have 1 replica configured, it must destroy it first. Either increase y... | superstator |
<p>I have a working kubernetes cluster where ingress and letsencrypt is working just fine when I use helm charts. I have a deployment not included in a chart that I want to expose using ingress with TLS. How can I do this with kubectl commands?</p>
<p>EDIT: I can manually create an ingress but I don't have a secret so... | JSantos | <p>Google provides a way to do this for their own managed certificates. The documentation for it is at <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs</a>.</p>
| Andy Shinn |
<p>I'm trying to find a solution for the problem that seems like something very common.</p>
<ol>
<li>I have a k8s cluster ip service which exposes two ports: 8088 and 60004</li>
<li>I would like to expose these same ports on ALB and not use path based routing</li>
</ol>
<p>This works for exposing one service on 8088 ... | Bakir Jusufbegovic | <p>Eventually, to solve this problem, I've used ALB ingress controller group feature, which is currently in alpha state: <a href="https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/914" rel="noreferrer">https://github.com/kubernetes-sigs/aws-alb-ingress-controller/issues/914</a></p>
<p>This is how my... | Bakir Jusufbegovic |
<p>I am new to the argo universe and was trying to set up Argo Workflows <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/quick-start.md#install-argo-workflows" rel="nofollow noreferrer">https://github.com/argoproj/argo-workflows/blob/master/docs/quick-start.md#install-argo-workflows</a> .</p>
<p>I ... | Kishor Unnikrishnan | <p>The <code>argo</code> CLI <a href="https://github.com/argoproj/argo-workflows/blob/877d6569754be94f032e1c48d1f7226a83adfbec/cmd/argo/commands/get.go#L73-L74" rel="noreferrer">manages two API clients</a>. The first client connects to the <a href="https://argoproj.github.io/argo-workflows/rest-api/" rel="noreferrer">A... | crenshaw-dev |
<p>How do i need to configure my ingress that Angular 7 App is working?</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- http:
paths:
... | Nico Schuck | <p>Without knowing the version of nginx-ingress this is just a guess.</p>
<p>Per the documentation at <a href="https://kubernetes.github.io/ingress-nginx/examples/rewrite/#rewrite-target" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/examples/rewrite/#rewrite-target</a> is says:</p>
<blockquote... | Andy Shinn |
<p>I have created an Autopilot cluster on GKE</p>
<p>I want to connect and manage it with <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Python Kubernetes Client</a></p>
<p>I am able to get the kubeconfig of cluster</p>
<p>I am able to access the cluster using kubectl on my local system... | HERAwais | <p>Here's what I figured out. I think it's a good solution because it prevents man in the middle attacks (uses SSL) unlike other python snippets in the wild.</p>
<pre><code>from google.cloud.container_v1 import ClusterManagerClient
from kubernetes import client
from tempfile import NamedTemporaryFile
import base64
impo... | E Brake |
<p>Since Kubernetes does not implement a dependency between Containers, I was wondering whether there is an elegant way of checking whether another Container in the same Pod is ready.</p>
<p>I would assume the Downward API is necessary.
Maybe it could be done by embedding <code>kubectl</code> inside the container - bu... | abergmeier | <p>For now I ended up using a simple file existence check:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
...
- name: former
readinessProbe:
exec:
command:
- /bin/sh
- "-c"
- /bin/sh /check_... | abergmeier |
<p>I am running a small 3 node test kubernetes cluster (using kubeadm) running on Ubuntu Server 22.04, with Flannel as the network fabric. I also have a separate gitlab private server, with container registry set up and working.</p>
<p>The problem I am running into is I have a simple test deployment, and when I apply ... | Aaron Murray | <p>After going through many different solutions and lots of research and testing. The answer was actually very simple.</p>
<h3>Solution in my case</h3>
<p>The /etc/hosts file <em>MUST</em> contain the host for the registry (and possibly the entry for the gitlab instance as well) on <em>EVERY</em> node of the cluster i... | Aaron Murray |
<p>I have broken down my workflow scenario into 2 separate <code>WorkflowTemplates</code>. <code>outer-template</code> would just define the steps and <code>inner-template</code> would hold that <code>job</code> definition that will spin up desired container, with all other fancy stuff. Now when I submit a request <cod... | colossal | <p>When passing an argument to a template in a step, you have to explicitly set the argument value.</p>
<p>In the <code>outer-template</code> WorkflowTemplate, you invoke <code>inner-template</code> twice. In each case you have half-specified the <code>message</code> argument. You have to also set the <code>value</code... | crenshaw-dev |
<p>I have restarted the rancher host a few times while configuring rancher.</p>
<p>Nothing was lost, even though containers had been started and stopped several times during these reboots.</p>
<p>I had to stop and run the container again to set a specific IP for the UI, so I could use the other IP addresses available... | Miguel Mesquita Alfaiate | <p>Ok, I can confirm that this process works.</p>
<p>I have followed the guide here: <a href="https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#completing-the-upgrade" rel="nofollow noreferrer">https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#completing-the-... | Miguel Mesquita Alfaiate |
<p>How can I reserved resources to a namespace?</p>
<p>Example: I want to guarantee that one namespace cannot allocate all the resources on the cluster.</p>
<p>Example: Having namespace A and B and a Cluster that can have 100 pods. How can I make sure that the pod A can schedule at least 10 pods, even if we have 200 ... | Jorge Machado | <p>Namespace resource quota won't do this for you. Try to explore: <a href="http://yunikorn.apache.org/" rel="nofollow noreferrer">http://yunikorn.apache.org/</a>. More specifically the min/max capacity model: <a href="http://yunikorn.apache.org/docs/next/get_started/core_features#hierarchy-resource-queues" rel="nofoll... | Weiwei Yang |
<p>An <code>outer-template</code> which calls <code>inner-template</code> twice since there are 2 steps. Inner template is a simple container which write some text to <code>/command_output/result.txt</code>. The workflow outputs attempts to read it thru:</p>
<pre><code>- name: previous_step_output
valueFrom:
path... | colossal | <p>As far as I can tell, <a href="https://github.com/argoproj/argo-workflows/tree/master/examples#kubernetes-resources" rel="nofollow noreferrer">Argo Workflows resource templates</a> do not support reading files as output parameters.</p>
<p>It looks like the only built-in method of communicating from a <code>job</code... | crenshaw-dev |
<p>I'm trying Kubernetes in a Azure environment (AKS).</p>
<p>I have an nginx ingress deployed and exposed to internet through a public ip and an azure load balancer. It is used to expose public/front services.</p>
<p>My issue is I would like to deploy 'back' services, not exposed to internet. My first guess would be... | luke77 | <p>Ingress controllers are made for external traffic. For in-cluster communication it is best to use <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Kubernetes Services</a> which will configure the DNS inside the cluster. With a Service you'll be able to call your ba... | Jean-Philippe Bond |
<p>I have been trying to watch some resources in my K8s cluster and after reading some blogs about watch vs informers, i've decided to go with Informers.</p>
<p>I came across this example of how to use one: <a href="https://github.com/Netflix-Skunkworks/kubernetes-client-java/blob/master/examples/src/main/java/io/kuber... | kambamsu | <p>Well it's a ride down a rabbit hole.</p>
<blockquote>
<p>I suggest to keep the diagrams <a href="https://github.com/huweihuang/kubernetes-notes/blob/master/code-analysis/kube-controller-manager/sharedIndexInformer.md" rel="nofollow noreferrer">from the official docs</a> open in separate tab/window in order to apprec... | iska |
<p>I am working with an Argo workflow.</p>
<p>There is a DAG step in my <code>entrypoint</code> which follows several normal steps. One of these steps does a <code>sys.stdout</code>. Once inside of the DAG step, I want some of the tasks to reference the results from the <code>sys.stdout</code>.</p>
<p>I know if we want... | TCR | <h1>A bit of background about template outputs</h1>
<p>Argo Workflows supports a number of different <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/workflow-concepts.md#template-types" rel="noreferrer"><em>types of templates</em></a>.</p>
<p>Each type of template supports different types of refere... | crenshaw-dev |
<p>I am trying to configure one python flask application running in port 5000 in kubernetes. I have created the deployment, service and ingress. It is not working using the domain name which is added to hosts file, but python application is working when i have tried from port forwarding.</p>
<p>I have tried a lot chan... | Sreejith | <p>You need to run a Ingress Controller. The Prerequisites part of <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#prerequisites" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#prerequisites</a> says:</p>
<blockquote>
<p>You must have an ingress c... | Andy Shinn |
<p>I have a module calling another module, I pass kubernetes provider from main to the 1st module which then passes it to the other module. provider passed to 1st module works ok, but the provider passed down from 1st module to other doesn't work</p>
<p>main.tf</p>
<pre><code>data "google_container_cluster" &... | RandomQuests | <p>You don't need to "pass" your provider to your module. The <code>providers</code> attribute in your module is only needed if you have multiple kubernetes provider which seems that is not your case. Only define the provider in the root module on which you are executing the <code>terraform plan</code>, you d... | Jean-Philippe Bond |
<p>I recently start studying for kubernetes and ansible.</p>
<p>I have the following kubernetes command in order to do rollback</p>
<blockquote>
<p>kubectl patch deployment -n my-namespace mydeployment --type='json' -p='[
{"op": "replace", "path": "/spec/template/spec/containers/0/ima... | getsoubl | <p>The error is indicating that “containers:” is an array.</p>
<p>Try adding “- “ in front of “my-operaror:” to indicate that it's the first item in the array</p>
| csantanapr |
<p>When setting the following annotations:</p>
<pre><code>nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "ALPHA"
nginx.ingress.kubernetes.io/session-cookie-path: /
</code></pre>
<p>Where do they end up in nginx.conf?</p>
<p>I'm comparing nginx.conf before and after by... | PussInBoots | <p>The short answer is that these settings exist in memory of the <a href="https://github.com/openresty/lua-nginx-module" rel="nofollow noreferrer">lua nginx module</a> used by nginx-ingress.</p>
<p>The longer answer and explanation of how this works is in the documentation at <a href="https://kubernetes.github.io/ing... | Andy Shinn |
<p>I'm running a kubernetes cluster and one microservice is constantly crashing with exitCode 134. I already changed the resource memory limit to 6Gi</p>
<pre><code>resources: {
limits: {
memory: "6Gi"
}
}
</code></pre>
<p>but the pod never goes above 1.6/1.7Gi. </p>
<p>What may be missing?</p>
| Miguel Morujão | <p>It's not about Kubernetes memory limit. Default JavaScript Heap limit is 1.76GB when running in node (v8 engine).</p>
<p>The command-line in Deployment/Pod should be changed like <code>node --max-old-space-size=6144 index.js</code>.</p>
| silverfox |
<p>I have <strong>2</strong> Deployments are as follow:</p>
<ol>
<li><strong>Orient DB Deployment.</strong></li>
<li><strong>Web Service Deployment.</strong></li>
</ol>
<p>Initially, To access Orient DB, Web service fetch the Orient DB username and password which are stored in <strong>Azure Key Vault</strong>.</p>
<p>T... | Kaivalya Dambalkar | <p>You can either add an egress rule that enable the port 443 (And IP Range of the Key Vault service if you want to restrict the traffic) or use a something like <a href="https://github.com/Azure/secrets-store-csi-driver-provider-azure" rel="nofollow noreferrer">Azure Key Vault provider for Secret Store CSI driver</a> ... | Jean-Philippe Bond |
<p>I am trying to route outbound traffic from an application in my GKE cluster through a static IP, as the destination server requires whitelisting IP for access. I have been able to do this using the terraformed nat gateway, but this impacts all traffic from the cluster.</p>
<p>Following the istio guide on the site, ... | Blender Fox | <p>I think of your problem as having three steps. First, to fix the outgoing traffic to a particular pod. The istio egress gateway does this for you. Second and third, to fix the pod to a particular IP address.</p>
<p>If you use GCP's version of floating IP addresses, then you can assign a known IP to one of the hos... | fraznen |
<p>I'm currently trying to wrap my head around learning Go, some details of the kubernetes API I haven't used before and the kubernetes api framework for Go at the same time, and would appreciate your help in understanding the grammar of that framework and why people use it anyways.</p>
<p>Honestly I'm not sure why to... | erikbstack | <p>I'm a bit late, but here is my 2 cents.</p>
<h1>Why to use <code>client-go</code> instead of <code>http</code> library</h1>
<p>There are serval pros with <code>client-go</code>.</p>
<ol>
<li><p>Kubernetes resource is defined as <strong>strongly-typed class</strong>, means less misspelled debugging and easy to ref... | silverfox |
<p>I want to migrate Mule applications deployed on Mule standalone (on-Premise) to Anypoint Runtime Fabric (RTF) Self managed Kubernetes on AWS, but I could not find any document on this.</p>
<p>Any ideas or any document available on this please share it.</p>
<p>Thanks in advance</p>
| anonymous | <p>Mule applications run exactly the same on-prem, on <a href="https://docs.mulesoft.com/runtime-manager/cloudhub" rel="nofollow noreferrer">CloudHub</a> or in <a href="https://docs.mulesoft.com/runtime-fabric/1.8/" rel="nofollow noreferrer">Anypoint Runtime Fabric</a>. It is only if your applications make assumptions ... | aled |
<p>I know that with Azure AKS , master components are fully managed by the service. But I'm a little confused here when it comes to pick the node pools. I understand that there are two kind of pools system and user, where the user nodes pool offer hosting my application pods. I read on official documentation that <stro... | am fs | <p>System node pools in AKS does not contain Master nodes. Master nodes in AKS are 100% managed by Azure and are outside your VNet. A system node pool contains worker nodes on which AKS automatically assigns the label <code>kubernetes.azure.com/mode: system</code>, that's about it. AKS then use that label to deploy cri... | Jean-Philippe Bond |
<p>Can anyone share me the yaml file for creating kafka cluster with two kafka broker and zookeeper cluster with 3 servers.I'm new to kubernetes.</p>
| Radha | <p>Take look at <a href="https://github.com/Yolean/kubernetes-kafka" rel="nofollow noreferrer">https://github.com/Yolean/kubernetes-kafka</a>, Make sure the broker memory limit is 2 GB or above.</p>
<p>Maintaining a reliable kafka cluster in kubernetes is still a challenge, good luck.</p>
| silverfox |
<p>I would like to know, if there is an optimal approach for setting memory limits for Kubernetes containers, especially for applications running java.</p>
<p>For Java applications, we have to set a heap value in conjunction with Kubernetes resources. it's like we're kinda forced to guess at a memory limit for the Kub... | Bala krishna | <p>Yes, I have encountered the issue multiple times. You definitely want to keep the memory limit for the k8 to avoid the noisy neighbour problems. The possible solutions you have mentioned are right. Monitoring and load testing are a must to arrive at the number.</p>
<p>Along with these, I used the profiling of Java p... | Avishek Bhattacharya |
<p>I would like to access multiple remote registries to pull images.
In the k8s <a href="https://kubernetes.io/docs/concepts/containers/images/" rel="nofollow noreferrer">documentation</a> they say:</p>
<blockquote>
<p>(If you need access to multiple registries, you can create one secret
for each registry. Kubele... | Geis | <p>You can use following script to add two authentications in one secret</p>
<pre><code>#!/bin/bash
u1="user_1_here"
p1="password_1_here"
auth1=$(echo -n "$u1:$p1" | base64 -w0)
u2="user_2_here"
p2="password_2_here"
auth2=$(echo -n "$u2:$p2" | base64 -w0)
cat <<EOF > docker_config.json
{
"auths": {
"... | Sameer Naik |
<p>I am confused about some elementary network concept in k8s and can someone kindly explain this to me please? thank you!</p>
<p>as described <a href="https://github.com/bmuschko/ckad-crash-course/blob/master/exercises/31-networkpolicy/instructions.md" rel="nofollow noreferrer">here</a>:</p>
<blockquote>
<p>All ingres... | sqr | <p>the setup.yaml should create a NetworkPolicy,
you also need to install Cilium to achieve the setup before apply the solution</p>
<blockquote>
<p>NOTE: Without a network policy controller, network policies won't have
any effect. You need to configure a network overlay solution that
provides this controller. You'll ha... | emaniacs |
<p>I am struggling to get my nginx ingress (on AWS EKS) working with path rules and TLS.</p>
<p>The ingress is from
<a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/aws/deploy.yaml" rel="nofollow noreferrer">here</a></p>
<p>A snippet from the Ingress looks li... | e.dan | <p>After staring at this for several more hours, and digging through the nasty chunk of lua that is the
<code>nginx.conf</code> for this, I found it! Maybe someday someone will have this problem, and might find this useful.</p>
<p>The problem was:</p>
<pre><code> rules:
- host: example.com
- http:
</code></pre>
<... | e.dan |
<p>I am facing performance issues with hazelcast configured as client-server.
I have one K8S Cluster consisting of 5 Nodes and 1 Master Node. Each node is of 64 GB of RAM and 16 Core (Hazelcast Version 3.12.4)
Hazelcast server is deployed on K8S with one POD on one of the nodes available in cluster
My Client is deploye... | Pavan Mulani | <p>The goal of a cache is to get the value from a key as fast as possible. In general, you already have the key, and request the value. That means you send a request to any node, this looks in the partition table which partition the key belongs to, and forwards the query to the relevant node.</p>
<p>In your second use... | Nicolas |
<p>How can we auto-update (<em>delete, create, change</em>) entries in <code>/etc/hosts</code> file of running Pod without actually entering the pod?</p>
<p>We working on containerisation of <em>SAP</em> application server and so far succeeded in achieving this using <em>Kubernetes</em>.</p>
<pre><code>apiVersion: v1... | Jayesh | <p>Kubernetes does have several different ways of affecting name resolution, your request is most similar to <a href="https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/" rel="nofollow noreferrer">here</a> and related pages.</p>
<p>Here is an extract, emphasis mine.</... | Paul Annetts |
<p>So when I run helm init, sometimes it works and a tiller pod gets created and sometimes the connection times out. I reasoned to extend the tiller-connection-time out with:</p>
<p><code>helm init --tiller-connection-timeout 500 --service-account tiller --tiller-image my-image --tiller-namespace my-namespace</code></... | Aliisa Roe | <p><code>--tiller-connection-timeout</code> is available from helm 2.9.0, take a look at your helm version, it maybe need some upgrade.</p>
| silverfox |
<p>I have an Azure Kubernetes Service cluster, running version <code>1.15.7</code>. This cluster recently replaced an older cluster version (<code>1.12.something</code>). In the past, once the various service pods were up and running, we would create a public IP resource in Azure portal and assign it a name, then creat... | superstator | <p>This is indeed a bug in AKS <code>1.15.7</code></p>
<p><a href="https://github.com/kubernetes/kubernetes/issues/87127" rel="nofollow noreferrer">Azure - PIP dns label will be default deleted</a></p>
<p>The upshot is, this is part of a new feature in 1.15 that allows the DNS label for a LoadBalancer IP to be set in... | superstator |
<p>I'm getting <code>Unable to connect to the server: dial tcp <IP> i/o timeout</code> when trying to run <code>kubectl get pods</code> when connected to my cluster in google shell. This started out of the blue without me doing any changes to my cluster setup. </p>
<pre><code>gcloud beta container clusters crea... | Coss | <p>From what I can see of what you've posted you've turned on master authorized networks for the network <code><IP></code>.</p>
<p>If the IP address of the Google Cloud Shell ever changes that is the exact error that you would expect.</p>
<p>As per <a href="https://cloud.google.com/kubernetes-engine/docs/how-to... | Paul Annetts |
<p>I am struggling to understand the Spark documentation in order to set up the local-dir correctly.</p>
<h2>Setup:</h2>
<p>I am running Spark 3.1.2 on Kubernetes via the Sparkoperator approach. The Number of executor Pods varying on job size and available resources on the cluster. A typical case is that i start the jo... | Alex Ortner | <p>spark should be able to create PVC dynamically by setting up claimName= OnDemand.
Attaching multiple pods for the same pvc will be issue on Kubernetes end</p>
<p>attaching screenshot for documentation
<a href="https://i.stack.imgur.com/jmIPT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jmIPT.p... | Vish |
<p>I have an <em>alpine</em> Docker image running in Kubernetes, in which I try to push to Git using a Deploy Key (with passphrase).</p>
<p>Now my command looks like:</p>
<pre class="lang-docker prettyprint-override"><code>CMD ["/bin/sh", "-c", "GIT_SSH_COMMAND=\"sshpass -p mygreatpassphra... | abergmeier | <p>For Keys with a Passphrase, the SSH prompt is different.
So I had to change the prompt using <code>-P assphrase</code>:</p>
<pre class="lang-docker prettyprint-override"><code>CMD ["/bin/sh", "-c", "GIT_SSH_COMMAND=\"sshpass -p mygreatpassphrase -P assphrase ssh -vvv\" git -C /work... | abergmeier |
<p>I was following <a href="https://cloud.google.com/python/django/kubernetes-engine" rel="nofollow noreferrer">this</a> tutorial for deploying Django App to Kubernetes Cluster. I've created cloudsql credentials and exported them as in the tutorial</p>
<pre><code>export DATABASE_USER=<your-database-user>
export ... | Josef Korbel | <p>You should <code>base64</code> encode your password before passing it into the pod so that special characters are encoded in a way that they can be preserved.</p>
<p>In bash you can do this with: </p>
<pre><code>export DATABASE_PASSWORD=`echo [ACTUAL_PASSWORD_HERE] | base64`
</code></pre>
<p>You'll then need to e... | Paul Annetts |
<p>I am writing this question to share the solution we found in our company.
We migrated Solr over a docker only solution to a kubernetes solution.</p>
<p>On kubernetes the environment ended up with slowness.
At least for me the solution was atypical.</p>
<p><strong>Environment:</strong></p>
<ul>
<li>solr(8.2.0) with j... | Tarmac | <p>After one week of frustrated adjustments this is the simple solution we found:</p>
<p>Solr JVM had 25 GB. We decreased the value to 10GB.</p>
<p>This is the command to start solr with the new values:</p>
<p>/opt/solr/bin/solr start -f -force -a '-Xms10g -Xmx10g' -p 8983</p>
<p>If someone can explain what happened th... | Tarmac |
<p>I know that you can assign multiple roles to one service account when you want your service account to access multiple namespaces, but what I wonder is how it will behave when you assign to it more than one clusterrole which is cluster scoped. From my perspective, I think that it will choose one of them but I'm not ... | touati ahmed | <blockquote>
<p>Permissions are purely additive (there are no "deny" rules).</p>
</blockquote>
<p><a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="noreferrer">reference</a></p>
<p>This is the golden 🥇 rule here that we must memorize for kubernetes RBAC roles.</p>
<p>"purely a... | Abdennour TOUMI |
<p>I have installed Ingress and linked my service to it (usign metallb).</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /api/tasks/*
# pat... | Denn | <p>Since this is a result in Google for wildcards and prefixes, I'll answer this old question.</p>
<p>The functionality you're looking for comes from <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types" rel="nofollow noreferrer">specifying the path type</a> as <code>pathType: Prefix</co... | Indigenuity |
<p>I run a tiny (read: single-node) Docker Swarm cluster that I want to migrate to Kubernetes, and I can't figure out how to expose a Service on a specific port so that I can access it from the outside world.</p>
<p>In Docker Swarm, I could expose e.g. a MySQL server by specifying</p>
<pre><code>ports:
- '3306:3306... | James | <p><code>NodePort</code> is probably the simplest approach, but you will need to pick a port in the range 30000 - 32767. That way you'd access say <code>some-public-ip:30306</code> which would map to your service's port 3306 internally.</p>
| Paul Annetts |
<p>In the context of Azure Kubernetes Service (AKS), I would like to deploy some pods to a region not currently supported by Azure (in my case, Mexico). Is it possible to provision a non-Azure VM here in Mexico and attach it as a worker node to my AKS cluster?</p>
<p>Just to be clear, I want Azure to host the Kubernete... | brando | <p>You can't have a node pool with VMs that are not managed by Azure with AKS. You'll need to run your own k8s cluster if you want to do something like this. The closest you can get to something managed in Azure like AKS is to build your own <a href="https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/overview... | Jean-Philippe Bond |
<p>Setup is Kubernetes v1.13 & Istio 1.0.5</p>
<p>I'm running into an issue where the Istio service discovery is creating Envoy configurations that match TCP listeners instead of HTTP listeners. </p>
<p>The communication is working in the service mesh, but I need Envoy to serve as a Layer 7 proxy and not a Layer ... | Jonathan H | <p>I've come across this, in my case the port name for my service was not in the form <code>http-xyz</code>.</p>
<p>Istio/Envoy assumes that traffic is TCP, unless it gets a hint from the port name that it is some other protocol.</p>
<p>As per <a href="https://istio.io/help/faq/traffic-management/#naming-port-conventio... | Paul Annetts |
<p>I have 3 nodes k8 cluster in on-premise setup in my company which run a TCP listener exposed on port <code>58047</code>.</p>
<p>We have a network load balancer which can RR on this nodes.</p>
<p>I can expose the port to the host in each nodes so NLB will take care, or should i create a service which exposes a sing... | itsmewajid | <p>Looks like you’re directly trying to expose a Deployment via a host port. That is not recommended: you should create a Service that instructs Kubernetes how to expose your Deployment to other workloads in the cluster and outside.</p>
<p>A NodePort service would allow you to properly expose your Deployment on each N... | Paul Annetts |
<p>How can I execute "helm install" command and re-install resources that I have defined in "templates"? I have some custom resources that already exist so I want to re-install them. It is possible to do that through a parameter in helm command?</p>
| Riccardo Califano | <p>I think your main question is:</p>
<blockquote>
<p>I have some custom resources that already exist so I want to re-install them.</p>
</blockquote>
<p>Which means <strong>DELETE</strong> then <strong>CREATE</strong> again.</p>
<h2>Short answer</h2>
<p>No.. but it can be done thru workaround</p>
<h2>Detailed answer</h... | Abdennour TOUMI |
<p>I have this BUILD file:</p>
<pre><code>package(default_visibility = ["//visibility:public"])
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "lib",
srcs = glob(
include = ["**/*.ts"],
exclude = ["**/*.spec.ts"]
),
deps = [
"//packages/enums/src:lib... | Florian Ludewig | <p>Have you pushed images using this syntax before? </p>
<p>I'm used to using the full repository tag for both the server.yaml and the k8s_object images. </p>
<p>So, instead of just "<code>deploy_server:do_not_delete</code>", try "<code>gcr.io/learning-bazel-monorepo/deploy_server:do_not_delete</code>".</p>
| Paul |
<p>We have an GKE ingress that is using the below frontend-service. The ingress terminates tls as well. We want to have http to https permanent redirects for any traffic that comes on http. </p>
<p>With the below configuration we have all working, and serving traffic on both http and https (without redirect).</p>
<p>... | pjotr_dolphin | <p>The GCP Health Check is very picky about the HTTP response codes it gets back. It must be a 200, and not a redirect. If in the configuration you have posted, the NLB gets a 301/302 response from your server. it will then mark your backend as unhealthy as this is not a 200 response. If the health check is sending HTT... | Paul Annetts |
<p>Consider this current namespace config in JSON format:</p>
<pre><code>$ kubectl get configmap config -n metallb-system -o json
{
"apiVersion": "v1",
"data": {
"config": "address-pools:\n- name: default\n protocol: layer2\n addresses:\n - 192.168.0.105-1... | Siddharth Srinivasan | <p>You need <a href="https://github.com/mikefarah/yq" rel="nofollow noreferrer"><code>yq</code></a> alongside <code>kubectl</code> ...</p>
<p>After inspecting your configmap, I understood the structure when I convert it to YAML :</p>
<pre><code>---
apiVersion: v1
data:
config: |
address-pools:
- name: default... | Abdennour TOUMI |
<p>I am trying to insert multiline json string into helm template for base64 encoding required for Kubernetes secret.</p>
<p>Goals:</p>
<ul>
<li>helm value is injected into json string</li>
<li>multi-line json string must be base64 encoded using <code>b64enc</code></li>
</ul>
<p><code>myfile1.json</code> does not wo... | Steve | <p>You actually don't need to base64-encode the secret in the helm chart. If you use the <code>stringData</code> field instead of <code>data</code> field, Kubernetes knows that it needs to base64 encode the data upon the secret's deployment.</p>
<p>From the docs (<a href="https://kubernetes.io/docs/concepts/configurat... | Technetium |
<p>Gist: I am struggling to get a pod to connect to a service outside the cluster.
Basically the pod manages to resolve the ClusterIp of the selectorless service, but traffic does not go through. Traffic does go through if i hit the ClusterIp of the selectorless service from the cluster host.</p>
<p>I'm fairly new with... | takilara | <p>As I haven't gotten much response, i'll answer the question with my "workaround". I am still not sure this is the best way to do it though.</p>
<p>I got it to work by exposing the selectorless service on metallb, then using that exposed ip inside grafana</p>
<pre><code>kind: Service
apiVersion: v1
metadata... | takilara |
<p>Background:
There is a need in our project to store the balance info in a KV store. The KV store need strongly data consistence across DCs(different Kubernetes clusters), because we target to deploy the KV store across 3 DCs(different Kubernetes clusters) for high availability.</p>
<p>Our design:
Deploy HazelCast 3 ... | Fathand Qi | <ol>
<li>You probably don't want to form a Hazelcast cluster across different Kubernetes cluster, as network-wise, it wouldn't be very performant. You need to check <a href="https://docs.hazelcast.com/imdg/4.2/wan/wan.html" rel="nofollow noreferrer">WAN Replication</a></li>
<li>Hazelcast stores data in-memory and not o... | Nicolas |
<p>I am using busybox to detect my network problem in kubernetes v1.18 pods. I created the busybox like this:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: busybox
namespace: default
spec:
containers:
- name: busybox
image: busybox:1.28
command:
- sleep
- "3600&quo... | Dolphin | <p>The short answer, is you cannot.</p>
<h3>Why?</h3>
<p>Because busybox does not have package manager like: yum, apk, or apt-get ..</p>
<h3>Acutally you have two solutions:</h3>
<p><strong>1. Either use a modified busybox</strong></p>
<p>You can use other busybox images like <a href="https://github.com/progrium/busybo... | Abdennour TOUMI |
<p>I have a question about authentication and security in Hazelcast Client. Which methods can I use to authenticate Hazelcast Clients? I'm using an open-source 5.0 version on k8s.</p>
<p>Thanks
Dũng</p>
| DungLe | <p><a href="https://docs.hazelcast.com/hazelcast/5.0/security/default-authentication" rel="nofollow noreferrer">Authentication</a> is part of the Enterprise package. With that, you'll have dedicated support.</p>
| Nicolas |
<p>I am trying to deploy a simple zookeeper ensemble following the tutorial from the <a href="https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/" rel="nofollow noreferrer">official Kubernetes website</a>. The tutorial states that I need</p>
<blockquote>
<p>a cluster with at least four nodes and each n... | Adelin | <p>By default, a kubernetes nodes will <strong>not come empty.</strong> Instead, it has running processes before even running your apps workload:</p>
<ul>
<li>kubelet is running ( in each node)</li>
<li>kube-proxy is running as daemonset ( in each node)</li>
<li>container-runtime (Docker) is running in each node</li>
<... | Abdennour TOUMI |
<p>I am using argo events/sensors to create a Kubernetes Job , the sensor gets triggered correctly but it is giving me error "the server could not find the requested resource"</p>
<p>Here is my sensor.yaml</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: exp-webhook
spec:
templ... | TruckDriver | <p>So the error was , instead of</p>
<pre><code>resource: Job
</code></pre>
<p>it should be</p>
<pre><code>resource: jobs
</code></pre>
<p>That fixed this issue.</p>
| TruckDriver |
<p>Deployment.yaml</p>
<pre><code>...
env: {{ .Values.env}}
...
</code></pre>
<p>Values.yaml:</p>
<pre><code>env:
- name: "DELFI_DB_USER"
value: "yyy"
- name: "DELFI_DB_PASSWORD"
value: "xxx"
- name: "DELFI_DB_CLASS"
value: "com.mysql.jdbc.Driver"
- name: "DELFI_DB_URL"
value: "jdbc:sqlserver://dockersqlserv... | 4c74356b41 | <p>The current Go template expansion will give output which is not YAML: </p>
<pre><code>env: {{ .Values.env}}
</code></pre>
<p>becomes:</p>
<pre><code>env: env: [Some Go type stuff that isn't YAML]...
</code></pre>
<p>The Helm Go template needs to loop over the keys of the source YAML dictionary.
This is described... | Paul Annetts |
<p>I would like to run a one-off container from the command line in my Kubernetes cluster. The equivalent of:</p>
<pre><code>docker run --rm -it centos /bin/bash
</code></pre>
<p>Is there a <code>kubectl</code> equivalent?</p>
| Dmitry Minkovsky | <p>The <code>kubectl</code> equivalent of</p>
<pre><code>docker run --rm -it centos /bin/bash
</code></pre>
<p>is</p>
<pre><code>kubectl run tmp-shell --restart=Never --rm -i --tty --image centos -- /bin/bash
</code></pre>
<p>Notes:</p>
<ul>
<li><p>This will create a Pod named <code>tmp-shell</code>. If you don't speci... | Dmitry Minkovsky |
<p>I have access to a cluster with a lot of nodes. I am running my Nextflow workflow using this command:</p>
<pre><code>./nextflow kuberun user/repo -c nextflow.config -profile kubernetes -v my_pvc:/mounted_path -with-report _report.html -with-trace _trace
</code></pre>
<p>I would like to run my nextflow workflow on a ... | Nine | <p>Use one or more <a href="https://www.nextflow.io/docs/latest/config.html#process-selectors" rel="nofollow noreferrer">process selectors</a> and the <a href="https://www.nextflow.io/docs/latest/process.html#pod" rel="nofollow noreferrer">pod directive</a> to select the nodes using a pod label. For example, the follow... | Steve |
<p>We have a Kubernetes deployment consisting of a nodejs front end and an nginx backend. We're finding that the two deployments work fine in Kubernetes individually, but when they are both deployed requests to the front end return a 404 almost exactly 50% of the time.</p>
<p>It's natural to assume there is an issue wi... | Adam Wise | <p>Each service needs to point to a different app. You can verify in Rancher that each service points to a different app. Check your yaml. If using Kustomize, the commonLabels:app can trip you up. Make sure it points to different apps for frontend and backend.</p>
| Adam Wise |
<p>We have some weird memory leaking issues with our containers where the longer they live, the more resources they take. We do not have the resources at the moment to look into these issues (as they don't become problems for over a month) but would like to avoid manual work to "clean up" the bloated containers.</p>
... | Marshall Tigerus | <p>The easiest way is to put a hard resource limit on memory that is above what you would see in a temporary spike: at a level that you'd expect to see over say a couple of weeks.</p>
<p>It's probably a good idea to do this anyhow, as k8s will schedule workloads based on requested resources, not their limit, so you co... | Paul Annetts |
<p>I have setup jenkins to run on GKE kubernetes cluster. I wrote the Jenkinsfile to define CI/CD pipeline. But when it reaches the docker build command, it gives me the following error:
"Segmentation fault (core dumped)
Build step 'Execute shell' marked build as failure
Finished: FAILURE"</p>
<p>After that I setup a ... | devops_enthusiast | <p>The reason you are having an issue is because you are trying to run docker inside a container. The Jenkins pod(s) are themselves running in a container (docker or otherwise) inside the kubernetes cluster. It can be very tricky to run docker inside a container. There is a lot of help out there on how to do it - searc... | dlaidlaw |
<p>I'm Running a Kubernetes cluster on <code>AWS</code> using <code>Kops</code> for the first time and I need some help in exposing the services to the public with an AWS managed domain name and an SSL certificate. </p>
<p>The cluster is running in a private VPC and I can access it through a bastion instance.</p>
<p>... | Adel Bachene | <p>To solve this, you can point your <code>LoadBalancer</code> to a "reverse-proxy" service such as an NGINX instance or Istio's Gateway (<a href="https://istio.io/docs/reference/config/istio.networking.v1alpha3/#Gateway" rel="nofollow noreferrer">https://istio.io/docs/reference/config/istio.networking.v1alpha3/#Gatewa... | Paul Annetts |
<p>To my understanding <a href="https://kubernetes.io" rel="nofollow noreferrer">Kubernetes</a> is a container orchestration service comparable to <a href="https://aws.amazon.com/ecs/" rel="nofollow noreferrer">AWS ECS</a> or <a href="https://docs.docker.com/engine/swarm/" rel="nofollow noreferrer">Docker Swarm</a>. Ye... | B M | <p>As for <strong>VM</strong>, my answer is <strong>YES</strong>; you can run VM as workload in k8s cluster.</p>
<p>Indeed, Redhat team figured out how to run VM in the kubernetes cluster by adding the patch <a href="https://kubevirt.io/docs/workloads/controllers/virtualmachine.html" rel="nofollow noreferrer">KubeVirt... | Abdennour TOUMI |
<p>I am working on an <a href="https://github.com/lucastheisen/dev-bootstrap" rel="nofollow noreferrer">ansible based dev-bootstrap project</a>. I'd like to be able to <a href="https://docs.docker.com/docker-for-windows/#kubernetes" rel="nofollow noreferrer">enable the kubernetes</a> from the <a href="https://github.c... | Lucas | <p>Not sure if this is all you need, but when toggling the enable Kubernetes option it writes to the settings.json. There is also a Kubernetes Initial install step, so this might not be enough, but I would try see if it picks it up, needs a restart or doesn't work at all...</p>
<pre><code>function Enable-DockerKuberne... | CJ Harmath |
<p>When I use helm, It creates a <code>.helm</code> folder in my home directory. Is it important? Should it be committed to source control? Poking around I only see cache related information, that makes me think the whole folder can be deleted. And helm will re-create it if needed. Am I wrong in this thinking? Or i... | 7wp | <p>In simple terms, no.</p>
<p>The <code>.helm</code> directory contains user specific data that will depend on the version of helm, the OS being used, the layout of the user’s system.</p>
<p>However, the main reason to not add it is that it also can contain TLS secrets which would then be disclosed to other users. W... | Paul Annetts |
<p>I am learning Kubernetes and planning to do continuous deployment of my apps with Kubernetes manifests. </p>
<p>I'd like to have my app defined as a <code>Deployment</code> and a <code>Service</code> in a manifest, and have my CD system run <code>kubectl apply -f</code> on the manifest file. </p>
<p>However, our c... | David Ham | <p>You should consider <a href="/questions/tagged/helm" class="post-tag" title="show questions tagged 'helm'" rel="tag">helm</a> charts in this case, where you separate between the skeleton of templates (or what you called maniest) and its values which are changed from release to another.</p>
<p>In <strong>tem... | Abdennour TOUMI |
<p><code>gcloud container clusters create --cluster-version 1.10 --zone us-east1-d ...</code> returns with the error message <code>ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=No valid versions with the prefix "1.10" found.</code>.</p>
<p>The GKE release notes <a href="https://cloud.googl... | Sameer Naik | <p>The syntax you are using looks correct, but support for k8s 1.10 is being phased out on GKE, as per the GKE release notes entry of February 11, 2019:</p>
<blockquote>
<h2>Coming soon</h2>
<p>We expect the following changes in the coming weeks. This information is not a guarantee, but is provided to help you ... | Paul Annetts |
<p>So Jenkins is installed inside the cluster with this <a href="https://github.com/helm/charts/tree/master/stable/jenkins" rel="nofollow noreferrer">official helm chart</a>. And this is my installed plugins as per helm release values: </p>
<pre><code> installPlugins:
- kubernetes:1.18.1
- workflow-job:2.33
- w... | Abdennour TOUMI | <p>Just add <code>--network=host</code> to <code>docker build</code> or <code>docker run</code>.</p>
<pre><code> docker build --network=host foo/bar:latest .
</code></pre>
<p>Found the answer <a href="https://github.com/awslabs/amazon-eks-ami/issues/183#issuecomment-463687956" rel="nofollow noreferrer">here</a></p>
| Abdennour TOUMI |
<p>I don't mean being able to route to a specific port, I mean to actually change the port the ingress listens on.</p>
<p>Is this possible? How? Where is this documented?</p>
| Chris Stryczynski | <p>No. From the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#what-is-ingress" rel="noreferrer">kubernetes documentation</a>:</p>
<blockquote>
<p>An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of t... | dlaidlaw |
<p>I have an mysql container I'm deploying through k8s in which I am mounting a directory which contains a script, once the pod is up and running the plan is to execute that script.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
spec:
replicas: 1
template:
spec:
volumes:
- name: mys... | SkinnyBetas | <p>Since you are running your pod in a minikube cluster. Minikube itself is running in a VM , so the path mapping here implies the path of minikube VMs not your actual host.</p>
<p>However you can map your actual host path to the minikube path and then it will become accessible.</p>
<pre><code>minikube mount /home/myap... | TruckDriver |
<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: "Never"
containers:
- name: EP
image: myImage
</code></pre>
<p>The Job star... | Mary1 | <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... | DogEatDog |
<p>I have a kustomize layout something like this:</p>
<pre><code>├──release
│ ├──VariantA
│ │ └──kustomization.yaml
│ │ cluster_a.yaml
| └──VariantB
│ └──kustomization.yaml
│ cluster_b.yaml
└──test
├──TestVariantA
│ └──kustomization.yaml; resources=[VariantA]
│ common_cluster_patch.yam... | Matthew Booth | <p>Thanks to criztovyl for this answer! The solution is <a href="https://kubectl.docs.kubernetes.io/guides/config_management/components/" rel="nofollow noreferrer">kustomize components</a>. Components are currently only defined in <code>kustomize.config.k8s.io/v1alpha1</code> and the <a href="https://kubectl.docs.kuber... | Matthew Booth |
<p>My pods/containers run on a docker image which is about 4GiB in size. Pulling the image from the container registry takes about 2 mins whenever a new VM node is spun up when resources are insufficient. </p>
<p>That is to say, whenever a new request comes in and the Kubernetes service auto scale up a new node, it ta... | Seng Wee | <p>If you are using Azure Container Registry (ACR) for storing and pulling your images you can enable teleportation that will significantly reduce your image pull time. Refer <a href="https://stevelasker.blog/2019/10/29/azure-container-registry-teleportation/" rel="nofollow noreferrer">link</a> for more information</p>... | vivekd |
<p>When I issue a command</p>
<pre><code>kubectl delete namespace <mynamespace>
</code></pre>
<p>What is the sequence followed by kubernetes to clean up the resources inside a namespace? Does it start with services followed by containers? Is it possible to control the order?</p>
<p>Stack:
I am using <code>HELM... | Vishrant | <p>No it is not possible and it will start in parallel.</p>
<p><code>kube-controller-manager</code> has few flags to control the speed/sync of different resources.</p>
<p>You can check <code>--concurrent-*</code> flags for controller manager on link: <a href="https://kubernetes.io/docs/reference/command-line-tools-re... | Akash Sharma |
<p><strong>Use case</strong></p>
<p>Let's say I've got 3 different node pools: <code>default</code>, <code>kafka</code> and <code>team-a</code>. I want to make sure that only kafka relevant deployments and stuff like daemonsets or kubernetes system services run on this node pool. I do so by simply adding a node select... | kentor | <p>Use <code>taint</code> for statefulset or <code>pod</code>. Follow: <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/" rel="noreferrer">https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/</a></p>
| Akash Sharma |
<p>I've been studying "Kubernetes Up and Running" by Hightower et al (first edition) Chapter 13 where they discussed creating a Reliable MySQL Singleton (Since I just discovered that there is a second edition, I guess I'll be buying it soon).</p>
<p>Using their MySQL reliable singleton example as a model, I'v... | Siegfried | <h1>Short answer</h1>
<p><a href="https://github.com/helm/charts/blob/master/stable/mssql-linux/templates/pvc-master.yaml" rel="nofollow noreferrer">https://github.com/helm/charts/blob/master/stable/mssql-linux/templates/pvc-master.yaml</a></p>
<h1>Detailed Answer</h1>
<p>Docker For Desktop comes already with a default... | Abdennour TOUMI |
<p>Have a kubernetes cluster with an nginx ingress to a service which I am trying to set up with https access using <code>cert-manager</code> and ACME <code>ClusterIssuer</code>.</p>
<p>The steps I have followed from cert-manager I am reasonably happy with but I am currently at the stage where a challenge is made to ht... | Going Bananas | <p>After reading up about various different aspects of how <code>cert-manager</code> works, reading up about other peoples' similar issues on other posts and getting a better understanding on how my network is set up and is seen from the outside, I present below what I've learnt about my setup and thereafter what I did... | Going Bananas |
<p>I'm running gitsync container in kubernetes and trying to sync the repository from github. I have already created secret using known_hosts and ssh. However I face following error.</p>
<blockquote>
<p>"msg"="failed to sync repo, aborting" "error"="error running command: exit status ... | Sabir Piludiya | <p>Seems that you followed the <a href="https://github.com/kubernetes/git-sync/blob/master/docs/ssh.md" rel="nofollow noreferrer">official documentation</a>.</p>
<p>But it turns out that this documentation does not mention at all where to put the <strong>public key</strong>.</p>
<p>Actually, a git authentication thru S... | Abdennour TOUMI |
<p>Im trying to create a pod using my local docker image as follow.</p>
<p>1.First I run this command in terminal </p>
<pre><code>eval $(minikube docker-env)
</code></pre>
<p>2.I created a docker image as follow</p>
<pre><code>sudo docker image build -t my-first-image:3.0.0 .
</code></pre>
<p>3.I created the pod.y... | Niranga Sandaruwan | <p>Try checking logs with command <code>kubectl logs -f my-first-pod</code></p>
| Akash Sharma |
<p>Kubernetes sends a SIGTERM signal to containers in a pod before terminating the pod</p>
<p>Does it send a similar signal when it restarts a pod?</p>
| Abdulrahman Bres | <p>Depends on what you mean here by pod restart. If a pod stops running because an underlying node is lost and then a higher level controller restarts it, then you may/may not see any signal being delivered because it is unexpected termination.</p>
<p>On the other hand, if you're talking about planned termination, whe... | Anirudh Ramanathan |
<p>I have been asked to create a system which has different functionalities. Assume service 1, service 2 and service 3. I need to run these services per hour to do something.
To make the system of those services I need: database, web interface for seeing the result of the process, caching and etc.
This is what I have ... | Milix | <p>For python/java applications, create docker images for both applications. If these application run forever to serve traffic then deploy them as <code>deployments</code>.If you need to have only cron like functionality, deploy as <code>Job</code> in kubernetes.</p>
<p>To make services accessible, create services as... | Akash Sharma |
<p>When it comes to running Express (NodeJS) in something like Kubernetes, would it be more cost effective to run with more cores and less nodes? Or more nodes with less cores each? (Assuming the cost of cpus/node is linear ex: 1 node with 4 cores = 2 nodes 2cores)</p>
<p>In terms of redundancy, more nodes seems the ob... | danthegoodman | <p>because the node does not come empty, but it has to run some core apps like :</p>
<ul>
<li>kubelet</li>
<li>kube-proxy</li>
<li>container-runtime (docker, gVisor, or other)</li>
<li>other daemonset.</li>
</ul>
<p>Sometimes, 3 <strong>large</strong> VMs are better than 4 <strong>medium</strong> VMs in term of the bes... | Abdennour TOUMI |
<p>I understand the difference between ReplicaSet and ReplicationController, of former being Set based and the latter Equality based. What I want to know is why was a newer implementation (Read ReplicaSet) introduced when the older ReplicationController achieves the same functionality.</p>
| Vinodh Nagarajaiah | <p><code>ReplicaSet</code> is usually not standalone, these are owned by <code>Deployment</code>. A single <code>Deployment</code> can have many <code>ReplicaSet</code>s in its life cycle as new <code>Version</code> deployment added one more <code>ReplicaSet</code>. </p>
<p><code>Deployment</code> allows us to rollbac... | Akash Sharma |
<p>I use <a href="https://k3s.io/" rel="nofollow noreferrer">K3S</a> for my Kubernetes cluster. It's really fast and efficient. By default K3S use <a href="https://traefik.io/" rel="nofollow noreferrer">Traefik</a> for ingress controller which also work well til now.</p>
<p>The only issue I have is, I want to have HTT... | user1079877 | <p>You probably do not want HTTP/2 Server Push given it's <a href="https://brianli.com/2020/12/chrome-to-drop-support-for-http2-server-push/" rel="nofollow noreferrer">being removed from Chromium</a>. If you would like to switch ingress controllers you can choose another by:</p>
<ul>
<li>Starting K3s with the <code>--d... | vhs |
<p>I have a deployment that runs two containers. One of the containers attempts to build (during deployment) a javascript bundle that the other container, nginx, tries to serve.</p>
<p>I want to use a shared volume to place the javascript bundle after it's built.</p>
<p>So far, I have the following deployment file (wit... | wheresmycookie | <p>The best way is to customize your image's entrypoint as following:</p>
<ul>
<li><p>Once you finish building the <code>/var/app/dist</code> folder, copy(or move) this folder to another empty path (.e.g: <code>/opt/dist</code>)</p>
<pre><code>cp -r /var/app/dist/* /opt/dist
</code></pre>
</li>
</ul>
<p>PAY ATTENTION: ... | Abdennour TOUMI |
<p>We use Kubernetes cronjobs on GKE (version 1.9) for running several periodic tasks. From the pods, we need to make several calls to external API outside our network. Often (but not all the time), these calls fail because of DNS resolution timeouts.</p>
<p>The current hypothesis I have is that the upstream DNS serve... | Ashu Pachauri | <p>Not sure if all knobs are covered, but if you update the ConfigMap used by the deployment you should be able to reconfigure KubeDNS on GKE. It will use the ConfigMap when deploying new instances. Then nuke the existing pods to redeploy them with the new config.</p>
| KarlKFI |
<p>I have a job definition based on example from kubernetes website.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: pi-with-timeout-6
spec:
activeDeadlineSeconds: 30
completions: 1
parallelism: 1
template:
metadata:
name: pi
spec:
containers:
- name: pi
image: ... | esio | <p>By now this is possible by setting <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy" rel="noreferrer"><code>backoffLimit: 0</code></a> which tells the controller to do 0 retries. default is 6</p>
| pHiL |
<p>I tried to find useful information when should i use <code>--record</code>. I created 3 commands:</p>
<ul>
<li><code>k set image deployment web1 nginx=lfccncf/nginx:latest --record</code></li>
<li><code>k rollout undo deployment/web1 --record</code></li>
<li><code>k -n kdpd00202 edit deployment web1 --record</code>... | O.Man | <p>Kubernetes desired state can be updated/mutated thru two paradigms :</p>
<ol>
<li>Either <strong>imperatively</strong> using kubectl adhoc commands ( <code>k set</code>, <code>k create</code>, <code>k run</code>, <code>k rollout</code> ,..)</li>
<li>Or <strong>declaratively</strong> using YAML manifests with a singl... | Abdennour TOUMI |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.