Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>With <code>CRD</code> we can extend the functionality of kubernetes, but how could I know which <code>controller</code> handle a certain CRD, I mean I know there is a CRD registered in my kubernetes named <code>foo</code> but how could I know which <code>controller/pod</code> do the reconcile for it?</p>
vincent pli
<p>There is no way of knowing just by looking at the CRDs. Several different controllers could be watching the same CRD, it's not like there is a 1-1 relationship.</p> <p>If you really need to know, there would be ways of figuring this out, like enabling the audit log and inspecting the calls received by the k8s api.</...
Jose Armesto
<p>I have the following dockerfile for a project that is hosted with Kubernetes and Openshift and am getting a vulnerability warning from Gitlab that line 10 should use an absolute path instead of relative path for the sake of clarity and reliability. Is there something about a string path that dockerfile or Gitlab doe...
Reid P.
<p>Delete the quotes from that line, changing:</p> <pre><code>WORKDIR &quot;/app/src/{directory-name}&quot; </code></pre> <p>To:</p> <pre><code>WORKDIR /app/src/{directory-name} </code></pre>
BMitch
<p>I am building a new Helm chart (<strong>mychart</strong>) that I'm trying to install.</p> <p>A <code>values.yaml</code> exists and its contents specify the fullnameOverride:</p> <pre class="lang-yaml prettyprint-override"><code>fullnameOverride: &quot;myapp&quot; </code></pre> <p>I run the following command</p> <p><...
Micaël Félix
<p>Finally the problem wasn't the values.yaml that was not set correctly but more the way it was used within the template.</p> <p>When using an include of a definition coming from a .tpl file (this one was the autogenerated by Helm), we must be careful to not be in a range.</p> <p>I was creating a range of assets so it...
Micaël Félix
<p>Asked in <a href="https://stackoverflow.com/questions/65358738/is-there-any-way-to-configure-skaffold-to-build-images-on-my-local-docker-daemon/65395223?noredirect=1#comment120508501_65395223">a different question</a>:</p> <blockquote> <p>why does <code>skaffold</code> need two tags to the same image?</p> </blockquo...
Brian de Alwis
<p>During deployment, Skaffold rewrites the image references in the Kubernetes manifests being deployed to ensure that the cluster pulls the the newly-built images and doesn't use stale copies (read about <code>imagePullPolicy</code> and some of the issues that it attempts to address). Skaffold can't just use the comp...
Brian de Alwis
<p>I have a k8s cluster where I deploy some containers.</p> <p>The cluster is accessible at microk8s.hostname.internal.</p> <p>At this moment I have an application/container deployed that is accessible here: microk8s.hostname.internal/myapplication with the help of a service and an ingress.</p> <p>And this works great....
Viktor Eriksson
<p>To do this you would have to configure a kube service, kube ingress and the configure your DNS.</p> <p>Adding an entry into the <code>hosts</code> file would allow DNS resolution to <code>otherapplication.microk8s.hostname.internal</code></p> <p>You could use <code>dnsmasq</code> to allow for wildcard resolution e.g...
Wayne Shelley
<p>How can I make <code>Skaffold</code> forward privileged/protected/special ports which have numbers below <code>1024</code>? In my <code>skaffold.yaml</code> I added:</p> <pre class="lang-yaml prettyprint-override"><code>portForward: - resourceType: service resourceName: foo port: 80 localPort: 80 </code></pre>...
adrihanu
<p>This should work. We changed Skaffold's behaviour to prevent it from allocating system ports (≤ 1024), but user-defined port-forwards with explicit <code>localPort</code>s will still be honoured.</p> <p>You didn't say what ports you were seeing being allocated, but I suspect they were ports 4503–4533, in which you'...
Brian de Alwis
<p>I'm running docker-registry inside a deployment with ingress setup (nginx-ingress), and I use cloudflare. I started getting issues when trying to push images larger then 1GB if a layer is bit larger then that I just get &quot;Retrying in x&quot;, and it begins from 0. Strange enough pushing any layer below that thre...
Immutable
<p>First, verify you are using nginx-ingress and not ingress-nginx, which uses a <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#custom-max-body-size" rel="nofollow noreferrer">different configuration for the body size</a>:</p> <pre class="lang-yaml prettyprint-override">...
BMitch
<p>I have a multi-module maven project (Spring Boot), I generate the docker images in using the JIB Maven Plugin but how should I name the images in scaffold? Im pushing to local docker repo and Skaffold afaik does not support templating. What is the recommended was to reference these images in Skaffold?</p> <p>Keep...
Steven Smart
<p>When using Jib with Skaffold, Skaffold is the master and overrides the image refs used by Jib. Skaffold will decide what image names should be used and will rewrite the image references in the Kubernetes manifests to match prior to deploying.</p> <p>If you're developing against a <em>local cluster</em> such as Min...
Brian de Alwis
<p>I'm trying to follow this guide: <a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html</a> and was able to get as far as running <code>curl -u &quot;elastic:$PASSWORD&qu...
reactor
<ol> <li>If you rename <code>metadata.name: quickstart</code> to <code>my-elasticsearch</code>, then you'll need to rename it in <code>kubectl get pods --selector='elasticsearch.k8s.elastic.co/cluster-name=quickstart'</code> as well.</li> <li>Just deleting a pod won't get rid of it while the operator is still running. ...
xeraa
<p>I am currently attempting to get the logs from my kubernetes cluster to an external ElasticSearch/Kibana. So far I have used <a href="https://github.com/elastic/beats/blob/master/deploy/kubernetes/filebeat-kubernetes.yaml" rel="nofollow noreferrer">this</a> daemon deployment to get filebeat running and piping to my ...
deef0000dragon1
<p>Precondition: You have enabled <a href="https://www.elastic.co/guide/en/beats/filebeat/current/add-kubernetes-metadata.html" rel="nofollow noreferrer"><code>add_kubernetes_metadata: ~</code></a>.</p> <p>Then you can use that metadata in the index name like this:</p> <pre><code>output.elasticsearch: index: "%{[ku...
xeraa
<p><strong>Situation</strong></p> <p>At work, we have been using Kubernetes Service Mesh v1.22 for the past year, and all was fine. We lately debuted a 2nd environment, this time running v1.25. This introduced several security related changes that we had to overcome, but that is a separate issue.</p> <p><strong>Problem...
Michael Norton
<pre><code>sshpass -p $password ssh -t $kubernetes-login &quot;pwd &amp;&amp; echo '$password' | sudo -S kubectl exec -it $pod -c $container -n $namespace -- /bin/sh&quot; </code></pre> <p>The input for the <code>kubectl</code> command is the pipe (<code>|</code>) from the <code>echo</code>, even though the content of...
BMitch
<p>I'm having trouble deleting custom resource definition. I'm trying to upgrade kubeless from v1.0.0-alpha.7 to <strong>v1.0.0-alpha.8</strong>.</p> <p>I tried to remove all the created custom resources by doing </p> <pre class="lang-sh prettyprint-override"><code>$ kubectl delete -f kubeless-v1.0.0-alpha.7.yaml de...
smk
<p>So it turns out , the root cause was that Custom resources with finalizers can &quot;deadlock&quot;. The CustomResource &quot;functions.kubeless.io&quot; had a</p> <pre><code>Finalizers: customresourcecleanup.apiextensions.k8s.io </code></pre> <p>and this is can leave it in a bad state when deleting.</p> <p><a h...
smk
<p>I have a number of <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="noreferrer">Jobs</a> running on k8s. </p> <p>These jobs run a custom agent that copies some files and sets up the environment for a user (trusted) provided container to run. This agent runs on the sid...
ButterDog
<p>From <a href="https://github.com/kubernetes/kubernetes/issues/37838#issuecomment-328853094" rel="nofollow noreferrer">this GitHub issue</a>, it seems that the answer is that adding or removing containers to a pod is not possible, since the container list in the pod spec is immutable. </p>
ButterDog
<p>I started learning about Kubernetes and I installed minikube and kubectl on Windows 7.</p> <p>After that I created a pod with command:</p> <pre><code>kubectl run firstpod --image=nginx </code></pre> <p>And everything is fine:</p> <p>[![enter image description here][1]][1]</p> <p>Now I want to go inside the pod with ...
elvis
<p>One error for certain is gitbash adding Windows the path. You can disable that with a double slash:</p> <pre><code>kubectl exec -it firstpod -- //bin/bash </code></pre> <p>This command will only work if you have bash in the image. If you don't, you'll need to pick a different command to run, e.g. <code>/bin/sh</code...
BMitch
<p>I'm trying to understand why sometimes I update a <code>.php</code> in my project it completely rebuilds the image everytime and other times it doesn't seem to do anything. Actually regarding the latter it says <code>Syncing 1 files for ...</code>, but none of my changes are reflected.</p> <p>This is my project str...
cjones
<p>So there are a few issues. First, your wildcards should be <code>**</code> not <code>***</code>. The globbing library used by Skaffold doesn't recognize <code>***</code> and so it treats it as a literal part of the path name. And since you have no directory literally named <code>***</code>, no sync rules are matc...
Brian de Alwis
<p>I followed the instructions in the official repo on installing on kubernetes, however I get a 404 when I try to use the UI. Could anyone tell me what the issue might be?</p> <p>Repo: <a href="https://github.com/apache/incubator-airflow/tree/master/scripts/ci/kubernetes" rel="nofollow noreferrer">https://github.com/...
eamon1234
<p>nevermind... I must have missed the memo that the default username/password is airflow/airflow even though I thought that authenticate was set to False.</p> <p>Solution:</p> <p>Go to localhost:8080/login and enter username/password airflow/airflow.</p>
eamon1234
<p>Hoping that there is some good insight into how to handle orchestration amount microservices in an on prem smaller company environment. Currently, the systems that we are looking to convert from monolithic to microservices like the rest of the world :).</p> <p>The problem I'm having with as an architect, is justify...
gcoleman0828
<p>This comes down to a debate over essential vs accidental complexity. The verdict is in from companies that k8s strikes a good balance vs swarm and other orchestrators are barely talked about in the industry.</p> <p><a href="https://www.reactiveops.com/blog/is-kubernetes-overkill" rel="nofollow noreferrer">https://w...
eamon1234
<p>There are two kubelet nodes and each kubelet node contains several containers including server with wildfly. Even though I do not define containerPort &lt;&gt; hostPort, the management console can be reached with port 9990 from outside. I do not have any clue, why?</p> <pre><code>- name: server image: registry/ser...
m19v
<p>You can expose the port in two places, when you run the container, and when you build the image. Typically you only do the latter since exposing the port is documentation of what ports are likely listening for connections inside the container (it doesn't have any affect on networking).</p> <p>To see if the port was ...
BMitch
<p>I am using GKE with istio add-on enabled. Myapp somehow gives 503 errors using when using websocket. I am starting to think that maybe the websocket is working but the database connection is not and that causes 503's, as the cloudsql-proxy logs give errors:</p> <pre><code>$ kubectl logs myapp-54d6696fb4-bmp5m cloud...
musicformellons
<p>I saw similar errors but was able to get cloudsql-proxy working in my istio cluster on GKE by creating the following service entries (with some help from <a href="https://github.com/istio/istio/issues/6593#issuecomment-420591213" rel="nofollow noreferrer">https://github.com/istio/istio/issues/6593#issuecomment-42059...
gsf
<p>We are starting a project from scratch that will be managed on Google Cloud Services. I'd like to use Google Kubernetes Engine. Our application will have multiple environments (Dev, Staging, Production). Each environment is setup as a new Project on Google Cloud.</p> <p>What is unclear to me is how to parameterize ...
hummmingbear
<p>Helm would work for this, as would kustomize. In the case of helm, you'll have separate values.yaml files (e.g. dev-values.yaml) with e.g.:</p> <pre><code>max-surge: 2 gcr-image-url: project-23456/test </code></pre> <p>And then reference them in the yaml via:</p> <pre><code>{{ .Values.max-surge }} </code></pre> ...
eamon1234
<p>I'm trying to install Kubernetes on CentOS 7.7, therefore, I have to install docker first. I followed <a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker" rel="nofollow noreferrer">Kubernetes Documentation</a> to install docker-ce and modify daemon.json file.</p> <pre><code>$ ...
tan
<p>This error is pointing to an issue forcing docker to use overlay2 without the proper backing filesystem:</p> <pre><code>failed to start daemon: error initializing graphdriver: overlay2: the backing xfs filesystem is formatted without d_type </code></pre> <p>See docker's table for details on backing filesystem requ...
BMitch
<p>I'm using Airflow with kubernetes executor and the <code>KubernetesPodOperator</code>. I have two jobs:</p> <ul> <li>A: Retrieve data from some source up to 100MB</li> <li>B: Analyze the data from A.</li> </ul> <p>In order to be able to share the data between the jobs, I would like to run them on the same pod, and...
matanper
<p>Sorry this isn't possible - one job per pod.</p> <p>You are best to use task 1 to put the data in a well known location (e.g in a cloud bucket) and get it from the second task. Or just combine the two tasks.</p>
eamon1234
<p>I decided to use the rootless version of Buildkit to build and push Docker images to a GCR (Google Container Registry) from within a container in Kubernetes.</p> <p>I stumbled upon this error:</p> <pre><code>/moby.buildkit.v1.Control/Solve returned error: rpc error: code = Unknown desc = failed to solve with fronten...
Diego ROJAS
<p>Rootless requires various preparation steps to be performed on the host (this would need to be done outside of Kubernetes on the VM host running the kubernetes node). See the <a href="https://docs.docker.com/engine/security/rootless/" rel="nofollow noreferrer">rootless documentation</a> for a full list of steps. Not...
BMitch
<p>When I change inside index.js file inside auth directory then skaffold stuck on <strong>watching for changes...</strong> I restarted but every time when I change it stuck</p> <p>Syncing 1 files for test/test-auth:941b197143f22988459a0484809ee213e22b4366264d163fd8419feb07897d99</p> <p>Watching for changes...</p> <pre...
Rishabh Soni
<p>Given the output you included above, I suspect that Skaffold is copying the file across:</p> <blockquote> <pre><code>Syncing 1 files for test/test-&gt; auth:941b197143f22988459a0484809ee213e22b4366264d163fd8419feb07897d99 Watching for changes... </code></pre> </blockquote> <p>but your app is not set up to respond to...
Brian de Alwis
<p>Have a simple program as shown below</p> <pre><code>import pyspark builder = ( pyspark.sql.SparkSession.builder.appName(&quot;MyApp&quot;) .config(&quot;spark.sql.extensions&quot;, &quot;io.delta.sql.DeltaSparkSessionExtension&quot;) .config( &quot;spark.sql.catalog.spark_catalog&quot;, ...
Varun Mallya
<p>Could you try the following <code>Dockerfile</code>:</p> <pre><code>FROM datamechanics/spark:3.1.1-hadoop-3.2.0-java-8-scala-2.12-python-3.8-dm17 USER root WORKDIR /app COPY main.py . </code></pre> <p>And then try deploying the <code>SparkApplication</code>:</p> <pre class="lang-yaml prettyprint-override"><code>apiV...
Benjamin Tan Wei Hao
<p>I've the following docker file which is working for my application. I was able to access to the simple web app server.</p> <pre><code>FROM golang:1.14.7 AS builder RUN go get github.com/go-delve/delve/cmd/dlv RUN mkdir /app ADD . /app WORKDIR /app RUN CGO_ENABLED=0 GOOS=linux go build -gcflags=&quot;all=-N -l&quot;...
PJEM
<p>You need to compile <code>dlv</code> itself with the static linking flags. Without that, <code>dlv</code> will have dynamic links to libc which doesn't exist within an alpine image. Other options include switching your production image to be debian based (<code>FROM debian</code>) or change to golang image to be alp...
BMitch
<p>I am aware of the pros of having multiple containers in one pod but What are the cons of having multiple containers. We have a 20k pod prod requirement and our current infra supports max 900 pods for one namespace.which is best suitable approach to accommodate this request.</p>
Karthik Reddy
<p>I'm not a devops guy, but from developer's perspective:</p> <p>If you have many containers in POD:</p> <ul> <li><p>you should be aware of: lifecycle issues - which container starts first, which ends first, and so forth</p></li> <li><p>how to evaluate the "operability" of a pod as a logical unit. If there is one co...
Mark Bramnik
<p>I've created a Kubernetes job that has now failed. Where can I find the logs to this job?</p> <p>I'm not sure how to find the associated pod (I assume once the job fails it deletes the pod)?</p> <p>Running <code>kubectl describe job</code> does not seem to show any relevant information:</p> <pre><code>Name: ...
Chris Stryczynski
<p>One other approach:</p> <ul> <li><code>kubectl describe job $JOB</code></li> <li>Pod name is shown under "Events"</li> <li><code>kubectl logs $POD</code></li> </ul>
David Thomas
<p>What is the relationship between EXPOSE in the dockerfile and TARGETPORT in the service YAML and actual running port in the Pod ?</p> <p>In my dockerfile</p> <pre><code>expose 8080 </code></pre> <p>in my deployment</p> <pre><code>ports: - containerPort: 8080 </code></pre> <p>In my service</p> <pre><code>apiV...
adrian ding
<p>In the Dockerfile, <code>EXPOSE</code> is documentation by the image creator to those running the image for how they have configured the image. It sets metadata in the image that you can inspect, but otherwise does not impact how docker configures networking between containers. (Many will confuse this for publishing...
BMitch
<p>I am using fabric8 to develop a cluster management layer on top of Kubernetes, and I am confused as to what the 'official' API is to obtain notifications of errors when things go wrong when instantiating pods/rep controllers &amp; services etc. </p> <p>In the section "Pod Deployment Code" I have a stripped dow...
Chris Bedford
<p>I'd suggest you to have a look at events, see <a href="http://kubernetes.io/docs/user-guide/introspection-and-debugging/#example-debugging-pending-pods" rel="nofollow">this topic</a> for some guidance. Generally each object should generate events you can watch and be notified of such errors.</p>
soltysh
<p>Hi I am trying to expose 5 ports for an Informix Container which is within a statefulSet. It has a headless service attached, to allow other internal stateless sets communicate with it internally. </p> <p>I can ping the headless service <code>informix-set-service</code> from my <code>informix-0</code> pod and other...
ryan4j
<p>From the <code>ss</code> output, you are listening on 127.0.0.1, rather than all interfaces:</p> <pre><code>informix@informix-0:/$ ss -lnt State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 0 127.0.0.1:9088 *:...
BMitch
<p>I have a simple cronjob that runs every 10 minutes:</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob metadata: name: myjob spec: schedule: &quot;*/10 * * * *&quot; #every 10 minutes successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 1 jobTemplate: spec: template: spec: ...
ArielB
<p>You could have a one time CronJob trigger the scheduled CronJob:</p> <pre><code>kubectl create job --from=cronjob/&lt;name of cronjob&gt; &lt;name of job&gt; </code></pre> <p><a href="https://www.craftypenguins.net/how-to-trigger-a-kubernetes-cronjob-manually/" rel="nofollow noreferrer">Source</a></p> <p>The one tim...
Gavin
<p>Imagine a scenario in which a producer is producing 100 messages per second, and we're working on a system that consuming messages ASAP matters a lot, even 5 seconds delay might result in a decision not to take care of that message anymore. also, the order of messages does not matter.</p> <p>So I don't want to use a...
behz4d
<p>For your use case, think of partitions = max number of instances of the service consuming data. Don't create extra partitions if you'll have 8 instances. This will have a negative impact if consumers need to be rebalanced and probably won't give you any performace improvement. Also 100 messages/s is very, very littl...
Augusto
<p>I just switched from ForkPool to gevent with concurrency (5) as the pool method for Celery workers running in Kubernetes pods. After the switch I've been getting a non recoverable erro in the worker:</p> <p><code>amqp.exceptions.PreconditionFailed: (0, 0): (406) PRECONDITION_FAILED - delivery acknowledgement on chan...
lowercase00
<p>The accepted answer is the correct answer. However, if you have an existing RabbitMQ server running and do not want to restart it, you can dynamically set the configuration value by running the following command on the RabbitMQ server:</p> <p><code>rabbitmqctl eval 'application:set_env(rabbit, consumer_timeout, 3600...
Sarang
<p>I'm trying to use kubernetes-alpha provider in Terraform, but I have &quot;Failed to construct REST client&quot; error message. I'm using tfk8s to convert my yaml file to terraform code.</p> <p>I make the seme declaration for the provider than kubernetes, and my kubernetes provider work correctely</p> <pre><code>pr...
握草行天下
<p>After some digging, I found that this resource requires a running kubernetes instance and config before the terraform plan will work properly. Best stated in github here: <a href="https://github.com/hashicorp/terraform-provider-kubernetes-alpha/issues/199#issuecomment-832614387" rel="nofollow noreferrer">https://gi...
mccrackend
<p>Istio on Kubernetes injects an Envoy sidecar to run alongside Pods and implement a service mesh, however Istio itself <a href="https://istio.io/docs/tasks/traffic-management/egress/egress-gateway/#additional-security-considerations" rel="nofollow noreferrer">cannot ensure traffic does not bypass this proxy</a>; if t...
dippynark
<p>Envoy is not designed to be used as a firewall. Service meshes that rely on it such as Istio or Cilium only consider it a bug if you can bypass the policies on the receiving end.</p> <p>For example, any pod can trivially bypass any Istio or Cilium policies by terminating its own Envoy with <code>curl localhost:1500...
Shnatsel
<p>In Kubernetes, there is deletionTimestamp to signal an ongoing deletion and there are finalizers to model tasks during the process of deletion. However, it could be, that during the deletion, the specification of a parent object changes in a way that would effective make cancelling the deletion the most desirable so...
Timm Felden
<p>The answer is No,</p> <p>Finalizers are namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion. Finalizers alert controllers to clean up resources the deleted object owned. Documentation is <a href="https://kubernetes.io/docs/concepts/over...
Bijendra
<p>I'm using janusgraph docker image - <a href="https://hub.docker.com/r/janusgraph/janusgraph" rel="nofollow noreferrer">https://hub.docker.com/r/janusgraph/janusgraph</a> In my kubernetes deployment to initialise the remote graph using groovy script mounted to <code>docker-entrypoint-initdb.d</code></p> <p>This works...
Vivek
<p>A <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes" rel="nofollow noreferrer">readinessProbe</a> could be employed here with a command like <code>janusgraph show-config</code> or something similar which will exit with code -1</p> <...
Gavin
<p>I have added <code>pgbouncer-exporter</code> container to my deployment. It is emitting the metrics on port <code>9100</code>. I want to add a scraper for these metrics so that it becomes visible in Prometheus. How can I do it by using Kubernetes <code>ServiceMonitor</code>?</p>
Dev
<p>I'm unfamiliar with <a href="https://github.com/prometheus-community/pgbouncer_exporter" rel="nofollow noreferrer"><code>pgbouncer-exporter</code></a> but the principles are consistent irrespective of technology.</p> <p>You'll need to:</p> <ol> <li>Ensure the <code>pgbouncer_exporter</code>'s port (default <code>912...
DazWilkin
<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/</a> According to the above document in order to use encryption configuration, we need to edit the <code>kube-apiserver.yaml</code> file. But in GCP, ...
Ajinkya16
<p><a href="https://cloud.google.com/secret-manager" rel="nofollow noreferrer">Google Secret Manager(GSM)</a>is GCP’s flagship service for storing, rotation and retrieving secrets. A secret in GSM could be stored in encrypted form. It supports IAM for authentication and fine grained access controls</p> <p><a href="http...
Bijendra
<p>I have a dockerfile with a custom SQL server 2019 installation running a bashscript, which in turn calls another bash script:</p> <pre><code>FROM mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04 ARG BuildConfiguration=Debug USER root # Install Unzip RUN apt-get update \ &amp;&amp; apt-get install unzip -y ...
Marco
<p>The error isn't that bash isn't found, it's that <code>\r</code> isn't found. This indicates you've saved your script with Windows linefeeds and tried to run that script on a Linux platform. From your editor, save the script with Linux linefeeds (LF, not CR-LF). Or you can use a tool like dos2unix to strip the carri...
BMitch
<p>I am discovering Google Cloud Kubernetes being fairly new to the topic. I have created couple of clusters and later deleted them (that is what I thought). When I go to the console I see one new cluster:</p> <p><a href="https://i.stack.imgur.com/aYgFC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com...
fascynacja
<p>This <strong>is</strong> a tad confusing.</p> <p>There are 2 related but <strong>disconnected</strong> &quot;views&quot; of the clusters.</p> <p>The first view is Google Cloud's &quot;view&quot;. This is what you're seeing in Cloud Console. You would see the same (!) details using e.g. <code>gcloud container cluster...
DazWilkin
<p>I need to get all resources based on <strong>label</strong>, I used the following code <strong>which works</strong>, However, it takes <strong>too much time</strong> ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?</p> <pre><code>resource.NewBuil...
PJEM
<p>The search may be heavy due to the sheer size of the resources the query has to search into. Have you looked into this possibility and further reduce the size using one more label or filter on top of current.</p> <p>Also check the performance of you Kubernetes api server when the operation is being performed and opt...
Bijendra
<p>We've just bought a docker hub pro user so that we don't have to worry about pull rate limits.</p> <p>Now, I'm currently having a problem trying to to set the docker hub pro user. Is there a way to set the credentials for hub.docker.com globally?</p> <p>In the kubernetes docs I found following article: <a href="http...
Cédric Voit
<p>Kubernetes implements this using <a href="https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod" rel="nofollow noreferrer">image pull secrets</a>. <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">This doc d...
BMitch
<p>I had a express application and I used this application in my Kubernetes cluster.</p> <p>This application is auth service for my micro service architecture study.</p> <p>I use Skaffold dev command for applying Kubernetes for this app.</p> <p>My Dockerfile is like that:</p> <pre><code>FROM node:alpine WORKDIR /app C...
akasaa
<p>I assume you're either incorrectly specifying your script in the <code>package.json</code> or your script is not <code>server.js</code>.</p> <p>A minimal repro of your question works:</p> <p>Using the Node.JS Getting Started guide's example with one minor tweak: <a href="https://nodejs.org/en/docs/guides/getting-sta...
DazWilkin
<p>I am trying to push my docker image to Google Cloud Registry but get a 509 error say the certificate signed by unknown authority. This never used to be a problem and I can't seem to fix the issue. Any help is appreciated.</p> <p><strong>I'm running</strong> </p> <p><code>docker -- push gcp.io/project/registry</cod...
GrepThis
<p>Update: you have a typo, you need to go to <code>gcr.io</code>, not <code>gcp.io</code>.</p> <hr> <p>[ Original answer ]</p> <p>Looks like a certificate issue on gcp.io:</p> <pre><code>$ openssl s_client -showcerts -connect gcp.io:443 &lt;/dev/null CONNECTED(00000003) ...
BMitch
<p>I am trying to use VSCode Cloud Studio plugin to deploy and debug a project in Kubernetes. When I use intellij and Cloud Studio plugin there, everything works perfect. My MongoDB is persistent with each deployment. When I use VSCode and Cloud Studio there, MongoDB is not persistent anymore. I would appreciate any ti...
MilesDyson
<p>It looks like the Cloud Code for IntelliJ configuration is restricting the deployment to the XYZ module, but not in the Cloud Code for VS Code configuration.</p>
Brian de Alwis
<p>I have a microservice application in one repo that communicates with another service that's managed by another repo. This is not an issue when deploying to cloud, however, when devving locally the other service needs to be deployed too.</p> <p>I've read this documentation: <a href="https://skaffold.dev/docs/design/c...
WIlliam
<p>Profiles can be <a href="https://skaffold.dev/docs/environment/profiles/#activation" rel="nofollow noreferrer">automatically activated</a> based on criteria such as environment variables, kube-context names, and the Skaffold command being run.</p> <p>Profiles are processed after resolving the config dependencies tho...
Brian de Alwis
<p>When I try to create a pod in kubernetes with my image in my Harbor registry,I got an ErrImagePull Error, which looks like that:</p> <pre><code>Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 10s default-scheduler Successf...
karasart
<blockquote> <p>I copied the ca.crt to /etc/docker/certs.d/my.harbor.com/</p> </blockquote> <p>This will make it work for the docker engine, which you've shown.</p> <blockquote> <p>along with my.harbor.cert and my.harbor.com.key</p> </blockquote> <p>I'd consider that a security violation and no longer trust the secret ...
BMitch
<p>I am using the skaffold to run my typescript application with the helm in Kubernetes. Below is my skaffold build configuration.</p> <pre><code>apiVersion: skaffold/v2beta8 kind: Config build: local: push: false tagPolicy: gitCommit: variant: CommitSha prefix: commit- artifacts: - image:...
aryan
<p>In your example, you're using Skaffold's <code>docker</code> builder. Skaffold's file watcher respects the values in the <code>.dockerignore</code> file.</p>
Brian de Alwis
<p>How to add a service_account.json file to kubernetes secrets? I tried</p> <p><code>kubectl create secret generic service_account.json -n sample --from-file=service_account=service_account.json</code></p> <p>but it returns an error failed to create secret Secret &quot;service_account.json&quot; is invalid: metadata.n...
Tony Stark
<p>You can't use <code>service_account.json</code> as the (metadata) name for a Kubernetes resource. Here's the documentation on permitted <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names/" rel="nofollow noreferrer">Object Names and IDs</a></p> <p>You can use:</p> <pre class="lang-sh pre...
DazWilkin
<p>I wanted to give a try to GCP's Anthos On-Premise GKE offering. </p> <p>For sake of my demo I setup a Kubernetes cluster in GCP itself using Google Compute Engine following instructions from (<a href="https://kubernetes.io/docs/setup/production-environment/turnkey/gce/" rel="nofollow noreferrer">https://kubernetes....
kaysush
<p>You're not running Anthos GKE On-Prem, you're running open-source Kubernetes on Google Cloud. Things designed for Anthos - the marketplace and connecting clusters to Cloud Console - are <strong>not supposed to work</strong> in your setup. The fact that they mostly work despite that is an accident (and a testament to...
Shnatsel
<p>I have built some docker images and pushed them to my dockerhub repo. That means that these docker images are also available on my local computer. Here is an example of a public docker image in my repo <a href="https://hub.docker.com/repository/docker/vikash112/pathology/general" rel="nofollow noreferrer">https://hu...
screamingmamba
<blockquote> <p>Because the image is available locally, k8s should not try to download the image</p> </blockquote> <p>Docker and Kubernetes do not share the same image store (with one small exception of Docker Desktop running Kubernetes from there). Therefore you need to push the images to a registry and pull them from...
BMitch
<p>I'm trying to use Skaffold, Dekorate and Spring Boot.</p> <p>I can't find any examples using the new buildpack feature of Spring Boot 2.3+</p> <pre><code>apiVersion: skaffold/v2beta9 kind: Config metadata: name: tellus-upgrade build: artifacts: - image: tellus-admin custom: buildCommand: ./mvnw...
Rod McCutcheon
<p>The <code>spring-boot-maven-plugin:build-image</code> loads the image into your local Docker daemon, but does not push the image. I've never tried it, but you might be able to use the <code>com.spotify:dockerfile-maven-plugin:push</code> goal.</p> <p><em>Update</em>: here's a Skaffold custom build script that shoul...
Brian de Alwis
<pre><code>KUBECONFIG=&quot;$(find ~/.kube/configs/ -type f -exec printf '%s:' '{}' +)&quot; </code></pre> <p>This will construct a config file path for the environment var. I can see the contexts of my clusters and I can switch them. However when I want to get my nodes I get</p> <blockquote> <p>error: You must be logg...
Stephan Kristyn
<p>I suspect you either don't have a <code>current-context</code> set or your <code>current-context</code> points to a non-functioning cluster.</p> <p>If set (or exported) <code>KUBECONFIG</code> can reference a set of config files.</p> <p>The files' content will be merged. I think this is what you're attempting.</p> <...
DazWilkin
<p>I have a SpringBoot project with graceful shutdown configured. Deployed on k8s <code>1.12.7</code> Here are the logs,</p> <pre><code>2019-07-20 10:23:16.180 INFO [service,,,] 1 --- [ Thread-7] com.jay.util.GracefulShutdown : Received shutdown event 2019-07-20 10:23:16.180 INFO [service,,,] 1 --- [ Thread-7] com.jay...
jaks
<p>SIGTERM isn't putting the pod into a terminating state immediately. You can see in the logs your application begins graceful shutdown at 10:23:16.180 and takes >20 seconds to complete. At this point, the container stops and pod can enter the terminating state.</p> <p>As far as kubernetes is concerned the pod looks ...
Eamonn McEvoy
<p>I'm trying to find an optimal way to handle ongoing PostgreSQL transactions during the shutdown of a golang server running on Kubernetes.</p> <p>Does it make sense to wait for transactions to finish, when these transaction are serving requests initiated by a server that has already shutdown? And even if the transact...
Alechko
<p>Why reinventing the wheel and not using some of the existing libraries, that do the magic for you?</p> <p>In our production services, we have used <a href="https://github.com/TV4/graceful" rel="nofollow noreferrer">this graceful shutdown lib</a> a lot and never had issues with it. It waits until all HTTP requests ar...
shadyyx
<p>I am trying to add ingress to my Kubernetes documentation. I was able to add the ingress.yaml file, and there is plenty of documentation on ingress.yaml, but I am using a skaffold.yaml to handle the nitty-gritty of the Kubernetes deployment. And I cannot find any documentation on creating a skaffold file for ingress...
ZanyCactus
<p>Ingress definitions are just Kubernetes Resources, so you just add your <code>ingress.yaml</code> into the manifests to be deployed:</p> <pre><code>deploy: kubectl: manifests: - ./kubernetes-manifests/ingress.yaml - ./kubernetes-manifests/*.service.yaml - ./kubernetes-manifests/*.deployment.yaml </...
Brian de Alwis
<p>I'm currently trying to create a GKE cluster and would like to be able to scale my PostgreSQL pods beyond 1 active instance but I'm getting stuck on the read-write permission of my volume is there a way to get readwritemany to work in GKE autopilot? a hot spare for my PostgreSQL pod would also be helpful if that is ...
Alex Skotner
<p>IIUC you're unable to use Google's (Compute Engine's) Persistent Disks as <code>ReadWriteMany</code>. This may be documented on <a href="https://cloud.google.com" rel="nofollow noreferrer"><code>cloud.google.com</code> </a> but I was unable to find it.</p> <p>See Kubernetes' documentation for <a href="https://kubern...
DazWilkin
<p>If I understand the documentation here correctly...</p> <p><a href="https://skaffold.dev/docs/workflows/debug/#java-and-other-jvm-languages" rel="nofollow noreferrer">Skaffold Debug</a></p> <p>If I try to run K8s Project with 'skaffold debug' or with IntelliJ 'Develop on Kubernetes' and Debug, skaffold must insert i...
posthumecaver
<p>There were some mismatches between the @posthumecaver's Helm chart and the <code>skaffold.yaml</code> that prevented Skaffold from configuring the image. I'll summarize the findings here for the benefit of those who stumble across this post.</p> <p>@posthumecaver is using Skaffold's Helm support. This requires tha...
Brian de Alwis
<p>Been working fine for months and quit working two days ago. Don't recall changing anything in the <code>.yamls</code>. </p> <p>Basically, when I start up the <code>create-react-app</code>, the <code>create-react-app</code> client just starts, fails and restarts.</p> <p>I've tried:</p> <ul> <li>Reverting to a prev...
cjones
<p>This is due to a change in <a href="https://github.com/facebook/create-react-app/" rel="noreferrer">facebook/create-react-app</a>, specifically <a href="https://github.com/facebook/create-react-app/issues/8739" rel="noreferrer">#8739</a> and <a href="https://github.com/facebook/create-react-app/issues/8688" rel="nor...
Brian de Alwis
<p>I would love to list deployments having <code>mongodb</code> environment value along with their phase status. Is there anyway to do so?</p> <p>With this command, I get the deployments name which carries a specific environment value</p> <pre><code>kubectl get deploy -o=custom-columns=&quot;NAME:.metadata.name,SEC:.sp...
titanic
<p>I had a go at a solution using <code>kubectl</code> but was unsuccessful.</p> <p>I suspect (!?) you'll need to use additional tools to parse|process the results to get what you want. Perhaps using <a href="https://stedolan.github.io/jq/" rel="noreferrer"><code>jq</code></a>?</p> <p>For Deployments, you can filter th...
DazWilkin
<p>We are submitting spark job into kubernetes cluster using cluster mode and with some more memory configurations. My job is finishing in about 5 mins but my executor pods are still running after 30 - 40 mins. Due to this the new jobs are pending as the resources are still bound to running pods.</p> <p>Below is spark ...
Rajashekhar Meesala
<p>You need to add</p> <pre><code>sparkSession.stop() </code></pre> <p>at the end of your code</p>
Loic
<p>Currently I am trying to implement CI/CD pipeline using the DevOps automation tools like Jenkins and kubernetes. And I am using these for deploying my micro services creates using spring boot and maven projects.</p> <p>Now I am successfully deployed my spring boot micro services using Jenkins and Kubernetes. I am d...
Mr.DevEng
<p>The method of getting deployment feedback depends on your service and your choice. For example, you can check if the container is up or check one of the rest URL. </p> <p>I use this stage as a final stage to check the service: </p> <pre><code> stage('feedback'){ sleep(time:10,unit:"SECONDS") def...
M-Razavi
<p>I am working on a web application with all the infrastructure based on Kubernetes. In my local environment, I am using Skaffold. I have two computers (Desktop and Laptop) with 8Gb of RAM each. By starting minikube (virtualbox driver) and <code>skaffold dev</code> the Deskop is freezing.</p> <p>So I decided to use th...
Mael Fosso
<p>Minikube uses its own Docker installation to power its cluster. This daemon runs in Minikube's VM (or container, if using the <code>docker</code> driver) and is completely independent from the host's Docker daemon (your Desktop). You can access to Minikube's daemon by setting the environment returned by <code>mini...
Brian de Alwis
<p>I would like to know, how to find service name from the Pod Name in Kubernetes.</p> <p>Can you guys suggest ?</p>
Big Bansal
<p>Services (<code>spec.selector</code>) and Pods (<code>metadata.labels</code>) are bound through shared labels.</p> <p>So, you want to find all Services that include (some) of the Pod's labels.</p> <pre class="lang-sh prettyprint-override"><code>kubectl get services \ --selector=${KEY-1}=${VALUE-1},${KEY-2}=${VALUE-2...
DazWilkin
<p>Is there a way to access existing validation specs? For example, I want to be able to set NodeAffinity on my CRD, and would like to just $ref: . I found the entire API here: <a href="https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/swagger.json" rel="nofollow noreferrer">https://github.com/kuber...
user2896438
<p>There unfortunately isn't a way to do nicely this currently. We solved the problem by writing <a href="https://gist.github.com/danrspencer/f695a22b15b1e4e3b3cae75a7a8a93ec" rel="nofollow noreferrer">a horrible Bash script</a> to rip the definition out of Kubernetes and included it via Helm templating into our CRD.</...
Dan
<p>Until now I developed Python applications locally using docker and docker-compose. Now I'd like to change my development workflow to use <code>skaffold</code> with <code>docker</code> as builder, with <code>kubectl</code> as deployer and with <code>minikube</code> for managing the local kubernetes cluster.</p> <p>Le...
thinwybk
<p>Use Skaffold <a href="https://skaffold.dev/docs/pipeline-stages/port-forwarding/" rel="nofollow noreferrer"><code>--port-forward</code></a> to enable automatic port fowarding of services and user-defined port-forwards.</p> <p>Skaffold normally tries select a local port that is close to the remote port where possible...
Brian de Alwis
<p>I am trying to set a non-default Service Account to the node pool that I am creating.</p> <p>However, every time with the following code, the node pool shows as using the <code>default</code> service account.</p> <pre><code>resource &quot;google_container_node_pool&quot; &quot;node_pool&quot; { ... service_account =...
fuzzi
<p>It's unclear from your question whether your <code>service_account</code> is, as required, part of the <code>node_config</code> which is part of resource.</p> <p>See <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#example-usage---with-a-separately-managed-nod...
DazWilkin
<p>I have mounted one volume which contained username and password inside pod. If I do:</p> <pre><code>kubectl exec -it my-app -- cat /mnt/secrets-store/git-token {&quot;USERNAME&quot;:&quot;usernameofgit&quot;,&quot;PASSWORD&quot;:&quot;dhdhfhehfhel&quot;} </code></pre> <p>I want to read this USERNAME and PASSWORD u...
Chintamani
<p>Assuming:</p> <ul> <li>the file (git_token) format is fixed (JSON).</li> <li>the file may not have an extension suffix (.json).</li> </ul> <p>... we have some Problems!</p> <p>I tried <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.files.importing-extens...
xerx593
<p>I have backend service description in skaffold.yaml similiar this:</p> <pre><code>... deploy: helm: releases: - name: 'myapp-backend' chartPath: myapp-chart-backend values: APP_IMAGE: ... namespace: myapp-ns recreatePods: true ... </code></pre> <p>After cluster is up I hav...
Log
<p>Assuming you know the name in the deployment ('myapp-backend' in this case), you can:</p> <pre><code>kubectl get pods --selector=app=myapp-backend -o jsonpath='{.items[*].metadata.name}' </code></pre> <p><strong>Update</strong></p> <p>Since I obviously don't have an access to your environment, I've rather provide...
Mark Bramnik
<p>We have a custom metric that gets exported only upon some error condition in app</p> <p>Alert rule use that custom metric that gets registered with rule manager of Prometheus</p> <p>Why Prometheus does not raise error, when this metric name is queried? Despite the metric is not available in Prometheus yet...</p>
overexchange
<p>It seems correct that the absence of a signal is not treated as an error.</p> <p>However, it can cause problems with dashboards and alerting.</p> <p>See this presentation by one of Prometheus' creators: <a href="https://promcon.io/2017-munich/slides/best-practices-and-beastly-pitfalls.pdf" rel="nofollow noreferrer">...
DazWilkin
<p>We are taking the step to upgrade our infrastructure setup and are doing some R&amp;D with K8s.</p> <p>We believe k8s is the solution we want to implement, however I've hit a brick wall.</p> <p>I'm really struggling to get k8s to pull an image from a private registry that uses a hostname that does not exist.</p> <p>...
Matt
<p>DNS resolution needs to be setup for each node in your cluster, preferably by updating a common DNS server, but you can also update /etc/hosts on every node in the cluster. Kubernetes and docker pull images from the node and not from within a container, so they won't see the settings applied to things like coredns (...
BMitch
<p>How can I share the Spring cache between replicated microservices in kubernetes? Which technology should I use? The solution should be able to support an high available configuration (e.g.: master/slave; active-active DR and so on).</p> <p>Please provide the spring boot configuration as well if possible.</p>
Fabry
<p>Spring cache has a concept of cache providers - technologies standing behind the caching implementation.</p> <p>By default the cache is implemented in-memory, so its not replicated in any manner. However you can configure it to run, say, with Redis. <a href="https://dzone.com/articles/quickstart-how-to-use-spring-ca...
Mark Bramnik
<p>So I have a kubernetes cronjob object set to run periodically.</p> <pre class="lang-py prettyprint-override"><code>NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE ticketing-job-lifetime-manager 45 */4 * * * False 0 174m 25d </code></pre> <p>and I know ho...
Oliver Williams
<p>The way to think about this is that Kubernetes resources are defined (definitively) by YAML|JSON config files. A useful advantage to having config files is that these can be checked into source control; you automatically audit your work if you create unique files for each resource (for every change).</p> <p>Kubernet...
DazWilkin
<p>I use minikube with Docker driver on Linux. For a manual workflow I can enable registry addon in minikube, push there my images and refer to them in deployment config file simply as <code>localhost:5000/anything</code>. Then they are pulled to a minikube's environment by its Docker daemon and deployments successfull...
b.niki
<p>Skaffold builds directly to Minikube's Docker daemon as an optimization so as to avoid the additional retrieve-and-unpack required when pushing to a registry.</p> <p>I believe your duplicates are like the following:</p> <pre><code>$ (eval $(minikube docker-env); docker images node-example) REPOSITORY TAG ...
Brian de Alwis
<p>I do anything i can. Not in daemon.json,maybe in some docker binary file.</p> <pre><code> # cat /etc/docker/daemon.json { &quot;registry-mirrors&quot;: [ &quot;https://d8b3zdiw.mirror.aliyuncs.com&quot; ], &quot;insecure-registries&quot;: [ &quot;https://ower.site.c...
zhuwei
<p>You are showing an issue with kubernetes, but making your configuration on docker. While these both run containers, they have separate configurations. For configuring the mirroring, it depends on how you run your containers in kubernetes. The most popular runtime being containerd's CRI, which has <a href="https://gi...
BMitch
<p>I have one of my spec files like this</p> <pre class="lang-yaml prettyprint-override"><code> containers: - name: webserver image: PRIVATE_REPO/project/projectname:${TAG} imagePullPolicy: Always ports: - containerPort: 8080 ...
Bharat Ramaswamy Nandakumar
<p>You cannot do this the same way in Kubernetes.</p> <p>Docker Compose permits transformations to be applied to its YAML config files so that you can, for example, replace environment variables with values as you were doing. Essentially, the YAML file you provide to Docker Compose is a template that the tool transform...
DazWilkin
<p>In the <a href="https://skaffold.dev/docs/environment/local-cluster/" rel="nofollow noreferrer">skaffold documentation</a> it says it will auto-detect a local cluster based upon the kubernetes context and, if it is not a local-cluster, it will push to a container repo.</p> <p>I am running skaffold on a Mac, I do not...
Mike Nishizawa
<p>Setting <code>local-cluster: true</code> in your <code>~/.skaffold/config</code> instructs Skaffold to treat that cluster as a local-cluster. When in the <code>global</code> section, Skaffold will treat <em>all</em> clusters as local.</p>
Brian de Alwis
<p>I have a mssql pod that I need to use the <a href="https://github.com/free/sql_exporter" rel="nofollow noreferrer">sql_exporter</a> to export its metrics. I was able to set up this whole thing manually fine:</p> <ol> <li>download the binary</li> <li>install the package</li> <li>run ./sql_exporter on the pod to start...
bZhang
<h5>To answer your question:</h5> <p>This <a href="https://stackoverflow.com/a/49245303/609290">answer</a> should help you. You should (!?) be able to use <code>./sql_exporter &amp;</code> to run the process in the background (when <strong>not</strong> using <code>--stdin --tty</code>). If that doesn't work, you can tr...
DazWilkin
<p>Recently, prometheus-operator has been promoted to stable helm chart (<a href="https://github.com/helm/charts/tree/master/stable/prometheus-operator" rel="noreferrer">https://github.com/helm/charts/tree/master/stable/prometheus-operator</a>). </p> <p>I'd like to understand how to add a custom application to monitor...
andig
<p>Thanks to Peter who showed me that it idea in principle wasn't entirely incorrect I've found the missing link. As a <code>servicemonitor</code> does monitor services (haha), I missed the part of creating a service which isn't part of the gitlab helm chart. Finally this yaml did the trick for me and the metrics appea...
andig
<p>I have the following skaffolding</p> <pre><code>build: tagPolicy: sha256: {} artifacts: - image : sdk context: docker docker: dockerfile: Dockerfile.sdk buildArgs: CONFIGURATION: Debug - image : app context: docker docker: dockerfile: Dockerf...
Rune FS
<p><em>(Aside: It's difficult to help if you don't include your full <code>skaffold.yaml</code> and your <code>Dockerfile</code>s. Just redact pieces that are private.)</em></p> <p>Skaffold &quot;just&quot; orchestrates the builds and has no influence over how the underlying builders resolve images. But Skaffold <em>...
Brian de Alwis
<p>Generally you can use <code>kops get secrets kube --type secret -oplaintext</code>, but I am not running on AWS and am using GCP. </p> <p>I read that <code>kubectl config view</code> should show you this info, but I see no such thing (wondering if this has to do with GCP serviceaccount setup, am also using GKE).</p...
Alexander Kleinhans
<p>Try:</p> <pre class="lang-sh prettyprint-override"><code>gcloud container clusters describe ${CLUSTER} \ --flatten="masterAuth" [--zone=${ZONE}|--region=${REGION} \ --project=${PROJECT} </code></pre> <p>It's possible that your cluster has basic authentication (username|password) <em>disabled</em> as this authentic...
DazWilkin
<p>I understand <code>gcloud</code> uses the Dockerfile specified in the root directory of the source (<code>.</code>) as in the command: <code>gcloud builds submit --tag gcr.io/[PROJECT_ID]/quickstart-image .</code></p> <p>but I am trying to specify the Dockerfile to use to build the image which I have not found any ...
idrisadetunmbi
<p>The only way to specify a Dockerfile (i.e. other than <code>./Dockerfile</code>) would be to create a <code>cloudbuild.yaml</code> per techtabu@. This config could then use the <code>docker</code> builder and provide the specific Dockerfile, i.e.:</p> <pre><code>steps: - name: "gcr.io/cloud-builders/docker" args:...
DazWilkin
<p>I created an Alpine docker image for Nifi 1.14.0 and used that image in stateful-set yaml file for Nifi pods' deployment on Rancher. On running the image locally on my VM, it is running without any errors and generating the HTTPS URL for Nifi UI but when the same image is deployed on Rancher via helm through the sta...
Dolly
<p>Set <code>NIFI_SENSITIVE_PROPS_KEY</code> environment variable. It should be atleast 12 characters. You can see more details how it is used in <a href="https://www.contemplatingdata.com/2017/08/28/apache-nifi-sensitive-properties-need-know/" rel="nofollow noreferrer">this article</a>.</p>
Dakshinamurthy Karra
<p>I have a pod and NodePort service running on GKE.</p> <p>In the Dockerfile for the container in my pod, I'm using <code>gosu</code> to run a command as a specific user:</p> <p>startup.sh</p> <pre><code>exec /usr/local/bin/gosu mytestuser &quot;$@&quot; </code></pre> <p>Dockerfile</p> <pre><code>FROM ${DOCKER_HUB_PUB...
rmf
<p>When you run a useradd inside the container (or as part of the image build), it adds am entry to the <code>/etc/passwd</code> <em>inside the container</em>. The uid/gid will be in a shared namespace with the host, unless you enable user namespaces. However the mapping of those ids to names will be specific to the fi...
BMitch
<p>I want to create some docker images that generates text files. However, since images are pushed to Container Registry in GCP. I am not sure where the files will be generated to when I use kubectl run myImage. If I specify a path in the program, like '/usr/bin/myfiles', would they be downloaded to the VM instance whe...
FranktheTank
<p>Container Registry and Kubernetes are mostly irrelevant to the issue of where a container will persist files it creates.</p> <p>Some process running within a container that generates files will persist the files to the container instance's file system. Exceptions to this are <code>stdout</code> and <code>stderr</co...
DazWilkin
<p>I have created a docker image for the an app in which i am doing a copy of folder to the image like this:</p> <pre><code>COPY extra-addons/ /mnt/extra-addons/pos_item_price/ </code></pre> <p>but when i use that image using kubernetes and go to the /mnt/extra-addons folder</p> <pre><code>$ kubectl --insecure-skip-...
Zeeshan Abbas
<p>I believe the issue you are facing is related to your volume, but not the one defined inside the Dockerfile (even though I personally dislike any volume defined in the Dockerfile because of issues they cause).</p> <p>To explain the issues resulting from the VOLUME in the Dockerfile, you can see the following exampl...
BMitch
<p>I'm using <a href="https://github.com/jenkinsci/kubernetes-plugin" rel="noreferrer">Jenkins Kubernetes Plugin</a> which starts Pods in a Kubernetes Cluster which serve as Jenkins agents. The pods contain 3 containers in order to provide the slave logic, a Docker socket as well as the <code>gcloud</code> command line...
Kalle Richter
<p>Disclaimer, I have a rather limited knowledge of kubernetes, but given the question:</p> <p>Maybe you can run the forth container that exposes one simple endpoint of "liveness" It can run <code>ps -ef</code> or any other way to contact 3 existing containers just to make sure they're alive.</p> <p>This endpoint co...
Mark Bramnik
<p>I create a yaml file to create rabbitmq kubernetes cluster. I can see pods. But when I write kubectl get deployment. I cant see there. I can't access to rabbitmq ui page.</p> <pre><code>apiVersion: v1 kind: Service metadata: labels: app: rabbit name: rabbit spec: ports: - port: 5672 protocol: TCP ...
newUser
<p>@arghya-sadhu's answer is correct.</p> <p><strong>NB</strong> I'm unfamiliar with RabbitMQ but you may need to use a different image (see <a href="https://hub.docker.com/_/rabbitmq" rel="nofollow noreferrer">'Management Plugin`</a>) to include the UI.</p> <p>See below for more details.</p> <p>You should be able t...
DazWilkin
<p>As per <a href="https://docs.docker.com/compose/env-file/" rel="nofollow noreferrer">docker docs</a>, environment variables in .env file expected to be in in key-val format as <code>VAR=VAL</code> which works fine for sample like <code>foo=bar</code> but no mention of unavoidable special characters e.g. '=', which m...
AnilR
<p>I ran a test without any issues:</p> <pre><code>$ cat .env ENV=default USER_NAME=test2 SPECIAL=field=with=equals;and;semi-colons $ cat docker-compose.env.yml version: '2' services: test: image: busybox command: env environment: - SPECIAL $ docker-compose -f docker-compose.env.yml up Creating ...
BMitch
<p>I'm trying to incorporate the <code>kubectl auth can-i</code> <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/auth/cani.go#L236" rel="nofollow noreferrer">logic</a> into my code base, but while the code is working, the results are not what I expect.</p> <p>I have 2 users (<strong>miniku...
GrandVizier
<p>In Kubernetes there's a notion of Kinds and Resources. It's very well explained in <a href="https://stackoverflow.com/questions/52309496/difference-between-kubernetes-objects-and-resources">Difference between Kubernetes Objects and Resources</a> and in <a href="https://github.com/kubernetes/community/blob/master/con...
soltysh
<p>I'd like to create a Google Kubernetes Engine (GKE) alpha cluster and am facing the following problems:</p> <ul> <li>According to the <a href="https://cloud.google.com/kubernetes-engine/docs/release-notes" rel="nofollow noreferrer">release notes</a> the latest alpha version is <code>1.16.6-gke.4</code>, however <co...
Kalle Richter
<p>A good way to "sanity check" things like this is to use the Console and have it show you the equivalent CLI command. I tried to repro your issue and the command the Console produces this:</p> <pre class="lang-sh prettyprint-override"><code>gcloud beta container clusters create ${CLUSTER} \ --project=${PROJECT} \ --...
DazWilkin
<p>With Docker, there is discussion (consensus?) that passing secrets through runtime environment variables is not a good idea because they remain available as a system variable and because they are exposed with docker inspect.</p> <p>In kubernetes, there is a system for handling secrets, but then you are left to eith...
Kyle
<p>Environment variables aren't treated very securely by the OS or applications. Forking a process shares it's full environment with the forked process. Logs and traces often include environment variables. And the environment is visible to the entire application as effectively a global variable.</p> <p>A file can be r...
BMitch
<p>I'm trying to run a docker image once to execute a task using a popular <a href="https://hub.docker.com/r/minio/mc/" rel="nofollow noreferrer">S3 client minio</a> the environment I'm dealing with use Kubernetes.</p> <p>I can get shell access to execute tasks like so:</p> <pre><code>docker run -it minio/mc --restart=...
Deano
<p>This issue arises when container(s) in a Pod run some process(es) that complete. When its containers exit, the Pod completes. It is more common to have container(s) in a Pod that run continuously.</p> <p>A solution to this completing problem is thus to keep the container running:</p> <ol> <li>Run the container in a ...
DazWilkin
<p>So I created EKS Cluster using example given in<br /> <a href="https://github.com/cloudposse/terraform-aws-eks-cluster/tree/master/examples/complete" rel="nofollow noreferrer">Cloudposse eks terraform module</a></p> <p>On top of this, I created AWS S3 and Dynamodb for storing state file and lock file respectively an...
Savan
<p>Generally, it is not recommended to keep your S3 bucket that you use for Terraform's backend state management in the Terraform state itself (for this exact reason). I've seen this explicitly stated in Terraform documentation, but I've been unable to find it in a quick search.</p> <p>What I would do to solve this iss...
Jordan
<p>I am trying to set up <a href="https://cloud.google.com/debugger/docs/setup/go" rel="nofollow noreferrer">Stackdriver debugging</a> using Go. Using the article and this great <a href="https://medium.com/google-cloud/stackdriver-error-reporting-part-2-826f40e00886" rel="nofollow noreferrer">medium post</a> I came up ...
robertson
<p>OK :-)</p> <p>Yes, you should follow the current Stackdriver documentation, e.g. <code>go-cloud-debug-agent</code></p> <p>Unfortunately, there are now various issues with my post including a (currently broken) <code>gcr.io/cloud-builders/kubectl</code> for regions.</p> <p>I think your issue pertains to your use o...
DazWilkin
<p>I created an ubuntu instance on gcloud and installed minikube and all the required dependency in it. Now I can do curl from gnode terminal &quot;curl <a href="http://127.0.0.1:8080/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/%22" rel="nofollow noreferrer">http://127.0.0.1:8080/ap...
vikky
<p>I suspect that minikube binds to the VM's localhost interface making it inaccessible from a remote machine.</p> <p>There may be a way to run minikube such that it binds to <code>0.0.0.0</code> and then you may be able to use it remotely.</p> <p>Alternatively, you can keep the firewall limited to e.g. <code>22</code>...
DazWilkin
<p>I am new with kubernettes. But I have installed ubuntu-server to my raspberry pi and now I am trying to forward the port for the dashboard.</p> <p>I don't have any success, almost nothing happens and I can't see the dashboard in the cluster-info.</p> <p>I tried following command:</p> <pre><code>microk8s kubectl p...
Dasma
<p>Nothing is frozen - the command for port-forward is running in the foreground. If you have setup the service properly with the right port number everything should be working fine.</p> <p>Try running the same as a background process, by adding &amp; at the end.</p> <blockquote> <p><code>microk8s kubectl port-forward ...
Praveen Sripati
<p>I have service A which is a consumer from some queue.</p> <p>I can monitor and count any consumed message, easily with Prometheus :)</p> <pre><code>from prometheus_client import start_http_server, Counter COUNTER_IN_MSGS = Counter('msgs_consumed', 'count consumed messages') start_http_server(8000) while(queue not e...
dev ved
<p>Yes, you should consider using <a href="https://github.com/prometheus/client_python#labels" rel="nofollow noreferrer">labels</a> to disambiguate metrics (e.g. Counters) by instance.</p> <p>You'll need to determine a unique identifier to use.</p> <p>Kubernetes provides a <a href="https://kubernetes.io/docs/tasks/inje...
DazWilkin