prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p><strong>Description</strong> Trying to deploy the triton docker image as container on kubernetes cluster</p> <p><strong>Triton Information</strong> What version of Triton are you using? -&gt; 22.10</p> <p><strong>Are you using the Triton container or did you build it yourself?</strong> I used the server repo with fo...
<p>And what is the error message you are getting? Some of the issues I noticed:</p> <ul> <li>use the expected file name know to <code>docker</code>, i.e. <code>Dockerfile</code> not <code>DockerFile</code></li> <li>make sure base image exists (<code>tritonserver:latest</code> does not, you probably want one of <a href=...
<p>I have read about the various ways to run tasks periodically in a K8s cluster, but none of them seem to work well for this specific case. I have a deployment &quot;my-depl&quot; that can run an arbitrary number of pods and the task needs to execute periodically inside each pod (basically a shell command that &quot;n...
<p>I think the simplest solution is to run <code>crond</code> (or an alternative of your choice) in a sidecar container (that is, another container in the same pod). Recall that all containers in a pod share the same network namespace, so <code>localhost</code> is the same thing for all containers.</p> <p>This means yo...
<p>I've installed Zolando PostgreSQL Operator v1.8.1 in bare-metal K8S using helm,</p> <pre><code>helm repo add postgres-operator-charts https://opensource.zalando.com/postgres-operator/charts/postgres-operator helm install postgres-operator postgres-operator-charts/postgres-operator --version 1.8.1 </code></pre> <p>bu...
<p>Hope is not too late, I found myself doing this a couple of months ago as well, all you have to do is to change the docker image as explained in the documentation above, to be more specific, the <code>deployment</code> docker image. So I assume you have some basic understanding of helm, it is pretty common to have a...
<p>I am experiencing a <code>pending-update</code> Helm issue, ie. in CI pipelines we sometimes deploy a particular application just one time after another. The first helm deployment is still in the <code>pending-update</code> state, while the other deployment of the same application (ran eg. 1 min later) cannot be dep...
<p>Yes, you can solve it with a <strong>secret deletion</strong> in one of our cases it was also not working.</p> <p>So i would recommend checking the <code>kubetl get events</code> it will point out an error also if someone can not enable the logs of not getting debug log.</p> <p>i faced issues due to helm deploying c...
<p>We have been experimenting with the number of Ignite server pods to see the impact on performance.</p> <p>One thing that we have noticed is that if the number of Ignite server pods is increased after client nodes have established communication the new pod will just fail loop with the error below.</p> <p>If however t...
<p>It's hard to say precisely what the root cause is, but in general it's something related to the network or domain names resolution.</p> <p>A public address is assigned to a node on a startup and is exposed to other nodes for communication. Other nodes store that address and nodeId in their history. Here is what is h...
<p>I want to setup cassandra,elasticsearch and janusgraph on ubuntu 20.04 using kubernetes.</p> <p>can anyone suggest me links or provide me yaml file for setup?</p> <p>i have a 3node Kubernetes cluster,1 master and 2 nodes, i have installed 1.26.1 Kubernetes version</p>
<p>You can leverage the Operator to create these databases on Kubernetes.</p> <p><strong>Operators</strong> will manage and create the database for you.</p> <p><strong>Elasticsearch</strong> - <a href="https://www.elastic.co/downloads/elastic-cloud-kubernetes" rel="nofollow noreferrer">https://www.elastic.co/downloads/...
<p>We have on-premises Kubernetes clusters.</p> <p>Our data is in S3-compatible cloud storage (e.g. Amazon s3).</p> <p>We want to mount S3 bucket to Kubernetes pods in ReadWriteMany (RWX) mode via a CSI driver.</p> <p>What non-dead Kuebrnetes CSI RWX S3 drivers exist in 2022?</p>
<p>There is no official AWS support for S3 as a CSI. There is a fuse driver from Yandex-cloud here:</p> <p><a href="https://github.com/yandex-cloud/k8s-csi-s3" rel="nofollow noreferrer">https://github.com/yandex-cloud/k8s-csi-s3</a></p>
<p>This is my first time using GCP, I have always been an AWS person before this.</p> <p>As a small team without dedicated DevOps, should we separate our prod and sandbox environments into 2 clusters / VPCs under one GCP project, or should we be going through the hassle of entirely separate GCP projects as well?</p> <p...
<p>A common approach is to use separate projects for staging and production.</p> <p>With that, you will get the <strong>isolation</strong>, and clear <strong>separation</strong> between the <strong>staging</strong> &amp; <strong>production</strong> environment. Prevents accidental changes or testing and also prevents d...
<p>Issue type: Kubernetes on Docker Desktop stopped working due to expired kuber-apiserver certificates</p> <p>OS Version/build: Windows 10 version - 1909 and OS Build - 18363</p> <p>App version: Docker Desktop 3.03</p> <p>Steps to reproduce:</p> <ol> <li>Install Docker Desktop</li> <li>Enable Kubernetes</li> <li>Chang...
<p>I also had the issue showing in the etcd logs:</p> <pre><code>{&quot;level&quot;:&quot;warn&quot;,&quot;ts&quot;:&quot;2023-02-14T11:47:26.260Z&quot;,&quot;caller&quot;:&quot;embed/config_logging.go:169&quot;,&quot;msg&quot;:&quot;rejected connection&quot;,&quot;remote-addr&quot;:&quot;192.168.65.4:34996&quot;,&quot...
<p>I was under the impression that the main point of cluster-issuer is that its namespaced and doesn't have to be recreated across different resources, in general there could be one main cluster-issuer that will manage all ingresses across the cluster.</p> <p>From what I am seeing the cluster-issuer can only create one...
<p>@Harsh Manvar while I do appreciate your anwser I found something that is a better suit for my needs.</p> <p><a href="https://cert-manager.io/docs/tutorials/syncing-secrets-across-namespaces/" rel="nofollow noreferrer">Cert-manager documentation</a> contains multiple options to sync secrets across namespaces</p> <p>...
<p>This is my Dockerfile:</p> <pre><code>FROM gcr.io/distroless/static:nonroot WORKDIR / COPY ls . COPY tail . COPY test . COPY manager . ENTRYPOINT [&quot;/manager&quot;] </code></pre> <p>after</p> <pre><code>[root@master go-docker-test]# docker build -t strangething:v1.13 . [root@master go-docker-test]# docker run -d...
<p>After reading silh's comment and the kubebuilder <code>Dockerfile</code> again, I somehow solved this problem by adding <code>CGO_ENABLED=0</code> to <code>go build</code>. It changes dynamic linker to static linker.</p> <pre><code>CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go </code></pre> <p...
<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><...
<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...
<p>We have created two machine deployments.</p> <pre><code>kubectl get machinedeployment -A NAMESPACE NAME REPLICAS AVAILABLE-REPLICAS PROVIDER OS KUBELET AGE kube-system abc 3 3 hetzner ubuntu 1.24.9 116m kube-system ...
<p>To annotate all nodes with a particular machinedeployment. You can use the <a href="https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_annotate/" rel="nofollow noreferrer">kubectl annotate</a> command to annotate all nodes in a particular machinedeployment with a specific key-value pair. For example, to ...
<p>when CLUSTER-IP is internal to cluster network, then why I am able to ping one of the cluster IP service from host/node where k8s installed. Have a look at ip 10.101.210.88 which is a cluster-ip and as per definition it must be only reachable from any other pod only but still I can reach it from my Ubuntu host/node ...
<p>Yes, you will be able to access the <strong>ClusterIP</strong> from <strong>Kubernetes</strong> worker nodes.</p> <p>When you create the SVC in to Kubernetes with type <strong>ClusterIP</strong> it assigns the <strong>Virtual IP</strong> to <strong>SVC</strong>, Virtual IP address is accessible only within the K8s c...
<p>a have a problem with Kubernetes service. My service only sends requests to one pod ignoring other pods. I don't know why and how can I debug it. It should distribute request in a round-robin way. For me, it seems that something's wrong service but I don't know to debug it. Outputs of kubectl describe service and no...
<p>Is the client using a persistent/long-lived connection? Because the service endpoint will only distribute the new connections in a round-robin manner as per your setting. Kubernetes doesn't offer any built-in mechanism to load balance long-lived connections. For long-lived connections, you can handle the load balanc...
<p>I have the following directory structure:</p> <pre><code>templates/ a.tmpl services/ service.go main.go </code></pre> <p>Now inside the <code>service.go</code> file i am calling the below function:</p> <pre><code>dir, err := filepath.Abs(filepath.Dir(&quot;./templates/&quot;)) if err != nil { return ...
<p>Just copy the templates folder from the builder, like:</p> <pre><code>COPY --from=builder /app ./ ADD ./migrations /migrations COPY --from=builder ./templates /templates </code></pre> <p>or add the folder like:</p> <pre><code>COPY --from=builder /app ./ ADD ./migrations /migrations ADD ./templates /templates </cod...
<p>I have the following directory structure:</p> <pre><code>templates/ a.tmpl services/ service.go main.go </code></pre> <p>Now inside the <code>service.go</code> file i am calling the below function:</p> <pre><code>dir, err := filepath.Abs(filepath.Dir(&quot;./templates/&quot;)) if err != nil { return ...
<p>When you <a href="https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies" rel="nofollow noreferrer">build</a> your binary, go only includes the necessary go files to have your program work. It does not know that your <code>templates</code> directory is necessary to the running of the program.</p> <p>There i...
<p>We are planning to move from on-prem to gcp, but the process of designing is taking some time. We want to deploy our docker containers on gce vms. We don't want to manually increase the storage every time the containers fill up the space, we know that this can be done by auto scaling but we don't have enough experti...
<p>In our case we were using gcsfuse and mounted the bucket to the gce instance at /root/bucketmount. since the bucket is mounted on root fs, I have to use escalate privilege tag but it's not suggested to use. so we now changed the permissions to the folder using chown command. This helped us so In our pipeline we have...
<p>I have one question regarding ServiceEntry in Istio. As I can see in the guides it says that we can use <a href="https://istio.io/latest/docs/reference/config/networking/sidecar/#WorkloadSelector" rel="nofollow noreferrer">workloadSelector</a> to select one or more Kubernetes pods of the MESH_INTERNAL to direct traf...
<p>I don't think that is how it works. meshservice1 sidecar needs to know where to contact meshservice2, it's used Kubernetes service to get the latest endpoint IP of meshservice2 itself.</p> <p>alternatively, you can use spec.endpoints, but you need to update everytime Pod IP is change.</p>
<p>I'm trying to pull my Docker Image from my private Docker Registry in Kubernetes, but I got this error: ImagePullBackOff</p> <pre><code>NAME READY STATUS RESTARTS AGE nginx-994fc8fb7-f24sv 2/2 Running 0 2d22h portals-app-669b654d87-lk258 0/...
<p>This:</p> <pre><code>spec: containers: - name: private-reg-container image: xichen9718/portals_docker_repository:latest </code></pre> <p>Is pulling from docker.io and not a private repo.</p> <p>Also, this:</p> <pre><code> Warning Failed 28s (x2 over 46s) kubelet Failed to pull image &quot;x...
<p>I have this query:</p> <pre><code>100 * (1 - ((avg_over_time(node_memory_MemFree_bytes[10m]) + avg_over_time(node_memory_Cached_bytes[10m]) + avg_over_time(node_memory_Buffers_bytes[10m])) / avg_over_time(node_memory_MemTotal_bytes[10m]))) </code></pre> <p>However it only returns the namespace where Prometheus is in...
<p>With the node-exporter installed as daemonset, you have the metrics of the entire cluster.</p> <p>To have the overall cluster memory usage, in percentage:</p> <pre><code>100 * ( sum(node_memory_MemTotal_bytes{service=&quot;node-exporter&quot;}) - sum(node_memory_MemAvailable_bytes{service=&quot;node-exporter&quot;...
<p>I have set up the Kubernetes MongoDB operator according to this guide: <a href="https://adamtheautomator.com/mongodb-kubernetes/" rel="nofollow noreferrer">https://adamtheautomator.com/mongodb-kubernetes/</a> and it works well. However, when I try to update the MongoDB version to 6.0.4, I get the following error:</p...
<p>After a couple of days' research, I managed to find a way to do this, and it is annoyingly simple...</p> <p>The key to all of this lies in the documentation <a href="https://www.mongodb.com/docs/manual/reference/command/setFeatureCompatibilityVersion/#default-values" rel="nofollow noreferrer">here</a>. Basically, in...
<p>I am using Google Kubernetes Engine and some of my deployments are more important than others (For example, the staging environment can run on less replicas or even stop if needed).</p> <p>I want to dynamically change the amount of replicas of a deployment depending on the available resources, especially memory.</p>...
<blockquote> <p>I want to dynamically change the amount of replicas of a deployment depending on the available resources, especially memory.</p> </blockquote> <p>You can use the Kubernetes HPA (Horizonatal POD autoscaling), which which dynamically changes the number of replicas based on the <strong>CPU/Memory</strong> ...
<p>I want to run some gpu workloads on my bare metal k8s cluster. So I have installed the nvidia containerd runtime engine on my cluster. But the cilium cni pods crashes when I make nvidia the default runtime. (I'll post about that some other place)</p> <p>I'm thinking I should be able to work around this problem by sc...
<p>well... I feel dumb for not reading the docs more closely. Here I am to answer my own question.</p> <ol> <li>create a RuntimeClass like this:</li> </ol> <pre><code>kind: RuntimeClass apiVersion: node.k8s.io/v1 metadata: name: nvidia handler: nvidia </code></pre> <ol start="2"> <li>add <code>runtimeClassName: nvi...
<p>I tried the following but failed to get a list of all pods like these:</p> <pre><code>my-pod-1 my-pod-19 my-pod-24 </code></pre> <p>etc.</p> <pre><code>kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E &quot;my-pod-[0-9]&quot; kgp | grep -i -E &quot;^my-pod-[0-9]&q...
<p>Just use the options to the <code>kubectl</code> command to get the name column as the only output.</p> <pre><code>kubectl get pods -o custom-columns=NAME:.metadata.name </code></pre> <p>Then use a grep/sed to filter out what you do or do not want.</p>
<p>I'm developing a NATS based solution with deterministic subject partitioning, I use this type of mapping:</p> <blockquote> <p>service.* --&gt; service.*.&lt;number of partition&gt;</p> </blockquote> <p>Now I need a way to subscribe only one of my replicas per partition, what's the right way to do that?</p> <p>I was ...
<p>One way to ensure that only one replica per partition subscribes to messages is to use a queue group subscription in NATS. When multiple subscribers are part of the queue group. Only one of them will receive each message. This allows you to ensure that only one replica per partition processes messages at a time.</p>...
<p>I tried the following but failed to get a list of all pods like these:</p> <pre><code>my-pod-1 my-pod-19 my-pod-24 </code></pre> <p>etc.</p> <pre><code>kgp | grep -E my-pod-[0-9]+ kgp | grep -E my-pod-[0-9] kgp | grep -i -E my-pod-[0-9] kgp | grep -i -E &quot;my-pod-[0-9]&quot; kgp | grep -i -E &quot;^my-pod-[0-9]&q...
<p>Use <code>grep</code> like so:</p> <pre><code>kubectl get pods | grep -P '^my-pod-\d+$' </code></pre> <p>Here, GNU <a href="https://www.gnu.org/software/grep/manual/grep.html" rel="nofollow noreferrer"><code>grep</code></a> uses the following option:<br /> <code>-P</code> : Use Perl regexes.</p> <p><code>^my-pod-\d...
<p>I want to expose 2 services:</p> <ul> <li>web application at <strong>example.com</strong> port <strong>80</strong></li> <li>web sockets at <strong>example.com/app/ws</strong> port <strong>8000</strong></li> </ul> <p>with given configuration:</p> <hr /> <pre><code>apiVersion: &quot;v1&quot; kind: &quot;Service&quot; ...
<p>I found the problem was with used port 8000 for websocket server. Used port was not open on firewall, after changing websocket server port to 80, everything started working.</p>
<p>After running a pipeline job in Jenkins that runs in my k8s cluster</p> <p>I am getting this error -</p> <pre><code>β€˜Jenkins’ doesn’t have label β€˜jenkins-eks-pod’. </code></pre> <p>What am I missing in my configuration?</p> <p>Pod Logs in k8s-</p> <pre><code> 2023-02-20 14:37:03.379+0000 [id=1646] WARNING o.c.j....
<p>This error might be due to not creating the label β€˜jenkins-eks-pod’ on the jenkins server.</p> <p>To create a label on the jenkins server :</p> <blockquote> <p>go to manage jenkins &gt; Manage nodes and Clouds &gt; labels and then enter the label name.</p> </blockquote> <p>Post creating this label try to run the job...
<p>I want to check if pod in the cluster running as <code>privileged pods</code>, which can indicate that we may have security issue, so I check if <code>privileged: true</code></p> <p>However under the <code>securityContext:</code> spec there is additional fields like</p> <ul> <li><code>allowPrivilegeEscalation</code>...
<p>The <code>securityContext</code> are more related to the container itself and some access to the host machine.</p> <p>The <code>allowPrivilegeEscalation</code> allow a process to gain more permissions than its parent process. This is more related to setuid/setgid flags in binaries, but inside a container there is no...
<p>My NodeJS microservice is deployed to k8s cluster.</p> <p>I would like this microservice to access the k8s API server. For that, I guess I need to create a <code>ServiceAccount</code> for it. So I did this:</p> <pre><code>apiVersion: v1 kind: ServiceAccount metadata: name: my-app-service-account namespace: myap...
<p>I'd reckon the issue is with the resources, not with Ansible.</p> <p>Take a look:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: myapp-cluster-role namespace: myapp-ns # &lt;-- NOT A NAMESPACED RESOURCE rules: - apiGroups: [&quot;*...
<p>I need to automate the provisioning of a complex application in Kubernetes. It's a complex, multi-step process that involves provisioning of some cluster-wide resources and some app-specific resources. The cluster-wide resources are:</p> <ul> <li>Istio</li> <li>A few Operators (Cert Manager, Prometheus Operator, Pos...
<p>The <a href="https://olm.operatorframework.io/docs/getting-started/" rel="nofollow noreferrer">Operator Lifecycle Manager</a> is really well suited for the task.</p> <p>When you create operator <code>Foo</code>, you can package it in the OLM way by creating a bundle which contains the <a href="https://olm.operatorfr...
<p>I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer</p> <p>so, using kubectl I created zookeeper service and deployment using this yml file</p> <pre><code>apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service s...
<p>It seems you have missing broker config, usually I have below config exposed from my docker compose when I run Kafka on my CI</p> <pre><code> KAFKA_LISTENERS: 'LISTENER_INTERNAL://kafka:29092,LISTENER_HOST://:9092' KAFKA_ADVERTISED_LISTENERS: LISTENER_INTERNAL://kafka:29092,LISTENER_HOST://localhost:9092 ...
<p>On a Kubernetes cluster, I have multiple <code>Deployment</code> resources. For security, I am using a sidecar proxy pattern where the <code>Service</code> will proxy traffic to the sidecar, which will ensure authentication before passing on to the deployed application.</p> <p>I am trying to set up Kustomize to do t...
<blockquote> <p>In summary, I want the overlay to be able to define when the sidecar should be added, and to which specific deployments to add it to.</p> </blockquote> <p>My first thought was that you could have a label that means &quot;apply the sidecar patch&quot;, and use that in the Component:</p> <pre><code>apiVer...
<p>I am trying to deploy PostgreSQL to GKE and here is my PersistentVolumeClaim definition:</p> <pre><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: name: postgres-pvc namespace: db labels: app: imgress-db spec: accessModes: - ReadWriteOnce resources: requests: storage: 400Mi </co...
<p>I was able to solve the issue by adding two things to description:</p> <ol> <li><p><code>PGDATA</code> env variable inside containers:</p> <pre><code> env: - name: PGDATA value: /var/lib/postgresql/data/pgdata </code></pre> </li> <li><p><code>subPath: postgres</code> under <code>volumeMounts</code></p> </...
<p>I am following the instructions on the official Kubernetes documentation to install Kubernetes repository, I run</p> <pre><code>sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg </code></pre> <p>but I get 500 error</p> <pre><code>curl: (22) The re...
<p>Indeed, there seem to be an issue. Docs still suggests that URL should be used. Yet I see to 500 too.</p> <p>Checking google status page ( <a href="https://status.cloud.google.com/" rel="nofollow noreferrer">https://status.cloud.google.com/</a> ), there could be an issue with FileStore (file access issues for non-ro...
<p>I have a ruby on rails deployment and I want to use it in the frontend deployment so I created a service exposing port 3000 called &quot;flicron-backend-service&quot;</p> <p>here is the description of the service</p> <pre><code>kubectl describe svc flicron-backend-service Name: fli...
<blockquote> <p>I have tried from inside minikube to curl the backend-service-name did not work</p> </blockquote> <p>If you explicitly meant that you've:</p> <ul> <li>connected to your minikube instance (i.e. <code>minikube ssh</code>)</li> <li><code>curl</code> the service name directly from <code>minikube</code> inst...
<p>Im trying to deploy spark (pyspark) in kubernetes using spark-submit, but I'm getting the following error :</p> <blockquote> <p>Exception in thread &quot;main&quot; org.apache.spark.SparkException: Please specify spark.kubernetes.file.upload.path property.Β Β Β Β at org.apache.spark.deploy.k8s.KubernetesUtils$.uploadFil...
<p>You need to specify a real path not an empty string, let's say in your image you have a tmp folder under /opt/spark, then the conf should be set like this:</p> <pre><code>--conf spark.kubernetes.file.upload.path='local:///opt/spark/tmp' </code></pre> <p>If you don't want to use the</p> <pre><code> cmd = f&quot;&qu...
<p>I'm using podman 4.5-dev I have two pods deployed using: <em>podman kube play foo.yaml</em> <em>podman kube play bar.yaml</em></p> <p>I specified the pods' hostnames in the files, but they won't get resolved inside the containers. I verified that the pods are in the same network.</p> <p>Is there some DNS configurati...
<p>Edit your network settings in <code>/etc/containers/net.d/podman-default-kube-network.conflist</code> Change this line</p> <pre><code>&quot;dns_enabled&quot;: false, </code></pre> <p>To this:</p> <pre><code>&quot;dns_enabled&quot;: true, </code></pre> <p>Then reboot and up your yaml and try to resolve this:</p> <pre...
<p>I have seen both <code>serviceAccount</code> and <code>serviceAccountName</code> been used in a pod manifest. What is the difference?</p>
<p>There is no difference <code>serviceAccount</code> is DEPRECATED and you shoud use <code>serviceAccountName</code> instead.</p> <p>Quoting from the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podspec-v1-core" rel="nofollow noreferrer">Kubernetes API docs &gt; pod spec</a>:</p> <blo...
<p>I am a student and have to make a Bachelor thesis for my school. Is it possible to make a hybrid Kubernetes cluster, and how is this possible?</p> <p>Is there a good application I can run in this cluster to show that it works?</p> <p>I have made an AKS cluster and a on-prem cluster. Then I made a nginx loadbalancer ...
<p>If by hybrid k8s cluster you mean a cluster that has nodes over different cloud providers, then yes that is entirely possible.</p> <p>You can create a simple example cluster of this by using <a href="https://docs.k3s.io/" rel="nofollow noreferrer">k3s</a> (lightweight Kubernetes) and then using the <a href="https://...
<p>I'm trying to construct a Kubernetes informer outside of the EKS cluster that it's watching. I'm using <a href="https://github.com/kubernetes-sigs/aws-iam-authenticator" rel="nofollow noreferrer">aws-iam-authenticator</a> plugin to provide the <a href="https://kubernetes.io/docs/reference/access-authn-authz/authenti...
<p>My solution was to create write the credentials to a file and create a background thread to refresh that file. I can then pass tell <code>aws-iam-authenticator</code> to read the credentials from the file via the <code>AWS_SHARED_CREDENTIALS_FILE</code> environment variable.</p> <p>This might also be possible using ...
<p>In, nomad, we have an env variable named NOMAD_ALLOC_INDEX, that gives me the index of the container, is there a similar env variable in Kubernetes for the pods to get the pod index?</p> <p>Could you please provide your inputs?</p> <p>Thanks, Sarita</p>
<p>Not really, unless you are using <a href="https://kubernetes.io/blog/2021/04/19/introducing-indexed-jobs/" rel="nofollow noreferrer">indexed jobs (Kubernetes 1.21, Apr. 2021)</a>.</p> <p>For indexed jobs, the index is exposed to each Pod in the <code>batch.kubernetes.io/job-completion-index</code> annotation and th...
<p>I have run into an issue where <code>helm install</code>ing my charts will work fine, but when I go to restart the system, the nvidia gpu operator will fail to validate.</p> <p>Bootstrapping is simple:</p> <p><code>$ microk8s enable gpu</code></p> <p>&lt; watching dashboard for all the pods to turn green &gt;</p> <p...
<p>This is an issue I am comming across too which lead me hear, it looks like it was just recently fixed with this patch <a href="https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/release-notes.html#id2" rel="nofollow noreferrer">https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/release-notes.html...
<h1>Problem</h1> <p>After moving to RHEL 8.5 from 8.4, started having the issue of K8S pods failure.</p> <pre><code>spec.template.spec.containers[0].env[52].name: Invalid value: &quot;BASH_FUNC_which%%&quot;: a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must no...
<p>Answering the first part:</p> <p>Output of <code>rpm -q --changes which-2.21-28.el9.x86_64</code></p> <pre><code>* Fri Apr 15 14:00:00 2022 Than Ngo &lt;than@redhat.com&gt; - 2.21-28 - Resolves: #2050996, error on login when using ksh as the default shell * Tue Aug 10 14:00:00 2021 Mohan Boddu &lt;mboddu@redhat.com...
<p>I have a little Go app which creates YAML ressources for me I then deploy to a Kubernetes cluster.</p> <p>It worked quite well but since some hours (?) it fails saying:</p> <blockquote> <p>error: Could not automatically download and install resource plugin 'pulumi-resource-kubernetes', install the plugin using <code...
<p>The issue can be solved by providing a valid GitHub API token via the <code>GITHUB_TOKEN</code> environment variable.</p> <p>Thanks a lot <em><strong>Christian Nunciato</strong></em> for the hint.</p> <p>However, if anybody knows some background about this and why this happened so surprisingly, I would be very inter...
<p>I've just enabled docker desktop's kubernetes feature on my m2 macbook air, and I observed that the <code>vpnkit-controller</code> pod under <code>kube-system</code> namespace has restarted several times since enabling the feature, is this normal or I missed some of the settings?</p> <p><a href="https://i.stack.imgu...
<h2>Update:</h2> <p>This problem was resolved after upgrading Docker-Desktop to version <code>4.20.1</code></p> <p>which uses a new <code>docker/desktop-vpnkit-controller</code> image tagged with <code>dc331cb22850be0cdd97c84a9cfecaf44a1afb6e</code></p> <hr /> <h2>Original Answer</h2> <p>you can get the log of crashed ...
<p>How does a StatefulSet ensure that a PersistentVolume and Pod will always be provisioned in the same Availability Zone? I understand that each pod in a StatefulSet has a storage identity, and that each pod will remember the PVC it is using, but am struggling to find the official documentation to support this.</p>
<blockquote> <p>pod will remember the PVC it is using, but am struggling to find the official documentation to support this</p> </blockquote> <p>I think here is the exact line you are looking for</p> <blockquote> <p>You can set the .spec.volumeClaimTemplates which can provide stable storage using PersistentVolumes prov...
<p>Below is the manifest file i used to enable calico CNI for k8s, pods are able to communicate over ipv4 but i am unable to reach outside using ipv6, k8s version v1.14 and calico version v3.11, am i missing some settings,</p> <p>forwarding is enabled on host with &quot;sysctl -w net.ipv6.conf.all.forwarding=1&quot;</p...
<p>We have faced the same issue we were able to reach through ipv4 and not working with ipv6.</p> <p>We did the following,</p> <pre><code># Reset the Cluster kubeadm reset # Create the cluster by adding the ipv6 CIDR along with the ipv4 address also enable IPv6DualStack # NOTE: The ipv6 given below matches the first ...
<p>Good afternoon!</p> <p>I am relatively new to Kubernetes. I would like to ask for your help in knowledge! What is the best way to deploy Postgresql or MySql in kubernetes for production? Suggest articles or resources, I would be very grateful.</p> <p>I only see examples and information on how to deploy Postgresql de...
<p>We have been running multiple databases on K8s like Elasticsearch, Redis some message brokers so it you can definitely run on Production.</p> <p>Now i would suggest going with the Operator managed <strong>Database deployment</strong>. As on Production, you might be expecting an <strong>HA</strong>, data replication ...
<p>I'm trying to deploy kafka on local k8s, then I need to connect to it by application and using offset explorer</p> <p>so, using kubectl I created zookeeper service and deployment using this yml file</p> <pre><code>apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service s...
<p>You configured the NodePort of <code>30092</code> for your kafka broker so to be able to connect to it you should use <code>&lt;node-ip&gt;:30092</code> as your bootstrap server address.</p> <p>If you're running minikube, you can find the node ip with the <code>minikube ip</code> command.<br /> (Although you mention...
<p>Alice deployes a chart from her computer to a k8s cluster. Bob runs helm ls -a on that cluster and sees Alice's chart.</p> <p>I am looking for any configmaps on my cluster that could hold chart info but cant find any.</p> <p>Where is it then?</p>
<p>When you apply the helm release it convert the Helm template to K8s resources like <strong>deployment</strong>, <strong>configmap</strong>, <strong>secret</strong>, <strong>statefulset</strong> and those values get applied and stored to <strong>etcd</strong> datastore of <strong>K8s</strong>.</p> <p>Still <strong>he...
<p>Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file?</p> <p>Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I can't ac...
<p>Helm is like a package manager. It can install applications on your cluster, but it has only some basic logic for updates to its configuration or for version upgrades. You control it through the <code>helm</code> commands and call it when you need it. So it helps you with some tasks, but it is still up to you to run...
<p>We would like to pack as many pods into each nodes in our cluster as much as possible do decrease the amount of nodes we have on some of our environments. I saw <a href="https://github.com/kubernetes-sigs/descheduler" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/descheduler</a> HighNodeUtilization st...
<p>Eks does not provide the ability to override the default scheduler configuration, which means that actually configuring the <code>default-scheduler</code> profile with the <code>MostAllocated</code> scoring strategy is not an option. However, you may run your own scheduler <em>alongside</em> the default scheduler, ...
<p>I know docker has options like syslog <code>log-driver</code> and <code>log-opts</code> so that it can be used to send the logs to say, the UDP server.</p> <p>Marathon is the docker orchestrator here and a config file has the below:</p> <pre><code> { &quot;key&quot;: &quot;log-driver&quot;, &quot;valu...
<p>As David suggested there is no option to control the log target. However as requested for log collector application writing this answer.</p> <p>If your <strong>application</strong> is <strong>streaming</strong> the <strong>UDP</strong> logs you can use the <strong><a href="https://www.graylog.org/products/source-ava...
<p>I am having a problem with my GitLab pipeline when trying to mount a docker volume inside a container. Before I explain the problem, first I will describe my whole setup, because I think that is very essential to understand the problem, because I think that this is the reason why I am having this problem.</p> <h2>Se...
<p>This is a tricky problem requiring in-depth explanation of GitLab and Kubernetes dynamics.</p> <p><strong>Summary of your problem:</strong></p> <blockquote> <pre><code> volumes: - .:/var/www/html # or # - /builds/projects/laravel-api:/var/www/html </code></pre> </blockquote> <p>The Docker service you a...
<p>Kubernetes cluster is running on a node (Virtual Machine) which gets its network configuration from a DHCP server (this includes DNS settings).</p> <p>From within a pod I need to be able to reach external resources identified by FQDN. The DNS on the K8 node (VM) is able to solve the FQDN to an IP address but how cou...
<p>You can configure Kubernetes to use your host's DNS resolver by setting up dnsPolicy for the pod by selecting either Default or ClusterFirstWithHostNet.</p> <ul> <li>The first option uses the cluster DNS if available, and falls back to the host's DNS resolver if none is found.</li> <li>The second option uses the clu...
<p>I got freez of Sklearn-classifier in MLRun (the job is still running after 5, 10, 20, ... minutes), see log output:</p> <pre><code>2023-02-21 13:50:15,853 [info] starting run training uid=e8e66defd91043dda62ae8b6795c74ea DB=http://mlrun-api:8080 2023-02-21 13:50:16,136 [info] Job is running in the background, pod: t...
<p>I solved the same issue and the problem was with different MLRun version between client side and server side. I had MLRun on client in version <strong>1.2.1rc2</strong> and server side in version <strong>1.2.1</strong> (these versions have different interfaces and it generates freez issue).</p> <p><strong>Please, sy...
<p>I am running a load test over a kubernetes pod and i want to sample every 5 minutes the CPU and memory usage of it. I was currently manually using the linux <code>top</code> command over the kubernetes pod.</p> <p>Is there any way given a <code>kubernetes pod</code> to fetch the CPU/Memory usage every X minutes and ...
<p>Try this one-liner:</p> <pre class="lang-bash prettyprint-override"><code>while [ true ]; do echo $(date) $(date +%s) $(kubectl top -n your-namespace pod $(kubectl get pods -n your-namespace -l your-label-name=your-label-value -o jsonpath='{..metadata.name}') | tail -n 1) | tee -a /path/to/save/your/logs.txt; done <...
<p>Can anyone explain in simple terms what is the difference between deploying Kafka through Kubernetes operator (for example Strimzi ) and Kafka helm chart or manifest file?</p> <p>Previously in my project we used helm chart for kafka but for now we've received requirement to move to kafka strimzi-operator. I can't ac...
<p>Some generic thoughts on Helm charts vs. operators:</p> <p>A Helm chart directly includes Kubernetes YAML files using the Go <a href="https://pkg.go.dev/text/template" rel="nofollow noreferrer"><code>text/template</code></a> language. An operator has actual code, frequently written in Go using the <a href="https://...
<p>I have a strange result from using nginx and IIS server together in single Kubernetes pod. It seems to be an issue with nginx.conf. If I bypass nginx and go directly to IIS, I see the standard landing page - <a href="https://i.stack.imgur.com/lJ1IG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l...
<p>After some testing, here is a working nginx.conf -</p> <pre><code>http{ server { listen 81; set $target &quot;http://127.0.0.1:80&quot;; location / { proxy_pass $target; proxy_set_header Host $host; } } } </code></pre> <ul> <li>New directive - <code>p...
<p>As an IT contractor, I was tasked with fixing an issue in a client's software which made simple use of a third-party library to encrypt or decrypt byte strings. For reasons relating to AWS temporary access tokens, the library required occasional reinitialisation for a fresh access token to be acquired (via AWS EKS) ...
<blockquote> <p>But the client rep said this might cause problems in a Kubernetes pod, relating to access rights and process monitoring among other things.</p> </blockquote> <p>There is nothing special about kubernetes with respect to child processes and access rights. It's just Unix processes: a child runs with the sa...
<p>Is there any easy command line option to export my entire ETCD database to json file but also decode the keys and values automatically from base64?</p> <p>What I succeeded to the moment is this(example show 1x key/value):</p> <pre><code> ./etcdctl get &quot;&quot; --prefix -w json | jq -r &quot;.[] | .[] &quot; ...
<p>If the encoded data is a string and not binary data, you can decode it to a UTF-8 string using the <code>@base64d</code> filter. This should be available in jq 1.6.</p> <pre><code>$ ./etcdctl ... | jq '.[][] | (.key, .value) |= @base64d' { &quot;key&quot;: &quot;by-dev/meta/snapshots/root-coord/partitions/44004742...
<p><code>error: Couldn't get available api versions from server: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }</code></p>
<p>I had to set output format to <code>json</code>.</p> <pre><code>&gt;kubectl get nodes Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string &quot;json:\&quot;apiVersion,omitemp...
<p>I have set of pods belonging to different deployments. All are configured to run as single replicas. Further, i have 2 nodes in my cluster. Now, when i try to schedule my pods, all pods get deployed to same node. its very rare that i see my pods are going to another node.</p> <p>Due to this, my one node is always un...
<p>You are right <strong>topology spread constraints</strong> is good for one deployment. There could be many reasons behind that behavior of Kubernetes.</p> <p>One could be like you have set the <strong>Resource</strong> <strong>request</strong> &amp; <strong>limit</strong> which K8s think is fine to Run both on <stro...
<p>I have setup a backend and frontend service running on Kubernetes. Frontend would be <code>www.&lt;myDomain&gt;.com</code> and backend would be <code>api.&lt;myDomain&gt;.com</code></p> <p>I need to expose and secure both services. I wish to use one ingress. I want to use free certificates from let's encrypt + cert ...
<p>@Jun's answer worked mostly for me, but the <code>secretName</code> values have to be different. Otherwise, you'll get this error:</p> <blockquote> <p>Warning BadConfig 12m cert-manager-ingress-shim spec.tls[0].secretName: Invalid value: &quot;api-ingress-cert&quot;: this secret name must only appear i...
<p>I followed the <a href="https://knative.dev/docs/install/yaml-install/serving/install-serving-with-yaml/" rel="nofollow noreferrer">official instruction</a> to installing knative serving on a self-built k8s cluster. But when running the second line</p> <pre><code>kubectl apply -f https://github.com/knative/serving/r...
<p>I believe Knative 1.9 requires Kubernetes 1.23 or newer. One of the changes that happened in the last year or so was the removal of the <code>v2beta2</code> autoscaling API and replacement with <code>v2</code> API. I believe the new API is present in Kubernetes 1.22, but Knative 1.9 was tested with the community su...
<p>I created the following <code>configMap </code>for my NGINX ingress controller:</p> <pre><code>apiVersion: v1 data: allow-snippet-annotations: &quot;true&quot; enable-modsecurity: &quot;true&quot; enable-owasp-modsecurity-crs: &quot;true&quot; modsecurity-snippet: |- SecRuleEngine On SecRequestBodyAc...
<p>I solved the issue by escaping quotes and double quotes of the SecRule in the configmap as follows:</p> <pre><code>SecRule REQUEST_URI|ARGS|QUERY_STRING \&quot;@contains attack\&quot; \&quot;id:100001,phase:1,t:lowercase,deny,status:403,msg:\'Attack Detected\'\&quot; </code></pre>
<p>I'm getting below error when I try to run the minikube after downloading its binary:-</p> <pre><code>❌ Exiting due to GUEST_START: wait: /bin/bash -c &quot;sudo env PATH=&quot;/var/lib/minikube/binaries/v1.22.3:$PATH&quot; kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable-...
<p>Executing both <code>minikube delete</code> and <code>minikube start</code> has solved the problem for me</p>
<p>For a GKE cluster configured with Autopilot, does it make sense to also enable autoscaling?</p> <p>In the document <a href="https://cloud.google.com/kubernetes-engine/docs/resources/autopilot-standard-feature-comparison" rel="nofollow noreferrer">Compare GKE Autopilot and Standard</a>, it says the auto scaler are op...
<blockquote> <p>Is it necessary to enable Vertical or Horizontal Pod Autoscaling in GKE Autopilot Clusters?</p> </blockquote> <p>Not necessary, but if using autopilot it's about leveraging the option to scale <strong>nodes</strong> without worry and just you focus on HPA &amp; VPA.</p> <blockquote> <p>For a GKE cluster...
<p>So, here is my current setup My experience is mostly on openshift, but I'm trying to get familiar with kubernetes... and I'm a bit noob in KS8 :)</p> <p>kubernets + callico + external storage(nfs) + metallb + ingress-nginx</p> <pre><code> kubectl get nodes -o wide NAME STATUS ROLES AGE VERSIO...
<p>Damn,</p> <p>Solved :)</p> <pre><code>--- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: lb-pool namespace: metallb-system spec: ipAddressPools: - lb-pool </code></pre> <p>Seems that L2Advertisement was missing according to : <a href="https://github.com/kubernetes/ingress-nginx/blob/ma...
<p>While I'm reading how to test on k8s with the fake client on this <a href="https://itnext.io/testing-kubernetes-go-applications-f1f87502b6ef" rel="nofollow noreferrer">link</a>, I noticed this function, which, IIUC, assigns a faked server version to the faked k8s cluster.</p> <pre><code>k8s.clientset.Discovery().(*d...
<p>It's a <a href="https://go.dev/tour/methods/15" rel="nofollow noreferrer">type assertion</a>, as @peter suggested in the comment.</p>
<p>We want our deployment to have 3/6/9/etc replicas at all times to have an even AZ spread. Is there a way to achieve this via HPA config ?</p>
<p>You can use the Scaling policy with the <strong>HPA</strong></p> <p><strong>Example</strong></p> <pre><code>scaleUp: stabilizationWindowSeconds: 0 policies: - type: Pods value: 3 periodSeconds: 5 selectPolicy: Max </code></pre> <p>it will add the <strong>3</strong> PODs every <strong>5</s...
<p>I am getting the following error on installing a custom docker image as a revision. I am not able to figure out the reason. So far I have tried adding secrets with the password and it didn't work</p> <pre><code>helm upgrade --install airflow apache-airflow/airflow -n airflow -f values.yaml --debug history.go:56: [de...
<p>Try this:</p> <pre><code>kubectl create secret generic airflow-postgresql -n airflow --from-literal=password='postgres' --dry-run=client -o yaml | kubectl apply -f - </code></pre> <p>I think the error is due to the helm create the airflow-postgresql's secrets using &quot;postgres-password&quot; as the key while the ...
<p>Based on the <a href="https://github.com/benc-uk/kubeview" rel="nofollow noreferrer"><strong>KubeView</strong> README</a>, I tried to run <strong>KubeView</strong> using the container provided <a href="https://github.com/users/benc-uk/packages/container/package/kubeview" rel="nofollow noreferrer">here</a>.</p> <p>I ...
<p>You can <strong>mount</strong> your local <strong>kubeconfig</strong> file to the <strong>Docker</strong> image that you are trying, not sure if the way you follow <strong>Env variable</strong> option is suggested anywhere or not</p> <p>Try something like :</p> <pre><code>docker run --publish-all --name kubeview -v ...
<p>I do have an existing application that used docker and docker compose so far. I want to operate this app in a Kubernetes cluster. Shouldn't be a big deal, right? But so far I failed because of the used secrets.</p> <p>The application expects a secret to be present in a file at: <code>/run/secrets/webhook_secret</cod...
<p>It might be perfectly possible to mount your own secrets into the <code>/var/run/secrets</code> or <code>/run/secrets</code> path. Even in the scenario where Kuberbetes is concurrently using that path for system-related tasks. This commonly happens when, for instance, you are running a cluster with 2+ nodes and Kub...
<p>I can resolve a DNS name on the internal kubernetes DNS with a value like: <a href="http://serviceNameExampleAbc.default.svc.cluster.local" rel="nofollow noreferrer">http://serviceNameExampleAbc.default.svc.cluster.local</a> where <code>serviceExampleAbc</code> relates to the IP of the service by name <code>serviceE...
<p>You can use the K8s <strong><a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">network polcies</a></strong> to block the traffic across the namespace or services.</p> <p>So with network policy, you will be able to restrict the traffic across the namespaces, ...
<p>I have a k8 deployment (using minikube) for ActiveMQ-Artemis. In this I'm exposing ports for broker(61616) and console(8161) both. Pointing the ports to service. It is working fine. and also I configured an Ingress Controller for the console.</p> <p>Service.yaml</p> <pre><code>kind: Service metadata: name: artemis...
<p><strong>Nginx Ingress</strong> does not support <strong>TCP</strong> or <strong>UDP</strong> services</p> <p>You can follow this guide the setup &amp; expose the TCP service : <a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="nofollow noreferrer">https://kubernetes.githu...
<p>I would like to know, if there is an optimal approach for setting memory limits for Kubernetes containers, especially for applications running java.</p> <p>For Java applications, we have to set a heap value in conjunction with Kubernetes resources. it's like we're kinda forced to guess at a memory limit for the Kub...
<p>Yes, I have encountered the issue multiple times. You definitely want to keep the memory limit for the k8 to avoid the noisy neighbour problems. The possible solutions you have mentioned are right. Monitoring and load testing are a must to arrive at the number.</p> <p>Along with these, I used the profiling of Java p...
<p>While installing influxdb2 using k8s manifest from the link <a href="https://docs.influxdata.com/influxdb/v2.6/install/?t=Kubernetes" rel="nofollow noreferrer">influxdb2 installation on k8s</a> I get below &quot;<code>pod has unbound immediate PersistentVolumeClaims</code>&quot; error.</p> <p>The instruction is giv...
<p><strong>Looks like there is no auto-provisioning of k8s cluster you are running. You need to create Persistent Volume &amp; Storage classes on <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#local" rel="nofollow noreferrer">local</a> clusters manually by cluster admin.</strong></p> <p>Create on...
<p>I am new to Kubernetes, Istio and so on, so please be gentle :)</p> <p>I have minikube running, I can deploy services and they run fine. I have installed istio following this guide: <a href="https://istio.io/latest/docs/setup/install/istioctl/" rel="nofollow noreferrer">https://istio.io/latest/docs/setup/install/ist...
<p>This might help you:</p> <p>I am having same error in injected container istio-init.</p> <p>My system is : k8s 1.26 and istio 1.17.1, installed on rocky 8.5 stations.</p> <p>This solved my problem:</p> <p>1.</p> <pre><code>cat &lt;&lt;EOT &gt;&gt; /etc/modules-load.d/k8s.conf overlay br_netfilter nf_nat xt_REDIRECT ...
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1 kind: Deployment metadata: name: django-k8-web-deployment labels: app: django-k8-web-deployment spec: replicas: 3 selector: matchLabels: app: django-k8-web-deployment template: metadata: labels: app: djang...
<p>This is issue with indentation.</p> <p>Here is proper <code>deployment</code> definition</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: django-k8-web-deployment labels: app: django-k8-web-deployment spec: replicas: 3 selector: matchLabels: app: django-k8-web-deployment te...
<p>I want to execute command on GCP GKE node but I need to do it without manually sshing to the machine.</p> <p>What I need:</p> <ol> <li>adding ntp.keys</li> <li>configuring ntp.conf</li> <li>restart ntp daemon (here I encountered a problem)</li> </ol> <p>Point 1 and 2 can be easly achived with DaemonSet. I mounted /e...
<p>You are on the right path, If you don't want to SSH into the node and manual job, what you can do is like create one <strong>Daemonset</strong> and automate <strong>SSH</strong> process.</p> <p><strong>Daemonset</strong> runs on all available <strong>nodes</strong> in <strong>Cluster</strong>. You can mount your <st...
<p>im confuse to convert nanocore to core of CPU my formula is:</p> <p><code>nanocore / 1000000000 = CORE (1000000000 is 1 billion)</code></p> <p>if my linux os have 10 core. I want to calculator percentage cpu usage. This formula is:</p> <p><code>(nanocore / 1000000000) / 10 * 100 = percentage cpu usage ?</code></p> <...
<p>Yes, a core is equal to 1e9 (1,000,000,000) nanocores.</p> <p>You can test this by seeing that, for example in Datadog, a metric like <code>(kubernetes.cpu.usage.total / 1000000000) / kubernetes_state.node.cpu_allocatable * 100</code> gives you a percentage that should be capped at 100%. The 1st metric is measured i...
<p>I'm using Jenkins configuration as code (JCASC).</p> <p>I'm having a pod template and I want to add NodeSelector + Tolerations. podTemplate doesn't support key of tolerations and NodeSelector so I need to add pod YAML spec...</p> <pre><code> agent: enabled: true podTemplates: podTemplates: ...
<p>I try to give you a little suggestion, let me know if it works.</p> <p>If you have an up&amp;running Jenkins instance (with the Kubernetes plugin installed), you can go to β€œManage Jenkins”/β€œConfigure Clouds” and prepare your Pod Templates as you see fit. There you will also find the definition of nodeSelector and To...
<p>We have a requirement to connect a K8s POD to an Azure VPN Gateway in a secure manner. This is what our network topology is:</p> <p><a href="https://i.stack.imgur.com/sH8cx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sH8cx.png" alt="enter image description here" /></a></p> <p>Firstly is this p...
<p>I tried to reproduce the same in my environment I have created a virtual network gateway vnet local network gateway like below:</p> <p><img src="https://i.imgur.com/FlsYk8w.png" alt="enter image description here" /></p> <p>In virtual network added gateway subnet like below:</p> <p><img src="https://i.imgur.com/GFa00...
<p>I want to build the the <code>secretName</code> dynamically base on the value of the <code>my-label</code> key (trough a <code>ENV</code>). Is this possible?</p> <p>I used the a similar approach to use label values as ARGs which worked.</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob metadata: name: my-cron...
<p>The fastest solution is surely to use kustomize.</p> <p>Following your data, first organize the repository by creating a folder called &quot;base&quot; and one called &quot;dev&quot;.</p> <p>Then move the &quot;my-cronjob&quot; manifest into the &quot;base&quot; folder and add a kustomization.yaml file that invokes ...
<p>I am getting into CI/CD and Microservices. I want to try Kubernetes for a project that I am starting. I spent the last two weeks learning about those topics. But I don't have the knowledge to make the decision. I would like to know if for a small project is better to setup Kubernetes in my server or pay a Cloud serv...
<p>If you have an <strong>on-prem</strong> set up and you can expose your cluster you can go with that creating the <strong>K8s</strong> cluster and managing it.</p> <p>Else are you planning to set up manually on cloud <strong>VMs</strong>? instead better to use managed one from <strong>Digital Ocean</strong> or <stron...
<p>so I am creating a system composed of different components that are installed via helm charts. Since I needed different customizations for each of the charts, I created my own separated repositories, copied the charts there and added customizations.</p> <p>The question is: how do I conveniently upgrade the charts ve...
<p>If your changes are very specific to your project and not something that can be merged into the original repo, or you have legal loopholes to jump through, you can fork the original code and periodically sync up with the upstream.</p> <p>The process is outlined here: <a href="https://docs.github.com/en/pull-request...
<p>I am trying to understand where is this warning coming from ? I have disabled the PSP support in my cluster and indeed using k8s version lower than 1.25. But I want to understand and disable this warning. Is it possible ? Which controller is responsible to handle this WARNING?</p> <pre><code>kubectl get psp -A Warni...
<p>There is a blog K8s where various aspects of the topic &quot;Warnings&quot; are explained. <a href="https://kubernetes.io/blog/2020/09/03/warnings/#deprecation-warnings" rel="nofollow noreferrer">https://kubernetes.io/blog/2020/09/03/warnings/#deprecation-warnings</a></p> <p>In summary, these have been introduced si...
<p>I am using the non HA version of ArgoCD (v2.6.5) installed in a single node k3s cluster. The goal is to deploy a sample application together with kube-prometheus-stack, loki, tempo &amp; minIO via Helm.</p> <p>However, when I create an &quot;Application&quot; in Github and reference it in Argocd, all of them are in ...
<p>This was fixed by deploying the CRDs separately. There seem to be more issues with a few objects and CRDs within the kube-prometheus-stack and loki charts, however, I can close this one.</p>
<p>I have a question about Kubernetes containers and persistent volumes.</p> <p><strong>How can I make some of the preexisting folders of a Kubernetes container persistent?</strong></p> <p>I know the usage of PVCs in Kubernetes but the problem about mounting a PVC to a container is that this operation -naturally- delet...
<p>there is no way to mount a Volume in a certain folder without overwriting its contents.</p> <p>In my opinion the best approaches could be:</p> <ol> <li><p>The first one reported by you (for large content):</p> <p>a. Create PVC</p> <p>b. Add an initContainer to your Deployment that mount the Volume in a DIFFERENT pat...
<p>I'm pretty new to Kubernetes, I have docker for mac, not minikube.</p> <p>I have the deployment file running with one pod (containing an express app) in the cluster, then i created a NodePort service.</p> <p>Inside the express app i have a get request to '/posts' and I want to access it from the localhost.</p> <p>i ...
<p>PREMISE:</p> <blockquote> <p>Every node in the cluster configures itself to listen on that assigned port and to forward traffic to one of the ready endpoints associated with that Service. You'll be able to contact the type: NodePort Service, from outside the cluster, by connecting to any node using the appropriate p...
<p>It's currently possible to allow a single domain or subdomain but I would like to allow multiple origins. I have tried many things like adding headers with snipets but had no success.</p> <p>This is my current ingress configuration:</p> <pre><code>kind: Ingress apiVersion: extensions/v1beta1 metadata: name: nginx-...
<p>A some time ago, ingress-nginx allows multiple origins. See issue <a href="https://github.com/kubernetes/ingress-nginx/issues/5496" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/issues/5496</a></p> <p>Example of usage:</p> <pre><code>nginx.ingress.kubernetes.io/cors-allow-origin: &quot;https:...
<p>I'm trying to create a k8s node struct and assign default value to it.</p> <p>The following code complains &quot;<em>unknown field Name in struct literal</em>&quot;</p> <pre><code>node = &amp;corev1.Node{Name: pod.Spec.NodeName} </code></pre> <p>However, this code is fine:</p> <pre><code>node = &amp;corev1.Node{} no...
<p>If the second code works, I'd assume there is an embedded struct, and looking at the code (assuming it's <a href="https://github.com/kubernetes/api/blob/master/core/v1/types.go#L5558-L5576" rel="nofollow noreferrer">this</a>) that appears to be the case:</p> <pre><code>type Node struct { metav1.TypeMeta `json:&q...
<p>I have an issue with my GKE cluster. I am using two node pools: secondary - with standard set of highmen-n1 nodes, and primary - with preemptible highmem-n1 nodes. Issue is that I have many pods in Error/Completed status which are not cleared by k8s, all ran on preemptible set. THESE PODS ARE NOT JOBS.</p> <p>GKE do...
<p>The given commands does not work for me.</p> <p>I have created a few manifests that you can apply in your cluster to automatically delete the Pods matching the criteria with a kubernetes CronJob.</p> <p><a href="https://github.com/tyriis/i-see-dead-pods" rel="nofollow noreferrer">https://github.com/tyriis/i-see-dead...
<p>I am trying to make socket connection from react application to nodejs server hosted on GKE. I am getting connection error &quot;Connection closed before it was established&quot;. HTTP connection working fine. dev.host.com is used for frontend and dev.host.com/api is used for backend and included in ingress.yml file...
<p>try the ingress config like</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: certmanager.k8s.io/cluster-issuer: core-prod kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;1800&quot; nginx.ingress.kubernetes.io/proxy-send-time...
<p>I have a k8s cluster which uses rancher.io/local-path. There is a PV there</p> <pre><code> $ kubectl describe pv pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Name: pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f Labels: &lt;none&gt; Annotations: pv.kubernetes.io/provisioned-by: ran...
<p>It isn't possible to do this in a single step.</p> <p>But you can:</p> <ol> <li>Access the K8s cluster where PVC exists</li> <li>Create a Deployment (or single Pod) that mounts PVC on the path you prefer (Example /xyz)</li> <li>Run</li> </ol> <pre><code> kubectl -n NAMESPACE cp POD_NAME:/xyz /tmp/ </code></pre> <p...
<p>ENV: <br /> k8s: v1.20.5 <br /> ingress-nginx: v1.6.4</p> <p>I created ingress-nginx-controller from offical yaml: <a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.6.4/deploy/static/provider/baremetal/deploy.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes...
<p><strong>Debug pointers:</strong></p> <ul> <li>Application Level <ul> <li>Check if you have a <code>/test</code> endpoint in your service what does it respond with. Because based on your test requests, with the IP you made request to <code>/</code> and with DNS you made a request to <code>/test</code></li> </ul> </li...
<p>I need to add swap memory in kubernates pod. so that if any pods exceeds the available RAM then it can use the swap memory from hard disk. is that possible in kubernates?</p>
<p>As of <em>Kubernetes 1.22</em>, swap memory is supported (as an alpha feature).</p> <ol> <li>Configure the node's host OS with a swap memory device (e.g., with <code>swapon</code> or <code>/etc/fstab</code>);</li> <li>Configure kubelet on that node to: <ul> <li>still start despite detecting the presence of swap (dis...