Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>I am begginer at K8S, i'm using github actions I have 3 environment (dev, pred-prod, prod) and 3 namespace to each environment, i want to have a second environment (pre-prod-2) into my namespace of pre-production; is it possible ? and how the yaml file will look like ?</p> <p>Thank you</p>
dia
<p>To create another independent deployment in the same namespace, take your existing Deployment YAML and change the following fields:</p> <ul> <li>metadata.name</li> <li>spec.selector.matchLabels.app</li> <li>template.metadata.labels.app</li> </ul> <p>It will be sufficient to just append a &quot;2&quot; to each of the...
jwhb
<p>We get this error when uploading a large file (more than 10Mb but less than 100Mb):</p> <pre><code>403 POST https://www.googleapis.com/upload/storage/v1/b/dm-scrapes/o?uploadType=resumable: ('Response headers must contain header', 'location') </code></pre> <p>Or this error when the file is more than 5Mb</p> <pre>...
David Dehghan
<p>The problem was indeed the credentials. Somehow the error message was very miss-leading. When we loaded the credentials explicitly the problem went away. </p> <pre><code> # Explicitly use service account credentials by specifying the private key file. storage_client = storage.Client.from_service_account_json( ...
David Dehghan
<p>On my GCE Kubernetes cluster I can no longer create pods.</p> <pre><code>Warning FailedScheduling pod (www.caveconditions.com-f1be467e31c7b00bc983fbe5efdbb8eb-438ef) failed to fit in any node fit failure on node (gke-prod-cluster-default-pool-b39c7f0c-c0ug): Insufficient CPU </code></pre> <p>Looking at the alloca...
Chris
<p>I recently had this same issue. After some research, I found that GKE has a default <code>LimitRange</code> with CPU requests limit set to <code>100m</code>.</p> <p>You can validate this by running <code>kubectl get limitrange -o=yaml</code>. It's going to display something like this:</p> <pre><code>apiVersion: v1 i...
jonathancardoso
<p>I run a kubernetes cluster with cert-manager installed for managing ACME (Let's Encrypt) certificates. I'm using DNS domain validation with Route 53 and it works all fine.</p> <p>The problem comes when I try to issue a certificate for a cluster internal domain. In this case domain validation does not pass since the ...
roman
<p>Assuming that you don't control public DNS for your cluster internal domain, you will not be able to receive LetsEncrypt certificates for it.</p> <p>You may however set up another issuer that will grant you certificates for this domain, e.g. the SelfSigned issuer: <a href="https://cert-manager.io/docs/configuration/...
jwhb
<p>We are enabling Google Cloud Groups RBAC in our existing GKE clusters.</p> <p>For that, we first created all the groups in Workspace, and also the required &quot;gke-security-groups@ourdomain.com&quot; according to documentation.</p> <p>Those groups are created in Workspace with an integration with Active Directory ...
codiaf
<p>It turned out to be an issue about case-sensitive strings and nothing related with the actual rules defined in the RBACs, which were working as expected.</p> <p>The names of the groups were created in Azure AD with a camel case model. These group names where then showed in Google Workspace all lowercase.</p> <p><str...
codiaf
<p>I am trying to use sidecar mode in kubernetes to create a logs sidecar to expose specific container logs. And I am using kubernetes client to fetch logs from kubernetes api and send it out by websocket. The code shows below:</p> <pre><code>func serveWs(w http.ResponseWriter, r *http.Request) { w.Header().Set("A...
aisensiy
<p>Put my final code here, thanks for the tips from @Peter:</p> <pre><code>func serveWs(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") conn, err := upgrader.Upgrade(w, r, nil) if err != nil { if _, ok := err.(websocket.HandshakeError); !ok { ...
aisensiy
<p>Good day, i'm newby in kubernetes and try to setup my first environment. I want to following scheme:</p> <ul> <li>My organization has public IP (x.x.x.x)</li> <li>This IP routed to server in private LAN (i.e. <code>192.168.0.10</code>) with win server + IIS. On IIS i have URL rewrite module and it's act as reverse ...
anatoly.kryzhanosky
<p>In your <code>traefik.toml</code> ConfigMap you're redirecting to HTTPS:</p> <pre><code>[entryPoints.http.redirect] regex = &quot;^http://(.*)&quot; replacement = &quot;https://$1&quot; </code></pre> <p>Remove that replacement using <code>kubectl edit configmap -n kube-system traefik</code>, save the changes then re...
vhs
<p>I have an EKS cluster to which I've added support to work in hybrid mode (in other words, I've added Fargate profile to it). My intention is to run only specific workload on the AWS Fargate while keeping the EKS worker nodes for other kind of workload.</p> <p>To test this out, my Fargate profile is defined to be:</...
Bakir Jusufbegovic
<p>It turns out the problem was in networking setup of private subnets associated with the Fargate profile all the time. </p> <p>To give more info, here is what I initially had:</p> <ol> <li>EKS cluster with several worker nodes where I've assigned only public subnets to the EKS cluster itself</li> <li>When I tried t...
Bakir Jusufbegovic
<p>The istio docs <a href="https://istio.io/latest/docs/setup/install/istioctl/#check-what-s-installed" rel="nofollow noreferrer">here</a> has the following information:</p> <blockquote> <p>The istioctl command saves the IstioOperator CR that was used to install Istio in a copy of the CR named installed-state. You can ...
Sibi
<h2>Short answer</h2> <p>this will give you all deployed objects belongs to Istio CRs in all namespaces:</p> <pre><code>kubectl api-resources | grep -i istio | awk '{print $4}' | while read cr; do kubectl get $(echo $cr | tr '[:upper:]' '[:lower:]') --all-namespaces done </code></pre> <h2>Details:</h2> <p>CR is a g...
Abdennour TOUMI
<p>I have a brand new (so empty) AKS cluster. I want to install two instances of the nginx ingress controller, in different namespaces and with different ingress class, using helm.</p> <p>I start with the first:</p> <pre><code>helm install ingress1 ingress-nginx/ingress-nginx --namespace namespace1 --set controller.ing...
Franco Tiveron
<p>I think that you're setting the wrong values, thus the class name is <code>nginx</code> in both installs. Take a look at the template here: <a href="https://github.com/kubernetes/ingress-nginx/blob/3ae09fd1fac381fce9f5066febf172a4a70c10a9/charts/ingress-nginx/templates/controller-ingressclass.yaml#L13" rel="noreferr...
iska
<p>I'm trying to create an ingress rule for a backend service. The ingress controller is the Microk8s Nginx ingress. If I set the host, the ingress stops matching the backend, resulting in a 404 when I visit <a href="https://my-host.com" rel="nofollow noreferrer">https://my-host.com</a></p> <p>Here is my code:</p> <pre...
Nash
<p>You have created 2 rules, one with only <code>host</code> and a second with <code>http: ...</code>. It should be</p> <pre><code>rules: - host: &quot;my-host.com&quot; http: paths: </code></pre> <p>Yes, YAML is evil.</p>
e.dan
<p>I have the following configmap spec:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 data: MY_NON_SECRET: foo MY_OTHER_NON_SECRET: bar kind: ConfigMap metadata: name: web-configmap namespace: default </code></pre> <pre><code>$ kubectl describe configmap web-configmap Name: web-co...
Aaron
<p>It looks like your pods are managed by <code>web-deployment</code> deployment. You cannot patch such pods directly.</p> <p>If you run <code>kubectl get pod &lt;pod-name&gt; -n &lt;namespace&gt; -oyaml</code>, you'll see a block called <code>ownerReferences</code> under the <code>metadata</code> section. This tells y...
Raghwendra Singh
<p>I'm having troubles setting up kubernetes ingress-nginx in order to expose my app externally. Here are the steps that I did:</p> <p><strong>Application deployment:</strong></p> <ol> <li>Created namespace called ingress</li> <li>Deployed statefulset set resource that describes my application (let's call it testapp)...
Bakir Jusufbegovic
<p>It was a mistake on my end. The missing part was following:</p> <p>On the ELB, I didn't set listeners correctly. So basically, what was needed is to point 80/443 port from ELB to the NodePorts of Ingress Service. </p> <pre><code>ingress-nginx ingress-nginx NodePort 10.96.249.168 &lt;none&gt; ...
Bakir Jusufbegovic
<p>I am just setting two simple services on Mac using minikube</p> <p>I have the service set up and I can access it via ingress / minikube tunnel . So i know the service works</p> <p>I am using Spring Boot 3, with the so i need to specify the <code>spring-cloud-starter-kubernetes-all</code> package. This means I need ...
duckdivesurvive
<p>You are trying to configure your discovery client with the Kubernetes API server URL, which is incorrect. Your client application needs to be connected to <strong>Spring Cloud Kubernetes Discovery Server</strong>. It's an independent application that will work like a <strong>proxy</strong> between your client Spring...
Igor Kanshyn
<p>I am quite confused about readiness probe. Suppose I use httpGet with /health as the probing endpoint. Once the readiness check returns 500, the server will stop serving traffic. Then how can the /health endpoint work? In other words, once a readiness check fails, how can it ever work again since it can no longer an...
Brian Shih
<p>You have typo.. you said :</p> <blockquote> <p>Once the readiness check returns 500, the <strong>server</strong> will stop serving traffic.</p> </blockquote> <p>However, it should be :</p> <blockquote> <p>Once the readiness check returns 500, the <strong>k8s service</strong> will stop serving traffic.</p> </blockquo...
Abdennour TOUMI
<p>So when creating secrets I often will use:</p> <pre class="lang-sh prettyprint-override"><code>kubectl create secret generic super-secret --from-env-file=secrets </code></pre> <p>However, I wanted to move this to a dedicated secrets.yaml file, of kind &quot;Secret&quot; as per the documentation: <a href="https://kub...
Micheal J. Roberts
<p>You can use <code>--dry-run</code> and <code>-oyaml</code> flags.</p> <p>Use this command to generate your secrets.yaml file</p> <pre class="lang-sh prettyprint-override"><code>kubectl create secret generic super-secret \ --from-env-file=secrets --namespace &lt;your-namespace&gt; \ --dry-run=client -oyaml &gt; s...
Raghwendra Singh
<p>I was following a guide to connect a database to kubernetes: <a href="https://itnext.io/basic-postgres-database-in-kubernetes-23c7834d91ef" rel="nofollow noreferrer">https://itnext.io/basic-postgres-database-in-kubernetes-23c7834d91ef</a></p> <p>after installing Kubernetes (minikube) on Windows 10 64 bit: <a href="h...
Tanik
<p>The <code>base64</code> cli found in Mac OS and some *nix distros is not available on Windows.</p> <p>You <em>could</em> write a small function named <code>base64</code> that mimics the behavior of the <code>base64</code> unix tool though:</p> <pre><code>function base64 { # enumerate all pipeline input $input |F...
Mathias R. Jessen
<p>due to company policies I have to replace my Kyverno rules by OPA ones. One of my rule is, that I want to add all pods of a specific namespace to our service-mesh (we're using Kuma) So for this I have to add the following annotations/labels</p> <pre><code>metadata: labels: kuma.io/mesh: mesh annotations: ...
Zwelch
<p>Just replace the slash <code>/</code> by <code>~1</code></p> <pre class="lang-yaml prettyprint-override"><code> location: &quot;metadata.annotations.kuma.io~1sidecar-injection&quot; </code></pre> <p>Or wrap it by <code>&quot;&quot;</code></p> <pre class="lang-yaml prettyprint-override"><code> location: 'metadata....
Abdennour TOUMI
<p>In my k8s environment where spring-boot applications runs, I checked log location in <code>/var/log</code> and <code>/var/lib</code> but both empty. Then I found log location in <code>/tmp/spring.log</code> . It seems this the default log location. My problem are</p> <ol> <li>How <code>kubectl log</code> knows it sh...
Viraj
<p>Docker logs only contain the logs that are dumped on STDOUT by your container's process with PID 1 (your container's <code>entrypoint</code> or <code>cmd</code> process).</p> <p>If you want to see the logs via <code>kubectl logs</code> or <code>docker logs</code>, you should redirect your application logs to STDOUT ...
Raghwendra Singh
<p>We run Couchbase in Kubernetes platform in AWS cloud. As per the 'Couchbase on AWS' best practices, it is suggested to use EBS 'gp3' or EBS 'io1' based on the following link. (<a href="https://docs.couchbase.com/server/current/cloud/couchbase-cloud-deployment.html#aws-deployment-methods" rel="nofollow noreferrer">ht...
Ganesh N
<p>Apologies for the delay here. In short, no we do not recommend using EFS with Couchbase as it is a file share rather than a block device.</p>
Perry Krug
<p>I've created a Switch in <code>Hyper-V Manager</code> : </p> <pre><code>Virtual Switch Manager (on the right) =&gt; New Virtual Network Switch =&gt; External =&gt; MinikubeSwitch </code></pre> <p><a href="https://i.stack.imgur.com/nMTDf.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nMTDf.gif"...
JAN
<p>OK , found the problem , I put it below for other people whom might encounter the same problem : </p> <p>Replace the CLI command </p> <pre><code>minikube start --driver=hyperv --hyperv-virtual-switch=MinikubeSwitch </code></pre> <p>with : </p> <pre><code> minikube start --driver=hyperv MinikubeSwitch </code></p...
JAN
<p>I have started a pod with an angular app in it and it is healthy with no errors when I do kubectl describe pod.</p> <p>However, when I curl to ingress route I get a 502 bad gateway.</p> <p>I tried exec into angular pod and do a curl localhost:4200 and I get: Failed to connect to localhost port 4200: Connection refus...
furion2000
<p>your container configuration is not set up correctly to start the service?</p> <p>you have a config like:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: my-angular-app spec: containers: - name: my-angular-app image: nginx:latest ports: - containerPort: 80 </code></pre> <p>it should also ha...
roberto tomás
<p>I am attempting to create a HA Kubernetes cluster in Azure using <code>kubeadm</code> as documented here <code>https://kubernetes.io/docs/setup/independent/high-availability/</code></p> <p>I have everything working when using only 1 master node but when changing to 3 master nodes kube-dns keeps crashing with apiser...
Mike Norgate
<p>I eventually got to the bottom of this. I had not copied the same Service Account signing keys onto each master node (<code>sa.key</code>, <code>sa.pub</code>).</p> <p>These keys are documented here: <a href="https://github.com/kubernetes/kubeadm/blob/master/docs/design/design_v1.7.md" rel="nofollow noreferrer">htt...
Mike Norgate
<p>We are trying to deploy a Kubernetes cluster with help of Azure Kubernetes Service (<strong>AKS</strong>) to our <strong>existing</strong> virtual network. This virtual network has <strong>custom route tables</strong>.</p> <p>The deployment process is done via an external application. Permissions should be given to...
Robert
<p>The documentation you are pointing to is for a cluster using <strong>Kubenet</strong> networking. Is there a reason why you don't want to use <a href="https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni" rel="nofollow noreferrer">Azure CNI</a> instead? If you are using Azure CNI, you will off course cons...
Jean-Philippe Bond
<p>We're trying to use nextflow on a k8s namespace other than our default, the namespace we're using is <code>nextflownamespace</code>. We've created our PVC and ensured the default service account has an admin rolebinding. We're getting an error that nextflow can't access the PVC:</p> <pre><code>&quot;message&quot;: &...
David Parks
<p>I think it's best to avoid using nested <a href="https://www.nextflow.io/docs/latest/config.html#config-profiles" rel="nofollow noreferrer">config profiles</a> with Nextflow. I would either remove the 'standard' layer from your profile or just make 'standard' a separate profile:</p> <pre><code>profiles { standa...
Steve
<p>On Cloud Composer I have long running DAG tasks, each of them running for 4 to 6 hours. The task ends with an error which is caused by Kubernetes API. The error message states 401 Unauthorized.</p> <p>The error message:</p> <pre><code>kubernetes.client.rest.ApiException: (401) Reason: Unauthorized HTTP response head...
Kavya
<p>After experiencing the same issue, I found a fix in the latest version of the Google provider for Airflow, which is currently not yet available in Cloud Composer. However, you can manually override this by adding the release candidate package to your Cloud Composer instance.</p> <p>You can use the release candidate ...
Jonny5
<p>I have created EKS cluster with Fargate. I deployed two microservices. Everything is working properly with ingress and two separate application load balancers. I am trying to create ingress with one alb which will route the traffic to the services. The potential problem is that both services use the same port (8080)...
Bakula33
<p>I believe you can accomplish this using the <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/" rel="nofollow noreferrer">ALB Ingress Controller</a>.</p>
grahamlyons
<p><a href="https://i.stack.imgur.com/A2G76.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A2G76.png" alt="enter image description here" /></a></p> <p>The nodeport takes in 3 parameters in the service yaml.</p> <ul> <li>port</li> <li>targetPort</li> <li>nodePort</li> </ul> <p>Since all you wanted wa...
D.B.K
<p>&quot;Nodeport is internally implemented on top of ClusterIP&quot; - correct.</p> <p>The port in the Kubernetes Service definition is used to specify the port on which the service will listen for traffic within the Kubernetes cluster. This is the port that will be exposed to other pods in the cluster as an endpoint ...
HoaPhan
<p>I have created an AKS cluster using the following Terraform code</p> <pre><code>resource &quot;azurerm_virtual_network&quot; &quot;test&quot; { name = var.virtual_network_name location = azurerm_resource_group.rg.location resource_group_name = azurerm_resource_group.rg.name address_...
One Developer
<p>This is because you have hit <a href="https://artifacthub.io/packages/helm/istio-official/gateway#general-concerns" rel="nofollow noreferrer">general concerns</a> of istio- prefix get striped, from the steps by steps installation with <code>istio-ingress</code> will stripe with <code>ingress</code>, so if you using ...
Turbot
<p>I am trying to use Hazelcast on Kubernetes. For that the Docker is installed on Windows and Kubernetes environment is simulate on the Docker. Here is the config file <code>hazelcast.xml</code></p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;ha...
nee nee
<p>Hazelcast's default multicast discovery doesn't work on Kubernetes out-of-the-box. You need an additional plugin for that. Two alternatives are available, Kubernetes API and DNS lookup.</p> <p>Please check <a href="https://github.com/hazelcast/hazelcast-kubernetes" rel="nofollow noreferrer">the relevant documentatio...
Nicolas
<p>I am trying to get a certificate issued from Let's Encrypt, and it has been 3 and a half hours.</p> <p>I accidentally originally set my secretName as "echo-tls" before switching it to the correct "pandaist-tls" that I want to use instead.</p> <p>I currently have this:</p> <pre><code>kubectl get CertificateRequest...
Steven Matthews
<p>Due to a bug in how load balancers work on Digital Ocean:</p> <p><a href="https://www.digitalocean.com/community/questions/how-do-i-correct-a-connection-timed-out-error-during-http-01-challenge-propagation-with-cert-manager" rel="nofollow noreferrer">https://www.digitalocean.com/community/questions/how-do-i-correct...
Steven Matthews
<p>This is what I keep getting:</p> <pre><code>[root@centos-master ~]# kubectl get pods NAME READY STATUS RESTARTS AGE nfs-server-h6nw8 1/1 Running 0 1h nfs-web-07rxz 0/1 CrashLoopBackOff 8 16m nfs-web-fdr9h 0/1 CrashLoopBackOf...
Lucifer
<p>As @Sukumar commented, you need to have your Dockerfile have a <a href="https://docs.docker.com/engine/reference/builder/#/cmd" rel="noreferrer">Command</a> to run or have your ReplicationController specify a command. </p> <p>The pod is crashing because it starts up then immediately exits, thus Kubernetes restarts ...
Steve Sloka
<p>I have multiple micro services in my project. I want to dynamically pause and resume them without losing the data.</p> <p>For example: I am deploying an theia ide and user created a folder. I want to down this service for sometime and resume again with the data.</p> <p>References: <a href="https://github.com/thei...
Imrahamed
<p>Whether your underlying storage gets deleted depends on the persistent volume's <a href="https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/#why-change-reclaim-policy-of-a-persistentvolume" rel="nofollow noreferrer">reclaim policy</a>. If you set the policy to <code>Retain</code>, it shoul...
Anirudh Ramanathan
<p>I am using GCP Container Engine in my project and now I am facing some issue that I don't know if it can be solved via secrets.</p> <p>One of my deployments is node-js app server, there I use some npm modules which require my GCP service account key (.json file) as an input.</p> <p>The input is the path where this j...
Ran Hassid
<p>You can make your json file a secret and consume in your pod. See the following link for secrets (<a href="http://kubernetes.io/docs/user-guide/secrets/" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/secrets/</a>), but I'll summarize next:</p> <p>First create a secret from your json file:</p> <pre...
Steve Sloka
<p>I am having a problem with a helm deployment of GitLab onto my kubernetes cluster. Everything was working except for the GitLab Runner that was throwing the error:</p> <pre><code>ERROR: Registering runner... forbidden (check registration token) PANIC: Failed to register this runner. Perhaps you are having network p...
Antebios
<p>The solution to this was the <code>gitlab-gitlab-runner-secret</code>.</p> <p>Data element: runner-registration-token</p> <p>value: FGvuUvo0aAce2xkLjvWxj1ktGHD8NAzWY4sLYDVvD3Z56JXh2E7rwfaTvKGkRlUJ</p> <p>It was pre-populated with an invalid <code>runner-registration-token</code>. I solved this by:</p> <ol> <li>Goi...
Antebios
<p>I'm trying to update an image in Kubernetes by using the following command:</p> <pre><code>kubectl set image deployment/ms-userservice ms-userservice=$DOCKER_REGISTRY_NAME/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT --insecure-skip-tls-verify </code></pre> <p>But when I receive the following error:</p> <pre><code>erro...
TietjeDK
<p>I've had this error fixed by explicitly setting the namespace as an argument, e.g.:</p> <pre><code>kubectl set image -n foonamespace deployment/ms-userservice..... </code></pre> <p><a href="https://www.mankier.com/1/kubectl-set-image#--namespace" rel="nofollow noreferrer">https://www.mankier.com/1/kubectl-set-imag...
Darren Rogers
<p>I have the following values.yaml</p> <pre><code>documentStorage: folders: TEST1: permissions: read: "test1@email.com" write: "test1@email.com" TEST2: permissions: read: "test2@email.com" write: "test2@email.com" </code></pre> <p>And, I want to move that to my con...
Manuelarte
<p>Use the following snippet. You'd need to change the value of indent depending on what nesting level you are setting documentStorage at</p> <pre><code> documentStorage: folders: {{ .Values.documentStorage.folders | toYaml | indent 6 }} </code></pre>
mukesh
<p>I'm trying to install the cert-manager ClusterIssuer on a AKS, and because the cluster is behind Azure Application Gateway I've gone down the route of using a DNS solver rather the HTTP. However, the challenge fails with an error calling the Cloudflare API. I've redacted emails and domains through the code snippets,...
Mark
<p>As <a href="https://stackoverflow.com/users/5525824/harsh-manvar">Harsh Manvar</a> guessed, it was an issue with the secret. I wasn't running the <code>kubectl apply</code> command through <a href="https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html" rel="nofollow noreferrer">envsubst</a> ...
Mark
<p>If I want to run multiple replicas of some container that requires a one off initialisation task, is there a standard or recommended practice?</p> <p>Possibilities:</p> <ul> <li>Use a StatefulSet even if it isn't necessary after initialisation, and have init containers which check to see if they are on the first p...
armb
<p>We effectively ended up with a Job that does the initialization task and creates a secret that the Deployment replicas have mounted as a volume, blocking them until the Job has completed. We're using ArgoCD without sync waves. (There are complications with patching the Job name whenever its spec is updated because J...
armb
<p>I would like to use kubernetes on any IaaS cloud (e.g. OpenStack, AWS, etc.) and have it scale up the pool of worker instances when it can no longer bin-pack new workload.</p> <p>I hope there is a IaaS-independent integration/API to allow this. If not, an integration with a specific cloud is good too.</p>
want-to-be-algorist
<p><a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler" rel="nofollow noreferrer">Kubernetes cluster autoscaler</a> is what you are looking for. It works with multiple cloud providers including AWS</p>
mukesh
<p>I have 2 services running on AKS (v1.16.13) and deployed the following istio (v1.7.3) configuration. First one is a UI where I invoke the OIDC flow and get JWT token, second one is a backend service which should require a valid JWT token.</p> <pre><code>apiVersion: networking.istio.io/v1beta1 kind: Gateway metadata:...
Blink
<p>Thanks to the sachin's comment and going again through the documentation made me realized that I need AuthorizationPolicy on top of RequestAuthentication:</p> <pre><code>apiVersion: security.istio.io/v1beta1 kind: AuthorizationPolicy metadata: name: myapp-require-jwt-backend spec: action: ALLOW rules: - ...
Blink
<p>I try to set up an infinispan cache in my application that is running on several nodes on <code>google-cloud-platform</code> with Kubernetes and Docker.</p> <p>Each of these caches shall share their data with the other node chaches so they all have the same data available.</p> <p>My problem is that the JGroups con...
HuMa
<p>Usually the first thing to do when you need help with JGroups/Infinispan is setting trace-level logging.</p> <p>The problem with KUBE_PING might be that the pod does not run under proper serviceaccount, and therefore it does not have the authorization token to access Kubernetes Master API. That's why currently pref...
Radim Vansa
<p>I have all sorts of problems with Kubernetes/helm, but I'm really new to it and so I'm not sure what I'm doing at all, despite spending a day trying to work it out.</p> <p>I have a pod that's in a CrashLoopBackOff situation as I entered an incorrect port number in the Dockerfile. When I do a <code>kubectl -n dev ge...
EricP
<p>The problem is you mixed helm 2 and helm 3</p> <p>The release was created by helm v2, so you need helm v2 to delete it, helm v3 won't be able to see releases created by helm v2.</p> <p>You could do the following </p> <blockquote> <ol> <li>download helm v2, delete release (I normally have both helm 2/3 in one ...
EricZ
<p>I'm running jenkins jobs to build our maven application and deploy into kubernetes cluster. in-order do that i have created pod container template to deploy my modules.</p> <p>When i am running to build my jenkins job, my build got failed with below error,</p> <pre><code>Still waiting to schedule task ‘Jenkins’ do...
Anonymuss
<p>Because, <code>kubectl -n jenkins-namespace get services</code> shows : </p> <pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE cicd-jenkins ClusterIP 172.20.120.227 &lt;none&gt; 8080/TCP 128d cicd-jenkins-agent ClusterIP 172.20.105.189 &lt;none&gt...
Abdennour TOUMI
<p>When rolling out my AKS cluster</p> <pre><code>az deployment group create --template-file template.json --parameters parameters.d.json -g &lt;resource_group&gt; </code></pre> <p>three managed identities are created. These resources are located, by default, in the Managed Cluster resource group (with prefix <code>MC_...
Casper Dijkstra
<p>I don't know which managed identities you have because it depends on which add-ons is enabled. Most add-on identities can't be managed outside the cluster, but you can use a user-assigned identity for the kubelet and agentpool (preview) identity. Here is the <a href="https://learn.microsoft.com/en-us/azure/aks/use-m...
Jean-Philippe Bond
<p>I created the below ns.yaml file:</p> <pre><code>apiVersion: v1 kind: Namespace metadata: Name: testns </code></pre> <p>I am getting the below error.</p> <pre><code>error: error validating "ns.yaml": error validating data: ValidationError(Namespace.metadata): unknown field "Name" in io.k8s.apimachinery.pkg.apis.m...
Raghu
<p>The root cause is clear in the error logs: <code>unknown field "Name" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta;</code></p> <p>This means you need to use <code>name</code> instead of <code>Name</code>.</p> <p>For more info about YAML format of Kubernetes object Namespace metadata, run the following comman...
Abdennour TOUMI
<p>I want to define a Kubernetes secrets map as part of my deployment pipeline. According to the Kubernetes documentation, there are two ways to define a secret.</p> <ol> <li>Declarative Using a .yml with the Secret Object</li> <li>Imperative Using <code>kubectl create secret generic</code></li> </ol> <p>The declarativ...
ams
<p>There is no really good way to managed secrets securely with a vanilla Kubernetes. If you decrypt the secret or inject an unencrypted secret in your CI/CD pipeline and create a Kubernetes Secret, you'll have a decrypted Base64 encoded string to store in your Kubernetes cluster (Etcd).</p> <p>Most companies I've work...
Jean-Philippe Bond
<p>KEDA scaler not scales with scaled object defined with trigger using pod identity for authentication for service bus queue. I'm following <a href="https://github.com/kedacore/sample-dotnet-worker-servicebus-queue/blob/main/pod-identity.md" rel="nofollow noreferrer">this</a> KEDA service bus triggered scaling project...
iarunpaul
<p>Unfortunately this looks like an issue with the identity itself and with AD Pod identities, they can be a bit flaky (based on my experiences)</p>
Tom Kerkhove
<p>I have created a Mutating WebHook that works fine when the resulting pods reach healthy Running state. But when used with pods that ultimately fail (e.g. bad image name), the scheduler keeps creating more and more, up to 4000 pods that all error out and retry. If I disable the webhook, and the pod still fails for th...
Jerico Sandhorn
<p>Turns out I had a mistake in the webhook where instead of just adding an additional label to indicate the mutation was done, it was instead removing existing labels including the ones kube uses to manage the pod. So when the pod got mutated, it erased the control lables and consequently the scheduler thinks no pods ...
Jerico Sandhorn
<p>A few of our Pods access the Kubernetes API via the &quot;kubernetes&quot; Service. We're in the process of applying Network Policies which allow access to the K8S API, but the only way we've found to accomplish this is to query for the &quot;kubernetes&quot; Service's ClusterIP, and include it as an ipBlock within ...
Puma
<p>The short answer is no.</p> <p>More details :</p> <ul> <li><p>You cannot change/edit clusterIP because it's immutable... so <code>kubectl edit</code> will not work for this field.</p> </li> <li><p>The service cluster IP can be changed easly by <code>kubectl delete -f svc.yaml</code>, then <code>kubectl apply -f svc....
Abdennour TOUMI
<p>I need to share a directory between two containers: myapp and monitoring and to achieve this I created an emptyDir: {} and then volumeMount on both the containers.</p> <pre><code>spec: volumes: - name: shared-data emptyDir: {} containers: - name: myapp volumeMounts: ...
Buggy B
<p>Can you mount shared-data at /var/read in an init container and copy config file from /etc/myapp/myapp.config to /var/read?</p>
Sameer Naik
<p>I am using calico as my kubernetes CNI plugin, but when I ping service from kubernetes pod, it failed.First I find the service ip:</p> <pre><code> [root@localhost ~]# kubectl get svc -o wide NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) ...
Dolphin
<p>This is a very common issue and it required from me a full migration of CIDR IPs.</p> <p>Most probably, this issue about the overlap of CIDRs between Pods CIDR ( which is IP pool used to assign IPs for services and pods) and CIDR of your network.</p> <p>in this case, route tables of each node (VM) will ensure that:<...
Abdennour TOUMI
<p>I'm struggling at having secrets read using application.yml.</p> <p>When I do:</p> <pre><code>quarkus: application: name: pi-quarkus-fund-persistence-service kubernetes-config: enabled: true fail-on-missing-config: false config-maps: pi-quarkus-fund-persistence-service-configm...
Frédéric Thomas
<p>I think this is just about how to write the correct YAML. It should be:</p> <pre><code>quarkus: application: name: pi-quarkus-fund-persistence-service kubernetes-config: enabled: true fail-on-missing-config: false config-maps: pi-quarkus-fund-persistence-service-configmap ...
Ladicek
<p>I've been reading about microservices and deploying educational projects with Spring Boot and Spring Cloud. Now I want to step up to another level and start using ` Docker and Kubernetes as container and orchestrator. My doubt is, most microservices tutorial for Java are about Spring Cloud with Eureka and Zuul, but ...
didgewind
<p>Kubernetes provides native support for service discovery and API gateway. So below technologies can be replaced:</p> <ul> <li>Netflix Eureka with Kubernetes Service</li> <li>Spring Cloud Config Server with Kubernetes config maps and secrets</li> <li>Spring Cloud Gateway with a Kubernetes Ingress resource</li> </ul> ...
Girish
<p>We have an on-premise kubernetes deployment in our data center. I just finished deploying the pods for Dex, configured hooked up with our LDAP server to allow LDAP based authentication via Dex, ran tests and was able to retrieve the OpenID connect token for authentication.</p> <p>Now I would like to change our on-pr...
jrlonan
<p>I installed <strong>Dex</strong> + Active Directory Integration few months ago on a cluster installed by <strong>kubeadmn</strong> .</p> <blockquote> <p>Let's assume that Dex is now running and it can be accessible thru <a href="https://dex.example.com" rel="nofollow noreferrer">https://dex.example.com</a> .</p> </b...
Abdennour TOUMI
<p>I am trying to build a docker image for dotnet core app on windows which I am planning to host it on Kubernetes </p> <p>with following details</p> <pre><code>#docker file FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base WORKDIR /app EXPOSE 8989 FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster A...
Kundan
<p>The issue is in folder structure. You copied your source to <code>/src</code> folder (see line 8 and 11 of Dockerfile), but *.csproj file is copied to <code>amazing-app</code> subfolder. </p> <p>You can check it by running "intermediate" image, eg: <code>781b4c552434</code> (it is a hash of image before crash), lik...
Exploding Kitten
<p>I'm installing nginx using these commands onto my AKS cluster by doing:</p> <p>kubectl create namespace hello-world</p> <p>helm3 repo add ingress-nginx <a href="https://kubernetes.github.io/ingress-nginx" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx</a></p> <p>helm3 install nginx-ingress ingr...
Joby Santhosh
<p>List the available versions using</p> <pre><code>helm search repo nginx -l </code></pre> <p>Install a specific version using</p> <pre><code>helm3 install nginx-ingress ingress-nginx/ingress-nginx --namespace hello-world --version [theVersion] </code></pre>
CSharpRocks
<p>I install kubernetes v1.11.5 from kubeadm with cni plugin flannel and everything is ok. But I after try to switch to calico I found that the cross machine pod communication is broken. So I switch back to flannel. But got error message when creating pod:</p> <p><a href="https://i.stack.imgur.com/V8dN5.png" rel="nofo...
aisensiy
<p>I use following steps to remove old calico configs from kubernetes without <code>kubeadm reset</code>:</p> <ol> <li>clear ip route: <code>ip route flush proto bird</code></li> <li>remove all calico links in all nodes <code>ip link list | grep cali | awk '{print $2}' | cut -c 1-15 | xargs -I {} ip link delete {}</co...
aisensiy
<p>I am having an issue with the authentication operator not becoming stable (bouncing Between Avaialbe = True, and Degraded = True). The operator is trying to check the health using the endpoing <a href="https://oauth-openshift.apps.oc.sow.expert/healthz" rel="nofollow noreferrer">https://oauth-openshift.apps.oc.sow.e...
Abdullah Alsowaygh
<p>I just resolved this issue. To check you have the same issue:</p> <pre><code>oc logs -n openshift-console console-xxxxxxx-yyyyy </code></pre> <p>Check if you have messages like these:</p> <blockquote> <p>error contacting auth provider (retrying in 10s): request to OAuth issuer endpoint <a href="https://oauth-openshi...
th3penguinwhisperer
<p>I have a K8 cluster that has smb mounted drives connected to an AWS Storage Gateway / file share. We've recently undergone a migration of that SGW to another AWS account and while doing that the IP address and password for that SGW changed.</p> <p>I noticed that our existing setup has a K8 storage class that looks f...
Ryan Grush
<p>The solution I settled on was to create a second K8 storage class and persistent volume claim that's connected to the new AWS Storage Gateway. I then switched the K8 deployments to use the new PVC.</p>
Ryan Grush
<p>When a new <em>Kubernetes service</em> is created in Azure a new <em>resource group</em> with a similar name to the cluster is also created. In this &quot;resource group&quot; all the disks etc. which are created from Kubernetes are stored. Is there a way I can avoid that this sub-<em>resource group</em> is created ...
Manuel
<p>According to the <a href="https://learn.microsoft.com/en-us/azure/aks/faq#can-i-provide-my-own-name-for-the-aks-node-resource-group" rel="nofollow noreferrer">documentation</a>, you can't create the cluster resources inside the resource group where the cluster is located. The only option available is to provide a n...
CSharpRocks
<p><a href="https://marketplace.visualstudio.com/items?itemName=ballerina.ballerina" rel="nofollow noreferrer">Ballerina extension</a> was installed successfully in visual code. Also I configured <code>ballerina.home</code> to point to the installed package </p> <pre><code>ballerina.home = "/Library/Ballerina/balleri...
Abdennour TOUMI
<p>Solved! Just add the <code>import</code> instruction at the beginning of the file</p> <pre><code>import ballerinax/kubernetes; </code></pre> <p>Note, it is <code>ballerinax/kubernetes</code> and not <code>ballerina/kubernetes</code> (add <code>x</code>)</p>
Abdennour TOUMI
<p>We a pod which needs certificate file We need to provide a path to a certificate file, (we have this certificate) how should we put this certificate file into k8s that the pod will have an access to it e.g. that we were able to provide it like the following to the pod <code>&quot;/path/to/certificate_authority.crt”<...
Jenney
<p>Create a TLS secret then mount it to the desired folder.</p> <pre><code>apiVersion: v1 kind: Secret metadata: name: secret-tls type: kubernetes.io/tls data: # the data is abbreviated in this example tls.crt: | MIIC2DCCAcCgAwIBAgIBATANBgkqh ... tls.key: | MIIEpgIBAAKCAQEA7yn3bRHQ5FHMQ ... </co...
CSharpRocks
<p>I am trying to configure kubernetes plugin in Jenkins. Here are the details I am putting in:</p> <p><a href="https://i.stack.imgur.com/OuRnk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OuRnk.png" alt="enter image description here"></a></p> <p>Now, when I click on test connection, I get the f...
Pensu
<p>Figured it out, I was using credentials as plain text. I changed that to kubernetes secret, and it worked. </p>
Pensu
<p><strong>The context</strong></p> <p>Let me know if I've gone down a rabbit hole here.</p> <p>I have a simple web app with a frontend and backend component, deployed using Docker/Helm inside a Kubernetes cluster. The frontend is servable via nginx, and the backend component will be running a NodeJS microservice.</p> ...
A. Duff
<p>You mention that your frontend is based on Nginx.</p> <p>Accordingly,Frontend must hit the <strong>public</strong> URL of backend.</p> <p>Thus, backend must be exposed by choosing the service type, whether:</p> <ul> <li><strong>NodePort</strong> -&gt; Frontend will communicate to backend with <code>http://&lt;any-no...
Abdennour TOUMI
<p>I am using the <code>flannel</code> network plugin in my k8s cluster. And there is one special node which has one internal IP address and one public ip address which make it possible to ssh into it. </p> <p>After I add the node using <code>kubeadm</code> I found out that the <code>k get node xx -o yaml</code> retur...
aisensiy
<p>Do the modification using <code>kubectl</code> and you will have two ways:</p> <ul> <li><p><strong>kubectl annotate</strong>: </p> <pre><code>kubectl annotate node xx --overwrite flannel.alpha.coreos.com/public-ip=new-value </code></pre></li> <li><p>or <strong>kubectl patch</strong> : </p> <pre><code>kubectl patc...
Abdennour TOUMI
<p>I just created a namespace, have done nothing with it and now deleted it. However, when I list contexts I can still see it there. It seems to have been deleted as I can't delete it again. Why can I still see it listed when I get contexts?</p> <pre><code>kubectl config get-contexts CURRENT NAME CLUSTER AU...
Snowcrash
<p>A <code>context</code> in <code>kubectl</code>is just a local config that contains details (metadata) about a particular cluster or a namespace. This is the config that is needed for cluster/namespace management using the <code>kubectl</code> client.</p> <p>So, when you type <code>kubectl config &lt;any_command&gt;...
Ashu Pachauri
<p>I have a ReactJS application and I'm deploying it using Kubernetes.</p> <p>I'm trying to wrap my head around how to inject environment variables into my <code>config.js</code> file from within the Kubernetes deployment file.</p> <p>I currently have these: <code>config.js</code> file:</p> <pre><code>export const C...
Jonathan Perry
<p>The kubernetes environment variables are available in your container. So you would think the task here is a version of getting server side configuration variables shipped to your client side code.</p> <p>But, If your react application is running in a container, you are most likely running your javascript build pi...
Robert Moskal
<p>I created a nginx ingress using <a href="https://kubernetes.github.io/ingress-nginx/deploy/#quick-start" rel="nofollow noreferrer">this link</a> using docker-desktop.</p> <pre class="lang-sh prettyprint-override"><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/depl...
Jedi31
<p>this is because the prefix <code>/assinaturas</code> need to be omitted by an Nginx <strong>rewrite</strong>.. And that's explain why you got 404 (not found):</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-be-assinaturas namespace: apps-space annotations: kubernetes....
Abdennour TOUMI
<p>I have a container based application running node JS and my backend is a mongoDB container. </p> <p>Basically, what I am planning to do is to run this in kubernetes. </p> <p>I have deployed this as separate containers on my current environment and it works fine. I have a mongoDB container and a node JS container. ...
adr
<p>[Edit] </p> <p>Sorry my bad, the connections string <code>mongodb://mongodb:27017</code> would actually work. I tried dns querying that name, and it was able to resolve to the correct ip address even without specifying ".default.svc...". </p> <p><code>root@web-controller-mlplb:/app# host mongodb mongodb.default.sv...
redgetan
<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...
tskuzzy
<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 ...
tskuzzy
<p>Unable to access the Kubernetes dashboard. Executed below steps:</p> <ol> <li><p>kubectl apply -f <a href="https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recomm...
muku
<p>After realizing that the chart <code>stable/kubernetes-dashboard</code> is outdated, I found that you need to apply this manifest :</p> <pre class="lang-sh prettyprint-override"><code>kubectl apply -f \ https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml </code></pre> ...
Abdennour TOUMI
<p>I'm having trouble getting my client container talking to the API container, I was hoping to use a fanout ingress as so:</p> <pre><code>foo.bar.com/api - routes to API container foo.bar.com - routes to client container </code></pre> <p>My setup does render the client no problem, but all calls to the API result in ...
Mark
<p>As suggested by @HelloWorld in the comments, checking the api server routes revealed the issue to be misconfigured routing in the server not the ingress rules.</p>
Mark
<p>I am using this command in Helm 3 to install kubernetes dashboard 2.2.0 in kubernetes v1.18,the OS is CentOS 8:</p> <pre><code>helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/ helm repo update helm install k8s-dashboard/kubernetes-dashboard --generate-name --version 2.2.0 </code></pre> <p>t...
Dolphin
<p>The problem is that you didn't specify <strong>ClusterRole</strong> for the serviceaccount attached to the dashboard pod.</p> <p>I've used this chart few months ago and i have to provide custom values.yaml as following :</p> <pre><code># myvalues.yaml #these are mine rbac: clusterReadOnlyRole: true # &lt;--- 🔴 YO...
Abdennour TOUMI
<p>Here is my deployment &amp; service file for Django. The 3 pods generated from deployment.yaml works, but the resource request and limits are being ignored.</p> <p>I have seen a lot of tutorials about applying resource specifications on Pods but not on Deployment files, is there a way around it?</p> <p>Here is my ...
Ivan
<p>There is one extra resource attribute under your container definition after ports.</p> <pre><code>resources: {} </code></pre> <p>This overrides original resource definition. Remove this one and apply it again.</p>
‌‌R‌‌‌.
<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...
Spanky
<p>We tested this extensively and found that new EKS clusters, with Calico installed (see below) will experience this problem, unless Calico is upgraded. Networking will be immediately killed when a pod is sent SIGTERM instead of waiting for the grace period. If you're experiencing this problem and are using Calico, pl...
Spanky
<p>Today, it's 366 days since the kubernetes 1.17 cluster is running. Accordingly, All PKI certificates are expired. Since we are using k8s 1.17, we are able to renew certificates</p> <pre class="lang-sh prettyprint-override"><code>kubeadm alpha certs renew all </code></pre> <p>everything is OK , except jenkins: still ...
Abdennour TOUMI
<p>actually the issue is not jenkins , but it was kubernetes master. actually, i have to restart the control plane. I reboot master tomake sure that all control plane components are refreshed. Issue is fixed now</p>
Abdennour TOUMI
<p>I've build docker image locally:</p> <pre><code>docker build -t backend -f backend.docker </code></pre> <p>Now I want to create deployment with it:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: backend-deployment spec: selector: matchLabels: tier: backend replicas: 2 templa...
Bunyk
<p>Found docs on how to use private registry: <a href="https://microk8s.io/docs/working" rel="noreferrer">https://microk8s.io/docs/working</a></p> <p>First it needs to be enabled:</p> <pre><code>microk8s.enable registry </code></pre> <p>Then images pushed to registry:</p> <pre><code>docker tag backend localhost:320...
Bunyk
<p>I am unable to scale vertical my AKS cluster. Currently, I have 3 nodes in my cluster with 2 core and 8 ram, I am trying to upgrade it with 16 code and 64 RAM, how do I do it? I tried scaling the VM scale set, on Azure portal it shows it is scaled but when I do &quot;kubectl get nodes -o wide&quot; it still shows th...
Abhishek Anvekar
<p>Vertical scaling or changing the node pool VM size is not supported. You need to create a new node pool and schedule your pods on the new nodes.</p> <p><a href="https://github.com/Azure/AKS/issues/1556#issuecomment-615390245" rel="nofollow noreferrer">https://github.com/Azure/AKS/issues/1556#issuecomment-615390245<...
CSharpRocks
<p>So before I used kubernetes the general rule I used for running multiple express instances on a VM was one per cpu. That seemed to give the best performance. For kubernetes, would it be wise to have a replica per node cpu? Or should I let the horizontalpodautoscaler decide? The cluster has a node autoscaler. Thanks ...
danthegoodman
<p>good question !</p> <p>You need to consider 4 things :</p> <ol> <li><p>Run the pod using <strong>Deployment</strong> so you enable replication, rolling update,...so on</p> </li> <li><p>Set <code>resources.limits</code> to your container definition. this is mandatory for autoscaling , because HPA is monitoring the pe...
Abdennour TOUMI
<p>I know dapr has support for service discovery built in but how does that work when deployed to kubernetes in a cross cluster setup? Can't seem to find example or docs.</p>
Dan Soltesz
<p>Dapr is not designed for that use case. It might be better to use something like <a href="https://skupper.io/" rel="nofollow noreferrer">https://skupper.io/</a> to create cross-cluster flat network and then use Dapr on top. This a valid scenario presented by a user in July community call</p>
Bilgin Ibryam
<p>I've created a Kubernetes cluster with AWS ec2 instances using kubeadm but when I try to create a service with type LoadBalancer I get an EXTERNAL-IP pending status</p> <pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 &lt;none&gt; ...
Hammed
<p>You need to setup the <strong>interface</strong> between k8s and AWS which is a<a href="https://github.com/kubernetes/cloud-provider-aws#readme" rel="noreferrer">ws-cloud-provider-controller</a>.</p> <pre><code>apiVersion: kubeadm.k8s.io/v1beta1 kind: InitConfiguration nodeRegistration: kubeletExtraArgs: cloud...
Abdennour TOUMI
<p>As I understood from the documentation , if you use azure portal to create AKS cluster , you can't use the basic load balancer ,which is free in my current subscription. So how can I then use the basic load balancer with aks.</p>
Mou
<p>You must use the CLI to create an AKS with a Basic load balancer.</p> <pre><code>az aks create -g MyRG -n MyCluster --load-balancer-sku basic </code></pre> <p>It's clearly stated in the infobox in the Portal.</p> <p><a href="https://i.stack.imgur.com/66J01.png" rel="nofollow noreferrer"><img src="https://i.stack.img...
CSharpRocks
<p>My Requirement is Scale up PODS on Custom metrics like pending messages from queue increases pods has to increase to process jobs. In kubernetes Scale up is working fine with prometheus adapter &amp; prometheus operator.</p> <p>I have long running process in pods, but HPA checks the custom metrics and try to scale ...
Santhoo Kumar
<p>At present the HPA cannot be configured to accommodate workloads of this nature. The HPA simply sets the replica count on the deployment to a desired value according to the scaling algorithm, and the deployment chooses one or more pods to terminate.</p> <p>There is a lot of discussion on this topic in <a href="http...
dlaidlaw
<p>I created registry credits and when I apply on pod like this:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: private-reg spec: containers: - name: private-reg-container image: registry.io.io/simple-node imagePullSecrets: - name: regcred </code></pre> <p>it works succesfly pull image</p> <p>But...
Vladimir Djukic
<p>We are always running images from private registry. And this checklist might help you :</p> <ol> <li><p>Put your params in env variable in your terminal to have single source of truth:</p> <pre><code>export DOCKER_HOST=registry.io.io export DOCKER_USER=&lt;your-user&gt; export DOCKER_PASS=&lt;your-pass&gt; </code></...
Abdennour TOUMI
<p>Created a cluster in EKS (Kubernetes 1.11.5) with multiple node groups however I'm noticing that in the <code>extension-apiserver-authentication</code> configmap that <code>client-ca-file</code> key is missing.</p> <p>I assume this is due to the way Kubernetes API service is initiated. Has anyone else come across t...
nixgadget
<p>I've also run into this issue while trying to use cert-manager on an AWS EKS cluster. It is possible to inject the certificate yourself using the certificate obtained from the AWS CLI. Follow these steps to address this issue:</p> <p><strong>Obtain the Certificate</strong></p> <p>The certificate is stored Base64 e...
Justin
<p>Minikube not starting with several error messages. kubectl version gives following message with port related message:</p> <pre><code>iqbal@ThinkPad:~$ kubectl version Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean"...
Iqbal Khan
<p>You didn't give more details, but there are some concerns that I solved few days ago about minikube issues with kubernetes <strong>1.12</strong>.</p> <p>Indeed, the compatibility matrix between kubernetes and docker recommends to run : Docker <strong>18.06</strong> + kubernetes <strong>1.12</strong> (Docker 18.09...
Abdennour TOUMI
<p>Have an <code>ingress-nginx-controller</code> Deployment in kubernetes cluster which passes requests to backend services within the cluster and this all currently works as expected.</p> <p>There is now a requirement within one of the backend services to get the caller's client IP address from within but, with the ng...
Going Bananas
<p>In order to have the nginx controller pass the client's ip address to the backend service I applied the following configmap yaml config:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: labels: helm.sh/chart: ingress-nginx-3.10.1 app.kubernetes.io/name: ingress-nginx app.kubernetes.io/instance: ...
Going Bananas
<p>I have the following role:</p> <p><code>roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: admin</code> </p> <p>When I do a <code>kubectl proxy --port 8080</code> and then try doing</p> <p><code>http://127.0.0.1:8080/apis/extensions/v1beta1/namespaces/cdp/deployments/{deploymentname}...
Dipayan
<p>You mentioned verbs of the role and you didn't mention resources and apiGroup. Make sure the following are set:</p> <pre><code> - apiGroups: - apps - extensions resources: - deployments/status </code></pre>
Abdennour TOUMI
<p>I'm trying to set up a MongoDB replica set on my Kubernetes cluster but the Secondary member keeps restarting after a few seconds.</p> <p>Here's a couple of things but might be useful to know:</p> <ul> <li>The Mongo server (and client) version is <code>4.0.6</code></li> <li>I'm using the official helm <a href="htt...
Francesco Casula
<p>The issue was a too short <a href="https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.settings.electionTimeoutMillis" rel="nofollow noreferrer">electionTimeoutMillis</a> setting.</p> <blockquote> <p>Lower values result in faster failover, but increased sensitivity to primary node or network s...
Francesco Casula
<p>I've applied the yaml for the <a href="https://github.com/kubernetes/dashboard" rel="nofollow noreferrer">kubernetes dashboard</a>.</p> <p>Now I want to expose this service with the public IP of my server: <a href="https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/#objectives" re...
Warok
<p>The command that you ran is fetching objects in <strong>default</strong> namespace.</p> <p>However, Dashboard is deployed on <strong>kube-system</strong> namespace.</p> <pre><code>kubectl -n kube-system get services kubernetes kubectl -n kube-system get deployment </code></pre> <p>I am giving you this info accord...
Abdennour TOUMI
<p>I am stuck with a helm install of jenkins </p> <p>:( </p> <p>please help!</p> <p>I have predefined a storage class via:</p> <pre><code>$ kubectl apply -f generic-storage-class.yaml </code></pre> <p>with generic-storage-class.yaml:</p> <pre><code>kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: nam...
gh4x
<p>So per Matthew L Daniel's comment I ran <code>helm repo update</code> and then re-ran the helm install command. This time it did not re-create the PVC but instead used the pre-made one. </p> <p>My previous jenkins chart version was "jenkins-0.35.0"</p> <p>For anyone wondering what the deployment looked like:</p> ...
gh4x
<p>I am trying to configure an Ingress to map to 2 different services but when I use anything other than <code>/</code> as the <code>path</code> I get a <code>Cannot GET /node-web-app-svc</code> error. I have tried using <code>Exact</code> as the <code>pathType</code> but it doesn't help. I am running this on a k3s c...
craigtb
<p>Need to leverage <code>traefik.ingress.kubernetes.io/rewrite-target: /app-root</code></p>
craigtb
<p>in my dotnet app I need to monitor activities and if there is no activity withing 10 min I should kill the kubernete pod. killing the process will not do the job, is there anyway to kill/delete a pod within dotnet? </p>
faranak777
<p>I assume you want to kill pods using code within the k8s cluster. Have a look at the <a href="https://github.com/kubernetes-client/csharp/" rel="nofollow noreferrer">kubernetes client</a> for dotnet core. You can use the cluster config from within the cluster you are running.</p> <pre><code>// Load from the defaul...
Thomas Luijken
<p>I have a small Kubernetes on prem cluster (Rancher 2.3.6) consisting of three nodes. The deployments inside the cluster are provisioned dynamically by an external application and always have their replica count set to 1, because these are stateful applications and high availability is not needed.</p> <p>The applic...
frinsch
<p>It depends on how the traffic gets into your cluster. But let's break it down a little bit:</p> <p>Generally, there are two strategies on how to handle source ip preservation:</p> <ul> <li>SNAT (packet IP)</li> <li>proxy/header (passing the original IP in an additional header)</li> </ul> <h4>1) SNAT</h4> <p>By defau...
Martin Peter
<p>I have an ingress for my application:</p> <pre><code>apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: myapi-ingress annotations: nginx.ingress.kubernetes.io/ssl-redirect: &quot;true&quot; spec: ingressClassName: nginx rules: - host: mysite.com http: paths: - path: &quot;/p...
Rodrigo
<p>The problem was the host name set on the Ingress</p>
Rodrigo
<p>I have created multiple stacks (node groups) within my <strong>EKS cluster</strong>, and each group runs on a <strong>different instance type</strong> (for example, one group runs on GPU instances). I have added an entry in <em>mapRoles</em> of <em>aws-auth-cm.yaml</em> file for each of the node groups. Now I would ...
Alessandro
<p>You can use <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/" rel="nofollow noreferrer">taints and tolerations</a> to ensure that your pods end up on the right nodes. When you have heterogeneous nodes, this is good practice. </p> <p>For example, in my deployment, we have 2 classes of...
Anirudh Ramanathan
<p>I am using Kubernetes on a coreOS cluster hosted on DigitalOcean. And using <a href="https://github.com/cescoferraro/kubernetes-do" rel="nofollow noreferrer">this</a> repo to set it up. I started the apiserver with the following line:</p> <pre><code> /opt/bin/kube-apiserver --runtime-config=api/v1 --allow-privile...
CESCO
<p>If you want your users to authenticate using HTTP Basic Auth (user:password), you can add:</p> <pre><code>--basic-auth-file=/basic_auth.csv </code></pre> <p>to your kube-apiserver command line, where each line of the file should be <code>password, user-name, user-id</code>. E.g.:</p> <pre><code>@dm1nP@ss,admin,ad...
CJ Cullen
<p>My DigitalOcean kubernetes cluster is unable to pull images from the DigitalOcean registry. I get the following error message:</p> <pre><code>Failed to pull image &quot;registry.digitalocean.com/XXXX/php:1.1.39&quot;: rpc error: code = Unknown desc = failed to pull and unpack image &quot;registry.digitalocean.com/X...
Brettins
<p>The issue was that API Platform automatically has a default value for imagePullSecrets in the helm chart, which is</p> <p><code>imagePullSecrets: []</code></p> <p>in <a href="https://github.com/api-platform/api-platform/blob/e7c3973a8bef114d9a618b0589a1ea34b21c5603/helm/api-platform/values.yaml#L60" rel="nofollow no...
Brettins
<p>I'm new with service mesh thing, so I did some PoC of basic implementation of microservices in kubernetes with istio. </p> <p>I have 2 Deployments which is supposed to be talking to each other using gRPC. When I call the grpc server it returned error <code>rpc error: code = Internal desc = server closed the stream ...
Ahmad Muzakki
<p>Quoting Istio <a href="https://istio.io/docs/setup/kubernetes/spec-requirements/" rel="nofollow noreferrer">docs</a>, </p> <blockquote> <p>Service ports must be named. The port names must be of the form {protocol}[-{suffix}] with http, http2, grpc, mongo, or redis as the in order to take advantage of Istio’s rou...
Ahmad Muzakki