Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p><strong>Use case</strong></p>
<p>"I want to deploy elasticsearch + kibana, by using elastic official helm charts. I want to create a helm chart called data-viz with these charts as dependency."</p>
<p>Running <code>helm install data-viz --set cluster=toto</code> must create an elasticsearch cluster "toto", and a k... | Thomas Decaux | <p><strong>TLDR:</strong> Not possible as of now, although there were several attempts to add such functionality that failed all of the committers to the project were unwilling to go through the additional bureaucracy required by the Helm project members.</p>
<p>The <a href="https://github.com/helm/helm/pull/6876" rel=... | VonC |
<p>I would like to setup the AutoDevops functionality of Gitlab CI/CD, and for that I am trying to setup the existing kubernetes cluster as my environment. </p>
<p>However, the Gitlab requires Kubernetes Master API URL that uses to access the Kubernetes API. Kubernetes
exposes several APIs, we want the "base" URL tha... | Chronograph3r | <p>There is now (Sept. 2020) an alternative, but it was not free (GitLab.com Premium/Ultimate only), is free in part in 14.5+ (Nov. 2021). Then fully with 15.3 (Aug. 2022)</p>
<p>See <a href="https://about.gitlab.com/releases/2020/09/22/gitlab-13-4-released/#introducing-the-gitlab-kubernetes-agent" rel="nofollow norefe... | VonC |
<p>I am setting up Github Actions for a project repository. </p>
<p>The workflow consists of the following steps:</p>
<ul>
<li>Building a docker image </li>
<li>Pushing the image to a container registry</li>
<li>Rollout a Kubernetes deployment. </li>
</ul>
<hr>
<p>However, I have two different Kubernetes deployment... | Antoine C. | <blockquote>
<p>Is there a way to trigger a workflow manually in Github Actions?</p>
</blockquote>
<p>You might consider, <a href="https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/" rel="noreferrer">from July2020</a>:</p>
<blockquote>
<h2>GitHub Actions: Manual triggers wit... | VonC |
<p>so basically i changed my website to a new kubernetes cluster. Now it is necessary to enable RBAC. The pipeline runs without any errors but unfortunately the certmanager SSH doesn't work anymore. I installed certmanager with gitlab so now I'm wondering if this could have anything to do with the change to RBAC? Unfor... | user9468014 | <p>Deploy cert-manager to managed cluster for SSL certificates is an issue requested for the past two years (<a href="https://gitlab.com/gitlab-org/gitlab-foss/-/issues/40635" rel="nofollow noreferrer">issue 40635</a>)<br>
<a href="https://gitlab.com/gitlab-org/gitlab/-/issues/29650" rel="nofollow noreferrer">Issue 296... | VonC |
<p>I want to create a deployment with GitHub URL using<br>
<code>kubectl create -f github.com/deployment.yaml</code><br>
That <code>deployment.yaml</code> file is located in my private GitHub repository.<br>
How can I authenticate my kubectl to use my GitHub private repo and create that deployment?</p>
| AATHITH RAJENDRAN | <p>You could simply:</p>
<ul>
<li><a href="https://gist.github.com/Integralist/9482061" rel="nofollow noreferrer">curl the file from the private repo</a></li>
<li><a href="https://unix.stackexchange.com/a/505831/7490">pass its content to kubectl create -f</a></li>
</ul>
<p>That is, from <a href="https://gist.github.c... | VonC |
<p>In the following scenario:</p>
<ol>
<li>Pod X has a toleration for a taint</li>
<li>However node A with such taint does not exists</li>
<li>Pod X get scheduled on a different node B in the meantime</li>
<li>Node A with the proper taint becomes Ready</li>
</ol>
<p>Here, Kubernetes does not trigger an automatic resc... | Arkon | <p>Natively, probably not, unless you:</p>
<ul>
<li>change the taint of <code>nodeB</code> to <code>NoExecute</code> (it probably already was set) :</li>
</ul>
<blockquote>
<p>NoExecute - the pod will be evicted from the node (if it is already running on the node), and will not be scheduled onto the node (if it is not ... | VonC |
<p>I am using cloud build and GKE k8s cluster and i have setup CI/CD from github to cloud build.</p>
<p>I want to know is it good to add CI build file and Dockerfile in the repository or manage config file separately in another repository? </p>
<p>Is it good to add Ci & k8s config files with business logic reposi... | Harsh Manvar | <p>Yes, you can add deployment directives, typically in a dedicated folder of your project, which can in turn use a cicd repository</p>
<p>See "<a href="https://github.com/kelseyhightower/pipeline-application" rel="nofollow noreferrer"><code>kelseyhightower/pipeline-application</code></a>" as an example, where:</p>
<... | VonC |
<p>I have an app running with Docker and the .git directory is ignored to reduced the project's size.</p>
<p>The problem is that every time an artisan command is ran this message is displayed and stored inside the logs of Kubernetes. Moreover, in some cases is the reason why some kubernetes tasks cannot reach the HEAL... | Jorge | <p><a href="https://github.com/monicahq/monica/pull/950" rel="noreferrer">monicahq/monica PR 950</a> is an example of a workaround where the Sentry configuration is modified to test for the presence of the Git repository, ensuring <code>php artisan config:cache</code> is run only once.</p>
<pre><code>// capture releas... | VonC |
<p>I'm using Docker to create a container application and then deploy it to <a href="https://cloud.google.com/kubernetes-engine/" rel="noreferrer">kubernetes engine</a> but when the application is been initialized I get this error: </p>
<pre><code>err: open C:\Go/lib/time/zoneinfo.zip: no such file or directory
</code... | John Balvin Arias | <p>You might consider building your Go application <a href="https://golang.org/doc/go1.15#time/tzdata" rel="nofollow noreferrer">with Go 1.15</a> (August 2020, two years later)</p>
<blockquote>
<h2>New embedded tzdata package</h2>
</blockquote>
<blockquote>
<p>Go 1.15 includes a new package, <a href="https://golang.org... | VonC |
<p>I am tasked with building a new relic chart to show gitlab runner job count over time.
I am trying to determine what type of object is a gitlab runner job. Is is a deployment, a pod or a statefulset?</p>
<p>Any assistance with being able to visualize gitlab runner pods in new relic would be appreciated.</p>
| Kingsley Okoro | <p>As mentioned in "<a href="https://docs.gitlab.com/runner/executors/kubernetes.html" rel="nofollow noreferrer">Kubernetes executor for GitLab Runner</a>":</p>
<blockquote>
<p>The Kubernetes executor, when used with GitLab CI, connects to the Kubernetes API in the cluster creating <strong>a Pod for each GitL... | VonC |
<p>I use the command <code>docker container update --cpus 1 target_container</code> to update the setting. But in most cases it not working and response "you must provide one or more flags when using this command", but somethings it working</p>
<p>Any one know the reason?</p>
<p>Some log is like,</p>
<pre><code>$ do... | bran | <p>The <a href="https://docs.docker.com/engine/reference/commandline/update/" rel="nofollow noreferrer">docker update</a> man page includes:</p>
<pre><code>--cpus API 1.29+
</code></pre>
<p>A <code>docker version</code> can show you if your API is equal or above <a href="https://docs.docker.com/engine/api/v1.29/... | VonC |
<p>We have a Keycloak 15.1.1 deployment on Kubernetes with multiple replicas with the AWS RDS Postgres 13 Database backend. I did not find any upgrade guide or experience of other people regarding this setup or even with Kubernetes with Postgres using PVC upgrading Keycloak with multiple major version changes.</p>
<p>D... | Sirish | <p>I got the answer from the Keycloak GitHub support forums <a href="https://github.com/keycloak/keycloak/discussions/14682" rel="nofollow noreferrer">https://github.com/keycloak/keycloak/discussions/14682</a>.</p>
<p>Running kc.sh start automatically upgrades the DB on first install, and the first container running th... | Sirish |
<p>I'm running a Ruby app on Kubernetes with Minikube. </p>
<p>However, whenever I look at the logs I don't see the output I would have seen in my terminal when running the app locally.</p>
<p>I presume it's because it only shows stderr?</p>
<p>What can I do to see all types of console logs (e.g. from <code>puts</co... | userMod2 | <p>As shown in this article, <code>kubectl logs pod apod</code> should show you stdout and stderr for a pod deployed in a minikube.</p>
<blockquote>
<p>By default in Kubernetes, Docker is configured to write a container's stdout and stderr to a file under /var/log/containers on the host system</p>
</blockquote>
<p>... | VonC |
<p>Are the resources released once the kube job is finished?</p>
<p>I mean the associated pod resources, let say a job is run to completion and the associated pod is in a completed state, which was allocated 0.5 CPU, is the 0.5cpu released after the job is finished?</p>
<p>or is it released only after deleting the jo... | Coding Ninja | <p>A <strong><a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase" rel="nofollow noreferrer">pod phase</a></strong> does not include "completed": you only have "Succeeded":</p>
<blockquote>
<p>All Containers in the Pod have terminated in success, and will not be restarted."</p>
</bloc... | VonC |
<p>I have a Kafka cluster that is running on K8S. I am using the confluent kafka image as and I have an EXTERNAL listeners that is working.
How can I add SSL encryption? Should I use an ingress? Where can I find good documentation?
Thank you</p>
| CMPE | <p>You have a <a href="https://gist.github.com/aramalipoor/f62355cd440584986bfd91bd69e52c49#file-0-readme-md" rel="noreferrer">manual way in this gist</a>, which does not use the confluent image.</p>
<p>But for <a href="https://github.com/confluentinc/cp-helm-charts" rel="noreferrer">Confluent and its Helm chart</a> (... | VonC |
<p>I am creating k8s cluster from digital ocean but every time I am getting same warning after I create cluster and open that cluster in lens ID.</p>
<p>Here is the screenshot of warning:</p>
<p><a href="https://i.stack.imgur.com/6lZvD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6lZvD.png" alt="s... | unknown | <p>Check first if <a href="https://github.com/k3s-io/k3s/issues/1857#issuecomment-950154218" rel="noreferrer"><code>k3s-io/k3s</code> issue 1857</a> could help:</p>
<blockquote>
<p>I was getting the same error when I installed kubernetes cluster via <code>kubeadm</code>.</p>
<p>After reading all the comments on the sub... | VonC |
<p>I want to access my Kubernetes cluster API in Go to run <code>kubectl</code> command to get available namespaces in my k8s cluster which is running on google cloud.</p>
<p>My sole purpose is to get namespaces available in my cluster by running <code>kubectl</code> command: kindly let me know if there is any alterna... | MSA | <p>You can start with <a href="https://github.com/kubernetes/client-go" rel="nofollow noreferrer"><code>kubernetes/client-go</code></a>, the Go client for Kubernetes, made for talking to a kubernetes cluster. (not through kubectl though: directly through the Kubernetes API)</p>
<p>It includes a <a href="https://github... | VonC |
<p>I'm trying to start minikube on ubuntu 18.04 inside nginx proxy manager docker network in order to setup some kubernetes services and manage the domain names and the proxy hosts in the nginx proxy manager platform.</p>
<p>so I have <code>nginxproxymanager_default</code> docker network and when I run <code>minikube s... | dazzed | <p>A similar error was reported with <a href="https://github.com/kubernetes/minikube/issues/12894" rel="nofollow noreferrer">kubernetes/minikube issue 12894</a></p>
<blockquote>
<p>please check whether there are other services using that IP address, and try starting minikube again.</p>
</blockquote>
<p>Considering <a h... | VonC |
<p>When I try to run a container in the cluster, I get a message "<code>deployment test created</code>" but when I look at the dashboard I can see that its in an error state (<code>Failed to pull image...</code>, it was not able to pull the image from the local minikube docker env due to authorization issues</p>
<p>My... | Tim Jarvis | <p>As discussed in the comments, <code>openfaas/faas-netes</code> issue 135 illustrates a similar issue, and mention as a possible solution:</p>
<blockquote>
<p><code>imagePullPolicy</code> if not mentioned should have defaulted to <code>Never</code> instead of <code>Always</code>.</p>
</blockquote>
<p>The <a href=... | VonC |
<p>I have installed a K8S cluster on laptop using Kubeadm and VirtualBox. It seems a bit odd that the cluster has to be up and running to see the documentation as shown below.</p>
<pre><code>praveensripati@praveen-ubuntu:~$ kubectl explain pods
Unable to connect to the server: dial tcp 192.168.0.31:6443: connect: no r... | Praveen Sripati | <p>See "<a href="https://blog.heptio.com/kubectl-explain-heptioprotip-ee883992a243" rel="nofollow noreferrer">kubectl explain — #HeptioProTip</a>"</p>
<blockquote>
<p>Behind the scenes, <strong><code>kubectl</code> just made an API request to my Kubernetes cluster</strong>, grabbed the current Swagger documen... | VonC |
<p>I am using <code>launcher.gcr.io/google/jenkins2</code> to run jenkins in gcp kubernetes engine.</p>
<p>Everything seems ok except that I get <code>Could not initialize class org.jfree.chart.JFreeChart</code> error for every chart that jenkins attempt to draw. I googled the error and almost everyone solves that wit... | gsf | <p>One other possible solution/workaround is seen in <a href="https://issues.jenkins-ci.org/browse/JENKINS-39636" rel="nofollow noreferrer">JENKINS issue 39636</a>:</p>
<blockquote>
<p>I installed <code>libxext6 libxrender1 fontconfig libfontconfig</code> but it didn't help. After that I also installed <code>libjfreech... | VonC |
<p>With k3d, I am receiving a DNS error when the pod tries to access a URL over the internet.</p>
<pre><code>ERROR:
getaddrinfo EAI_AGAIN DNS could not be resolved
</code></pre>
<p>How can I get past this error?</p>
| Khushaboo Shandilya | <p>It depends on your context, OS, version.</p>
<p>For instance, you will see various proxy issue in <a href="https://github.com/k3d-io/k3d/issues/209" rel="nofollow noreferrer"><code>k3d-io/k3d</code> issue 209</a></p>
<p>this could be related to the way k3d creates the docker network.</p>
<blockquote>
<p>Indeed, k3d ... | VonC |
<p>I am going to start with an example. Say I have an AKS cluster with three nodes. Each of these nodes runs a set of pods, let's say 5 pods. That's 15 pods running on my cluster in total, 5 pods per node, 3 nodes.</p>
<p>Now let's say that my nodes are not fully utilized at all and I decide to scale down to 2 nodes i... | Rodi | <p>Assuming you are using Kubernetes deployments (or replica sets) then it should do this for you. Your deployment is configured with a set number of replicas to create for each pod when you remove a node the scheduler will see that the current active number is less than the desired number and create new ones.</p>
<p>... | Sam Cogan |
<p>I am trying to find a DB (object storage) for my application. The application is really a wrapper over ISTIO Network Routing API. Basically simplifying the ISTIO configuratin for my network. Kubernetes (k8s) Custom Resource Definition (CRD) seems to fit my requirements. Also love the watch and REST API capability pr... | Jay Rajput | <p>Considering that (<a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/" rel="nofollow noreferrer">CRD page</a>)</p>
<ul>
<li><p>A resource is an endpoint in the <strong>Kubernetes API</strong> that stores a collection of API objects of a certain kind. For example, the built... | VonC |
<p>I have a kibana running inside docker container in k8s. And I put a nginx as sidecar to forward all traffic to kibana based on path.</p>
<p>Below is my nginx configuration. It works fine for elasticsearch. But when I open <code>/kibana/</code> in browser, it redirects to <code>/spaces/enter</code> and shows <code>40... | Joey Yi Zhao | <p><a href="https://github.com/elastic/kibana/pull/66098" rel="nofollow noreferrer"><code>elastic/kibana</code> PR 66098</a> mentions that the <code>/spaces/enter</code> view is used by the space selector UIs to send users to the appropriate default route.</p>
<p>And <a href="https://github.com/elastic/kibana/pull/446... | VonC |
<p>Im having k8s controller which needs to install some resources and update the status and condition accordantly</p>
<p>The flow in the reconcile is like following:</p>
<ol>
<li>Install the resource and don’t wait</li>
<li>Call to the function <code>checkAvailability</code> and update the status accordantly if ready/ ... | PJEM | <p>To your questions:</p>
<ol>
<li><p>This is the first time that I use status and conditions, is it right way or do I miss something?</p>
<p>Your approach to managing the status and conditions of Kubernetes resources is generally fine. The <a href="https://book-v1.book.kubebuilder.io/basics/status_subresource.html" re... | VonC |
<p>I can create config map from a property file and use the same config files inside the POD. However, I don't want to use the configmap created in past and supplied with the helmchart. Rather in the helmchart values.yaml i want to provide a file name from where the config map will be created dynamically ..</p>
<p>Any... | Tutai Kumar Dalal | <p>See if the approach described in <a href="https://github.com/kubernetes/charts/issues/1310" rel="nofollow noreferrer">kubernetes/charts issue 1310</a> works for you.</p>
<blockquote>
<p>I suggest that we allow for overriding the name of the <code>ConfigMap</code> that gets mounted to the persistent volume.<br>
... | VonC |
<p>my problem is that I need to increase NATS max_payload in production environment but it uses Kubernetes and I have no idea how to do that, I tried to use ConfigMap but I had not success.</p>
<p>In local/dev environment it uses a NATS config file with docker so it works fine.</p>
<p>Way to make it works local: <a hre... | Matheus Chignolli | <p>I would recommend using these <a href="https://github.com/nats-io/k8s/tree/master/helm/charts/nats#limits" rel="nofollow noreferrer">NATS Helm charts</a> and then use something like the following:</p>
<pre class="lang-yaml prettyprint-override"><code>nats:
limits:
maxPayload: "5mb"
</code></pre>
<p>Y... | wallyqs |
<p>How can I issue a <code>kubectl run</code> that pulls an environment var from a k8s secret configmap?</p>
<p>Currently I have:</p>
<p><code>kubectl run oneoff -i --rm NAME --image=IMAGE --env SECRET=foo
</code></p>
| Alex Flint | <p>Look into the <code>overrides</code> flag of the <code>run</code> command... it reads as:</p>
<blockquote>
<p>An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.</p>
</blockquote>
<p><a href... | Charlino |
<p>I have a single kubernetes service called MyServices which hold four deployments. Each deployment is running as a single pod and each pod has its own port number.</p>
<p><a href="https://i.stack.imgur.com/zSOKs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zSOKs.png" alt="enter image descriptio... | Benjamin | <p>There is a way to <a href="https://stackoverflow.com/a/39260160/6309">discover all the port of Kubernetes services</a>.</p>
<p>So you could consider using <code>kubectl get svc</code>, as seen in "<a href="https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-type-nodeport" rel="nofol... | VonC |
<p>I'm trying to access .NET Web API which I docker-ized and mounted in an Kubernet Cluster on Microsoft Azure.</p>
<p>The application works fine on local docker machine.
The cluster is running, my deployment was correct and the pods where created. Everything I check is fine, but I cannot access my application through... | ericpap | <p>I would give the deployment/pods port a name (e.g. <code>http</code>) and then make the service serve off port 80 but target the pod port by name... that way you don't have to worry about port numbers when connecting to a service.</p>
<p>Also, you shouldn't need or want to use <code>nodePort</code> if you are using... | Charlino |
<p>I just started working with ArgoCD and I have an issue I can't find the answer for.</p>
<p>I have a file called <code>clusters.yaml</code> in my Git repo:</p>
<pre><code>clusters:
- name: cluster1-eu-k8s-002
url: https://cluster1.hcp.northeurope.azmk8s.io:443
values:
nameOverride: ReplaceWithThis
</code></p... | Bogdan993 | <p>In the <a href="https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/" rel="nofollow noreferrer">Argo CD <code>ApplicationSet</code> controller</a>, you are using <code>{{ index .Clusters.values "nameOverride" }}</code> to access the <code>nameOverride</code> value. However, <code>Clusters</... | VonC |
<p>I am experiencing an issue using the helm_release resource in Terraform.</p>
<p>I basically deployed a <code>kube-prometheus-stack</code> that includes many k8s resources and that works smoothly.</p>
<p>The problem arose when I tried to destroy (or remove) this part, since Helm does not delete all resources (it prob... | Bertone | <p>In you need to solve this problem directly from Terraform, you could consider using a <a href="https://developer.hashicorp.com/terraform/language/resources/provisioners/null_resource" rel="nofollow noreferrer"><code>null_resource</code></a> with a <a href="https://developer.hashicorp.com/terraform/language/resources... | VonC |
<p>What setting up a new Kubernetes endpoint and clicking "Verify Connection" the error message:
"The Kubconfig does not contain user field. Please check the kubeconfig. " - is always displayed. </p>
<p>Have tried multiple ways of outputting the config file to no avail. I've also copy and pasted many sample config fil... | SteveP | <p>This is followed by <a href="https://github.com/TsuyoshiUshio/KubernetesTask/issues/35" rel="nofollow noreferrer">TsuyoshiUshio/KubernetesTask issue 35</a></p>
<blockquote>
<p>I try to reproduce, however, I can't do it.<br>
I'm not sure, however, I can guess it might the mismatch of the version of the cluster/k... | VonC |
<p>Is it possible to get a list of pods that are Running on matser from kubectl?</p>
<p>i have tried this </p>
<pre><code>kubectl get pods -o wide --sort-by="{.spec.nodeName}"
</code></pre>
<p>but this doesnt say whether the node is master or worker</p>
| shiv455 | <p>As mentioned in <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/" rel="nofollow noreferrer">the overview</a>:</p>
<blockquote>
<p>A Pod always runs on a <strong><a href="https://kubernetes.io/docs/concepts/architecture/nodes/" rel="nofollow noreferrer">Node</a></strong>.<br>
... | VonC |
<p>As per k8s docs:</p>
<p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy</a></p>
<blockquote>
<p>Note: If your job has restartPolicy = "OnFailure... | lGSMl | <blockquote>
<ol>
<li>If I understand correctly backoff count increments with failed Pod only, not failed container.</li>
</ol>
</blockquote>
<p>Yes, the backoff count increments only with a failed Pod, not with a failed container. If the container fails but the Pod is healthy (e.g., node issues), then with <code>resta... | VonC |
<p>I want to configure Jenkins sever to execute commands into Kubernetes. I created token using:</p>
<pre><code>kubectl create sa cicd
kubectl get sa,secret
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: cicd
spec:
serviceAccount: cicd
containers:
- image: nginx
name: cicd
... | Peter Penzov | <p>I would first check the Subject Alternative Name (SAN) details of a certificate using OpenSSL:</p>
<pre class="lang-bash prettyprint-override"><code>openssl s_client -connect 10.0.0.x:6443 -showcerts </dev/null 2>/dev/null | \
openssl x509 -text -noout | \
awk '/X509v3 Subject Alternative Name:/{flag=1; next} ... | VonC |
<p>I am using Kubernetes and Google Cloud to host my web application
and was looking for a way to increase the time for waiting for the server response before returning the error
<code>Internal server error Sorry, there seems to be an error. Please try again soon.</code>
I tried to search for the Kubernetes objects but... | ladhari | <p>If I understand correctly, you have a Django application hosted on a Kubernetes cluster, which is managed on Google Cloud.</p>
<p>There are still missing pieces, though:</p>
<ul>
<li>the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/" rel="nofollow noreferrer">Kubernetes Ingres... | VonC |
<p>I am trying to set up conditions in the bash script that will make sure if the file exists skip the entire code and go to the next part</p>
<p>'''</p>
<pre><code> echo "k8s: starting the init script"
if [ ! -e /etc/sawtooth/keys/validator.priv ]; then
echo $pbft0pri... | Swapnil Deshmukh | <p>Your problem is in line 27:</p>
<pre><code>fi && \
</code></pre>
<p>That <code>&& \</code> doesn't belong there. It's the last <code>if</code> in the block, so you shouldn't put <code>&&</code> there since there are no commands afterwards.</p>
<pre class="lang-bash prettyprint-override"><code... | FelipeC |
<p>How does pods get unique IP addresses even if they reside in the same worker node?</p>
<p>Also pod is not a device what is logic behind having it an IP address?<br>
Is the IP address assigned to a pod a virtual IP? </p>
| unmesh_swar | <p>A <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/" rel="noreferrer">pod</a> is part of a cluster (group of nodes), and <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/" rel="noreferrer">cluster networking</a> tells you that:</p>
<blockquote>
<p>In reality, Kubernete... | VonC |
<p>The Istio ingress gateway exposes the following ports by default:</p>
<pre><code>80:31380/TCP,443:31390/TCP,31400:31400/TCP
</code></pre>
<p>Why does it expose 31400 and map it to 31400? I can't find an explanation of this in the docs or elsewhere.</p>
<p><strong>Background:</strong> I'm following the <a href="ht... | nzkeith | <p><a href="https://github.com/istio/istio/commit/a4b6cc55dd2066f6c2bbe8fdf6d39657f44f444e" rel="noreferrer">Commit a4b6cc5</a> mentions:</p>
<blockquote>
<p>Adding the 31400 port back because of testdata dependency</p>
</blockquote>
<p>This is part of <a href="https://github.com/istio/istio/pull/6350" rel="norefer... | VonC |
<h1>Question</h1>
<p>Given this single-line string:</p>
<pre><code>PG_USER=postgres PG_PORT=1234 PG_PASS=icontain=and*symbols
</code></pre>
<p>What would be the right way to assign each value to its designated variable so that I can use it afterward?</p>
<hr />
<h1>Context</h1>
<p>I'm parsing the context of a k8s secre... | payne | <p>The bash <code>declare</code> command is appropriate here, and is safer than <code>eval</code>.</p>
<p>Suppose the input contains something potentially malicious</p>
<pre class="lang-sh prettyprint-override"><code>line='PG_USER=postgres PG_PORT=1234 PG_PASS=icontain=and*symbols`ls`'
</code></pre>
<p>I'm assuming non... | glenn jackman |
<p>Assuming I have a Kubernetes Deployment object with the <code>Recreate</code> strategy and I update the Deployment with a new container image version. Kubernetes will:</p>
<ol>
<li>scale down/kill the existing Pods of the Deployment,</li>
<li>create the new Pods,</li>
<li>which will pull the new container images</li... | Fabian Schmied | <p>Implement a "blue-green" deployment strategy. For instance, the service might be running and active in the "blue" state. A new deployment is created with a new container image, which deploys the "green" pods with the new container image. When all of the "green" pods are read... | David M. Karr |
<p>My pod can't be created because of the following problem:</p>
<pre><code>Failed to pull image "europe-west3-docker.pkg.dev/<PROJECT_ID>/<REPO_NAME>/my-app:1.0.0": rpc error: code = Unknown desc = Error response from daemon: Get https://europe-west3-docker.pkg.dev/v2/<PROJECT_ID>/<REPO_... | berserk23 | <p>I encountered the same problem, and was able to get it working by executing:</p>
<pre class="lang-sh prettyprint-override"><code>gcloud projects add-iam-policy-binding ${PROJECT} \
--member=serviceAccount:${EMAIL} \
--role=roles/artifactregistry.reader
</code></pre>
<p>with <code>${PROJECT}</code> = the project name... | JW. |
<p>Most of my images that I deploy into Kubernetes has the common base (From) image. So, I have multiple applications deployed into multiple pods. How does the Docker layer cache work across multiple pods, as the From image is same for all the pods?</p>
| user1578872 | <p>See "<a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#how-pods-manage-multiple-containers" rel="noreferrer">How Pods manage multiple Containers</a>"</p>
<blockquote>
<p>Pods are designed to support multiple cooperating processes (as containers) that form a cohesive unit of service.<br>
... | VonC |
<p>I have a Postgres pod which has a mounted volume:</p>
<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
name: postgres-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 100M
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
---
apiVersion: v1
kind: ... | beatrice | <p>I just had a similar situation. It turned out that I had a typo in my <code>initdb.sh</code> script. This results in PG starting, failing to apply the script and crashing. This causes the container to restart, and the next time, PG skips the script.</p>
<p>I finally figured it out because the pod was showing <code>r... | Roger Lipscombe |
<p>For example, a defer function is implemented within a webhook's logic (the webhook is written in Golang). The webhook times out after taking too long to complete. In this case, will the defer function still get executed?</p>
<p>The request timeout is set via <a href="https://pkg.go.dev/context#WithTimeout" rel="nofo... | jtee | <p>It's usually a good idea to clearly mention what programming language you're talking about, although I can figure it out.</p>
<p>In Go, the defer functor (whatever you want to call it) will be executed when the method returns, no matter how it completes, unless you manage to kill the executing process in a drastic m... | David M. Karr |
<p>I understand that blue-green deployment means having two versions of production code deployed. It allows us to test in production.</p>
<p>Assume that we have an e-commerce application, and both deployments are sharing a database.
Then someone testing the green deployment makes a purchase. This purchase will be recor... | AAV | <p>I'm not sure what resources you're looking at, but at least in our organization, using Kubernetes, blue-green deployments are not used for "canary testing", which is what you're referring to. Blue-green deployments are used to facilitate smooth deployment switches. During the process of deployment, the e... | David M. Karr |
<p>I am deploying a Spring boot application to Kubernetes. My Docker file is as follows.</p>
<pre><code>FROM alpine-jdk1.8:latest
RUN mkdir -p /ext/app
COPY target/app-service.war /ext/app
ENV JAVA_OPTS="" \
APPLICATION_ARGS=""
CMD java ${JAVA_OPTS} -jar /ext/app/app-service.war ${APPLICATIO... | user1578872 | <p>That is a good approach for secrets, but less so <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">for configMaps</a>.</p>
<p>If your war application can rely on environment variable, a possible approach is to convert that configMap into an rc file... | VonC |
<p>Has someone experience in debugging .NET 6 F# code running in a service-less deployment/pod inside a kubernetes cluster in AKS with Visual Studio (ideally 2022)?</p>
<p>Bridge to Kubernetes is not available for VS 2022, and the VS2019 (and VS code) seems to require a service and an http access. In my case, I have mi... | Franco Tiveron | <p>My experience with this sort of thing is with Java applications, but I assume it would be similar for this platform. This would typically be done with a "port-forward", described on this page: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel... | David M. Karr |
<p>I have a micro service written using <code>Java EE + Openliberty</code>. I have deployed this into <code>kubernetes</code> in my <code>Docker-Desktop</code>. I want to know, is there any way to debug this deployed service? I am using <code>Eclipse</code>. Please let me know how can I debug deployed service. Thank yo... | Randi | <p>I heartily endorse looking at telepresence. I don't use it for real yet, but I've verified it will be very useful in our enterprise once we get some pieces in place.</p>
<p>However, I don't believe you need that complication for your simpler situation. Telepresence will be very nice for injecting NEW code into a ... | David M. Karr |
<p>How do I get the current namespace of a deployment/service using the kubernetes client-go API? It doesn't seem to be in the client object or in the config.</p>
| gkgkgkgk | <p>Using</p>
<pre><code>ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
</code></pre>
<p>works but is ugly, when the desired implementation is present in the <code>Namespace()</code> method of <code>inClusterClientConfig</code>. But how would you get that object starting from <code>rest.In... | Jesse Glick |
<p>I have a AWS <strong>LoadBalancer</strong> which created using <code>Kube</code>, <code>Kops</code> and <code>AWS</code>.
protocl type for the <strong>ELB</strong> is <strong>tcp</strong>. this work fine for <code>http</code> requests, means I can access my site with <strong><a href="http://testing.example.com" rel=... | Marlon Brando aka Ben | <p>In the Listener configuration, you are forwarding the default HTTP port <code>80</code> to port <code>30987</code> on the back-end server. So this tells me that the back-end server is listening for HTTP requests on port <code>30987</code>.</p>
<p>You then added an SSL listener on the default port <code>443</code> b... | Mark B |
<p>I need to move my filebeat to other namespace, but I must keep registry , I mean that:</p>
<pre><code> # data folder stores a registry of read status for all files, so we don't send everything again on a Filebeat pod restart
- name: data
hostPath:
path: /var/lib/filebeat-data
type: ... | user3740179 | <p>Just to check my assumptions:</p>
<ul>
<li>filebeat is a a DaemonSet</li>
<li>When you start it up in the new Namespace, you want to keep the registry</li>
<li>You're happy to keep the on-disk path the same</li>
</ul>
<p>Because the <code>data</code> folder is mounted from the host directly - if you apply the same D... | Mike Bryant |
<p>I wrote a script that checks the kubernetes pods and in case of hanging it must write pod logs and delete it. Kube master is on another server and I try to connect to it by ssh. It's working good when I try to start script locally on kube master server, but when I try to enter the same command as ssh argument, I get... | Deekly | <p>Your <code>kube_reload.py</code> script writes its logs to its current working directory:</p>
<pre><code>with open (f'{arg}.log', 'w') as log:
...
</code></pre>
<p>When you're running kube_reload.py interactively, you're running it from this "deekly" directory, so "deekly" is the process's workin... | Kenster |
<p><strong>Scenario:</strong></p>
<p>I need to build a web-app, from which I can run/sop/delete/etc. containers in a cluster. So I installed <code>Kubernetes</code> and tested the API from the console. Everything seems working and looks fine. </p>
<p>Following the Docs, they write about Docker, but do I need it neces... | Adolf H | <p>Technically, you need a <em>container runtime</em> which respects <a href="https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/" rel="noreferrer">CRI (Container Runtime Interface)</a>.</p>
<p><a href="https://i.stack.imgur.com/Z7aPG.png" rel="noreferrer"><img src="https://i.stack.imgur.c... | VonC |
<p>I have a microservice deployed in a Tomcat container/pod. There are four different files generated in the container - access.log, tomcat.log, catalina.out and application.log (log4j output). What is the best approach to send these logs to Elasticsearch (or similar platform). </p>
<p>I read through the information o... | dsatish | <p>Yes, the best option for your use case is to have to have one <code>tail -f</code> sidecar per log file and then install either a <code>fluentd</code> or a <code>fluent-bit</code> daemonset that will handle shipping and enriching the log events. </p>
<p>The <a href="https://github.com/kubernetes/kubernetes/tree/ma... | coffeepac |
<p>I'd like to confirm information of the authenticated user and assigned role and assigned cluster role. How can I do it?</p>
| kawty | <blockquote>
<p>information of the authenticated user</p>
</blockquote>
<p>When you see <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts" rel="nofollow noreferrer">Define clusters, users, and contexts</a>, you realize you need... | VonC |
<p>I'm running Jenkins on EKS cluster with <a href="https://plugins.jenkins.io/kubernetes/" rel="nofollow noreferrer">k8s plugin</a> and i'd like to write a <strong>declarative</strong> pipeline in which I specify the pod template in each stage. So a basic example would be the following, in which in the first stage a f... | ollaw | <p>The docker image being used is configured to run as a non-root user <code>jenkins</code>. By default PVCs will be created only allowing root-user access.</p>
<p>This can be configured using the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownersh... | Mike Bryant |
<p>I'm learning Kubernetes and trying to follow the following tutorial to create a Mysql database:</p>
<p><a href="https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/#:%7E:text=Deploy%20MySQL,MySQL%20and%20references%20the%20PersistentVolumeClaim" rel="noreferrer">https://kubernet... | Tyler Stone | <p>Docker Desktop on a Mac runs <a href="https://docs.docker.com/docker-for-mac/docker-toolbox/#the-docker-desktop-on-mac-environment" rel="noreferrer">a virtual machine to run docker inside</a>. You're correct when you look at the <code>hostPath.path</code> - that's where it's stored. But because docker/Kubernetes is ... | Mike Bryant |
<p>I am working with minikube , currently creating config-maps attaching as volume to the pod
this is my test-config.yaml</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: 2016-02-18T18:52:05Z
name: bb-configmap
namespace: default
resourceVersion: "516"
uid: b4952dc3-d670-11... | Rajendar Talatam | <p>In the PodSpec, <code>restartPolicy</code> <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podspec-v1-core" rel="nofollow noreferrer">defaults to <code>Always</code></a>. For the Pod to go to <code>Completed</code> instead of <code>CrashLoopBackOff</code>, this field should be set to <c... | Mike Bryant |
<p>I am trying to deploy a configmap onto a cluster </p>
<pre><code>- name: Make/Update all configmaps on the cluster
kubernetes:
api_endpoint: blah
url_username: blah
url_password: blah
inline_data:
apiVersion: v1
kind: ConfigMap
metadata:
name: blah
namespace: blah
data: my-data.txt: "{{ data }}"
state: ... | hashmim | <p>This seems to be similar to <a href="https://github.com/kubernetes/kubernetes/issues/36222" rel="noreferrer">kubernetes/kubernetes issue 36222</a> when creating configMap from files.</p>
<p>In your case, that happens when created from a <code>data</code> block.</p>
<p>The recent <a href="https://github.com/kubernete... | VonC |
<p>In my Kubernetes <code>Service</code>, running on OpenShift, I have an annotation like this:</p>
<pre><code> annotations:
service.beta.openshift.io/serving-cert-secret-name: "..."
</code></pre>
<p>which works fine on OpenShift 4.x.</p>
<p>However I also want to support OpenShift 3.11, which requires t... | Dave L. | <p>Yes</p>
<p>This is a common pattern for alpha/beta annotation migrations in the Kubernetes ecosystem, the controllers will only be looking for their specific annotation, any the controller doesn't recognise will be ignored.</p>
<p>If a controller is written to be backwards-compatible, they will normally look for the... | Mike Bryant |
<p>I have observed that <code>kubectl</code> inserts an additional <code>\</code> to linefeed characters when using the <code>--from-literal</code> option. It works as expected when loading "the same" content from a file. Clearly, there must be a difference because the stdout looks different but I fail to see... | RndmSymbl | <p>When you use <code>echo $api</code>, <code>echo</code> itself changes the contents: On POSIX-compliant shells with XSI extensions enabled (and while zsh isn't POSIX-compliant in general, it <em>does</em> implement this aspect), the <code>\n</code>s are replaced with literal newlines.</p>
<p>That <em>doesn't</em> hap... | Charles Duffy |
<p>I am trying to create a statefulset that runs zookeper, but I want it to run as non-root (i.e. under the zookeper user).<br />
This is the image used for this:</p>
<p><a href="https://github.com/kubernetes-retired/contrib/blob/master/statefulsets/zookeeper/Dockerfile" rel="noreferrer">https://github.com/kubernetes-r... | Simon Ernesto Cardenas Zarate | <p>This can be configured using the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods" rel="noreferrer">security context</a>, e.g.</p>
<pre><code>securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
</cod... | Mike Bryant |
<p>Basically, I need clarification if this is the right way to do: I am able to run sed command inside a container on a k8s pod. Now, the same sed I want to loop over for 10times but am not sure if this is working though I get no error from kubernetes pods or logs. Please confirm if my looping is good.</p>
<pre><code>... | AhmFM | <p>The "<a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#run-a-command-in-a-shell" rel="nofollow noreferrer">Define a Command and Arguments for a Container</a>" does mention:</p>
<blockquote>
<p>To see the output of the command that ran in the container, vie... | VonC |
<p><em>As far as I'm concerned, this is more of a development question than a server question, but it lies very much on the boundary of the two, so feel free to migrate to serverfault.com if that's the consensus).</em></p>
<p>I have a service, let's call it <code>web</code>, and it is declared in a <code>docker-compose... | spender | <p>The default kubernetes local domain is</p>
<pre><code>default.svc.cluster.local
</code></pre>
<p>which means that the fully qualified name of the <code>web</code> service under kubernetes is <code>web.default.svc.cluster.local</code></p>
<p>So, in the <code>docker-compose</code> file, under the trafficserver conf... | spender |
<p>I am using helm 3 to install nexus in kubernetes v1.18:</p>
<pre><code>helm install stable/sonatype-nexus --name=nexus
</code></pre>
<p>and then expose nexus by using traefik 2.x to outside by using domian: <code>nexus.dolphin.com</code>. But when I using domain to access nexus servcie it give me this tips:</p>
<pre... | Dolphin | <p>From <a href="https://github.com/helm/charts/tree/master/stable/sonatype-nexus" rel="nofollow noreferrer">the documentation</a> you should set a property of the helm chart: <code>nexusProxy.env.nexusHttpHost</code> to <code>nexus.dolphin.com</code></p>
<p>The docker image used here has a proxy that allows you to acc... | Mike Bryant |
<p>I have a running Gitlab CI pipeline in my Kubernetes cluster.</p>
<p>When the tests are failing, I need to grab the app screenshots and logs from the pod where it ran so that they are available where the Gitlab Runner is expecting them.</p>
<p>I tried the <code>kubectl cp <namespace>/<podname>:/in-pod-... | ZedTuX | <p>You could try and define a PVC with access mode <code>ReadWriteMany</code>, in order to get a volume shared between multiple pods.<br>
See "<a href="https://stackoverflow.com/a/52564314/6309">How to share storage between Kubernetes pods?</a>"</p>
<p>It would still be a persistent volume (to support that), with all ... | VonC |
<p>I have a script in a pod called <code>script01</code> and it can take parameters.
I run the script through the following:</p>
<pre><code>POD=<pod name>
runScript="kubectl -n nmspc exec $POD -- script01"
$runScript --command "do stuff"
</code></pre>
<p>The reason I run it this way is that I don't have access ... | Alex oh | <p><code>/usr/bin/env</code> exports values passed in <code>key=value</code> pairs into the environment of any program it's used to invoke.</p>
<pre><code>kubectl -n nmspc exec "$POD" -- env curIP=123 script01
</code></pre>
<p>Note that you should <strong>never</strong> use <code>$runScript</code> or any other unquot... | Charles Duffy |
<p>I'm able to successfully run a .NET 5 Console Application with a <code>BackgroundService</code> in an Azure Kubernetes cluster on Ubuntu 18.04. In fact, the <code>BackgroundService</code> is all that really runs: just grabs messages from a queue, executes some actions, then terminates when Kubernetes tells it to sto... | Cory Gehr | <p>Here is a full example of how to use <code>IHostApplicationLifetime.StopApplication()</code>.</p>
<pre><code>void Main()
{
var host = Host.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
services.AddHostedService<MyService>();
})
.Build();
... | RB. |
<p>With a Kubernetes cluster in place, what would be the alternative way to send configurations/passwords into containers? I know about the secrets way but what I'm looking for is a centralised environment that has the password encrypted, not base64 encoded.</p>
| ibrik | <p>You could also consider <strong>Kamus</strong> (and <strong><a href="https://kamus.soluto.io/docs/user/crd/" rel="nofollow noreferrer">KamusSecret</a></strong>, see at the end):</p>
<blockquote>
<p>An open source, GitOps, zero-trust secrets encryption and decryption solution for Kubernetes applications.</p>
<p>Kamus... | VonC |
<p>I ran bash script from java code to sort a file of tens of millions of strings of <25 characters. The java application is running in a kubernetes pod. The script failed and the error message is</p>
<pre><code>bash: line 1: 425 Killed
sort /tmp/keys > /tmp/keys_sorted
</code></pre>
<p>What d... | Jesse C | <p>This means that <code>sort</code> was sent a SIGKILL signal.</p>
<p>On modern systems without something weird going on, this <em>almost</em> always means you're out of RAM.</p>
<p>Linux supports something called "memory overcommit". Due to language runtimes (Java among them!) habitually allocating far more... | Charles Duffy |
<p>I have created a workload on Rancher. This workload created from an image which is hosted on a gitlab-ci project registry.</p>
<p>I want to force rancher to download a new version of this image and upgrade workload.</p>
<p>I want to do this from a .gitlab-ci.yml script. How to do this with Rancher <strong>version ... | nidomo | <p>In rancher 2, much of the management of workloads is delegated to Kubernetes via its api or CLI (kubectl).</p>
<p>You could patch the deployment to specify a new image/version, but if you are using a tag like <code>:latest</code> which moves, you will need to force Kubernetes to redeploy the pods by changing someth... | Scott Anderson |
<p><code>kubectl proxy</code> and <code>kubectl port-forwarding</code> look similar and confusing to me, what are their main differences and use cases?</p>
| Dagang | <p>As mentioned in "<a href="https://stackoverflow.com/a/51469150/6309">How <code>kubectl port-forward</code> works?</a>"</p>
<blockquote>
<p><code>kubectl port-forward</code> forwards connections to a local port to a port on a pod. </p>
<p>Compared to <code>kubectl proxy</code>, <code>kubectl port-forward</cod... | VonC |
<p>I am trying to workaround an issue with a third party tool. That tool needs to be able to ensure that the namespace I tell it to work in exists. To do that, it runs:</p>
<pre><code>kubectl get namespace my-namespace-name-here
</code></pre>
<p>The user that I let the third party tool run as has <code>edit</code> pe... | Vaccano | <p>I figured it out!</p>
<p>I needed to make a <code>Role</code> scoped to <code>my-namespace-name-here</code> that grants the ability to get namespaces. Then make a <code>rolebinding</code> to grant that permission to my user. Running a <code>kubectl apply -f ./my-yaml-file-below.yaml</code> did it.</p>
<p>Here is ... | Vaccano |
<p>I am trying to setup my Helm chart to be able to deploy a <code>VirtualService</code>. My deploy user has the <code>Edit</code> ClusterRole bound to it. But I realized that because Istio is not part of the core Kubernetes distro, the <code>Edit</code> ClusterRole does not have permissions to add a <code>VirtualSer... | Vaccano | <p>I ended up using these ClusterRoles. They merge with the standard Kubernetes roles of admin, edit and view. (My edit role only allows access to the VirtualService because that fit my situtation.)</p>
<pre><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-admin
labels:
... | Vaccano |
<p>I am trying to scrape metrics for spark driver and executor using javaagent with below options. I have Prometheus in kubernetes cluster and I am running this spark application outside the kubernetes cluster.</p>
<pre><code>spark.executor.extraJavaOptions=-javaagent:/opt/clkd/prometheus/jmx_prometheus_javaagent-0.3.1... | Abirami Ramkumar | <p>I think that you need to switch from the pull-based monitoring, to push-based monitoring. For things, such as Spark jobs it makes more sense, as they aren't running all the time. For that you have some alternatives:</p>
<ul>
<li>Spark Prometheus Sink from Banzai Cloud as outlined in their <a href="https://banzaicl... | Alex Ott |
<p>Here my command line:</p>
<pre><code>kubectl apply -f postgres.secret.yaml \
-f postgres.configmap.yaml \
-f postgres.volume.yaml \
-f postgres.deployment.yaml \
-f postgres.service.yaml
</code></pre>
<p>and i got and error as this picture :
<a href="https://i.stack.imgur.com/8CpqL.png" rel="noreferrer"><img src="ht... | Da2ny | <p>The indentation is wrong.</p>
<p>It should be:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
replicas: 0
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
restartPolicy: Always
containers:
... | Mike Bryant |
<p>I'm setting up a Kubeflow cluster on AWS EKS, is there a native way in Kubeflow that allows us to automatically schedule jobs i.e. (Run the workflow every X hours, get data every X hours, etc.)</p>
<p>I have tried to look for other things like Airflow, but i'm not really sure if it will integrate well with the Kube... | Renz Iver Baliber | <p>That should be what a <a href="https://www.kubeflow.org/docs/pipelines/overview/concepts/run/" rel="nofollow noreferrer">recurring run</a> is for.</p>
<p>That would be using a <a href="https://www.kubeflow.org/docs/pipelines/overview/concepts/run-trigger/" rel="nofollow noreferrer">run trigger</a>, which does have ... | VonC |
<p>I currently own only one computer, and I won't have another.</p>
<ol>
<li><p>I run <em>Spark</em> on its CPU cores : <code>master=local[5]</code>, using it directly : I set <code>spark-core</code> and <code>spark-sql</code> for dependencies, do quite no other configuration, and my programs start immediately. It's co... | Marc Le Bihan | <p>It really depends on your goals - if you always will run your Spark code on the single node with local master, then just use it. But if you intend to run your resulting code in the distributed mode on multiple machines, then emulating cluster with Docker could be useful, as you'll get your code running in truly dis... | Alex Ott |
<p>I have a working Kubernetes cluster that I want to monitor with Grafana.</p>
<p>I have been trying out many dashboards from <a href="https://grafana.com/dashboards" rel="nofollow noreferrer">https://grafana.com/dashboards</a> but they all seem to have some problems: it looks like there's a mismatch between the Prom... | MasterScrat | <p>The Prometheus node exporter changed a lot of the metric names in the 0.16.0 version to conform to new naming conventions.</p>
<p>From <a href="https://github.com/prometheus/node_exporter/releases/tag/v0.16.0" rel="nofollow noreferrer">https://github.com/prometheus/node_exporter/releases/tag/v0.16.0</a>:</p>
<bloc... | Scott Anderson |
<p>I've create a private repo on docker hub and trying to pull that image into my kubernetes cluster. I can see the documentations suggest to do this</p>
<p><code>
kubectl create secret generic regcred \
--from-file=.dockerconfigjson=<path/to/.docker/config.json> \
--type=kubernetes.io/dockerconfigjson
<... | Liniaq | <blockquote>
<pre><code>error: error reading ~./docker/config.json: no such file or directory
^^^^ ?
</code></pre>
</blockquote>
<p><code>~./docker/config.json</code> does not seem valid:<br>
<code>~/.docker/config.json</code> would</p>
<p>To remove any doubt, try the full path instead of <code>~... | VonC |
<p>I am running Cassandra as a Kubernetes pod . One pod is having one Cassandra container.we are running Cassandra of version 3.11.4 and auto_bootstrap set to true.I am having 5 node in production and it holds 20GB data.</p>
<p>Because of some maintenance activity and if I restart any Cassandra pod it is taking 30 mi... | Khumar | <p>If you're restarting the existing node, and data is still there, then it's not a bootstrap of the node - it's just restart.</p>
<p>One of the potential problems that you have is that you're not draining the node before restart, and all commit logs need to be replayed on the start, and this can take a lot of time if... | Alex Ott |
<p>I would like to install Istio into my Kubernetes cluster. The <a href="https://istio.io/latest/docs/setup/getting-started/" rel="nofollow noreferrer">installation page</a> says to:</p>
<blockquote>
<p>download the installation file for your OS</p>
</blockquote>
<p>My developer machine is a Windows 10 machine. The ... | Vaccano | <p>The download basically has <code>istioctl</code> and some samples in it.</p>
<p>So you want to download for the OS that you are running the command from (in my case Windows 10).</p>
| Vaccano |
<p>I have a new application running in a container in OpenShift. Currently it can't connect to the database because I'm waiting for the SPN and database permissions to be set up, but the strange thing is that when the application tries the container itself crashes and the pod is restarted.</p>
<p>My code is properly ca... | CodeRedick | <p>It turns out this is due to a bug in Microsoft's Microsoft.Data.SqlClient library: <a href="https://github.com/dotnet/SqlClient/issues/1390" rel="nofollow noreferrer">https://github.com/dotnet/SqlClient/issues/1390</a></p>
<p>It was patched in version Microsoft.Data.SqlClient 4.1.0 but EF Core 6 is using a much, muc... | CodeRedick |
<p>I would like to programmatically create GKE clusters (and resize them etc.). To do so, I could use the gscloud commands, but I found this java library that seems to imply that one can create/resize/delete clusters all from within java:
<a href="https://developers.google.com/api-client-library/java/apis/container/v1"... | Jonathan Sylvester | <p>You could consider using the <a href="https://www.terraform.io/docs/providers/google/r/container_cluster.html" rel="nofollow noreferrer">Terraform GKE provider</a> to programmatically create and mange GKE clusters.
It is idempotent and tracks state. I'd consider it to be more stable than any standalone library imple... | Badri |
<p>I was playing with k8s deployment - rolling update and it works really well.
I am curious to know how to do deployment when we have a service dependency! Not sure If i am explaining my question correctly. It is just a very high level scenario! </p>
<p>Lets consider this example. I have deployed 2 apps with 10 repl... | KitKarson | <p>As shown in "<a href="https://medium.com/platformer-blog/enable-rolling-updates-in-kubernetes-with-zero-downtime-31d7ec388c81" rel="nofollow noreferrer">Enable Rolling updates in Kubernetes with Zero downtime</a>" from <a href="https://twitter.com/Nilesh_93" rel="nofollow noreferrer">Nilesh Jayanandana</a>, you coul... | VonC |
<p>I am trying to connect to cqlsh from remote (kuebctl command) when encryption is enabled, but I am unable to connect to cqlsh. anyone has a better way to connect?</p>
<pre><code>$ kubectl run -i --tty --restart=Never --rm --image cassandra cqlsh -- cqlsh cassandra-0.cassandra.default.svc.cluster.local -u cassandra ... | user3435964 | <p>You can specify location of the certfile, and validate options via environment variables <code>SSL_CERTFILE</code> and <code>SSL_VALIDATE</code> correspondingly, but you'll need to mount certificate files anyway, so you can also mount corresponding <code>cqlshrc</code>...</p>
<p>See <a href="https://docs.datastax.c... | Alex Ott |
<p>I have an existing POD containing a DB. I have a script containing executable queries in that container. I need to schedule the execution of the script. How do I go about doing this?</p>
| Srijoni Biswas | <p>OpenShift has a "cronjob" resource type which can schedule a job to run at specific intervals. You can read more about it <a href="https://docs.okd.io/3.11/dev_guide/cron_jobs.html" rel="nofollow noreferrer">here</a>.</p>
<p>You can create a custom image which contains the client to connect to your DB and ... | Badri |
<p>I have k8s cluster with three workers and when I explicitly creates the pod, corresponding docker images get downloaded to worker. When I explicitly deletes the pods corresponding docker images are still present on worker nodes. Is this expected case? </p>
| rgaut | <blockquote>
<p>Is this expected case?</p>
</blockquote>
<p>Possibly, considering the <a href="https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/" rel="noreferrer">Kubernetes Garbage collection policy for images</a>:</p>
<blockquote>
<p>Kubernetes manages lifecycle of all images thro... | VonC |
<p>Datastax Spark Cassandra Connector takes "spark.cassandra.connection.host" for connecting to cassandra cluster.</p>
<ol>
<li><p>Can we provide headless service of C* cluster on K8S environment as host to this parameter("spark.cassandra.connection.host").</p>
</li>
<li><p>Will it resolve the conta... | Manish Khandelwal | <p>By default, SCC resolves all provided contact points into IP addresses on the first connect, and then only uses these IP addresses for reconnection. And after initial connection happened, it discover the rest of the cluster. Usually this is not a problem as SCC should receive notifications about nodes up & down ... | Alex Ott |
<p>I have an existing system that uses a relational DBMS. I am unable to use a NoSQL database for various internal reasons.</p>
<p>The system is to get some microservices that will be deployed using Kubernetes and Docker with the intention to do rolling upgrades to reduce downtime. The back end data layer will use the... | TheEdge | <p>I work in an environment that achieves continuous delivery. We use MySQL.</p>
<p>We apply schema changes with minimal interruption by using <a href="https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html" rel="nofollow noreferrer">pt-online-schema-change</a>. One could also use <a href="htt... | Bill Karwin |
<p>I am unable to run any <code>kubectl</code> commands and I believe it is a result of an expired apiserver-etcd-client certificate.</p>
<pre><code>$ openssl x509 -in /etc/kubernetes/pki/apiserver-etcd-client.crt -noout -text |grep ' Not '
Not Before: Jun 25 17:28:17 2018 GMT
Not After : Jun 2... | RandyB | <p>In Kubernetes 1.14 and above, you can just run <code>sudo kubeadm alpha certs renew all</code> and reboot the master. For older versions the manual steps are:</p>
<pre class="lang-sh prettyprint-override"><code>sudo -sE #switch to root
# Check certs on master to see expiration dates
echo -n /etc/kubernetes/pki/{api... | Greg Bray |
<p>I just wanted to know the impact of storing data of apache Cassandra to any other distributed file system.</p>
<p>For example- let's say i am having Hadoop cluster of 5 node and replication factor of 3. </p>
<p>Similarly for cassandra i am having 5 node of cluster with replication factor of 3 for all keyspaces. a... | andy | <p>Cassandra doesn't support out of the box storage of data on the non-local file systems, like, HDFS, etc. You can theoretically hack source code to support this, but it makes no sense - Cassandra handles replication itself, and doesn't need to have additional file system layer.</p>
| Alex Ott |
<p>When reading blog posts about WAFs and Kubernetes, it seems 90+ % of the posts are written by WAF-providers, while the remaining posts seem to be sceptical. So I would like to hear what your experiences are with WAFs, do they make sense, and if so can you recommend any good open-source WAFs? We are currently not all... | Esben Eickhardt | <p>A WAF is not strictly <em>necessary</em> on Kubernetes — or on any other deployment platform. Honestly, even after consulting for dozens of companies, I've seldom encountered any site that used a WAF at all.</p>
<p>You're right that you could duplicate the functions of a WAF using other technology. But you're basica... | Bill Karwin |
<p>I'm trying to setup auto deploy with Kubernetes on GitLab. I've successfully enabled Kubernetes integration in my project settings. </p>
<p>Well, the integration icon is green and when I click "Test Settings" I see "We sent a request to the provided URL":</p>
<p><a href="https://i.stack.imgur.com/5jjm1.png" rel="n... | Mitkins | <p>As it turns out, the Deployment Variables will not materialise unless you have configured and referenced an Environment.</p>
<p>Here's what the <code>.gitlab-ci.yaml</code> file looks like with the <code>environment</code> keyword:</p>
<pre><code>deploy:
image: registry.gitlab.com/gitlab-examples/kubernetes-depl... | Mitkins |
<p>While the <a href="https://github.com/kubernetes/client-go/blob/master/examples/out-of-cluster-client-configuration/main.go" rel="nofollow noreferrer">kubernetes golang api example for out-of-cluster authentication works fine</a>, and <a href="https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708" rel="no... | SteveCoffman | <p>Looking at the source code, this should work:</p>
<pre><code>// error handling omitted for brevity
cc, _ := clientcmd.NewClientConfigFromBytes([]byte(d1))
config, _ := cc.ClientConfig()
clientset, _ := kubernetes.NewForConfig(config)
</code></pre>
| Jorge Ferreira |
<p>I am using Kubernetes to deploy all my microservices provided by Azure Kubernetes Services.</p>
<p>Whenever I release an update of my microservice which is getting frequently from last one month, it pulls the new image from the Azure Container Registry.</p>
<p>I was trying to figure out where do these images resid... | mkb_mc | <p>Clusters with Linux node pools created on Kubernetes v1.19 or greater default to containerd for its container runtime (<a href="https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#container-runtime-configuration" rel="nofollow noreferrer">Container runtime configuration</a>).</p>
<p>To manually remove ... | Chris |
<p>I'm building a few Spring Boot microservices that are getting deployed in a Kubernetes (AKS specifically) cluster. I was planning on setting the probePaths for the <strong><em>liveness & readiness</em></strong> check to both point at the actuator health endpoint, but was wondering if that may not be the best opt... | chinabuffet | <p>As of Spring Boot 2.3, <a href="https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/html/spring-boot-features.html#boot-features-application-availability" rel="noreferrer">the Availability state of the application</a> (including Liveness and Readiness) is supported in the core and <a href="https://docs.s... | Brian Clozel |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.