prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>So I am using the <a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">nginx ingress</a> and installed it trough the helm chart:</p> <pre><code>helm install --set controller.kind=DaemonSet --set controller.service.annotations.&quot;service\.beta\.kubernetes\.io/do-loadbalancer-size-slug&qu...
<blockquote> <p>Would this be the right and also easiest approach or is there a simpler way?</p> </blockquote> <p>The steps presented in the question based on <a href="https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/" rel="nofollow noreferrer">official NGINX Ingress Controller wiki</a> a...
<p>I am creating a bash script to automate certain actions in my cluster. One of the commands is: <code>kubectl delete -f example.yaml</code>.</p> <p>The problem is that when the resources defined in the YAML do not exist, the following error is printed:</p> <pre><code>Error from server (NotFound): error when deleting ...
<p>To find out if the same object is already present in the cluster as exactly described in the manifest file. you can use the return code of the <code>kubectl diff</code> command.</p> <pre><code>Exit status: 0 No differences were found. 1 Differences were found. &gt;1 Kubectl or diff failed with an error. </code><...
<p>Apologies if this is a really simple question</p> <p>I have a 2 applications that can potentially share the same template</p> <pre><code>applications: # app1: containerName: app1 replicaCount: 10 logLevel: warn queue: queue1 # app2: containerName: app2 replicaCount: 20 logLevel: ...
<p>One of the solutions would be to have one template and multiple value files, one per deployment/environment</p> <pre><code>spec: env: - name: LOG_LEVEL value: &quot;{{ .Values.logLevel }}&quot; </code></pre> <p><em>values-app1.yaml</em>:</p> <pre><code>containerName: app1 replicaCount: 10 logLevel: war...
<p>I have setup a Postgres pod on my Kubernetes cluster, and I am trying to troubleshoot it a bit.</p> <p>I would like to use the <a href="https://hub.docker.com/_/postgres" rel="nofollow noreferrer">official Postgres image</a> and deploy it to my Kubernetes cluster using <code>kubectl</code>. Given that my Postgres se...
<p>If your primarily interested in troubleshooting, then you're probably looking for the <code>kubectl port-forward</code> command, which will expose a container port on your local host. First, you'll need to deploy the Postgres pod; you haven't shown what your pod manifest looks like, so I'm going to assume a <code>D...
<p>Ive hit a wall I'm hoping the SO community can advise on where to go next. I've set up a 6 node kubernetes cluster with calico as the networking service. I've only got two pods, the dns debugging pods from kubernetes and a mysql pod. Well and the kube-system pods. Anyways, I've been at this all day. I've started fro...
<p>Turns out I just hadn't installed Calico correctly. I started from scratch one more time and installed calico using <a href="https://docs.projectcalico.org/getting-started/kubernetes/self-managed-onprem/onpremises" rel="nofollow noreferrer">this guide</a> (NOT THE QUICKSTART), and everything's working. I'm not reall...
<p>I have created a .NET Core microservice using Microsoft sign-in as explained <a href="https://stackoverflow.com/questions/69031953/how-to-set-the-redirect-uri-when-using-microsoft-sign-in-in-a-net-5-application">here</a>. When running it locally or in a local Docker container, everything is working as expected. Howe...
<p>I can see you are using <code>app.UseHsts();</code> in <code>Startup.cs</code> file which will force client to use https. See document <a href="https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-5.0&amp;tabs=visual-studio#http-strict-transport-security-protocol-hsts" rel="nofollow n...
<p>I have two helm charts, the second one is nested to the first tree output:</p> <pre><code>. └── outerChart ├── charts │   └── innerChart │   ├── charts │   ├── Chart.yaml │   ├── templates │   │   ├── deployment.yaml │   │   ├── _helpers.tpl │   │   ├── ingress...
<p>Inside the nested chart, <code>.Values</code> is seen as the contents of <code>.Values.nested</code> (using whatever name for the dependency is in <code>requirements.yaml</code> or <code>Chart.yaml</code>), merged with the top-level <code>global:</code> key.</p> <pre class="lang-yaml prettyprint-override"><code># re...
<p>I am using elastic search exporter to pull elastic search metrics to prometheus. I installed the helm chart and could see the metrics on <a href="http://127.0.0.1:9108/metrics" rel="nofollow noreferrer">http://127.0.0.1:9108/metrics</a> with port forwarding. But i don't see any metrics coming to prometheus. Can some...
<p>There are a few options that might help you:</p> <ul> <li>Check <a href="https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-elasticsearch-exporter/values.yaml" rel="nofollow noreferrer">ServiceMonitor</a> configuration of <code>prometheus-elasticsearch-exporter</code> and ensure that it ...
<p>I have a java web stateful service which connects to mongodb and currently it is being deployed as a jar directly on the VM. This service has a property in properties file i.e. <code>primary</code>.</p> <p>If we set <code>primary</code> to true then it is primary instance of the application and on this instance mong...
<p>For <strong>primary</strong> and <strong>secondary</strong> you can pass the <strong>environment</strong> variables to POD and based on that POD will start with the respective configuration.</p> <pre><code>import java.util.Map; public class EnvMap { public static void main (String[] args) { Map&lt;Strin...
<p>I enabled AGIC in the Azure portal and then created <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout" rel="nofollow noreferrer">Fanout Ingress</a>. But it's not working. I checked Rules (ingress-appgateway &gt; Rules &gt; Path-based routing) and paths are targeting correct back...
<p>Using <code>appgw.ingress.kubernetes.io/backend-path-prefix: &quot;/&quot;</code> We will be able to specify multiple rules.</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: gateway-ingress annotations: kubernetes.io/ingress.class: azure/application-gateway appgw.ingress.kube...
<p>I have what seems like an API issue that results in not being to be able to create a job from a cron job.</p> <p>I have a CronJob Helm file using the API like so:</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJob </code></pre> <p>Deploying that with helm works just fine.</p> <p>Then after it is deployed I attem...
<p>CronJobs is generally available (GA) in Google Kubernetes Engine (GKE) version 1.21 and later.</p> <p>the version you should use <code>apiVersion: batch/v1</code></p> <p><a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/job/autom...
<p>I uninstalled calico using: 'kubectl delete -f calico.yaml'</p> <p>and installed weave using: 'export kubever=$(kubectl version | base64 | tr -d '\n')' 'kubectl apply -f "<a href="https://cloud.weave.works/k8s/net?k8s-version=" rel="nofollow noreferrer">https://cloud.weave.works/k8s/net?k8s-version=</a>$kubever"'</...
<p>My issue was that I was using the command below to setup the Calico CNI:</p> <pre><code>kubectl apply -f https://docs.projectcalico.org/v3.9/manifests/calico.yaml </code></pre> <p>Using the link below instead worked. It's the same without the version I guess.</p> <pre><code>kubectl apply -f https://docs.projectcalic...
<p>I've recently joined a new project in Kubernetes. Last team didn't seem to manage deployments well and some task are managed wit single pods running with init containers in'em.</p> <p>So, for example we have namespace &quot;test&quot; and pods there - some of them were run manually, aside the deployment by other tea...
<p>You need to improve your request with <code>initContainerStatuses</code> to find necessary information only for Init containers:</p> <pre><code>kubectl get pod -n &lt;namespace&gt; -o jsonpath='{range .items[?(@.status.initContainerStatuses[].containerID==&quot;docker://&lt;container_id&gt;&quot;)]}{.metadata.name}{...
<p>Update:<br /> A colleague who works for Microsoft said:</p> <blockquote> <p>Changelog entry for this behaviour change is here: <a href="https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/docs-ref-conceptual/release-notes-azure-cli.md#aks-3" rel="nofollow noreferrer">https://github.com/MicrosoftDocs/azure-do...
<p>For Reference: I got the same and following your <a href="https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/docs-ref-conceptual/release-notes-azure-cli.md#aks-3" rel="nofollow noreferrer">link</a> I found that this worked.</p> <pre><code>az aks show -g aks -n cluster --query identityProfile.kubeletidentity...
<p>I’ve the following yaml which I need to apply using the K8S go sdk (and not k8s cli) I didn’t find a way with the go sdk as it is custom resource, any idea how I can apply it via code to k8s?</p> <p>This is the file</p> <p>Any example will be very helpful!</p> <pre><code>apiVersion: aps.dp.com/v1alpha1 kind: Edtack ...
<p>You can use the <a href="https://github.com/pytimer/k8sutil" rel="nofollow noreferrer">k8sutil</a> repo, see the <a href="https://github.com/pytimer/k8sutil/tree/main/examples/apply" rel="nofollow noreferrer">apply</a> example:</p> <pre><code>package main import ( &quot;context&quot; &quot;flag&quot; &q...
<p>How I will be able to change the access mode in the persistent volume claim access mode? currently it is showing as RWO, and I need to change it as RWX?</p> <p>Many thanks in advance.</p>
<p><code>accessModes</code> in PersistenceVolumeClaim (PVC) is an <strong>immutable field</strong> and <strong>cannot be changed once applied</strong>. Even though you can change the bounded PersistentVolume (PV) <code>accessModes</code> using the same way as suggested by @aurelius which will automatically updated PVC ...
<p>Created Kubernetes cluster deployment with 3 Pods, and all are running fine, but when trying to run them cannot do it, tried doing curl the Ip (Internal)of the Pods in describe section i could see this error &quot;&quot; MountVolume.SetUp failed for volume &quot;default-token-twhht&quot; : failed to sync secret cach...
<p>You can add an additional RBAC role permission to your Pod's service account, reference <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">1</a> <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#define-and-assign" rel="nofollow no...
<p>I'm trying to deploy a Mongodb ReplicaSet on microk8s cluster. I have installed a VM running on Ubuntu 20.04. After the deployment, the mongo pods do not run but crash. I've enabled microk8s storage, dns and rbac add-ons but still the same problem persists. Can any one help me find the reason behind it? Below is my ...
<p>The logs you provided show that you have an incorrectly set parameter <code>wiredTigerCacheSizeGB</code>. In your case it is 0.1, and according to the message</p> <pre><code>&quot;code&quot;:2,&quot;codeName&quot;:&quot;BadValue&quot;,&quot;errmsg&quot;:&quot;storage.wiredTiger.engineConfig.cacheSizeGB must be great...
<p>In my macos I can use below to launch kubernetes dashboard:</p> <pre><code># launch k8s dashboard $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended.yaml # Enable the local access proxy, listening on port 8001 by default $ kubectl proxy </code></pre> <p>I have a ...
<p>This command allows the dashboard to call the Kubernetes API Server. It handles locating the API server and authenticating: see <a href="https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-api/#using-kubectl-proxy" rel="nofollow noreferrer">https://kubernetes.io/docs/using-kubectl-proxy</a></p> <p>Wit...
<p>I have a big application structured with <strong><a href="https://fastapi.tiangolo.com/" rel="nofollow noreferrer">FastAPI</a></strong> (with many routers), that runs in AWS Lambda. I want to migrate it to a container inside <strong><a href="https://kubernetes.io/" rel="nofollow noreferrer">Kubernetes</a></strong>. ...
<p>If you are using the python or Ruby</p> <p>You can create the docker file and use it for creating the docker images and simply deploy it on Kubernetes.</p> <pre><code>FROM ruby:2.7-alpine3.11 WORKDIR /home/app COPY . . RUN bundle install CMD [&quot;ruby&quot;, &quot;main.rb&quot;] </code></pre> <p>For OpenFa...
<p>Imagine I have some pods I need on separate k8s nodes, I could use something like this if I know both pods have a label <code>my/label=somevalue</code></p> <pre class="lang-yaml prettyprint-override"><code>affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 2 pod...
<p>As far as I know, there is no built-in way to specify affinity without knowing label values. At the stage of creating a pod you need to provide both key and value. In order for affinity to work properly, you need to know this value at the time of creation and put it in the appropriate yaml file.</p> <p>Theoretically...
<p>Firstly, this is my folder:</p> <p><a href="https://i.stack.imgur.com/0zvFX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0zvFX.png" alt="enter image description here" /></a></p> <p>This is my Dockerfile:</p> <pre><code>FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env WORKDIR /app COPY *.csproj ./ RUN...
<h2>What happens with Linux containers:</h2> <p>Kubernetes on Windows Docker Desktop by default runs its components in WSL2 (Windows subsystem for Linux), it's separate virtual machine with its own IP address and <code>localhost</code>. This is the reason why service is not reachable on <code>localhost</code> from host...
<p>I am testing out Airflow on Kubernetes. Currently, I am running a simple DAG and purposefully trying to crash it to see what happens by running a memory-intensive task. My process queries a very large table and I'm trying to generate an Out Of Memory (OOM) error. I know it's happening because the task fails but the ...
<p>Take a look at this issue: <a href="https://github.com/kubernetes/kubernetes/issues/50632" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/50632</a></p> <p>and this article: <a href="https://medium.com/back-market-engineering/a-story-of-kubernetes-celery-resource-and-a-rabbit-ec2ef9e37e9f" ...
<p>I recently noticed a big accumulation of pods with status 'Shutdown'. We have been using Kubernetes since October, 2020.</p> <p>Production and staging is running on the same nodes except that staging uses preemtible nodes to cut the cost. The containers are also stable in staging. (Failures occur rarely as they are ...
<p>The evicted pods are not removed on purpose, as k8s team says here <a href="https://github.com/kubernetes/kubernetes/issues/54525#issuecomment-340035375" rel="noreferrer">1</a>, the evicted pods are nor removed in order to be inspected after eviction.</p> <p>I believe here the best approach would be to create a cron...
<p>I have a minimal web application running on local minikube cluster. The backend is exposing an API at <code>/be/test/hi</code> and service name is also be. When I send a GET request from frontend to backend i get:</p> <pre><code>main.js:15 GET http://be/be/test/hi net::ERR_NAME_NOT_RESOLVED </code></pre> <p>If I run...
<p><strong>Your frontend code (javascript) is executing in your browser, not inside the kubernetes cluster (nginx pod)</strong></p> <p>You have 3 options here,</p> <ol> <li>Create a NodePort Service for your frontend</li> <li>Rely on kubeproxy for doing a port forward</li> <li>Create an ingress</li> </ol>
<p>I have created a Kind cluster with containerd runtime. Here is my node:</p> <pre><code>root@dev-001:~# k get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME local-cluster-control-plane Ready...
<p>Kind Kuberenetes uses Docker to <strong><a href="https://kind.sigs.k8s.io/" rel="noreferrer">create container(s) which will be Kubernetes node(s)</a></strong>:</p> <blockquote> <p><a href="https://sigs.k8s.io/kind" rel="noreferrer">kind</a> is a tool for running local Kubernetes clusters using Docker container “node...
<p>I am having an issue on GKE where all this error is being spewed from all name spaces. Not sure what might be the issue or how to troubleshoot this.</p> <p>message: &quot;MountVolume.SetUp failed for &quot;<strong>volume-name</strong>-token-m4rtn&quot; : failed to sync secret cache: timed out waiting for the conditi...
<p>The error you are receiving points to be a problem with RBAC(Role-based access control) permissions, looks like the service account used by the pod does not have enough permissions.</p> <p>Hence, the default service account within the namespace you are deploying to is not authorized to mount the secret that you are ...
<p>Searching the web for <em>how to deploy a locally build docker image in kubernetes</em>, I found solutions in combination with <strong>minikube</strong> only.</p> <p>For example: <a href="https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d" rel="nofollow noreferrer">minikube</a>...
<p>Using a private registry is definitely the way to do it. Some may rely on a third-party registry, others would deploy it in kubernetes. Solutions may include Artifactory, Nexus, Portus, Harbor, GitLab, docker-registry, ... most of which may use s3 storage and would scale horizontally.</p> <p>Now, with minikube, host...
<p>We're trying to install the <code>ingress-nginx</code> controller onto an Azure Kubernetes Service (AKS) cluster, following the steps from the <a href="https://learn.microsoft.com/en-us/azure/aks/ingress-internal-ip#create-an-ingress-controller" rel="nofollow noreferrer">Azure documentation</a>.</p> <p>Kubernetes ve...
<p>You need to Quote the Values. I would also suggest to simplify the code bcs all the values are set by default inside the <a href="https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml" rel="nofollow noreferrer">Helm Chart of ingress-nginx</a>:</p> <pre><code>SET NAMESPACE=ingress-bas...
<p>just looking for some clarification here I have a 2 node etcd cluster:</p> <pre><code>master01=http://10.1.1.21:2379,master02=http://10.1.1.22:2379 </code></pre> <p>all running fine. If I login to master01 and do the following:</p> <pre><code>etcdctl --cluster=true endpoint health </code></pre> <p>i get a good resp...
<p>An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. For a cluster with n members, quorum is (n/2)+1. For any odd-sized cluster, adding one node will always increase the number of nodes necessary for quorum. Although adding a node to an odd-sized cluster appears better since...
<p>I currently have airflow running in a Kubernetes cluster in Azure using the helm chart for Apache airflow. I am able to use the API from the VM where I port forward the web server, using the endpoint: http://localhost:8080/api/v1/dags/test_trigger/dagRuns</p> <p>Can anyone point me in the right direction for how I c...
<p>There is a short chapter in Airflow Helm Chart's Production Guide:</p> <p><a href="https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#accessing-the-airflow-ui" rel="nofollow noreferrer">https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#accessing-the-airflow-ui</a></p> <p>It...
<p>I’m working on to install the Kubernetes cluster on Azure Ubuntu Virtual Machine 20.04 LTS. For that I have followed below articles.</p> <p><a href="https://www.edureka.co/blog/install-kubernetes-on-ubuntu#InstallingKubeadmKubeletKubectl" rel="nofollow noreferrer">https://www.edureka.co/blog/install-kubernetes-on-ub...
<p>I have also faced this problem and solved this by changing the cgroup driver of docker to systemd</p> <pre><code>sudo vi /lib/systemd/system/docker.service Then Modifiy the line as below ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --exec-opt native.cgroupdriver=systemd sudo sy...
<p>I've just deployed websocket based <code>echo-server</code> on <a href="https://aws.amazon.com/eks/?whats-new-cards.sort-by=item.additionalFields.postDateTime&amp;whats-new-cards.sort-order=desc&amp;eks-blogs.sort-by=item.additionalFields.createdDate&amp;eks-blogs.sort-order=desc" rel="nofollow noreferrer">AWS EKS</...
<blockquote> <p>Do I miss anything in my current, vanilla config?</p> </blockquote> <p>You probably exposed your <code>echo-server</code> app using <a href="https://stackoverflow.com/questions/41509439/whats-the-difference-between-clusterip-nodeport-and-loadbalancer-service-types/67931156#67931156">service type - <cod...
<p>I have an application running in Kubernetes as a <code>StatefulSet</code> that starts 2 pods. It has configured a liveness probe and a readiness probe.</p> <p>The <code>liveness probe</code> call a simple <code>/health</code> endpoint that responds when the server is done loading</p> <p>The <code>readiness probe</co...
<h2>StatefulSet deployment</h2> <blockquote> <p>Is it possible to force kubernetes deployment to complete and deploy 2 pods, even when the readiness probe is still not passing?</p> </blockquote> <p>Assuming it's meant <code>statefulSet</code> instead of <code>deployment</code> as object, the answer is no, it's not poss...
<p>I have kube-dns running in a (bare metal) cluster. I know that it works, as I can <a href="https://github.com/kubernetes/dns/blob/master/docs/specification.md" rel="noreferrer">interpolate a service to a name</a> I've created and get a host entry:</p> <pre><code>$ host elk-service-headless.default.svc.cluster.local...
<p>This post will help you find the internal DNS record of your K8s services on a cluster that runs kube-dns:</p> <ol> <li>Find the ClusterIP of the kube-dns service:</li> </ol> <p><code>kubectl -n kube-system get svc kube-dns</code></p> <p><a href="https://i.stack.imgur.com/LocI9.png" rel="noreferrer"><img src="https:...
<p>I am facing a weird issue with my pods. I am launching around 20 pods in my env and every time some random 3-4 pods out of them hang with Init:0/1 status. On checking the status of pod, Init container shows running status, which should terminate after task is finished, and app container shows Waiting/Pod Initializin...
<p>A Pod can be stuck in Init status due to many reasons.</p> <p>PodInitializing or Init Status means that the Pod contains an <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="noreferrer">Init container</a> that hasn't finalized (Init containers: specialized containers that run before ...
<p>I am trying to start a postgres pod on microk8s kubernetes cluster. At the moment the postgres container with all its data is started locally on the host machine.</p> <p>The question is: Is it possible to map the current volume (from local docker volume ) to the kubernetes pod deployment?</p> <p>I have used <code>ko...
<p>Posted community wiki for better visibility. Feel free to expand it.</p> <hr /> <p>There is possibility to share same docker volume with the Kubernetes pod by <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume" rel="nofollow noreferrer">de...
<p>I am unable to connect to our Kubernetes cluster. The <code>kubectl</code> command does not seem to take the configuration into account...</p> <p>When I issue a <code>kubectl cluster-info</code> (or <code>kubectl get pods</code>) I get the following error message:</p> <blockquote> <p>The connection to the server loc...
<p>Your current context is unset, as seen with <code>current-context: &quot;&quot;</code>; if you were to run <code>kubectl --context username-context get pods</code> I would expect it to do more what you want. If that turns out to be the case, one can run <code>kubectl config use-context username-context</code> to set...
<p>I have an application that has two parts: one deployer and the application runtime environment. The deployer needs to have access to different namespaces to be able to launch, edit and delete the application deployments, svc, configmaps, etc.</p> <p>I first launch the deployer via a helm chart and then the deployer ...
<p>You can create a <code>ClusterRole</code> that will describe what the role can do. Then create a <code>RoleBinding</code> in each namespace you want the role user to have the priviliges. Here is a nice example from the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-example" rel="n...
<p>I am just starting out with <code>kubernetes</code>. I have created a simple app which is working fine with the external IP address. It's a <code>mongodb-express</code> with <code>mongo-db</code> backend. I am trying to get a domain name mapped to it, instead of the IP address.</p> <pre><code>apiVersion: apps/v1 kin...
<p><strong>Cloud DNS</strong> config is the same as the <strong>route53</strong> configuration. You can add the <strong>CName</strong> record or <strong>A</strong> record as per requirement.</p> <p>For a simple use case, you can follow this document which is regarding adding static IP to DNS and mapping the domain.</p>...
<p>My metrics-server was sudden not working and got below information:</p> <pre><code>$ kubectl get apiservices |egrep metrics v1beta1.metrics.k8s.io kube-system/metrics-server False (MissingEndpoints) </code></pre> <p>I tried to implement below but still not okay:</p> <pre><code>$ git clone https://github.com/kuber...
<p>I solved this issue the following:</p> <p>Download metrics-server:</p> <pre><code>wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml </code></pre> <p>Remove metrics server:</p> <pre><code>kubectl delete -f components.yaml </code></pre> <p>Edit downloaded file and add <e...
<p>We have load balancing, discovery, etc in the Spring cloud. But the same load balancing, discovery is available in Kubernetes as well. So just wanted to know when we should go with Spring cloud (load balancing or discovery) and when to use Kubernetes</p>
<p>It depends on your use-case. There can be situations where you need to directly use <code>Eureka server registry</code> and <code>Eureka client discovery</code> offered by <code>Spring Cloud Netflix</code>. <code>Ribbon</code> is the client side load balancer provided by <code>Spring Cloud Netflix</code>.</p> <p>In ...
<p>The DevSpace-Django tutorial in question is the following:</p> <p><a href="https://devspace.cloud/blog/2019/10/18/deploy-django-to-kubernetes" rel="nofollow noreferrer">https://devspace.cloud/blog/2019/10/18/deploy-django-to-kubernetes</a></p> <p>Trying something completely barebones to understand how <code>devspace...
<p>Kind of important step being left off of the <a href="https://devspace.cloud/blog/2019/10/18/deploy-django-to-kubernetes" rel="nofollow noreferrer">Django tutorial</a>. After running <code>devspace dev</code>, you need to run in the <code>devspace</code> CLI that comes up:</p> <pre><code>./manage.py runserver </code...
<p>I am running my script inside a Kubernetes container and a zip file is downloaded.</p> <ol> <li><p>I want to verify how can I access the content inside a zip file when I am triggering tests from a windows machine and the tests are running inside the Kubernetes container through automation.</p> </li> <li><p>How can I...
<blockquote> <p>I want to verify how can I access the content inside a zip file when I am triggering tests from a windows machine and the tests are running inside the Kubernetes container through automation.</p> </blockquote> <p>If it's possible for you to write API uploading the zip file to storage you can do that als...
<p>I want to patch an existing secret resource within Kubernetes. The object is called <code>centos-secretstorage</code> within the <code>default</code> namespace. I want to add a simple label of <code>test: empty</code>. However, this fails when the secret object <code>centos-secretstorage</code> exists, but it doesn'...
<p>The problem is that the <code>add</code> operation in the JSON patch strategy requires the path to point to an existing map, while the object you are patching does not have this map at all. This is why when <em>any</em> label exists, the patch succeeds. We can work around this by using a different patch strategy. I ...
<pre><code>initContainers: - name: git-clone-openg2p image: bitnami/odoo command: [&quot;/bin/sh&quot;,&quot;-c&quot;] args: ['apt-get git &amp;&amp; git clone https://github.com/repo.git &amp;&amp; git clone https://github.com/repo.git /bitnami/odoo'] volumeMounts: - name: odoo-data mou...
<p>As far as I know, there is no command <code>apt-get get</code>, you probably want:</p> <pre><code>apt-get install -y git </code></pre>
<p>I'm trying to set up a database migration job for dotnet entity framework. It seems that I cannot connect to mysql database service from kubernetes job, but I can connect from my desktop when I forward ports.</p> <p>This is my working MySql deployment + service:</p> <pre><code>kind: Service metadata: name: mysql...
<p>I figured it out after reading kubernetes documentation: <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/</a></p> <p>I've installed DNS utils with the following command: <cod...
<p>So I've been trying to fix this for days now and I'm beyond stuck.</p> <p>My app is running, and I can access the site when I go to the default url (example.com). I can refresh on this url without issues, and I can navigate through the pages being rendered through react router as long as I don't refresh on any other...
<p>Your <code>path: /.*</code> has no capture groups, so <code>/$1</code> and <code>/$2</code> are undefined.</p> <p>Try the following:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: myApp-ingress annotations: kubernetes.io/ingress.class: ngi...
<p>I am trying to create a cli tool for kubernetes. I need to generate Bearer Token for communicating with kubernetes API. How can I generate the token from Kubeconfig File? I do not want to use external library or kubectl.<br><br> Here is example Kubeconfig File:</p> <pre><code>apiVersion: v1 clusters: - cluster: ...
<blockquote> <p>I need to generate Bearer Token for communicating with kubernetes API</p> </blockquote> <p>You cannot ”generate” these tokens. They are <em>issued</em> by the control plane and signed with the <em>private key</em> that the control plane holds. It would be a security hole if you could generate these on t...
<p>I'm having some issues with permissions and I'm really hoping someone can point me to where I'm going wrong...</p> <p>I've got a Kube cluster set up and functioning (for example, I'm running a mysql pod and connecting to it without issue), and I've been trying to get a Postgresql pod running with TLS support. The se...
<p>Figured it out.. Turns out it was just a necessary block in the template/spec:</p> <pre><code>securityContext: runAsUser: 70 fsGroup: 70 </code></pre> <p>Took way too long to find a <a href="https://stackoverflow.com/questions/66316489/dockerfile-run-addgroup-group-postgres-in-use">reference</a> to this using th...
<p>I'm new to K8s and currently following a course that is using K8s.I am using minikube in my local machine. I'm stuck on the part in which I need to directly communicate with ingress-nginx which happens to be in a separate namespace.</p> <p>Here's some information regarding my setup.</p> <pre><code> ✗ client (main...
<p>If you ingress controller in Ingress-nginx namespace it perfect or also fine it's any other namespace.</p> <p>You have create the ingress object in that namespace where your application running, regardless of where you controller running.</p> <p>Ingress will find the controller or communicate with it across namespac...
<p>I have the following code:</p> <pre><code>config.load_incluster_config() v1 = client.CoreV1Api() my_init_containers = v1.read_namespaced_pod(namespace=NAMESPACE, name=pod_name).spec.init_containers </code></pre> <p>This gives me all the containers in <code>init_containers</code>. My problem is that I want to get onl...
<p>You are close:</p> <pre class="lang-py prettyprint-override"><code>my_init_containers = v1.read_namespaced_pod(namespace=NAMESPACE, name=pod_name).spec.init_containers for container in my_init_containers: if container.name == &quot;the_one_im_looking_for&quot;: init = container break </code></pre...
<p>I have a kubernetes cluster, with two nodes running.</p> <p>I have argocd being used to handle pulling in any changes to my microservice (one microservice, currently, but I will be adding to that).</p> <p>My application is being built as a helm chart. So when my repo changes, i update my helm chart, and then argocd ...
<ol> <li><p>In my opinion, you should package Istio components like <code>VirtualService</code>, <code>RequestAuthentication</code> etc. to the application if they &quot;belong&quot; to the application. You could even add <code>Gateways</code> and <code>Certificates</code> to the app if it fits your development model (...
<p>I wanted to host a TDengine cluster in Kubernetes, then met an error when I enabled coredump in the container.</p> <p>I've searched Stack Overflow and found the Docker solution, <a href="https://stackoverflow.com/questions/60574458/how-to-modify-the-core-pattern-when-building-docker-image">How to modify the `core_pa...
<p>Here's an example:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: my-app spec: template: spec: containers: - image: my-image name: my-app ... securityContext: allowPrivilegeEscalation: false runAsUser: 0 </code></pre>
<h1>The problem</h1> <h2>Error photo</h2> <p><a href="https://i.stack.imgur.com/4tpWA.png" rel="nofollow noreferrer">Flyway Job Error</a></p> <p>I'm currently attempting to use flyway to perform migrations in postgres. I have a feeling the init scripts are unable to be found based on this error message. Not too sure wh...
<p>I suspect the way you are calling <code>command</code> is the issue. it needs to be <code>command: [&quot;flyway&quot;, &quot;-url=jdbc:postgresql://postgres-master:5432/wallet&quot;, &quot;-user=test_user&quot;, &quot;-password=testuser1234&quot;, &quot;-connectRetries=60 migrate&quot;]</code></p> <p>Also, I think ...
<p>I'm playing around with kubernetes ConfigMaps. In the <a href="https://kubernetes.io/docs/concepts/configuration/configmap/#configmaps-and-pods" rel="nofollow noreferrer">official documentation</a>, I see &quot;file-like keys&quot; in the <code>data</code> field:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadat...
<blockquote> <ul> <li>Proper syntax highlighting for the &quot;file-like&quot; configurations</li> <li>Can run auto formatters against the &quot;file-like&quot; configurations</li> </ul> </blockquote> <p>Yes, it is easier to save the files as proper files on your machine and in Git.</p> <p>I propose that you use the <a...
<p>I'm trying to run minikube with hyperv without open an Administrator powershell. Is there any way? I'm doing this:</p> <pre><code>choco install minikube minikube.exe start --vm-driver "hyperv" </code></pre> <p>If I try to launch minikube start from a normal powershell it gives me this message:</p> <pre><code>X h...
<p>To launch minikube from non-admin powershell. You need to add a non-admin user to &quot;Hyper-V Administrators&quot; group.</p> <p>Open PowerShell with administrator right. And run below command to add current user name to &quot;Hyper-V Administrators&quot; group. You need to sign off and sign in to take effect.</p>...
<p>I am working on a Kubernetes CronJob in GKE to <a href="https://cloud.google.com/sql/docs/mysql/import-export/exporting" rel="nofollow noreferrer">export SQL databases from GCP Cloud SQL</a>. I have a single GCP Cloud SQL instance whose Google service account is <code>p848827672298-eef1pd@gcp-sa-cloud-sql.iam.gservi...
<p>Hope your API enabled, please trying disabling and enabling API once faced once similar issue and worked: <code>gcloud services enable compute.googleapis.com</code> <a href="https://dzone.com/articles/enabling-gke-workload-identity" rel="nofollow noreferrer">https://dzone.com/articles/enabling-gke-workload-identity...
<p>I would like to deploy an ngingx-ingress controller on my self-hosted Kubernetes (microk8s) that is configurable to listen on one or more interfaces (external IPs).</p> <p>Not even sure if that is easily possible and I should just switch to an external solution, such as HAProxy or an nginx.</p> <p>Required behavior:...
<blockquote> <p>I would like to deploy an ngingx-ingress controller on my self-hosted Kubernetes (microk8s) that is configurable to listen on one or more interfaces (external IPs).</p> </blockquote> <p>For above scenario, you have to deploy the multiple ingress controller of Nginx ingress and keep the different <strong...
<p>The following error is returned:</p> <pre><code>error: you must specify two or three arguments: verb, resource, and optional resourceName </code></pre> <p>when I executed:</p> <pre><code>kubectl auth --as=system:serviceaccount:mytest1:default can-i use psp 00-mytest1 </code></pre> <p>I already have following manifes...
<p>You are missing the flag <code>--subresource</code>. If I execute</p> <pre><code>kubectl auth --as=system:serviceaccount:mytest1:default can-i use psp --subresource=00-mytest1 </code></pre> <p>I have clear answer. In my situation:</p> <pre><code>no </code></pre> <p>You can also get an warning like this:</p> <pre><co...
<p>We are using Spring Boot in Kubernetes in our project. Recently we decided to add graceful shutdown for our application in order to ensure seamless deployments and make sure no requests are failed during pod terminations for whatever reason. Even though Spring Boot provides graceful shutdown, it seems there is still...
<p>It seems like this might be up to your preferences but it looks like the 5-10 seconds sleep is a recommended range:</p> <blockquote> <p>In “Kubernetes in Action”, Lukša recommends 5–10 seconds <a href="https://blog.gruntwork.io/delaying-shutdown-to-wait-for-pod-deletion-propagation-445f779a8304" rel="nofollow norefe...
<p>I have a simple stateful with SFTP features and a second service try to connect to it.</p> <p>When ISTIO is enabled, the connection is closed by the sftp service. We can find this log:</p> <pre><code>Bad protocol version identification '\026\003\001' </code></pre> <p>The routing is OK.</p> <p>The service:</p> <pre><...
<p>It seems Envoy proxy (and Istio by proxy) does not support SFTP protocol (<a href="https://github.com/istio/istio/issues/7664#issuecomment-411948731" rel="nofollow noreferrer">referecce</a>).<br /> Your workaround is currently the only way to make it work.</p> <p>If you want your auto-discovered services in the mesh...
<p>I have an architecture with multiple pods subscribing to a GCP Topic.</p> <p>Every pod handles messages while it's up but is not interested in receiving messages it missed when it was not up.</p> <p>In ActiveMQ this was Non Persistent messages, but I don't see the equivalent in GCP. The only thing I thought is messa...
<p>There is no option in Cloud Pub/Sub to disable storage. You have two options.</p> <ol> <li><p>As you suggest, set the message retention duration to the minimum, 10 minutes. This does mean you'll get messages that are up to ten minutes old when the pod starts up. The disadvantage to this approach is that if there is ...
<p>I am trying to get some secret objects from my cluster using the <code>k8s</code> <code>go</code> client library as follows</p> <pre><code>secret, err := clientset.CoreV1().Secrets(&quot;mynamespace&quot;).Get(&quot;name-of-my-secret&quot;, metav1.GetOptions{}) </code></pre> <p>This worked well as long as I had to g...
<pre><code>clientset.CoreV1().Secrets(&quot;&quot;).List(context.TODO(), metav1.ListOptions{LabelSelector: &quot;k8s-app=kube-proxy&quot;}) </code></pre>
<p>So I've been trying to fix this for days now and I'm beyond stuck.</p> <p>My app is running, and I can access the site when I go to the default url (example.com). I can refresh on this url without issues, and I can navigate through the pages being rendered through react router as long as I don't refresh on any other...
<p>So I think I found the issue, it seems to be working now, I still run into a problem of cmd shift r occasionally giving an unexpected token, but as a whole it seems to work.</p> <p>I added the run script to the package.json, and I'm using that as the CMD now</p> <p><code>CMD [&quot;npm&quot;, &quot;run&quot;, &quot;...
<p>I created two sample application(tcp-server and tcp-client) for checking TCP connection in istio environment. Used the below link to create server and client in g0</p> <p><a href="https://www.linode.com/docs/guides/developing-udp-and-tcp-clients-and-servers-in-go/" rel="nofollow noreferrer">https://www.linode.com/do...
<p>Posting the solution I found.</p> <p>Issue: I was trying to connect to server using ip address and nodePort, which some how not working in istio environment</p> <p>Solution: From Client instead of providing ip address and nodePort of server node, give service name and container port of server app.</p> <p>Extra Info:...
<p>I have a Kubernetes cluster <code>v1.22.1</code> set up in bare metal CentOS. I am facing a problem when setting up Nginx Ingress controller following <a href="https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/" rel="nofollow noreferrer">this link</a>.</p> <p>I followed exactly...
<h2>Reproduction and what happens</h2> <p>I created a one node cluster using <code>kubeadm</code> on CentOS 7. And got the same error.</p> <p>You and I were able to proceed further only because we missed this command at the beginning:</p> <pre><code>git checkout v1.12.1 </code></pre> <p>The main difference is <code>ing...
<p>I have been trying to find a solution to this among the previously asked questions, but I can't find one that works for my use case (which to me seems like a general use case)</p> <p>So I have a load balancer service and 5 pods in a namespace that share a label <code>app=abc_application</code>. So when I want to fol...
<p>you can also do the same with <strong>logs</strong></p> <pre><code>kubectl logs &lt;POD name&gt; -n &lt;Namespace name&gt; --since-time='2021-09-21T10:00:00Z' </code></pre> <p>Using simple since with logs</p> <pre><code>kubectl logs &lt;POD name&gt; -n &lt;Namespace name&gt; --since=60h (5s, 2m, or 3h) </code></pre>...
<p>I have been trying to find a solution to this among the previously asked questions, but I can't find one that works for my use case (which to me seems like a general use case)</p> <p>So I have a load balancer service and 5 pods in a namespace that share a label <code>app=abc_application</code>. So when I want to fol...
<p>I tried this with <code>kubectl tail</code> and got it working</p> <p>To install <code>kubectl tail</code> -&gt; <code>kubectl krew install tail</code></p> <p><code>kubectl tail -n &lt;namespace&gt; -l app=abc_application --since=2h</code></p>
<p>The Kubernetes documentation says:</p> <blockquote> <p>The administrator creates one <code>ResourceQuota</code> for each namespace.</p> </blockquote> <p>However, Kubernetes API does not prevent from creating more than one <code>ResourceQuota</code> per namespace.</p> <p><strong>What happens if I have two <code>Resou...
<p>Yes, that's true, it's possible to create multiple ResourceQuota in the same namespace and it has been mentioned in few cases in <a href="https://github.com/kubernetes/kubernetes/issues/23698" rel="nofollow noreferrer">this issue</a>. It's important to remember that the ResourceQuota is one of the Admission Controll...
<p>i got really confused since i am new to kubernetes is there any difference between kubernetes endpoint and ClusterIP ?</p>
<p>An Endpoint in Kubernetes is just an IP address and port tied to some resource, and you rarely want to think about them at all as they are just used by other resources like Services. It is though a Kubernetes resource that can be found, listed and described.</p> <p>You can list all Endpoint resources in the cluster ...
<p>I'm trying to deploy okteto environment on Visual Studio Code to use Remote Development on Kubernetes.</p> <p>Following the official steps (<a href="https://okteto.com/blog/remote-kubernetes-development/" rel="nofollow noreferrer">https://okteto.com/blog/remote-kubernetes-development/</a>), I executed &quot;Okteto: ...
<p>Using a proxy is not currently supported in the Okteto. We're looking into it though.</p> <p>For now, a workaround is to manually download the syncthing binary and save it as<code>%HOME%\.okteto\syncthing.exe</code></p>
<p>I have a local kubernetes cluster (minikube), that is trying to load images from my local Docker repo.</p> <p>When I do a &quot;docker images&quot;, I get:</p> <pre><code>cluster.local/container-images/app-shiny-app-validation-app-converter 1.6.9 cluster.local/container-images/app-shiny-app-validation ...
<p>Since minikube is being used, you can refer to their documentation. It is recommended that if a <code>imagePullPolicy</code> is being used, it needs to be set to <code>Never</code>. If set to <code>Always</code>, it will try to reach out and pull from the network.</p> <p>From docs: <a href="https://minikube.sigs.k8s...
<p>We have a bunch of pods that use RabbitMQ. If the pods are shut down by K8S with SIGTERM, we have found that our RMQ client (Python Pika) has no time to close the connection to RMQ Server causing it to think those clients are still alive until 2 heartbeats are missed.</p> <p>Our investigation has turned up that on S...
<p>TERM kills nothing, it's up to your application to decide how to handle it. SIGKILL is sent some time later which does forcibly nuke the process but 1) it also closes all sockets which RMQ can detect and 2) you control how long the container has to close cleanly via terminationGracePeriodSeconds</p>
<p>Does the Kubernetes scheduler place the pods on the nodes only based on their requested resources and nodes' available resources at the current snapshot of the server or it also takes into account the node's historical resource utilization?</p>
<p>In the official <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/" rel="nofollow noreferrer">Kubernetes documentation</a> we can find process and metrics used by <code>kube-scheduler</code> for choosing node for pod.</p> <p>Basically this is 2-step process:</p> <blockquote> <p>kube-sch...
<p><code>Kubectl</code> allows you to create ad hoc jobs based on existing crons.</p> <p>This works great but in the documentation there is no specification for passing arguments upon creation of the job.</p> <p>Example:</p> <pre><code>kubectl -n my-namespace create job --from=cronjob/myjob my-job-clone </code></pre> <...
<p>Although <code>kubectl</code> currently does not allow you to use the --from flag and specify a command in the same clause, you can work around this limitation by getting the yaml from a dry run and using <code>yq</code> to apply a patch to it.</p> <p>For example:</p> <pre><code># get the original yaml file kubectl ...
<p>I have a local kubernetes cluster (minikube), that is trying to load images from my local Docker repo.</p> <p>When I do a &quot;docker images&quot;, I get:</p> <pre><code>cluster.local/container-images/app-shiny-app-validation-app-converter 1.6.9 cluster.local/container-images/app-shiny-app-validation ...
<ol> <li>Add <code>cluster.local</code> to your <code>/etc/hosts</code> file in all your kubernetes nodes.</li> </ol> <pre><code>192.168.12.34 cluster.local </code></pre> <ol start="2"> <li>Check whether you can login to registry using <code>docker login cluster.local</code></li> <li>If your registry has self-signed ce...
<p>I am new to <code>Kubernetes</code> and using EKS cluster end-point provided by third party. I trying to create a simple ngnix deployment using following command:</p> <pre><code>kubectl create deployment nginx-depl --image=nginx </code></pre> <p>It gives me following error:</p> <pre><code>error: failed to create dep...
<p>The cluster is installed with <a href="https://thenewstack.io/kyverno-a-new-cncf-sandbox-project-offers-kubernetes-native-policy-management/" rel="nofollow noreferrer">Kyverno</a>. Your <code>create</code> request was rejected by this policy engine base on a policy setup by the provider. Try the following spec:</p> ...
<p>I have these two ingresses for a blue (production) and green (canary) deployment and I want in my nginx snippet to set certain stuff based on whether the request is served from production service or from canary. What should be the <code>if</code> statement in the snippet?</p> <pre><code>--- apiVersion: networking.k...
<p>I don't think there is a specific <em>canary property</em> you can check against.<br /> You could, however, look for specific <em>cookie</em>, that your canary service could provide</p> <pre><code>if ($http_cookie ~* &quot;id=([^;]+)(?:;|$)&quot;) { ... } </code></pre> <p>Note that, while nginx does have <a href...
<p>I have an AKS cluster with a web application. I want to provision an nginx Ingress controller to expose the app to the internet and later enable TLS.</p> <p>I have been following the official documentation</p> <p><a href="https://learn.microsoft.com/en-us/azure/aks/ingress-basic" rel="nofollow noreferrer">https://le...
<p>I believe you are using a static IP address with the NGINX Ingress controller service. This issue pops up if the cloud controller manager cannot find the static Azure Public Ip Address resource in the containing resource group mentioned in the NGINX Ingress Controller's service annotation (if no resource group is ex...
<p>For example, I run a Pod in a public cloud cluster. The Pod has a main container running the app. The cluster has an environment variable named <code>ABC</code>. Within the main container, I wish to access the environment variable <code>ABC</code>. What is the best way to do so?</p>
<p><strong>Very simple option</strong></p> <pre><code>apiVersion: v1 kind: Pod metadata: name: envar-demo labels: purpose: demonstrate-envars spec: containers: - name: envar-demo-container image: gcr.io/google-samples/node-hello:1.0 env: - name: DEMO_GREETING value: &quot;Hello from the en...
<p>The Python <code>kubernetes</code> module provides two methods for listing secrets:</p> <ul> <li><code>list_namespaced_secret</code></li> <li><code>list_secret_for_all_namespaces</code></li> </ul> <p>I want to list the secrets for the namespace in which a container is running.</p> <p>The <code>list_secret_all_for_na...
<p>If you could use <code>fieldRef</code> in the pod's manifest to set the env variable.</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: dapi-envars-fieldref spec: containers: - name: test-container image: k8s.gcr.io/busybox command: [ &quot;sh&quot;, &quot;-c&quot;] args: - whil...
<p>I am deploying in Azure AKS a regular deployment and i want to use keyvault to store my secrets to get access to a database.</p> <p>This is my deployment file:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: labels: app: sonarqube name: sonarqube spec: selector: matchLabels: app: so...
<p>The <code>userAssignedIdentityID</code> in your <code>SecretProviderClass</code> must be the User-assigned Kubelet managed identity ID (Managed Identity for the NodePool) and not the Managed Identity created for your AKS bcs the volumes will be access via kubelet on the nodes.</p> <pre><code>apiVersion: secrets-stor...
<p>We have a microservices based application running in openshift for which we need to design an API gateway.</p> <p>This API gateway is expected to perform minimal checks like authentication , routing to appropriate micro services , logging , tracing etc ( Authorisation would be handled by respective micro services )...
<blockquote> <p>Should we go for a commercial product ( nginx , Red Hat OpenShift API gateway) or an open source spring cloud gateway would suffice ?</p> </blockquote> <p>Open-source version of Kong will work also.</p> <p>i would suggest to check &amp; read this article first : <a href="https://medium.com/@harsh.manvar...
<p>In order to apply Kubernetis for the first time as a backend developer of a startup, I looked for AWS' guide to EKS and found a good document and followed it.</p> <p>The link to the guide is as follows. <a href="https://aws-eks-web-application.workshop.aws/en/10-intro.html" rel="nofollow noreferrer">https://aws-eks-...
<p>HPA works on the Metrics server data to scale POD or not.</p> <pre><code>kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml </code></pre> <p>installation : <a href="https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html" rel="nofollow noreferrer"...
<p>I am trying to deploy multiple cronjob using same helm chart. I have defined cronjobs in values.yaml file which is below.</p> <pre><code>cronjob: crons: &quot;0&quot;: name: one-minute-cron schedule: &quot;*/1 * * * *&quot; &quot;1&quot;: name: five-minute-cron schedule: &quot;*/5 * * * *&q...
<p>First, I think that <code>cronjob.crons</code> should be an array. Try changing it to:</p> <pre><code>cronjob: crons: - id: &quot;0&quot; name: &quot;one-minute-cron&quot; schedule: &quot;*/1 * * * *&quot; - id: &quot;1&quot; name: five-minute-cron schedule: &quot;*/5 * * * *&quot; ...
<p>I am running Spring Batch application in Kubernetes environment. The k8s cluster have one master and three worker nodes. I am testing spring batch under high load, which is spawning around 100 worker pods. However, all the 100 pods are coming up only on two out of three worker nodes. No node selector or additional l...
<p>Posting this out of comments as a community wiki for better visibility, feel free to edit and expand.</p> <hr /> <p>There are scheduling mechanics which can prevent scheduling pods on some nodes:</p> <ul> <li><p><a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" rel="nofollow nor...
<p>Such as <code>system:masters</code>、<code>system:anonymous</code>、<code>system:unauthenticated</code>.</p> <p>Is there a way to have all system groups that do not contain external creation, just the system,kubectl command or a list?</p> <p>I searched the Kubernetes documentation but didn't find a list or a way to ge...
<p><strong>There is no build-in command to list all the default user groups from the Kubernetes cluster.</strong></p> <p>However you can try to workaround in several options:</p> <ul> <li>You can create your custom script (i.e. in Bash) based on <code>kubectl get clusterrole</code> command.</li> <li>You can try install...
<p>I was wondering if there are any ways to spin up another job, on the event that a pod controlled by a job fails, which would update the job controlling that pod’s memory request value, maybe double it, before the pod restarts?</p> <p>I’ve looked up PreStop container lifestyle hooks, operators, etc. Right now the bes...
<p>You could yuse <a href="https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler" rel="nofollow noreferrer">Vertical Pod Autoscaler</a> in <code>Auto</code> or <code>Recreate</code> mode.<br /> It support Jobs, CronJobs, as well as Deployments.</p> <p>Please be aware of <a href="https://github.co...
<p>What does it mean that Kubernetes removed support for Docker but supports containerd. Docker developed containerd and uses it for managing containers.</p> <p>Are there 2 different containerd?</p> <ol> <li>one that is supported by kubernetes</li> <li>another one which is used by docker</li> </ol> <p>If not, then why ...
<h2>In short</h2> <ul> <li><a href="https://containerd.io/" rel="nofollow noreferrer">containerd</a> is part of Docker (the part that pulls and runs images)</li> <li>Since Kubernetes is concerned only with pulling and running images and not creating them, it makes little sense to support Docker (which does not implemen...
<p>I am using the mssql docker image (Linux) for sql server 2019. The default user is not <code>root</code> but <code>mssql</code>. I need to perform some operations as <code>root</code> inside the container:</p> <pre><code>docker exec -it sql bash mssql@7f5a78a63728:/$ sudo &lt;command&gt; bash: sudo: command not foun...
<p><a href="https://stackoverflow.com/users/10008173/david-maze" title="74,731 reputation">David Maze</a> has well mentioned in the comment:</p> <blockquote> <p>Any change you make in this environment will be lost as soon as the Kubernetes pod is deleted, including if you need to update the underlying image or if its n...
<p>I have my hyperledger fabric blockchain deployed on k8s in the <strong>namespace: hlf-blockchain</strong> and my client app is deployed is in another <strong>namespace: hlf-app</strong></p> <p>The cpp-profile template is below. url-&gt; <em><code>grpcs://&lt;service-name&gt;.&lt;namespace&gt;:&lt;port&gt;</code></em...
<p>You are correct, the discovery service is returning network URLs that are unreachable from the <code>hlf-blockchain</code> namespace.</p> <p>It is possible to run a Gateway client in a different namespace from the Fabric network. If you are using Kube DNS, each of the fabric nodes can be referenced with a fully qua...
<p>I am trying kubernetes and seem to have hit bit of a hurdle. The problem is that from within my pod I can't curl local hostnames such as <strong>wrkr1</strong> or <strong>wrkr2</strong> (machine hostnames on my network) but can successfully resolve hostnames such as google.com or stackoverflow.com.</p> <p>My cluster...
<h2>What happens</h2> <blockquote> <p>Need help as to whether this is normal behavior</p> </blockquote> <p>This is normal behaviour, because there's no DNS server in your network where virtual machines are hosted and kubernetes has its own DNS server inside the cluster, it simply doesn't know about what happens on your...
<p>I'm trying to add ingress to my nginx container.</p> <p>The following ingress template gives me &quot;parse error (&lt;&gt;/ingress.yaml:71: unexpected EOF)&quot;. I went through trying mark possible missing end statements, but even adding arbitrary end at the end of file didn't fix it. I am out of ideas as to what ...
<p>Your file is generally structured like so:</p> <pre class="lang-none prettyprint-override"><code>{{- if .Values.someCondition }} ... {{- end }} # {{- if .Values.someCondition }} </code></pre> <p>However, the Go <code>text/template</code> engine runs before any YAML parsing happens. There is <em>not</em> a comment i...
<p>My goal is to setup an <strong>ingress nginx</strong> within my kubernetes cluster. The deployment seems to work as I guess, the logs are looking good.</p> <pre><code>NAME READY STATUS RESTARTS AGE pod/ingress-nginx-admission-create--1-n5h28 0/1 Completed ...
<p>No, solved the problem. It was an incorrect nginx load-balancer setup. Did indeed pass the <strong>443</strong> and <strong>80</strong> traffic, but not to the exposed Port for <strong>http</strong> on my worker nodes the <strong>ingress-nginx-controller</strong> service allocated. After this, everything works fine....
<p>Can anyone explain to me why when running my load test on one pod it gives better TPS rather than when scaling to two pods.</p> <p>I expected that when running the same scenario with the same configuration on 2 pods the TPS will be increased but this is not what happened.</p> <p>Is this normal behaviour that scaling...
<p>If you are using any sort of database, this is the place to optimize to increase TPS. Here is why:</p> <p>Assume your database is running as fast as possible - The pod can handle the network connections and query against the database, but the database is slow because the CPU/Memory/TPS are already maxed; increasing ...
<p>I work with a dev shop as a contractor &amp; I'm pitching Kubernetes to my CTO.</p> <p>It's on the premise that they can deploy multiple websites and abstract away multi-server management.</p> <p>However, the one stipulation is that in this new cluster of resources they would be able to point multiple different doma...
<p>You can use an ingress with multiple domain names:</p> <p><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a></p> <p>In the <code>rules</code> section, you can define multiple hosts like:</p> <pre><code>rules...
<p>Can anyone explain to me why when running my load test on one pod it gives better TPS rather than when scaling to two pods.</p> <p>I expected that when running the same scenario with the same configuration on 2 pods the TPS will be increased but this is not what happened.</p> <p>Is this normal behaviour that scaling...
<p>It's really depends on what your pod did. As @spencer mentioned. Besides that, there still many factor will impact your expectation:</p> <ol> <li>Does your pod has leader election?</li> <li>QPS/Burst setting(for controller,since I have no idea what your pod did).</li> <li>...</li> </ol> <p>Based on your case, I gues...
<p>I am following <a href="https://konghq.com/blog/kubernetes-ingress-api-gateway/" rel="nofollow noreferrer">this procedure</a> to deploy konghq in my Kubernetes.</p> <p>The key installation command there is this:</p> <pre><code>$ kubectl create -f https://konghq.com/blog/kubernetes-ingress-api-gateway/ </code></pre> ...
<p>There is no sense to create 2 ingress controllers under 1 namespace. Would you like have multiple ingress rules under 1 namespace - you are welcome to create 1 Ingress controller and multiple rules.</p> <p>Consider creating 2 ingress controllers in case you have multiple namespaces. For example, check <a href="http...
<p>I have a persistent volume that has read/write access on one specific node.</p> <p>How can I mount this persistent volume on all other nodes as read only?</p> <p>Here is what I was thinking, in my pvc.yaml:</p> <pre><code>--- apiVersion: v1 kind: PersistentVolumeClaim metadata: # This name uniquely identifies the ...
<p>The solution I found was to give the persistance volume the &quot;ReadWriteMany&quot; access modes: and then mount it with readOnly set to true in the definition of mounted volumes. Here are the .yaml files..</p> <p>The persistent volume claim... pvc.yaml:</p> <pre><code>--- apiVersion: v1 kind: PersistentVolumeClai...