Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>To know the container start time, we generally describe the pod using: <code>kubectl describe pod &lt;pod-name&gt;</code>. I need to access the container's start time via a kubectl api in terms of timestamp or any format. Do this exist in the API?</p>
medgai
<p>Effectively you could grab this via the status and state transitions. With kubectl it would look like this:</p> <blockquote> <p>kubectl get pod $PODNAME -o jsonpath='{.status.conditions[?(@.type==&quot;Ready&quot;)].lastTransitionTime}'</p> </blockquote> <p>would yield <code>2021-05-25T15:57:03Z</code> right now for...
Thomas Jungblut
<p>I have read the docs, but seem not able to understand differences between Mixer and Pilot. Is there any overlap? I mean I would like to draw a definite boundary between them to understand their responsibilities and with respect to their communication with the envoy proxies in the mesh. Please add examples of differe...
soupybionics
<p>The Istio Service Mesh provides the following functionalities:</p> <ol> <li>Routing. For example 90% of the traffic goes to the version 1 of a microservice and the remaining 10% goes to the version 2. Or some specific requests go to the version 1 and all the others to the version 2, according to some condition. And...
Vadim Eisenberg
<p>I'm currently working with some configmaps and I've noticed, that there are some documents in the configmap having redundant values/ referencing the same value e.g.</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: my-configmap labels: app: my-app data: some_file: |- ... foo1=bar ...
Urr4
<p>No, it's not possible.</p> <p>If the problems gets worse, you can always start using <a href="https://kustomize.io/" rel="nofollow noreferrer">kustomize</a> or <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a>, which allow you to create templates for your Kubernetes manifests, and use variables on those...
Jose Armesto
<p>I wonder if that would be possible to temporary stop the worker VM instances so they are not running at night time when I am not working on a cluster development. So far the only way I am aware of to "stop" the instances from running is to delete the cluster itself which I don't want to do. Any suggestions are highl...
alphanumeric
<p>I'm just learning myself but this might help. If you have <a href="https://eksctl.io/" rel="noreferrer">eksctl</a> installed, you can use it from the command line to scale your cluster. I scale mine down to the min size when I'm not using it:</p> <pre><code>eksctl get cluster eksctl get nodegroup --cluster CLUSTERNA...
jrk
<p>We have a issue where connecting to AWS RDS in Istio Service Mesh is results in <code>upstream connect error or disconnect/reset before header</code> . Our Egress rule is as below </p> <pre><code> apiVersion: config.istio.io/v1alpha2 kind: EgressRule metadata: namespace: &lt;our-namespace&gt; name: rd...
Anuranjit Maindola
<p>The protocol in your <code>EgressRule</code> definition should be <code>tcp</code>. The <code>service</code> should contain the IP address or a range of IP addresses in CIDR notation.</p> <p>Alternatively, you can use the <code>--includeIPRanges</code> flag of <code>istioctl kube-inject</code>, to specify which IP r...
Vadim Eisenberg
<p>I had to move my .Net Core app from a Google App Engine to Google Kubernetes Engine because I need static IPs and sadly Google App Engine doesn't have that option.</p> <p>I've managed to make a cluster and some pod, but in the logs I see:</p> <pre class="lang-cs prettyprint-override"><code>Unhandled exception. Grp...
Morasiu
<p>The error message reads:</p> <blockquote> <p>Request had insufficient authentication scopes</p> </blockquote> <p>Therefore it needs scope <code>https://www.googleapis.com/auth/cloud-platform</code> added.</p> <p>The service account needs IAM role <code>roles/cloudkms.cryptoKeyEncrypterDecrypter</code>.</p>
Martin Zeitler
<p>I'm working on a side project to learn Istio in my spare time, part of which is getting my hands dirty with Istio routing. </p> <p>I'm trying to setup a Virtual Service such that any traffic on "/" gets routed to google.com. I can get Virtual Services to work with any in-cluster pods/services, but I can't seem to c...
Kit Freddura
<p>You have <a href="https://istio.io/docs/tasks/traffic-management/egress/#configuring-istio-external-services" rel="nofollow noreferrer">to create a Service Entry</a> for google.com and then create a Virtual Service, referencing google.com in the same way as in-mesh services. Note the issue of the protocols - do you ...
Vadim Eisenberg
<p>I am trying to write a utility which accepts following parameters -</p> <ol> <li>kubernetes service name </li> <li>spring boot actuator endpoint name (e.g. /actuator/loggers)</li> </ol> <p>This utility should invoke the endpoint on all the pods of this service. </p> <p>Currently I am obtaining the name of all the...
nakul shukla
<p>I would run this utility inside the kubernetes cluster, and expose this utility to the developers that need the data. That way you only have to expose this utility, rather than exposing all the pods to allow http calls. I think it's much simpler this way.</p> <p>There are different ways to expose a Kubernetes Pod t...
Jose Armesto
<p>I am trying to implement service mesh using istio and envoy for a service which requires connecting to external mongodB server but for some reasons, my service is unable to reach the external mongodB server from istio proxy</p> <p>Below is the gateway and virtual service configuration for my service</p> <pre><code...
DoIt
<p>Try to specify the port in the <code>ServiceEntry</code> as TLS (the name and the protocol). </p> <p>I am working on a task regarding MongoDB right now, check the "Egress control for TLS" section in this PR <a href="https://github.com/istio/istio.io/pull/2347/" rel="nofollow noreferrer">https://github.com/istio/ist...
Vadim Eisenberg
<p>I am trying to deploy an application via kubectl using an image stored on Codefresh. I have it running perfectly when i place the image on a public registry.</p> <p>The problem is when I apply the deployment.yaml I get a "ImagePullBackOff" error on the pods. I'm assuming, i think correctly, that this is because I n...
JamWill
<p>I think <a href="https://codefresh.io/docs/docs/deploy-to-kubernetes/access-docker-registry-from-kubernetes/#creating-the-docker-registry-secret" rel="nofollow noreferrer">it's explained in the docs</a>.</p> <pre><code>export DOCKER_REGISTRY_SERVER=r.cfcr.io export DOCKER_USER=YOUR_USERNAME export DOCKER_PASSWORD=Y...
Jose Armesto
<p>Hey so I configured gateway for port 80 and 8083 for same domain i-e <code>example.com</code>. Now when I create attributes using below config file everything get up and running.</p> <p><strong>issue is I am using <code>8083</code> in service and virtualService but I get response from service at <code>80</code> whe...
Ahsan Naseem
<p>Two issues with your configuration:</p> <ol> <li>You have to call your port <code>http-tomcat</code> and not <code>tomcat-http</code>, see <a href="https://istio.io/docs/setup/kubernetes/spec-requirements/" rel="nofollow noreferrer">Istio requirements for named ports</a></li> <li>In order to enable ingress on port ...
Vadim Eisenberg
<p>I have RabbitMQ service running in an AKS (Azure Kubernetes Service) cluster as type LoadBalancer. While I am able to use the pod and service IP by providing <code>http://&lt;IP address&gt;:&lt;port number&gt;/</code> to access RabbitMQ management page on VMs peered to the cluster's VNET, I am not able to access the...
Chethan S.
<p>I discovered that the svc.cluster.local URLs resolve to the cluster IP and not external IP of the Load Balancer service. I figured this out after running a <code>nslookup &lt;URL&gt;</code> from one of the pods in the namespace. I am now evaluating the possibility of setting a static IP for the external IP or use th...
Chethan S.
<h2>Context</h2> <p>I'm writing a script that uses the <a href="https://github.com/kubernetes/client-go/" rel="noreferrer">k8s.io/client-go</a> library (<a href="https://godoc.org/k8s.io/client-go/" rel="noreferrer">godocs here</a>) to manipulate Deployments. In particular, I want to add a label selector to every Depl...
David Xia
<p>I ended up using a <a href="https://godoc.org/k8s.io/client-go/informers#NewSharedInformerFactory" rel="noreferrer">SharedInformer</a>.</p> <p>These resources were helpful.</p> <ul> <li><a href="https://jvns.ca/blog/2017/07/27/how-does-the-kubernetes-scheduler-work/" rel="noreferrer">https://jvns.ca/blog/2017/07/2...
David Xia
<p>I've read this <a href="https://istio.io/blog/2018/egress-https/#tls-origination-by-istio" rel="nofollow noreferrer">article</a> about TLS Origination problem in istio. Let me quote it here:</p> <blockquote> <p>There is a caveat to this story. In HTTPS, all the HTTP details (hostname, path, headers etc.) are encr...
Agung Pratama
<p>The cited blog post is from January 31, 2018, and the statement was correct then. Now (1.0) Istio supports traffic routing by SNI, see <a href="https://istio.io/docs/tasks/traffic-management/egress/" rel="nofollow noreferrer">https://istio.io/docs/tasks/traffic-management/egress/</a>.</p> <p>This reminds me to upda...
Vadim Eisenberg
<p>I am trying to get the namespace of the currently used Kubernetes context using <code>kubectl</code>.</p> <p>I know there is a command <code>kubectl config get-contexts</code> but I see that it cannot output in json/yaml. The only script I've come with is this:</p> <pre class="lang-sh prettyprint-override"><code>k...
Mikhail Golubtsov
<p>This works if you have a namespace selected in your context:</p> <pre><code>kubectl config view --minify -o jsonpath='{..namespace}' </code></pre> <p>Also, <a href="https://github.com/jonmosco/kube-ps1" rel="noreferrer">kube-ps1</a> can be used to display your current context and namespace in your shell prompt.</p>
Jose Armesto
<p>I am running a jenkins pipeline with the following command:</p> <pre><code>kubectl exec -it kafkacat-5f8fcfcc57-2txhc -- kafkacat -b cord-kafka -C -t BBSim-OLT-0-Events -o s@1585031458 </code></pre> <p>which is running fine on the terminal of the machine the pipeline is running on, but on the actual pipeline I get...
Shrey Baid
<p><strong>For windows git bash:</strong></p> <pre><code>alias kubectl='winpty kubectl' $ kubectl exec -it &lt;container&gt; </code></pre> <p>Or just use <code>winpty</code> before the desired command.</p>
4F2E4A2E
<p>I install Istio on GKE and run the application.</p> <p>Although there is no problem when accessing with curl, Ingressgateway returns a status code different from the status code of Pod's proxy by some image request when accessing from the browser. Specifically, 200 and 302 etc. are returned as 500 or 504. Resources...
akaimo
<p><code>UT</code> in the <a href="https://www.envoyproxy.io/docs/envoy/latest/configuration/access_log#config-access-log" rel="nofollow noreferrer">proxy's log</a> means that a timeout occurred:</p> <blockquote> <p>UT: Upstream request timeout in addition to 504 response code.</p> </blockquote> <p>Try to increase ...
Vadim Eisenberg
<p>We've setup an AWS s3 storage as Helm repo.</p> <p>But with development going on, more and more package files are uploade to the S3.</p> <p>We want to cleanup/delete older files in S3, of course, I know we can't directly delete them from S3 as there're some mapping info stored in index.yaml.</p> <p>I check the <c...
user10814765
<p>as mentioned in <a href="https://chartmuseum.com/docs/#helm-chart-repository" rel="nofollow noreferrer">https://chartmuseum.com/docs/#helm-chart-repository</a> </p> <p>you can use Helm Museum api to do that</p> <p>e.g.</p> <pre><code># curl -XDELETE http://helm.chartrepo.url/api/charts/chart-name/version </code><...
HQM
<p>As I understand the purpose of the <em>Kubernetes Controller</em> is to make sure that current state is equal to the desired state. Nevertheless, <em>Kubernetes Operator</em> does the same job.</p> <p>The list of controller in the <em>Control-Plane</em>:</p> <ul> <li>Deployment</li> <li>ReplicaSet</li> <li>StatefulS...
Suresh Vishnoi
<p>I believe the term &quot;kubernetes operator&quot; was introduced by <a href="https://coreos.com/operators/" rel="noreferrer">the CoreOS people here</a></p> <blockquote> <p>An Operator is an application-specific controller that extends the Kubernetes API to create, configure and manage instances of complex stateful ...
Jose Armesto
<p>When editing the yaml definition of a resource the changes are not applied in k9s.</p> <p>I see that neovim is saving the changes I made to a file in <code>/tmp</code> but after exiting with <code>:wq</code> the changes are not being applied in k9s.</p> <p>When I do the same thing with e.g. nano as editor, the chang...
Marius Kimmina
<p>This is probably a case of Vim renaming the file during the process of writing the buffer to disk.</p> <p>If so, you need to adjust <code>:help 'backupcopy'</code>:</p> <pre><code>&quot; in your vimrc set backupcopy=yes </code></pre>
romainl
<p>Running</p> <pre><code>docker run -it -v $PWD:/tmp k8s.gcr.io/kube-proxy:v1.15.1 cp /usr/local/bin/kube-proxy /tmp file kube-proxy </code></pre> <p>gives a different result depending on which architecture I am on e.g. on CoreOS</p> <pre><code>Container Linux by CoreOS stable (2135.5.0) core@node1 ~ $ file kube-pr...
dippynark
<p>Container runtimes are architecture aware &amp; container registries support defining images for multiple architectures. Docker automatically pulls the correct image for the platform it's running on.</p> <p><a href="https://blog.docker.com/2017/09/docker-official-images-now-multi-platform/" rel="nofollow noreferrer...
johnharris85
<p>How to delete all the contents from a kubernetes node?<br/> Contents include deployments, replica sets etc. I tried to delete deplyoments seperately. But kubernetes recreates all the pods again.<br/> Is there there any ways to delete all the replica sets present in a node? </p>
Mufeed
<p>If you are testing things, the easiest way would be</p> <pre><code>kubectl delete deployment --all </code></pre> <p>Althougth if you are using minikube, the easiest would probably be delete the machine and start again with a fresh node</p> <pre><code>minikube delete minikube start </code></pre> <p>If we are talk...
Jose Armesto
<p>According to the <a href="https://istio.io/docs/concepts/traffic-management/#virtual-services" rel="nofollow noreferrer">Istio documentation</a>, VirtualServices should be able to route requests to "a completely different service than was requested". I would like to use this feature give services different aliases i...
Erik Kuefler
<p>You have to rewrite <code>authority</code> (the HOST header) of your request, since the HTTP routing in Istio is performed by the HOST header.</p> <p>Add an <a href="https://preliminary.istio.io/docs/reference/config/istio.networking.v1alpha3/#HTTPRewrite" rel="nofollow noreferrer">HTTPRewrite</a> clause to the <co...
Vadim Eisenberg
<p><a href="https://kubernetes.io/docs/tasks/debug-application-cluster/audit/" rel="nofollow noreferrer">Reference</a></p> <p>I want to add audit-policy-file param and file is present in /etc/kubernetes/audit-policy.yaml</p> <p>It has basic metadata logging rule.</p> <p>But once i restart service apiserver is not co...
jani basha
<p>You're running the <code>kube-apiserver</code> as a pod, so it's looking for that audit file on the filesystem <em>inside</em> the container, whereas you're putting it on the filesystem of the host. You need to mount that path through to your <code>kube-apiserver</code> pod. Assuming you're using <code>kubeadm</code...
johnharris85
<p>Hello I want to use helm on google cloud console. Tiller is already installed.</p> <p>I did the following steps:</p> <pre><code> wget https://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz </code></pre> <p>Then:</p> <pre><code>tar zxfv helm-v2.7.2-linux-amd64.tar.gz </code></pre> <p>Now I...
Tim Schwalbe
<p>You need to add the directory where the helm binary is placed to your $PATH, <a href="https://unix.stackexchange.com/questions/162134/how-to-execute-a-bash-script-without-typing">as explained in this question</a>. That way, next time you invoke <code>helm</code> it will try to look for a binary in the folders specif...
Jose Armesto
<p>I am trying to troubleshoot my service by looking at the istio-proxy access log (it logs every access). However, I can't find any documentation that explains the meaning of each entry in the log.</p> <p>For example</p> <blockquote> <p>[2018-12-20T11:09:42.302Z] "GET / HTTP/1.1" 200 - 0 614 0 0 "10.32.96.32" "cur...
Agung Pratama
<p>Istio proxy access log's configuration is defined as part of <code>envoy.http_connection_manager</code> or <code>envoy.tcp_proxy</code> filters. To see it's configuration, run:</p> <pre><code>istioctl proxy-config listeners &lt;your pod&gt; -n &lt;your namespace&gt; -o json </code></pre> <p>Search for <code>access...
Vadim Eisenberg
<p>This question is a follow up of: <a href="https://stackoverflow.com/q/66453781/562440">How to list really all objects of a nonexistant namespace?</a></p> <p>Long story short:</p> <pre><code>$ kubectl get namespaces NAME STATUS AGE argo Active 27d default Active 27d kube-node...
Raffael
<p>This worked:</p> <pre><code>$ kubectl create namespace argo-events namespace/argo-events created $ kubectl patch eventsource/pubsub-event-source -p '{&quot;metadata&quot;:{&quot;finalizers&quot;:[]}}' --type=merge -n argo-events eventsource.argoproj.io/pubsub-event-source patched $ kubectl patch eventbus/default -...
Raffael
<p>I am using <code>t3a.xlarge</code> instance type, which has 16 gb of memory. When I run kubectl top, I can see my memory usage more than 16gb. Is there something wrong with it? Or Am I missing something? I'd appreciate if anyone can help me grasp this.</p> <p>$ kubectl top pods</p> <pre><code>NAME ...
titanic
<p>The memory you see from kubectl top is the working set which includes the actual physical memory plus the memory mapped files. The memory mapped files are shared by multiple pods. This is why the total can be &gt;16GB if you add them up since the memory mapped files are calculated multiple times. I can update my ans...
dadan
<p>I want to route 70% percentage of my traffic coming to service A to an external end point and append the URL.</p> <p>To achieve this I created an externalName type service which points to external endpoint and then use treafik ingress controller to divide the weight in percentage.</p> <p>My service definition look...
Aakash Singhal
<p>You can do the following:</p> <ol> <li><p>Use Istio Ingress Gateway instead of a traefik gateway. Istio Ingress Gateway is the recommended way for Ingress control in Istio. See <a href="https://istio.io/docs/tasks/traffic-management/ingress/" rel="nofollow noreferrer">https://istio.io/docs/tasks/traffic-management/...
Vadim Eisenberg
<p>I'm trying to set the deployment name as environment variable using the downward API but my container keeps crashing without any logging. I'm using the busybox to print the environment variables. I've had success using a Pod but no luck with a Deployment: This is my YAML:</p> <pre><code>--- apiVersion: apps/v1 kin...
Stanko
<p>You are using the wrong indentation and structure for Deployment objects. </p> <p>Both the <code>command</code> key and the <code>env</code> key are part of the <code>container</code> key.</p> <p>This is the right format</p> <pre><code>--- apiVersion: apps/v1 kind: Deployment metadata: labels: app: test-...
Jose Armesto
<p>I'm trying to set up a manifest with specifying the <code>ASPNETCORE_ENVIRONMENT</code> env variable:</p> <pre><code>kubectl version 1.18.10 </code></pre> <pre class="lang-yaml prettyprint-override"><code> kind: Deployment apiVersion: apps/v1 metadata: name: $(appName) labels: app: $(appName) spec: replica...
Sven
<p>Ok it must've been wrong formatting or indentation. The following file is working now:</p> <pre class="lang-yaml prettyprint-override"><code>kind: Deployment apiVersion: apps/v1 metadata: name: $(appName) labels: app: $(appName) spec: replicas: 2 selector: matchLabels: app: $(appName) templat...
Sven
<p>I'm using k8s with istio. And, I have external api with https endpoint (mutual tls)</p> <p>And I don't want every api request from k8s pod to implement mutual tls call, so it would be great if istio envoy proxy can process mutual tls. Then pod can call api with http, and request would be converted to https mtls req...
chaeyk
<p><a href="https://istio.io/docs/tasks/traffic-management/egress/egress-gateway-tls-origination/#perform-mutual-tls-origination-with-an-egress-gateway" rel="nofollow noreferrer">Here</a> is a task on istio.io how to do it.</p>
Vadim Eisenberg
<p>I am playing with an idea of using istio for some of the features, however I find it hard to find any reasonable estimates of the latency it adds to every call. 1ms for every service call seems like a lot, especially once there are 10 services involved in a chain, each having request&amp;response passing through ist...
Matej Briškár
<p><a href="https://medium.com/@michael_87395/benchmarking-istio-linkerd-cpu-at-scale-5f2cfc97c7fa" rel="nofollow noreferrer">This post</a> does a benchmark of Istio and Linkerd to compare both service meshes in different aspects like CPU, memory or latency.</p>
Jose Armesto
<p>i have a kubernetes cluster of 2 machines on bare metal machines on which master machine contains the docker image which i want to deploy only on slave node, but i dont want to use the cloud repository for image storage,i am building docker image from jenkins job which runs on master machine, if i use docker image...
user8024713
<p>The slave needs to download the image from somewhere. Images are not automatically distributed to the slaves.</p> <p>If you don't want to use dockerhub, you need to host your own Docker Registry in the cluster to download images from it. <a href="https://medium.com/@jmarhee/in-cluster-docker-registry-with-tls-on-ku...
Jose Armesto
<p>I trying to debug it for few hours to no effect. I either do know how to google it or it unusual issue.</p> <p>I have Kubernetes Engine cluster on google cloud. To test it I deploy simple app: <a href="https://github.com/iniside/uSpark" rel="nofollow noreferrer">https://github.com/iniside/uSpark</a> It is composed ...
Łukasz Baran
<p>I fixed issue and it was two fold. First as @spender suggested I did changed gRPC addresses to 0.0.0.0 both backend and frontend.</p> <p>But the changes were not picked up by cluster. Because all this time it was pulling wrong images.</p> <p>Every time I made changes, I deleted old images, with old tags (both loca...
Łukasz Baran
<p>When I set up an ingress controller to point to the traefik service, I expect load balancers to be created for that ingress controller on GKE in the same way a <code>LoadBalancer</code> service would. I could then point to the static ip created.</p> <p>However, when I get my ingresses, there is no static IP assigne...
Clement
<p>You are creating a <code>Service</code> object for the traefik deployment, but you have used the <code>NodePort</code> type, which is only accesible from inside the cluster. If you want Kubernetes to create a LoadBalancer for a <code>Service</code>, you need to specify the type <code>LoadBalancer</code> in your serv...
Jose Armesto
<p>I'm trying to deploy my own HPA without a success. Although while trying to deploy the official PHP of kubernetes, it worked as planned. When I tryied to deploy my own Test Deployment with the HPA, it didn't work.</p> <h1>Compare 2 HPA deployments processes - Kubernetes official deployment VS My Test deployment:</h1...
Oded .S
<p>The way I solved it is by adding the cpu resources to the deployment's file and keeping only the necessary HPA deployment yaml fields.</p> <p><strong>HPA deployment file</strong></p> <pre><code>apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: {{ .Values.name }} labels: app: {{ .Values...
Oded .S
<p>I'm studying helm3 and k8s (microk8s). While tryingi the following command:</p> <pre><code>helm install traefik traefik/traefik -n traefik --values traefik-values.yaml </code></pre> <p>and traefik-values.yaml has the following value:</p> <pre><code>additionalArguments: - &quot;--certificatesresolvers.letsencrypt....
Alessandro Dentella
<p>There's an <a href="https://github.com/traefik/traefik-helm-chart/issues/336" rel="noreferrer">open issue</a> on the Traefik helm chart <a href="https://github.com/traefik/traefik-helm-chart/issues/336#issuecomment-776163841" rel="noreferrer">where Jasper Ben</a> suggests a working solution:</p> <pre><code>hostNetwo...
Alessandro Dentella
<p>I'm using the simplest docker ever:</p> <pre><code>FROM ubuntu COPY script.sh /script.sh CMD /script.sh </code></pre> <p>Where all the script does is:</p> <pre><code>#!/bin/bash function sigterm() { echo "Got SIGTERM" exit } trap sigterm SIGTERM i=1 while true; do echo "$(date +%H:%M:%S) | $((i++))...
Amir Mehler
<p>Reading <a href="https://docs.docker.com/engine/reference/builder/#cmd" rel="noreferrer">the Dockerfile documentation on CMD</a></p> <blockquote> <p>The CMD instruction has three forms:</p> <ul> <li>CMD [&quot;executable&quot;,&quot;param1&quot;,&quot;param2&quot;] (exec form, this is the preferred form)</li> <li>CM...
Jose Armesto
<p>I'm using <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" rel="nofollow noreferrer">Workload Identity with GKE</a> so that a namespaced pod can get access to a GCP resource. I noticed that it takes ~1 min for the binding between IAM and GKE accounts to take place which is way too s...
Pithikos
<p>Yes, this is normal.</p> <p>Google Cloud IAM has various caching layers which means it takes time for <a href="https://cloud.google.com/iam/docs/access-change-propagation" rel="nofollow noreferrer">access change propagation</a> to complete. This makes applying IAM changes &quot;eventually consistent&quot;.</p> <p>Ad...
Joseph Lust
<p>I just upgraded kubernetes cluster, but kubectl is very inconsistent in showing me the version. How can I verify this. Any source of truth?</p> <pre><code>[iahmad@web-prod-ijaz001 k8s-test]$ kubectl version Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817...
Ijaz Ahmad
<p>IIRC: <code>kubectl version</code> is telling you what version the APIServer is at (1.14.3). <code>kubectl get nodes</code> is telling you what version the <code>kubelet</code> is on those nodes.</p>
johnharris85
<p>I am new in Kubernetes and stuck on the issue. I was trying to renew letsencrypt SSL certificate. But when I try to get certificate by running following command</p> <pre><code>kubectl get certificate </code></pre> <p>System throwing this exception</p> <pre><code>Error from server: conversion webhook for cert-manager...
Hunzla Ali
<p>In my case, I was attempting to install an older version of <code>cert-manager</code> onto my cluster, and Simply pulling the latest version of <code>cert-manger</code> (1.10.1 at time of writing) and installing that worked.</p> <hr /> <p>When attempting to install an older version of <code>cert-manager</code> I saw...
David Gard
<p>I have started a pod with an angular app in it and it is healthy with no errors when I do kubectl describe pod.</p> <p>However, when I curl to ingress route I get a 502 bad gateway.</p> <p>I tried exec into angular pod and do a curl localhost:4200 and I get: Failed to connect to localhost port 4200: Connection refus...
furion2000
<p>This could be caused by a variety of things. Generally around the container networking/ports/services.</p> <ol> <li><p>Investigate your Dockerfile source code. Does it run a process to expose your application and on what port.</p> </li> <li><p>If you can exec inside a running container...Find the active process expo...
Wayne Shelley
<p>Is there a nice way to delete a specific key from a Kubernetes configmap, using kubectl?</p> <p>Right now I run: </p> <pre><code>$ kubectl edit configmap myconfigmap </code></pre> <p>and then I delete the entry but I would like a solution that can be run as a script.</p>
rvabdn
<p>This works but I wonder if there is a simpler way</p> <pre><code>$ kubectl patch configmap myconfigmap --type=json -p='[{"op": "remove", "path": "/data/mykey"}]' </code></pre>
rvabdn
<p>Update: This problem is only on docker-for-mac</p> <p>I have been chasing this for some time now - how do you open an external port into Istio.</p> <p>Note all this works on <code>port 80</code>, why not on <code>port 8080</code>?</p> <p>Using helm, I have changed value in <code>values.yaml</code> gateways:</p> ...
Chris G.
<p>You have to define a <code>VirtualService</code> to specify where (to which microservice) the ingress traffic must be directed, see <a href="https://istio.io/docs/tasks/traffic-management/ingress/#configuring-ingress-using-an-istio-gateway" rel="nofollow noreferrer">https://istio.io/docs/tasks/traffic-management/ing...
Vadim Eisenberg
<p>We are attempting to make several private Kubernetes clusters. We can find limited documentation on specific settings for the private cluster, therefore we are running into issues related to the subnetwork IP ranges. </p> <p>Say we have 3 clusters: We set the Master Address Range to 172.16.0.0/28, 172.16.0.16/28 an...
Mike Furlender
<p>This cluster has VPC-native (alias IP) enabled, which use 2 secondary ranges per cluster.</p> <p>See <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips#secondary_ranges" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips#secondary_ranges</a></p> <p>Acc...
user571470
<p>I'm struggling to get an app deployed to GKE using Helm Charts and Gitlab Auto Devops. I feel like I've made lots of progress, but I've reached something I can't seem to figure out.</p> <p>I only have two stages right now, "build" and "production". During the "production" stage it fails after deploying to Kubernete...
andyrue
<p>There are a lot of automation steps here and any one of them could potentially be hiding the issue. I would be tempted to run things one stage at a time and build up the automation.</p> <p>E.g. I would first try to deploy the yaml manifest file to the cluster manually via kubectl from your machine.</p> <p>I've als...
Wayne Shelley
<p>I am trying to ship my K8s pod logs to Elasticsearch using Filebeat.</p> <p>I am following the guide online here: <a href="https://www.elastic.co/guide/en/beats/filebeat/6.0/running-on-kubernetes.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/beats/filebeat/6.0/running-on-kubernetes.html</a></p> <...
timothyclifford
<p>The conditions need to be a list:</p> <pre><code>- drop_event.when.regexp: or: - kubernetes.pod.name: "weave-net.*" - kubernetes.pod.name: "external-dns.*" - kubernetes.pod.name: "nginx-ingress-controller.*" - kubernetes.pod.name: "filebeat.*" </code></pre> <p>I'm not sure if your order...
xeraa
<p>I have a Kubernetes namespace that is stuck on Terminating. I've read that it's probably due to finalizers. When I run <code>kubectl get namespace $NAMESPACE -o json</code> I get the following finalizer:</p> <pre><code>"finalizers": [ "kubernetes" ] </code></pre> <p>I can't find any documentation on this final...
velizar
<p>It's kubernetes built-in and is there to ensure all objects are deleted. Is there anything at all in the namespace?</p> <p>The resolution is <a href="https://stackoverflow.com/a/53661717/578582">here</a>, although this can leave stranded resources</p> <p>Read the last few comments on <a href="https://github.com/ku...
eamon1234
<p>I'm well versed in Docker, but must be doing something wrong here with K8. I'm running <code>skaffold</code> with <code>minikube</code> and trying to get DNS between containers working. Here's my deployment:</p> <pre><code>kind: Deployment apiVersion: apps/v1 metadata: name: my-api labels: app: my-api spec:...
Fmstrat
<p>You have defined all 3 containers as part of the same pod. Pods have a common network namespace so in your current setup (which is not correct, more on that in a second), you could talk to the other containers using <code>localhost:&lt;port&gt;</code>. </p> <p>The 'correct' way of doing this would be to create a <a...
johnharris85
<p>For the purpose of log file aggregation, I'm looking to setup a production Elasticsearch instance on an on-premise (vanilla) Kubernetes cluster.</p> <p>There seems to be two main options for deployment:</p> <ol> <li>Elastic Cloud (ECK) - <a href="https://github.com/elastic/cloud-on-k8s" rel="noreferrer">https://gi...
Wayne Shelley
<p>The main difference is that the Helm Charts are pretty unopinionated while the Operator is opinionated — it has a lot of best practices built in like a hard requirement on using security. Also the Operator Framework is built on the reconcilliation loop and will continuously check if your cluster is in the desired st...
xeraa
<p>I'm looking to do 3 legged oauth on istio+kubernetes. I did not find a way to route unauthenticated requests to an authentication proxy service which performs the authentication and route the traffic back to the target service. I've done this with <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs...
Suman Ganta
<p>Answering my own question. At this point I've figured out the only way to do this is via <a href="https://istio.io/docs/reference/config/istio.networking.v1alpha3/#EnvoyFilter" rel="nofollow noreferrer">EnvoyFilter</a> on istio. This allows us to write a custom <a href="https://www.envoyproxy.io/docs/envoy/latest/co...
Suman Ganta
<p>I'm struggling with jx, kubernetes and helm. I run a Jenkinsfile on jx executing commands in env directory:</p> <pre><code>sh 'jx step helm build' sh 'jx step helm apply' </code></pre> <p>It finishes with success and deploys pods/creates deployment etc. however, helm list is empty. </p> <p>When I execute somethin...
maszter
<p>Going throught the changelog, it seems that the tillerless mode has been made the default mode since version <a href="https://github.com/jenkins-x/jx/releases/tag/v2.0.246" rel="nofollow noreferrer">2.0.246</a>.</p> <p>In Helm v2, Helm relies on its server side component called Tiller. The Jenkins X tillerless mode...
Jose Armesto
<p>I am a begginer developer. Please help to find my mistake I have a helm chart with ytt .yml files. I going to deploy the chart in argo. There are many links for helm+argo/kubernetes, but poor with helm+ytt+argo/kubernetes. My ytt files are in the templates. During experimnets with steps getting in internet I got err...
Armenuhi Kocharyan
<p>While ArgoCD doesn't have a built-in ytt interpreter, it has at least two ways to integrate with other interpreters like ytt:</p> <ul> <li>a customizable plugins system,</li> <li>a sidecar system.</li> </ul> <p>The customizable plugins system is relatively straightforward, and there is a <a href="https://carvel.dev/...
jpetazzo
<p>I'm running ECK cluster with rancher2. There are 3 nodes: 2 for elasticsearch, 1 for kibana.</p> <p>I want to change Elastic-server configuration with operator, for example, disable ssl communication.</p> <p>But what right way to do it? Mount config-file from host? Please give some ideas</p>
Ivan Vovk
<p>Quoting the <a href="https://www.elastic.co/guide/en/cloud-on-k8s/1.2/k8s-tls-certificates.html#k8s-disable-tls" rel="nofollow noreferrer">documentation</a>:</p> <blockquote> <p>You can explicitly disable TLS for Kibana, APM Server, Enterprise Search and the HTTP layer of Elasticsearch.</p> </blockquote> <pre><code>...
xeraa
<p>I have a folder of TFRecords on a network that I want to expose to multiple pods. The folder has been exported via NFS.</p> <p>I have tried creating a Persistent Volume, followed by a Persistent Volume Claim. However, that just creates a folder inside the NFS mount, which I don't want. Instead, I want to Pod to <em...
Benjamin Tan Wei Hao
<p>I figured it out. The issue was I was looking at the problem the wrong way. I didn't need any <em>provisioning</em>. Instead, what was need was to simply mount the NFS volume within the container:</p> <pre><code>kind: Pod apiVersion: v1 metadata: name: pod-using-nfs spec: containers: - name: app image...
Benjamin Tan Wei Hao
<p>I am currently installing QlikSense on Kubernetes. In order to work with Qlik the Kubernetes Cluster needs to have a readwritemany storage class.</p> <p>How do I configure a readwritemany storage class in EKS with kubectl?</p>
Jsimp
<p>Amazon AWS supports Elastic File System (EFS) as a highly scalable NFS service basically. By installing their new CSI driver in your EKS cluster, this allows a ReadWriteMany storage class. This should satisfy your requirements. You can read more about installing that <a href="https://docs.aws.amazon.com/eks/latest/u...
kim0
<p>I have spring-boot microservices deployed to kubernetes cluster. Outside cluster there is netflix eureka discovery service on AWS. I want to register my services on this eureka. Gateway is also on AWS. On my localmachine I need to create vpn connection via openvpn to get access to eureka, Kubernetes cluster is also ...
Dawid Macura
<p>It is <a href="https://caveofcode.com/2017/06/how-to-setup-a-vpn-connection-from-inside-a-pod-in-kubernetes/" rel="nofollow noreferrer">possible</a> to put every Kubernetes pod on the OpenVPN network so that they would be able to access the Eureka instance. However, since you want Eureka to do service discovery, it...
Shnatsel
<p>I've setup Istio using the helm charts, and I'm trying to expose services to the istio-ingressgateway.</p> <p>Here's the config I've decided to go with:</p> <pre><code>apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: grafana-gateway namespace: istio-system spec: selector: istio: ing...
JustAnotherThrowaway
<p>Your gateway and virtual services are mixed since the same hosts (<code>*</code>) are used for all of them, so their behavior is undefined in Istio. I would allocate fake hostnames, for example, <code>my-grafana.com</code>, <code>my-kiali.com</code> and use them in the Gateway and Virtual Service definitions. I woul...
Vadim Eisenberg
<p>I want to set up 3 microservice architecture; one would be a frontend, the second one would be a backend, and the third one would be a pod that would be responsible for running some commands. The frontend should enable a user to run a sequence of commands and show their outputs in real-time, these commands would get...
Harith
<p>(This answer is assuming you're interested in using Kubernetes since this question is tagged with <code>kubernetes</code> and you mentioned Pods).</p> <p>It sounds like you have the basic building blocks assembled already, and you just need a way to stream the logs through the backend, and expose them in a way the ...
bosgood
<p>I installed Rancher on my Kubernetes cluster on Azure as described <a href="https://rancher.com/docs/rancher/v2.5/en/installation/install-rancher-on-k8s/aks/" rel="nofollow noreferrer">here</a>. I ran the following command:</p> <pre><code>helm install rancher rancher-latest/rancher --namespace cattle-system --set ho...
Mar Chal
<p>@Mar Chal</p> <p>Try below command to reset password it will work.</p> <pre><code>[]$ kubectl -n cattle-system exec $(kubectl -n cattle-system get pods -l app=demo-rancher | grep '1/1' | head -1 | awk '{ print $1 }') -- reset-password W1214 11:55:25.230447 127 client_config.go:615] Neither --kubeconfig nor --mas...
Satyam Pandey
<p>I'm following this <a href="https://github.com/mongodb/mongodb-enterprise-kubernetes" rel="nofollow noreferrer">https://github.com/mongodb/mongodb-enterprise-kubernetes</a> and <a href="https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/" rel="nofollow noreferrer">https://docs.opsmanager.mon...
Łukasz Baran
<p>I got it working. As It stands in documentation here: <a href="https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/" rel="nofollow noreferrer">https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/</a></p> <p><strong><em>data.projectName</em></strong></p> <p>Is not optiona...
Łukasz Baran
<p>In <strong>kubernetes</strong>, if a pod go down for some reason, the admission controller will restart it.</p> <p>We call this mecanism self healing.</p> <p>I have never worked with <strong>docker-compose</strong>, but I wonder : is it the same ?</p>
Will
<p>When deployed with <code>docker-compose</code> or now <code>docker compose</code> (with a space) you are deploying to a single node. You can define the service to automatically restart with a <a href="https://docs.docker.com/compose/compose-file/compose-file-v3/#restart_policy" rel="nofollow noreferrer">restart poli...
BMitch
<p>My deployment is using a couple of volumes, all defined as <code>ReadWriteOnce</code>.</p> <p>When applying the deployment to a clean cluster, pod is created successfuly.</p> <p>However, if I update my deployment (i.e update container image), when a new pod is created for my deployment it will always fail on volum...
Mugen
<p>You will need to tolerate an outage here, due to the access mode. This will delete the existing Pods (unmounting the volumes) before creating new ones.</p> <p>A Deployment strategy - <code>.spec.strategy.type</code> - of “Recreate” will help achieve this: <a href="https://github.com/ContainerSolutions/k8s-deploymen...
elithrar
<p>I'm trying to get the IP address of the "docker-for-desktop" node.</p> <p>I'm switching from minikube to docker-for-desktop because it doesn't require VirtualBox. </p> <p><a href="https://i.stack.imgur.com/1UcAx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1UcAx.png" alt="Screenshot of docker-for-desk...
mathieux51
<p>Minikube is creating a virtual machine that has its own IP, but when using Docker for Mac, you use your own laptop, so where you were using the minikube ip you can now just use <code>localhost</code>. It's just simpler.</p>
Jose Armesto
<p>It looks like I might need to traverse the <code>v1.Node-&gt;NodeStatus-&gt;Conditions[]</code> slice and sort by transition time and find if the most recent timed condition is <code>NodeConditionType == "Ready"</code>. I am wondering if there is a better way or if that approach is flawed?</p>
Philip Lombardi
<p>You are looking in the right place, but Conditions may not work exactly the way your question implies they do. Conditions shouldn't be seen as time-based events, but rather current states. To quote the <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md...
bosgood
<p>Suppose we have a kubernetes stack running on AWS and we would like to config our component directly via kubernetes chart files to be able to provision some AWS services (for example a DynamoDB table).</p> <p>What would be the best practice if we want to achieve this and hopefully also allow our kubernetes componen...
Fuyang Liu
<p>What you are describing here is more or less what the <a href="https://github.com/awslabs/aws-servicebroker/" rel="nofollow noreferrer">AWS Service Broker</a> is trying to achieve. Using the <a href="https://www.openservicebrokerapi.org/" rel="nofollow noreferrer">Open Service Broker API</a>, the AWS broker would re...
Jose Armesto
<p>I was trying to use the netshoot image with Nginx server image on the same pod.</p> <p>If I do not include sleep argument to netshoot container,</p> <pre><code>args: - sleep - '9999999999999999999' </code></pre> <p>the pod status always becomes CrashLoopBackOff. I did not figure out why I have to put...
s.onal
<p>Containers are a wrapper around a command, and they run until that command exits. The default command for netshoot is <code>zsh</code>. Like other shells, they run until they reach an exit command, a signal interrupts them, or the input they process returns an EOF. Without any stdin input defined, a container will r...
BMitch
<p>I have a kops cluster with a max of 75 nodes and added with <a href="https://github.com/kubernetes/kops/tree/master/addons/cluster-autoscaler" rel="nofollow noreferrer">cluster autoscaler</a>. It uses <a href="https://github.com/kubernetes/kops/blob/master/docs/networking.md#kops-default-networking" rel="nofollow n...
smk
<p>I found out the problem was that my Cluster had gone into an Unhealthy state because of <a href="https://github.com/kubernetes/kops/blob/master/docs/networking.md#kops-default-networking" rel="nofollow noreferrer">this limitation</a> in AWS VPC routing tables.My cluster had scaled to 75 nodes and then had become unh...
smk
<p>For one of my containers inside a pod I set some of the environment variables using <code>envFrom</code>:</p> <pre><code>envFrom: - configMapRef: name: my-config-map </code></pre> <p>Experimenting, it seems that updating the ConfigMap does not change the value of the corresponding environment value in the ...
rlandster
<p>The environment variables are set when the container is starting so there is no possible way to update those environment variables. You will need to restart Pod so it that reads again the ConfigMap values and sets the environment for the new created container.</p> <p>You can do this automatically with some tools ou...
Jose Armesto
<p>As container can be accessed by everyone by inserting command docker ps -a (running containers), so need to protect the containers. I want to create user credentials to access the container. Each user should have login details. Please help me out with this issue. </p>
amit potdar
<p>You need to do this at a level above docker. The most you can do with just the CE engine is configure open policy agent, but I don't think it has the granularity or usability you want. Tools that run on top of docker, like UCP, provide this sort of functionality.</p> <p>From the low level engine standpoint, this re...
BMitch
<p>I am trying to deploy one spring boot application which uses postgres database.</p> <p>I used this tutorial : <a href="https://github.com/mkjelland/spring-boot-postgres-on-k8s-sample" rel="nofollow noreferrer">https://github.com/mkjelland/spring-boot-postgres-on-k8s-sample</a></p> <p>But when I did this commmand <...
Dhanraj
<p>You can get the deployment logs with the following command</p> <pre><code>kubectl logs -f deployment/spring-boot-postgres-sample </code></pre> <p>Or if you want the logs for an specific pod</p> <pre><code>kubectl logs -f spring-boot-postgres-sample-7f7c7479d9-fclwb </code></pre>
Jose Armesto
<p>I have a bunch of pods and corresponding cluster IP services running in a Kubenetes cluster. I use an Ingress controller to route incoming traffic to these workloads. </p> <p>Now, when I make an external request from within a workload, I would like those requests to go out from a static IP. </p> <ol> <li><p>Are bo...
Charlie
<p>If you're on AWS or GKE the only way to get a static outbound from an (autoscaling) node pool is via a NAT gateway. On GKE you are also required to have private nodes (no public ips). </p> <p>Kubernetes ingress, at least in GKE, is treated separately from egress and is a different load balancer.</p> <p><a href="ht...
eamon1234
<p>Today I was going through some documentation and discussions about matchLabels statement that is a part of a Deployment (or other objects) in Kubernetes. Example below:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: ...
honor
<p><code>kubectl explain deploy.spec.selector --api-version=apps/v1</code></p> <blockquote> <p>Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.</p> </blockquote> <p><a href="https://gi...
eamon1234
<p>So I have already images in my <code>dockerhub</code> which are ready to use as I have already setup a kubernetes cluster on a server. My next step is to achieve something similar using docker swarm. I do not really know how to get started so I am asking in here.</p> <p>The kubernetes cluster is running on a <code>...
elp
<blockquote> <p>How to set up a single node cluster (one master only, no workers) on a bare metal ubuntu VPS? I did not found much out there, are there any significant changes I need to take care about (similar to the metalLB in the kubernetes cluster)?</p> </blockquote> <p>There's not much to do. You simply:</p> <...
BMitch
<p><a href="https://i.stack.imgur.com/KiZXn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KiZXn.png" alt="enter image description here"></a>I am running my applications on a bare-metal kubernetes cluster which uses Ubuntu 18.04. For a long time I had problems with cached memory. Some of my componen...
AVarf
<p>Linux caches disk access to RAM to speed up future read requests, this is expected and desirable behavior. When applications need more RAM, this disk cache may be pruned. Also, if large files are deleted, I'd expect their cache would also be removed. </p> <p>The issue here is whether you count this disk cache when ...
BMitch
<p>I'd like to get some clarification for preparation for maintenance when you drain nodes in a Kubernetes cluster:</p> <p>Here's what I know when you run <code>kubectl drain MY_NODE</code>:</p> <ul> <li>Node is cordoned</li> <li>Pods are gracefully shut down</li> <li>You can opt to ignore Daemonset pods because if t...
Birdman
<p>By default <code>kubectl drain</code> is non-destructive, you have to override to change that behaviour. It runs with the following defaults:</p> <blockquote> <pre><code> --delete-local-data=false --force=false --grace-period=-1 --ignore-daemonsets=false --timeout=0s </code></pre> </blockquote> <p>Each of...
eamon1234
<p>This is driving me crazy, been trying to get this to work for 3 days now: I'm trying to connect a kubernetes deployment to my Cloud SQL database in GCP.</p> <p>Here's what I've done so far:</p> <ol> <li>Set up the cloud SQL proxy to work as a sidecar in my deployment</li> <li>Created a GKE service account and attach...
Rob
<p>FINALLY got it to work!</p> <p>Two major pieces that the main article on this (cloud.google.com/sql/docs/mysql/connect-kubernetes-engine) glosses over:</p> <ol> <li><p>Properly setting up workload identity, for which I found these links to be very helpful: a) <a href="https://cloud.google.com/kubernetes-engine/docs/...
Rob
<p>In some cases after a node reboot the Kubernetes cluster managed by MicroK8S cannot start pods.</p> <p>With a describe of the pod failing to be ready I could see that the pod was stuck in a &quot;Pulling image&quot; state during several minutes without any other event, as following:</p> <pre><code>Events: Type ...
Micaël Félix
<p>Running a <code>sudo microk8s inspect</code> gives no error/warning, everything seemed to work perfectly.</p> <p>As a Docker pull did work locally, it's really the Kubelet app which is communicating with Docker that seemed stuck.</p> <p>Even with a <code>sudo service docker stop &amp;&amp; sudo service docker start<...
Micaël Félix
<p>I can list all the <code>custom.metrics</code> available, but I don't know how to query an individual value. For example I have tried:</p> <pre><code>curl http://localhost:8001/apis/custom.metrics.k8s.io/v1beta1/ | jq . { "kind": "APIResourceList", "apiVersion": "v1", "groupVersion": "custom.metrics.k8s.io/v...
Breedly
<p>Just like Resource Metrics, Custom Metrics are bound to Kubernetes objects too. What you're missing in your URL is the resource you want the metric to relate to. For example the Pod the custom metric is related to, but the same is true for Deployments.</p> <p>Try to adjust this url to your needs:</p> <pre><code>ku...
Matthias Loibl
<p>As part of the build pipeline I wanted to create a ConfigMap with the content of a file which is part of the Git repository from which the pipeline runs.</p> <p>According to the Kubectl task für Azure Pipelines, this should be possible. But I have no idea how to apply it. It doesn't matter how my YAML is look like ...
dannyyy
<p>It seems, that something has been fixed since last Friday. Now the following definition is working as expected:</p> <pre><code>- task: Kubernetes@1 displayName: 'Create ConfigMap for /data' inputs: kubernetesServiceEndpoint: 'cluster-test' namespace: 'app-test' forceUpdateConfigMap: true configM...
dannyyy
<p>In the <a href="https://kubernetes.io/docs/concepts/configuration/overview/#container-images" rel="noreferrer">Kubernetes documentation</a> it mentions that the caching semantic of using <code>ImagePullPolicy: Always</code> makes the ImagePullPolicy quite efficient. What reasons would I want to choose a different Im...
chris.mclennon
<p>It heavily depends on your versioning/tagging strategy. </p> <p>When new replicas of your application are created (because your app has scaled up, or a pod has died and it's been replaced by a new pod), if you use <code>ImagePullPolicy: Always</code> and you have pushed a different version of your application using...
Jose Armesto
<p>Can we run an application that is configured to run on multi-node AWS EC2 K8s cluster using kops (<a href="https://github.com/hydro-project/cluster/blob/master/docs/getting-started-aws.md" rel="nofollow noreferrer">project link</a>) into local Kubernetes cluster (setup using kubeadm)?</p> <p>My thinking is that if t...
Md Abul Kalam Azad Azad
<p>It is the beauty of Docker and Kubernetes. It helps to keep your development environment to match production. For simple applications, written without custom resources, you can deploy the same workload to any cluster running on any cloud provider.</p> <p>However, the ability to deploy the same workload to different ...
Rajan Panneer Selvam
<p>I'm running some scheduled commands on Kubernetes using PHP.</p> <p>When running the command on local docker PHP RAM usage is at least 70% less than on Kubernetes.</p> <p>I'm using the same Docker Image on both local and Kubernetes.</p> <p>An example script:</p> <pre><code>&lt;?php use Symfony\Component\Process...
Evaldo Junior
<p>I found the issues.</p> <p>1 - The K8S deployment was setting the application to development mode. This is a Symfony application using Doctrine ORM. Doctrine ORM's profiling was active, this made it collect all the queries in memory, growing the amount of needed memory a lot. FOr long running processes with up to a...
Evaldo Junior
<p>I have a pod with two containers :</p> <ol> <li>A component with input file and does not support hot reload, to handle my new set of files i need to restart it with the new files in a particulary directory.</li> <li>A sidecar who handle "event" and communicate with the other container</li> </ol> <p>What i want to ...
Guillaume Alouege
<p><a href="https://github.com/kubernetes/git-sync" rel="nofollow noreferrer">git-sync</a> is a simple command that pulls a git repository into a local directory. It is a perfect "sidecar" container in Kubernetes - it can periodically pull files down from a repository so that an application can consume them.</p>
Jose Armesto
<p>I'v setup Kubernetes Horizontal Pod Autoscaler with custom metrics using the prometheus adapter <a href="https://github.com/DirectXMan12/k8s-prometheus-adapter" rel="nofollow noreferrer">https://github.com/DirectXMan12/k8s-prometheus-adapter</a>. Prometheus is monitoring rabbitmq, and Im watching the <strong>rabbitm...
Zarko
<p>Horizontal Pod Autoscaler is not designed for long-running tasks, and will not be a good fit. If you need to spawn one long-running processing tasks per message, I'd take one of these two approaches:</p> <ul> <li>Use a task queue such as <a href="http://www.celeryproject.org/" rel="nofollow noreferrer">Celery</a>. ...
Shnatsel
<p>Kubernetes Pods are stuck with a STATUS of <code>Terminating</code> after the Deployment (and Service) related to the Pods were deleted. Currently they have been in this state for around 3 hours.</p> <p>The Deployment and Service were created from files, and then sometime later deleted by referencing the same files...
David Gard
<p>After searching Google for a while I came up blank, but a suggested <a href="https://stackoverflow.com/questions/51559111/ghost-kubernetes-pod-stuck-in-terminating">Stack Overflow question</a> which appeared when I added my title saved the day.</p> <pre><code>kubectl delete pods mypod-ba97bc8ef-8rgaa --grace-period...
David Gard
<p>Is there any command which points me to the path where kubeconfig file is present? I mean I am working on python k8s/openshift client. I am looking for linux or python command or libraries which can print me the path where kubeconfig file is present.</p> <p>By default kubeconfig is present it home most of the time, ...
majid asad
<p>kubectl configuration file is located at ~/. kube/config as default. You can check using this code</p> <pre><code>kubeconfig_path = os.environ.get('KUBECONFIG', '~/.kube/config') </code></pre> <p>You can check if the variable is set</p> <pre><code>kubeconfig_path = os.environ['KUBECONFIG'] </code></pre> <p>and if it...
Bijendra
<p>We have set up a kubernetes cluster for our laravel application on google cloud platform. Containers:</p> <ul> <li>application code + php-fpm</li> <li>apache2</li> <li>others not related to the issue</li> </ul> <p>(We run under nginx-ingress-controller but this seems unrelated to the issue)</p> <p>We run a jmeter...
Tania Petsouka
<p>Ok. We found out that we had no opcache enabled. As documented about composer optimize-autoloader:</p> <blockquote> <p>On PHP 5.6+, the class map is also cached in opcache which improves the initialization time greatly. If you make sure <em>opcache is enabled</em>, then the class map should load almost instantly ...
Tania Petsouka
<p>To use <code>nginx.ingress.kubernetes.io/ssl-passthrough</code> annotation I need to be <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#ssl-passthrough" rel="nofollow noreferrer"><code>starting the controller with the --enable-ssl-passthrough flag.</code></a></p> <p>H...
Kirill Kliushkin
<p>I don't think there is an easy way to change it. But you can always manually change the ingress controller deployment object so that it passes the arguments that you need. For example, <a href="https://github.com/ajanthan/minikube-ingress-with-ssl-passthrough/" rel="nofollow noreferrer">in this repository</a> someon...
Jose Armesto
<p>I have several applications deployed on AWS EKS as microservices.</p> <p>They are also deployed across different AWS accounts and have dependencies on each other.</p> <p>I would like some kind of dashboard that says where exactly a request failed in a long flow of request across say 10 different microservices (m1 ca...
Biju
<p>To cover the scenario you mention here, firstly make sure to have a centralized logging. I have used Elk and found it to be good covering logs from multiple services and it comes with a good dashboard view to debug the logs.</p> <p>You can have different source types for logs across the micro services to differentia...
Bijendra
<p>Not able to access the node js application I am running inside the K8s cluster with docker desktop. Below are the Objects <strong>Skaffold Config:</strong></p> <pre><code>apiVersion: skaffold/v2beta26 kind: Config deploy: kubectl: manifests: - ./objects/* build: local: push: false artifacts: ...
harish durga
<p>By default, <code>skaffold dev</code> only port-forwards <em>user-defined port-forwards</em>, those that are <a href="https://skaffold.dev/docs/pipeline-stages/port-forwarding/#UDPF" rel="nofollow noreferrer">explicitly defined in the <code>skaffold.yaml</code></a>. For example:</p> <pre><code>portForward: - resour...
Brian de Alwis
<p>I used this tutorial to install wordpress using kubernetes.</p> <p><a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/</a></p> <p>It is working a...
shantanuo
<p>In the wordpress deployment you just need to update the host and credentials for your amazon db</p> <p><a href="https://i.stack.imgur.com/U40c7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U40c7.png" alt="enter image description here"></a></p> <p>you don't need to deploy any of the mysql reso...
Eamonn McEvoy
<p>I my 1.9 cluster created this deployment role for the dev user. Deployment works as expected. Now I want to give exec and logs access to developer. What role I need to add for exec to the pod?</p> <pre><code>kind: Role name: deployment-manager rules: - apiGroups: ["", "extensions", "apps"] resources: ["depl...
sfgroups
<p>The <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources" rel="nofollow noreferrer">RBAC docs say that</a></p> <blockquote> <p>Most resources are represented by a string representation of their name, such as “pods”, just as it appears in the URL for the relevant API endpoint....
Jose Armesto
<p>When a request takes over 60s to respond it seems that the ingress controller will bounce </p> <p>From what I can see our NGINX ingress controller returns 504 to the client after a request takes more than 60s to process. I can see this from the NGINX logs:</p> <pre><code>2019/01/25 09:54:15 [error] 2878#2878: *40...
Dave New
<p>The issue was fixed by provided integer values (in seconds) for these annotations:</p> <pre><code>nginx.ingress.kubernetes.io/proxy-connect-timeout: "180" nginx.ingress.kubernetes.io/proxy-read-timeout: "180" nginx.ingress.kubernetes.io/proxy-send-timeout: "180" </code></pre> <p>It seems that <a href="https://gith...
Dave New
<p>As AWS &amp; GCP is not providing managed service for any of the modules of Redis. I am looking forward to running <code>Redis ReJson</code> with HA configuration on AWS.</p> <p>Is it best way to set it up on EC2 with RDB backup? How EBS storage will work as i want multi AZ also auto failover.</p> <p>Right now som...
Harsh Manvar
<p>RedisLabs provides a managed Redis with modules support on both AWS and GCP.</p> <p>See: Cloud PRO <a href="https://redislabs.com/redis-enterprise-cloud/" rel="nofollow noreferrer">https://redislabs.com/redis-enterprise-cloud/</a></p>
Guy Korland
<p>How do I pass in a variable inside another string value in k8s deployments.</p> <p><a href="https://i.stack.imgur.com/LUMMR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LUMMR.png" alt="enter image description here" /></a></p>
edmamerto
<p>Variable references are possible using the <code>$(ENV_VAR)</code> format. So, in this example, it would be:</p> <pre><code>containers: - env: - name: DATA_SOURCE_PASS valueFrom: secretKeyRef: name: app-secrets key: DB_DOCKER_USER_PASSWORD - name: PG_EXPORTER_URL ...
Gavin
<p>I am trying to understand the K8s gpu practices better, and implementing a small K8s GPU cluster which is suppose to work like below.</p> <p>This going to be little long explanation, but I hope it will help to have many questions at once place to understand GPU practices better in Kubernetes.</p> <h2>Application R...
Neeraj Kumar
<p>Both designs are supported in 1.10. I view design 2 as a special case of 1. You don't necessarily need to have 1 GPU per node. In case your pod needs more GPUs and memory, you have to have multiple GPUs per node, as you mentioned in question (4). I'd go with 1 unless there's a reason not to.</p> <p>I think the best...
user571470
<p>Getting below error while trying to create an ingress endpoint on k8s v1.26.3. i have created a k8s cluster using kops.</p> <p>Error from server</p> <blockquote> <p>(BadRequest): error when creating &quot;ingress.yaml&quot;: Ingress in version &quot;v1&quot; cannot be handled as a Ingress: strict decoding error: unk...
Satyam Pandey
<pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: prod-demo-ingress namespace: prod labels: env: prod app: demo-ms layer: frontend annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - host: demo.abc.in http: paths: - path...
Satyam Pandey
<p>I'm checking the official documentation on how to skip deploy after build and push the image but there's no clue. Does anybody know how to skip the process?</p> <p>I even checked the official doc carefully but nothing mentioned <a href="https://skaffold.dev/docs/references/yaml/" rel="nofollow noreferrer">https://sk...
Toshi
<p><code>skaffold dev --render-only=true</code> should do what you're looking for.</p> <p>(I'm a bit surprised that we support <code>dev --render-only</code> since <code>skaffold dev</code> is really meant for a rapid compile-deploy-edit cycle, sometimes called the <em>innner loop</em>, and the <em>deploy</em> is gener...
Brian de Alwis