prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am configuring an ingress-nginx load balancer on Azure Kubernetes service. I have installed the load balancer using Helm, and set up ingress. Here is the behavior I'm encountering:</p>
<ul>
<li>When I include a host in my pathing rules in my ingress config, I cannot access service at that host URL. The request tim... | <p>If you are using AKS v>=1.24, then try adding below annotation with path <strong>/healthz</strong> instead of <strong>127.0.0.1</strong> during nginx ingress controller installation or in nginx ingress controller service and use host based routing with nginx ingress routes -</p>
<blockquote>
<p>service.beta.kuber... |
<p>I'm using Traefik 2.7.0 on an AKS Kubernetes Cluster 1.22.6.
Currently, everything routes to the same service:</p>
<pre><code>apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: api
namespace: namespace1
spec:
entryPoints:
- websecure
routes:
- match: Host(`api.my-domain.com`)... | <p>You can only expose services in the same namespace as your IngressRoute resource. If you watch the logs of your Traefik pod when you deploy your IngressRoute, you should see something like:</p>
<blockquote>
<p>time="2023-01-26T13:57:17Z" level=error msg="service namespace2/users-api not in the parent ... |
<p>I need to use <a href="https://github.com/Azure/azure-sdk-for-python" rel="nofollow noreferrer">Azure Python SDK</a> and <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Kubernetes Python Client</a> to list the Pods CPU limits for a cluster running in AKS.</p>
<p>Although its straight ... | <p>You can use the <code>config.load_kube_config</code> method and pass in the kubeconfig object you obtained earlier as a parameter. The method accepts a <code>config_file</code> parameter, which can be a file object, a file-like object, or a string file path.</p>
<p>Since <strong>kubeconfig</strong> is a string, you ... |
<p>I need to use <a href="https://github.com/Azure/azure-sdk-for-python" rel="nofollow noreferrer">Azure Python SDK</a> and <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Kubernetes Python Client</a> to list the Pods CPU limits for a cluster running in AKS.</p>
<p>Although its straight ... | <p>I tried a repro and was able to achieve as below -</p>
<ol>
<li><p>Getting kubeconfig in correct decoded format from kubeconfigs[0] which is <a href="https://learn.microsoft.com/en-us/python/api/azure-mgmt-hybridkubernetes/azure.mgmt.hybridkubernetes.models.credentialresults?view=azure-python" rel="nofollow noreferr... |
<p>It's now quite a few days that I'm trying to configure the cluster on AKS but I keep jumping between parts of the docs, various questions here on SO, articles on Medium.. all to keep failing at it.</p>
<p>The goal is get a static ip with a dns that I can use to connect my apps to the server deployed on AKS.</p>
<p>I... | <p>Finally found what the problem was.</p>
<p>Indeed the <code>Public IP</code> needs to be created in the <code>node resource group</code> because the ingress controller, with the <code>loadBalancerIP</code> assigned to the <code>Public IP</code> address, is going to look for it in the <code>node resource group</code... |
<p>The certs in kubernetes are base64 encoded and on the disk are plain certificate. We might have certs embedded in a yaml file. I was wondering if we can quickly verify the certs using either md5sum or viewing the cert contents as follows:</p>
<p>The first function tries to use pipes in variables and combines into a ... | <p>I'd try hard to avoid building up a command line out of unquoted strings as you show. It will in fact be prone to quoting problems, and if the input contains any sort of character that has special shell syntax the process is prone to behaving unexpectedly (and this can have security implications).</p>
<p>The first ... |
<p>I want to remove a few environment variables in a container with kustomize? Is that possible? When I patch, it just adds as you may know.</p>
<p>If it's not possible, can we replace environment variable name, and secret key name/key pair all together?</p>
<pre><code> containers:
- name: container1
env:
... | <p>If you're looking remove that <code>NAMESPACE</code> variable from the manifest, you can use the special <code>$patch: delete</code> directive to do so.</p>
<p>If I start with this Deployment:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: example
spec:
template:
spec:
containers:
... |
<p>I'm having a hard time with pulling image from private repository. Here's the drill down:</p>
<p>The pod:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
[...]
spec:
containers:
- image: gitlab.private:31443/cdn/cdndemo/appcdnmanagerui/main
imagePullPolicy: Always
[...]
imagePullSecrets:
- name: gitl... | <p>OK, I've found the problem. Instead of:</p>
<pre><code>{
"auths": {
"https://gitlab.private:31443": {
"username": "gitlab+deploy-token-22",
"password": "EGDLqGKJwBtfYYf9cDFg",
"email": "example@example.com",
... |
<p>previously I was using</p>
<blockquote>
<p>"google.golang.org/api"=>v0.10.0</p>
</blockquote>
<p>in my go.mod file and I was able to import</p>
<blockquote>
<p>gensupport "google.golang.org/api/gensupport"</p>
</blockquote>
<p>But with new</p>
<blockquote>
<p>"google.golang.org/api"=... | <p>Your only option is to vendor an older version of the library.
This package has been marked for internal use for a long time and was also marked to allow for breakages. See <a href="https://github.com/googleapis/google-api-go-client/issues/416" rel="nofollow noreferrer">https://github.com/googleapis/google-api-go-cl... |
<p>I've implemented a controller for Custom Resource (CR) A by <code>controller-runtime</code> lib. CR A is dependent on resource B as</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: CRD.API.Version
kind: A
metadata:
name: a
spec:
bName: b
otherSpecs: ...
</code></pre>
<p>And I add <code>ownerRe... | <p>You will need to add a finalizer to A, so that when A is deleted, in the finalizer logic you remove the OwnerReference from B. This way A's deletion is not orphaning B in Kubernetes GC's eyes, as when A is deleted after the finalizer logic, it does not own anything.</p>
|
<p>Is there a way to define a Persistent Volume in kubernetes which can grow automatically if it runs out of space?<br />
If not, are there any extensions/workarounds, other than over-provisioning storage to protect our applications?</p>
| <p>This is possible with an controller called the <a href="https://github.com/DevOps-Nirvana/Kubernetes-Volume-Autoscaler" rel="nofollow noreferrer">Kubernetes Volume Autoscaler</a>. This will require that you have defined your <code>StorageClasses</code> with the flag of <code>allowVolumeExpansion</code> enabled and ... |
<p>I am new to kubernetes and was trying to apply horizontal pod autoscaling to my existing application. and after following other stackoverflow details - got to know that I need to install metric-server - and I was able to - but some how it's not working and unable to handle request.</p>
<ul>
<li>Further I followed fe... | <p>First of all, execute the following command:</p>
<pre><code>kubectl get apiservices
</code></pre>
<p>And checkout the availablity (status) of <code>kube-system/metrics-server</code> service.</p>
<ul>
<li><p>In case the availability is <em>True</em>:
Add <code>hostNetwork: true</code> to the <code>spec</code> of your... |
<p>Hope you can help.</p>
<p>I am trying to enable audit logging in a docker container so if anybody <code>kubectl exec</code> to a docker container and runs any commands, then those commands get logged and we can view them in <code>kubectl logs</code> and capture with <code>fluentd</code> for example.</p>
<p>An option... | <p>Ah, came across my own question :D
So, <a href="https://falco.org/" rel="nofollow noreferrer">Falco</a> can be used as a HIDS (Host-based intrusion detection system), which will alert on any unusual activity based on rules defined in Flaco configuration. This can be deployed as a Deamonset (privileged) or directly o... |
<p>I'm trying to use internal service DNS for service-to-service HTTP communication.</p>
<p>If I try to curl a pod from another deployment pod it is working but unable to use it in golang net/http service</p>
<pre><code>2023/01/27 15:48:37 oauth2.go:90: oauth2 url http://hydra-admin.microservices.svc.cluster.local:444... | <p>Per my comment, depending on how you are building your <code>go</code> executable will have an effect on how it behaves within a <code>k8s</code> environment. Are you using a <code>scratch</code> image or a <code>CGO_ENABLED=1</code> image?</p>
<p>From the <code>dns</code> package <a href="https://pkg.go.dev/net#hdr... |
<p>I am trying to run a nextflow pipeline but the output file is not created.</p>
<p>The main.nf file looks like this:</p>
<pre><code>#!/usr/bin/env nextflow
nextflow.enable.dsl=2
process my_script {
"""
Rscript script.R
"""
}
workflow {
my_script
}
</code></pre>
<p>In m... | <p>Nextflow processes are run independently and isolated from each other from inside the working directory. For your script to be able to find the required input files, these must be localized inside the process working directory. This should be done by defining an <a href="https://www.nextflow.io/docs/latest/process.h... |
<p>pinniped cli is not working in widnows.
pinniped-cli-windows-amd64.exe is downloaded but when i type pinniped, it's not recognized.</p>
<p>C:\Users\hello>pinniped
pinniped is not recognized as a internal command or external command, operable program or batch file.</p>
<p>Seem windows is not recognizing this .exe ... | <p>Hi <code>Chai</code> I have gone through the link and tried installing pinniped cli it throwed me same error, then I troubleshooted and found that pinniped cli’s executable file is not getting added to the path and we can run pinniped commands by executing the exe file, however everytime you need to go to the direct... |
<p>I have this kind of routing in each namespace :</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
annotations:
janitor/expires: ${EXPIRY_DATE}
nginx.ingress.kubernetes.io/ssl-redirect: "false" # Set to true once SSL is set up.
spec:
ingressClassName: ngi... | <p>Alas I must admit I just discovered the error does not originate from the kubernetes / ingress-nginx part of the setup but from the testing system, which includes a collision between services at deploy time, because of bad separation in the CI / CD job. Sorry for your time !</p>
<p>So in fact the logs from ingress n... |
<p>I have the following chartInflator.yml file:</p>
<pre><code>apiVersion: builtin
kind: ChartInflator
metadata:
name: project-helm-inflator
chartName: helm-k8s
chartHome: ../../../helm-k8s/
releaseName: project-monitoring-chart
values: ../../values.yaml
releaseNamespace: project-monitoring-ns
</code></pre>
<p>When I... | <p>I think you may have found some outdated documentation for the helm chart generator. The canonical documentation for this is <a href="https://github.com/kubernetes-sigs/kustomize/blob/master/examples/chart.md" rel="nofollow noreferrer">here</a>. Reading that implies several changes:</p>
<ol>
<li><p>Include the infla... |
<p>I have web services running in the GKE Kubernetes Engine. I also have monitoring services running in the cloud that are monitoring these services. Everything is working fine....except that I don't know how to access the Prometheus, and Kibana dashboards. I know I can use <strong>port-forward</strong> to temporarily ... | <blockquote>
<p>Should I create a load balancer for each of these?</p>
</blockquote>
<p>No, you can create but not a good idea.</p>
<blockquote>
<p>What about security? I only want a few engineers to have access to
these systems.</p>
</blockquote>
<p>You can create an account in Kibana and manage access or else you can... |
<p>I ran the following command:</p>
<pre><code>kubectl create secret tls nexus-tls --cert cert.crt --key privateKey.pem
</code></pre>
<p>where <code>cert.crt</code> contains my certificate and <code>privateKey.pem</code> contains my private key (provisioned using CloudFlare).</p>
<p>I then installed the <code>stable... | <p>For legacy reasons I must stand up nexus on GKE. While this question doesn't directly state it is on Google Cloud, the <code>gs://</code> and <code>ingress.class: gce</code> suggest it was; despite the older answer from Xuan Huy being about AWS.</p>
<p>I had a heck of a time getting Nexus TLS to work on GKE, but I f... |
<p>When using Istio with Kubernetes, a number of different manifests require the same environment-specific values. For example, the host address is required by both the Gateway (under <code>spec/servers/hosts</code>) and VirtualService (under <code>spec/hosts)</code>. The typical approach to changing the address for di... | <p>This isn't going to be possible with just Kustomize other than by using multiple patches. Because you're looking to change the value in objects of different types, this can't be done with a single patch. So you could do this:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: kustomize.config.k8s.io/v... |
<p>The database and the server are not connected.
Attempting to deploy in Kubernetes environment.</p>
<p>this is deployment, sevice of mongodb , golang http server</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
labels:
app: backend
spec:
selector:
matchLabels:
app: backe... | <p>To connect MongoDB with Golang in a Kubernetes environment, you need to follow these steps:</p>
<p>Deploy MongoDB as a statefulset or a deployment in your Kubernetes cluster.</p>
<p>Create a Service for MongoDB to access the deployed pods from your Golang application.</p>
<p>In your Golang application, use the offic... |
<p>I use the Google Cloud Code extension on VSCode.
I have a minikube running on my macbook (using the virtualbox driver).</p>
<p>I can run <code>skaffold debug</code> from my terminal just fine; the Helm chart gets deployed, but I haven't done the debugger setup so the breakpoints don't hit (as expected).</p>
<p>I wan... | <p>my work around.</p>
<pre><code>ls -l /var/run/docker.sock
# /var/run/docker.sock -> $HOME/.docker/run/docker.sock
sudo rm /var/run/docker.sock
ssh -i ~/.minikube/machines/minikube/id_rsa -L $HOME/.minikube/docker.sock:/var/run/docker.sock docker@$(minikube ip) -o StrictHostKeyChecking=no -o UserKnownHostsFile=/d... |
<p>I want to list the pods that are owned by the resource <code>X</code> from the Kubernetes cluster using Kubuilder's <code>List(ctx context.Context, list ObjectList, opts ...ListOption)</code> method. <code>ListOptions</code> contains options for limiting or filtering results. Here is the the structure of the <code... | <p>Unfortunately it's not possible to use field selector for every field of a resource. In your case for example, you can only use <a href="https://github.com/kubernetes/kubernetes/blob/9d577d8a29893062dfbd669997396dbd01ab0e47/pkg/apis/core/v1/conversion.go#L33" rel="nofollow noreferrer">these fields</a> as field selec... |
<p>Having needed several times in the last few days to upload a 1Gb image after some micro change, I can't help but wonder why there isnt a deploy path built into docker and related tech (e.g. k8s) to push <em>just the application files</em> (Dockerfile, docker-compose.yml and app related code) and have it build out th... | <p>Good question.</p>
<p>Short answer:</p>
<p>Because storage is cheaper than processing power, building images "Live" might be complex, time-consuming and it might be unpredictable.</p>
<p>On your Kubernetes cluster, for example, you just want to pull "cached" layers of your image that you know tha... |
<p>We are deploying with Ansible scripts to Openshift 3 using <code>oc apply</code>. When we change template to add more environment variables, we receive a very vague error: <code>"unrecognized type: string"</code> and status code 500.</p>
<p>Setting <code>--loglevel 10</code> leads to no more details:</p>
<... | <p>Solved by quoting the var values in the template, like:</p>
<pre><code>- name: NEW_VAR_X
value: "${NEW_VAR_VALUE_X}"
</code></pre>
<p>No errors ever since.</p>
|
<p>Using <code>microk8s</code> installation. An image is tagged, so should use <code>IfNotPresent</code> policy.</p>
<pre><code>apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4 name: lh-graphql
5 labels:
6 app: lh-graphql
7 spec:
8 selector:
9 matchLabels:
10 app: lh-graphql
1... | <p>If you are running the <strong>microK8s</strong> and Docker still it's necessary <strong>microk8s</strong> to have an idea about the docker that is running on your machine. local Docker daemon is not part of the <strong>MicroK8s</strong> Kubernetes cluster.</p>
<p>You can <strong>export</strong> the image and inject... |
<p>This is my docker file</p>
<pre class="lang-sh prettyprint-override"><code>#!/bin/bash
FROM node:10.8.0 as build-stage
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY ./ /app/
ARG configuration=production
RUN npm run build -- --output-path=./dist/out --configuration $configuration
FROM nginx:1.15
#Copy ci... | <p>Try something like adding <code>--platform=linux/amd64</code> in your <strong>Dockerfile</strong></p>
<pre><code>FROM --platform=linux/amd64 node:18-alpine as builder
</code></pre>
<p>Build the image and run it on <strong>K8s</strong>.</p>
<p>it could be due to the building image on Mac or Arm and your K8s cluster i... |
<p>What I am going to use:</p>
<ul>
<li>Microk8s</li>
<li>istio addon</li>
<li>Metallb addon</li>
<li>Cert manager (if possible)</li>
</ul>
<hr />
<p>With microk8s, I want to deploy several micro services.</p>
<p>I want to set up istio gateway to check whether rest api requests are using https protocol.</p>
<ul>
<li>Ea... | <blockquote>
<p>Are there any options for a private IP address that works like
letsencrypt? :</p>
</blockquote>
<p>If you are using a private IP address and do not have DNS, you cannot use LetsEncrypt to obtain a SSL certificate. Instead, you will need to use a certificate from a Certificate Authority (CA) that can gen... |
<p>kustomize build --enable-helm .I have the following project structure:</p>
<pre><code>project
- helm-k8s
- values.yml
- Chart.yml
- templates
- base
- project-namespace.yml
- grafana
- grafana-service.yml
- grafana-deployment.yml
- grafana-datasource-config.yml
... | <p>I think you may have misunderstood the use of the <code>--enable-helm</code> parameter. It does not allow kustomize to perform helm-style templating on files, so when you write:</p>
<pre><code>apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.app.namespace }}
labels:
name: {{ .Values.app.namespace }}... |
<p>I need to get all resources based on <strong>label</strong>, I used the following code <strong>which works</strong>, However, it takes <strong>too much time</strong> ( ~20sec) to get the response, even which I restrict it to only one namespace (vrf), any idea what im doing wrong here?</p>
<pre><code>resource.NewBuil... | <p>The search may be heavy due to the sheer size of the resources the query has to search into. Have you looked into this possibility and further reduce the size using one more label or filter on top of current.</p>
<p>Also check the performance of you Kubernetes api server when the operation is being performed and opt... |
<p>I am re-designing a dotnet backend api using the CQRS approach. This question is about how to handle the Query side in the context of a Kubernetes deployment.</p>
<p>I am thinking of using MongoDb as the Query Database. The app is dotnet webapi app. So what would be the best approach:</p>
<ol>
<li><p>Create a sid... | <p>It has been almost 2 years since I posted this question. Now with 20-20 hindsight I thought I would post my solution. I ended up simply provisioning an Azure Cosmos Db in the region where my cluster lives, and hitting the Cosmos Db for all my query-side requirements.</p>
<p>(My cluster already lives in the Azure C... |
<p>to start with - I am a sort of newbie to Kubernetes and I might omit some fundamentals.</p>
<p>I have a working containerized app that is orchestrated with docker-compose (and works alright) and I am rewriting it to deploy into Kubernetes. I've converted it to K8s .yaml files via Kompose and modified it to some degr... | <p>I have managed to make it work by deleting services from deployment and running <code>kubectl expose deployment kafka-app</code>. The issue comes from Kompose labeling.</p>
|
<h3>Context</h3>
<p>I am running a job-processing task (specifically, <a href="https://github.com/resque/resque" rel="nofollow noreferrer">Resque</a>) in a kubernetes setup. This task sets up one or more workers to takes job messages off a queue and processes them. A typical invocation is to set your desired worker cou... | <p>Either way is fine and I wouldn't expect it to make a huge difference, except maybe at large scale.</p>
<p>There is nothing architecturally wrong with running multiple worker tasks inside a single container, particularly within a framework that's specifically designed to do it. As you note it's usually considered g... |
<p>I cannot pull artifact registry images to a newly created GKE cluster with Terraform and a user-defined service account.</p>
<p>The terraform used to stand up the cluster is below.</p>
<pre><code>locals {
service = "example"
resource_prefix = format("%s-%s", local.service, var.env)
... | <p>As error says : <strong>unexpected status: 403 Forbidden</strong></p>
<p>You might be having an issue with the Deployment <strong>imagepull</strong> <strong>secret</strong>.</p>
<p>For <strong>GKE</strong> you can use the service account <strong>JSON</strong></p>
<p>Ref doc : <a href="https://cloud.google.com/contai... |
<p>to start with - I am a sort of newbie to Kubernetes and I might omit some fundamentals.</p>
<p>I have a working containerized app that is orchestrated with docker-compose (and works alright) and I am rewriting it to deploy into Kubernetes. I've converted it to K8s .yaml files via Kompose and modified it to some degr... | <p>Your service's app selector is <code>kafka</code>, whereas the deployment is <code>kafka-app</code>, so they aren't connected.</p>
<p>I suggest you use Strimzi (or Confluent for Kubernetes if you want to use their images), not convert your existing Docker Compose file using Kompose, as it rarely gets network policie... |
<p>I use <code>kubectl</code> to list Kubernetes custom resources of a kind <code>mykind</code> with an additional table column <code>LABEL</code> that contains the value of a label <code>a.b.c.com/key</code> if present:</p>
<pre><code>kubectl get mykind -o=custom-columns=LABEL:.metadata.labels.'a\.b\.c\.com/key'
</cod... | <p>mdaniel's comment works!</p>
<pre class="lang-yaml prettyprint-override"><code>- description: Label value
jsonPath: '.metadata.labels.a\.b\.c\.com/key'
name: LABEL
type: string
</code></pre>
<p>You need to use <code>\.</code> instead of <code>.</code> and use single quotes <code>' '</code>. It doesn't work wit... |
<p>I am building a Go Kubernetes operator. I have used kubebuilder to create it.
I want to store some internal details in the CRD status. I have tried :</p>
<ul>
<li>To update the whole resource :</li>
</ul>
<pre><code>if err = r.Client.Update(ctx, upCRD); err != nil {
return ctrl.Result{}, client.IgnoreNotFound(er... | <p>I might have found the reason why the status were not updated.</p>
<p>Before updating the status, I was also updating the spec fields (to give some feedback to the user on created resources).</p>
<p>The issue is caused by the fact that the specs updates trigger a new reconcilation, and the instruction after this upd... |
<p>Is calling Delete in the Kubernetes go API an idempotent operation, i.e. can it safely be called twice?
If so, is there any documentation defining this property?
The go code just states</p>
<blockquote>
<p>Delete deletes the given obj from Kubernetes cluster.</p>
</blockquote>
<p>Essentially, this statement is what ... | <p>The api service is based on http, so you can check <a href="https://www.rfc-editor.org/rfc/rfc7231" rel="nofollow noreferrer">RFC 7231</a> about that</p>
<blockquote>
<p>A request method is considered "idempotent" if the intended effect on the server of multiple identical requests with that method is the s... |
<p>I have a question about labels and names, in this example manifest file</p>
<p>apiVersion: apps/v</p>
<pre><code>1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
... | <p>The Deployment has your specifed name "nginx-deployment".</p>
<p>However you did not define a Pod with a fixed name, you define a template for the pods managed by this deployment.</p>
<p>The Deployment manages 3 pods (because of your replicas 3), so it will use the template to build this three pods.</p>
<p... |
<p>During pod startup Kubernetes is creating some environment variables based on services i created (via downward API?). Problem is that one of them, MY_APPLICATION_PORT, seems to be initialized incorrectly, it looks like:</p>
<pre><code>MY_APPLICATION_PORT=tcp://192.168.0.5:7777
</code></pre>
<p>whereas i expect it to... | <p>This environment variable comes from compatibility with a very old Docker feature. You can disable it in Kubernetes by setting <code>enableServiceLinks: false</code> on a <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers" rel="nofollow noreferrer">Container</a> objec... |
<p>I have an Azure kubernetes cluster created using the following Terraform code</p>
<pre><code># Required Provider
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0.2"
}
}
required_version = ">= 1.1.0"
}
data &quo... | <p>The load balancer that gets created with the AKS cluster (usually called kubernetes) is used for egress (not ingress) traffic and is a public LB, and it cannot be private. This is part of the outbound type configuration.</p>
<p>The "outbound type" of the AKS cluster can be set to "LoadBalancer, UserDe... |
<p>i'm trying to set up a rke cluster, the connection to the nodes goes well but when it starts to check etcd health returns:
failed to check etcd health: failed to get /health for host [xx.xxx.x.xxx]: Get "https://xx.xxx.x.xxx:2379/health": remote error: tls: bad certificate</p>
| <p>If you are trying to upgrade the RKE and facing this issue then it could be due to the missing of <code>kube_config_<file>.yml</code> file from the local directory when you perform rke up.</p>
<p>This similar kind of issue was reported and reproduced in this <a href="https://github.com/rancher/rke/issues/1244#... |
<p>Does anyone had success implementing preStop hook with distroless/java17:nonroot ? Here is my (default) deployment:</p>
<pre class="lang-java prettyprint-override"><code># [...]
lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 10"... | <p>Solved using actuator endpoint</p>
<pre class="lang-java prettyprint-override"><code>@Slf4j
@Component
@ControllerEndpoint(id = "preStopHook")
class WebMvcPreStopHookEndpoint {
@ResponseStatus(OK)
@GetMapping("/{delayInMillis}")
public ResponseEntity<Void> preStopHook(@PathVariable(&... |
<p>I am seeing a very strange issue trying to start the official <code>postgres:14.6-alpine</code> image on Kubernetes.</p>
<p>For reference the official postgres image allows for configuring the initialization script using the <code>POSTGRES_USER</code>, <code>POSTGRES_PASSWORD</code>, and <code>POSTGRES_DB</code> env... | <p>I think this had to do with a specific setting I had enabled for Docker Desktop for Mac:</p>
<p><a href="https://i.stack.imgur.com/7f60o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7f60o.png" alt="Docker Desktop Settings" /></a></p>
<p>I had changed from the default value (<code>gRPC FUSE</cod... |
<p>Almost two years later, we are experiencing the same issue as described in <a href="https://stackoverflow.com/questions/67175908/gke-fails-to-mount-volumes-to-deployments-pods-timed-out-waiting-for-the-condit">this SO post</a>.</p>
<p>Our workloads had been working without any disruption since 2018, and they suddenl... | <p>OK, fixed. I had to enable the CI driver on our legacy cluster, <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver" rel="nofollow noreferrer">as described here</a>...</p>
|
<p>Update:</p>
<p>What I am trying to achieve: I have the IP address of a cluster resource (10.1.239.128 in the examples below) and want to figure out to which POD/service/... it belongs.</p>
<hr />
<p>I set up a Kuebernetes cluster using Microk8s running, among others, vault and cert-manager via Helm charts. In two of... | <p>Here is a workaround, not the finest way of doing it, but it may help to get in the right direction:</p>
<pre><code>kubectl api-resources -oname |while read r;
do
echo -n "$r ----> ";
kubectl get $r -A -o yaml |grep -oPz '\d+\.\d+\.\d+\.\d+';
echo "" ;
done
</code></pre>
<p>As... |
<p>It seems that excluding logs in a pod using the configuration below does not work.</p>
<p>extrascrapeconfig.yaml:</p>
<pre><code> - job_name: kubernetes-pods-app
pipeline_stages:
- docker: {}
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: drop
regex: .+
source_labels:
... | <p>If you need Helm to pick up a specific file and pass it as a value, you should not pass the value itself in the values YAML file, but via another flag when installing or upgrading the release.</p>
<p>The command you are using is just applying the Helm values as-is, since the <code>-f</code> flag does not support par... |
<p>In my namespace, I have several pods named with the same prefix, followed by the random string. There are also other pods, named differently. The result of <code>kubectl get pods</code> would look something like this:</p>
<pre><code>service-job-12345abc
service-job-abc54321
other-job-54321cba
</code></pre>
<p>I need... | <p>This works as you expect:</p>
<pre><code>kubectl get pods --sort-by=.metadata.creationTimestamp --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep service-job- | head -1
</code></pre>
|
<p>I cannot pull artifact registry images to a newly created GKE cluster with Terraform and a user-defined service account.</p>
<p>The terraform used to stand up the cluster is below.</p>
<pre><code>locals {
service = "example"
resource_prefix = format("%s-%s", local.service, var.env)
... | <p>Turning comment to answer as it resolved @David's issue.</p>
<p>Because the user defined service account is being used for the node_pool the appropriate roles need to be bound to this service account.</p>
<p>In this case: <code>roles/artifactregistry.reader</code></p>
<p><a href="https://cloud.google.com/artifact-re... |
<p>I'm deploying my Node.js server on AKS and I'm experiencing a few unexpected behaviours not happening on my local machine. I've tried various things to debug it but I'm not succeeding at all.</p>
<p>I use a Middleware as</p>
<pre><code>exports.clientApiKeyValidation = (req, res, next) => {
try {
const c... | <p>I don't know anything about AKS, but some HTTP server implementations (for instance <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers" rel="nofollow noreferrer">nginx</a>) don't accept underscores in HTTP header names.</p>
<p>As for why the server API keys contains a trailing n... |
<p>According to articles below, it seems we can pull container image to GKE from Artifact Registry without any additional authentication when these in same project.</p>
<p><a href="https://cloud.google.com/artifact-registry/docs/integrate-gke" rel="nofollow noreferrer">https://cloud.google.com/artifact-registry/docs/in... | <p>This could be because the GKE Autopilot service account does not have the necessary permissions to access the Artifact Registry. You can grant the needed permissions by adding the <code>roles/artifactregistry.reader</code> role to the service account that the GKE Autopilot node pool is configured to use. Additionall... |
<p>I have currently Trino deployed in my Kubernetes cluster using the official <a href="https://github.com/trinodb/charts" rel="nofollow noreferrer">Trino(trinodb) Helm Chart</a>. In the same way I deployed <a href="https://github.com/apache/superset/blob/master/helm/superset/Chart.yaml" rel="nofollow noreferrer">Apach... | <p>You should install <code>sqlalchemy-trino</code> to make the trino driver available.</p>
<p>Add these lines to your <code>values.yaml</code> file:</p>
<pre class="lang-yaml prettyprint-override"><code>additionalRequirements:
- sqlalchemy-trino
bootstrapScript: |
#!/bin/bash
pip install sqlalchemy-trino &&... |
<p>In normal kubernetes CI/CD process , following process occurs :</p>
<ul>
<li>clone code from git</li>
<li>build and push docker image</li>
<li>update kubernetes deployment with updated code</li>
</ul>
<p>According to gitops definition</p>
<p><em>GitOps is a new approach to Continuous Deployment that leverages Git as... | <p>GitOps is nothing but extending CI/CD principles beyond application code: to infra code. Simple. You can think of using Git as source of truth that combines with Terraform (provisioning), Ansible (config mgmt) and Kubernetes (orchestration) as an example ...in order to achieve the goal of keeping Git as 1:1 reflecti... |
<p>I am trying to update status subresource for a Custom Resource and I see a discrepency with curl and <code>kubectl patch</code> commands. when I use curl call it works perfectly fine but when I use <code>kubectl patch</code> command it says patched but with <code>no change</code>. Here are the command that I used</p... | <p>As of kubectl v1.24, it is possible to patch subresources with an additional flag e.g. <code>--subresource=status</code>. This flag is considered "Alpha" but does not require enabling the feature.</p>
<p>As an example, with a yaml merge:</p>
<pre><code>kubectl patch MyCrd myresource --type=merge --subresou... |
<p>I want to prevent unsafe requested to reach my application running in GCP GKE with Google Ingress (not nginx) and trying to do this using path rules.
I know nginx Ingress can configure paths using regex but I don know the best way to do with Google Ingress.
Right now I am just duplicating the same rules change the p... | <p>Everything you're looking for is covered in <a href="https://cloud.google.com/load-balancing/docs/url-map-concepts#pm-constraints" rel="nofollow noreferrer">this</a> document. As GKE ingress is essentially a GCP Load Balancer, the <code>path</code> key is using a <code>url-map</code> to configure and route the traff... |
<p>I am trying to pass given part of values.yaml into helm template:</p>
<pre><code> receivers:
test1:
test2:
test3:
test4:
</code></pre>
<p>using function:</p>
<p><code>{{ .Values.receivers | toYaml | nindent 2}}</code></p>
<p>Code is placed in correct format, however empty fields get filled wi... | <p>There are no fields inserted. The processor only replaces values that already exist with a different serialization that has the same semantics.</p>
<p><code>test3:</code> in YAML without a value is parsed as having an empty scalar value. The <a href="https://yaml.org/spec/1.2.2/#103-core-schema" rel="nofollow norefe... |
<p>I just follow the Keycloak Documentation for Kubernetes.</p>
<p><a href="https://www.keycloak.org/getting-started/getting-started-kube" rel="nofollow noreferrer">https://www.keycloak.org/getting-started/getting-started-kube</a></p>
<p><a href="https://i.stack.imgur.com/8oCpF.png" rel="nofollow noreferrer"><img src="... | <p>Make sure you have updated the ingress file with the proper <strong>IP</strong> of <strong>minikube</strong>.</p>
<p>Also check with <strong>http</strong> instead <strong>https</strong> & <strong>KEYCLOAK_HOSTNAME</strong> value</p>
<p>Try below YAML :</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name... |
<p>I am still new to K8S infrastructure but I am trying to convert VM infrastructure to K8S on GCP/GKE and I am stuck at forwarding the logs properly after getting Prometheus metrics forwarded correctly. I am also trying to do this without helm, to better understand K8S.</p>
<p>The logs of the loki pod, look as expecte... | <p>The issue you're describing is answered exactly by the error message.</p>
<p>Your second Kubernetes Service manifest, named <code>promtail</code>, does not have any specification. For services, at least <code>spec.ports</code> is required. You should add a label selector as well, so the Service can pick up the Deplo... |
<p>I am creating a custom Builder Image using S2i dotnet core. This will run in OpenShift linux container</p>
<p>I have modified the custom builder image and included few lines to copy few dlls and ".so" files</p>
<p>When running the container in OpenShift I am facing the below error</p>
<p>error says</p>
<pr... | <p>Your code depends on libstdc++.so.6 but it would seem that version isn't installed</p>
<p>In your Dockerfile, add the <code>yum install</code> command that should do it. It would depend on what operating system you're using, but for RHEL 7, for example, you could do:</p>
<p><code>RUN yum install -y libstdc++</code><... |
<p>I have an asp.net core 7.0 api application in a docker container hosted in Kubernetes behind an Nginx ingress controller.</p>
<p>To get the client ip address i'm using</p>
<blockquote>
<p>context.HttpContext.Connection.RemoteIpAddress</p>
</blockquote>
<p>for all user requests I get a Private Ip address like '10.244... | <p>You need to configure nginx to <a href="https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0#nginx-configuration" rel="nofollow noreferrer">forward the <code>X-Forwarded-For</code> and <code>X-Forwarded-Proto</code> headers</a>. Example:</p>
<pre><code>server {
li... |
<p>I have this redis instance in a pod running on 1.21 cluster.</p>
<p>Running <code>kubectl cp -c redis --request-timeout=1m redis-pod:data/dump.rdb /tmp/data/dump.rdb</code></p>
<p>or</p>
<p><code>kubectl exec --request-timeout=1m -i redis-pod -- cat /data/dump.rdb > /tmp/data/dump.rdb</code></p>
<p>I get the foll... | <p>You can use the <strong>kubectl cp</strong> <strong>--retries=10</strong> if the connection is getting timeout while copying the file.</p>
<p>If you are in <strong>Redis POD</strong> and just want to <strong>take out</strong> the <strong>data</strong> you can install the <strong>aws</strong>, <strong>gcp</strong> <... |
<p>What is the correct way of memory handling in OpenShift/Kubernetes?</p>
<p>If I create a project in OKD, how can I determine optimal memory usage of pods? For example, if I use 1 deployment for 1-2 pods and each pod uses 300-500 Mb of RAM - Spring Boot apps. So technically, 20 pods uses around 6-10GB RAM, but as I s... | <blockquote>
<p>Is it able to give extra memory but only for the first X minutes for each pod start?</p>
</blockquote>
<p>You do get this behavior when you set the <strong>limit</strong> to a higher value than the <strong>request</strong>. This allows pods to burst, unless they all need the memory at the same time.</p>... |
<p>I provisioned alertmanager using Helm (and ArgoCD).
I need to insert smtp_auth_password value but not as a plain text.</p>
<pre><code>smtp_auth_username: 'apikey'
smtp_auth_password: $API_KEY
</code></pre>
<p>How can I achieve it? I heard about "external secret" but this should be the easiest way?</p>
| <h3>Solution</h3>
<p>if you use <code>prometheus-community/prometheus</code> which includes this alertmanager <a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/alertmanager" rel="nofollow noreferrer">chart</a> as a dependency, then you can do the following:</p>
<p><strong>create secret</stro... |
<p>Below are the setup details:
keda installed,
prometheus deployed,
through application using below scaled object template for hpa:</p>
<pre><code>keda:
triggers:
- metadata:
metricName: container_memory_usage
query: avg(floor((container_memory_usage_bytes{pod=~"pythonb-.*",container=~&... | <p>We just solved this one after a lot of off-and-on hunting. Turns out KEDA has an option called <code>metricType</code> that you can specify under <code>triggers</code>. TLDR you need to set that to <code>"Value"</code>.</p>
<p>To understand why you need to dive into how HPA works in Kubernetes. When you de... |
<p>Lets say you use <a href="https://argoproj.github.io/cd/" rel="nofollow noreferrer">Argocd</a> to deploy helm charts to Kubernetes. Things work great but you have a kubernetes resource <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/" rel="nofollow noreferrer">finalizer</a> on a... | <p>Either you need to delete the corresponding Argocd application or you need to roll back the deployment. If you delete the application it will remove all the resources created by the application and it will stop the operation. If you roll back to the previous version it will undo the changes you have made in the curr... |
<p>I have a use-case where I need to mount a <code>hostpath</code> to a pod but that <code>hostpath should have a subdirectory with PODNAME</code>, I know something like this can be used with statefulsets but due to some constraints a hostpath mount is needed in deployment where the root directory will have sub directo... | <p>You can use the <strong><a href="https://kubernetes.io/docs/concepts/workloads/pods/downward-api/" rel="nofollow noreferrer">downward API</a></strong> of Kubernetes as <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow noreferrer">Environment... |
<p>I have a kubernetes namespace in <code>phase: Terminating</code> (waiting on finalizers or something) and I want it to stop terminating, without deleting it.</p>
<p>Is there a way to do this?</p>
| <p>Stop a kubernetes namespace from terminating by updating the finalizers associated with it.</p>
<p>The finalizers of a namespace determine the conditions that must be met before the namespace can be deleted. If a namespace is in a "Terminating" state, it means that there are still finalizers associated wit... |
<p>I have a basic kubernetes helm template like below</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: test
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .R... | <p>You're hitting problems with whitespace in the first line of the block scalar. You should check two things:</p>
<ol>
<li>The template block containing <code>indent</code> must not itself be indented, it must start at the first column of its line; and</li>
<li>The template block containing <code>indent</code> must n... |
<p>We use <code>kubectl set image</code> to rollout a new version <code>2.0.0</code> of an existing application. We then use <code>kubectl rollout status</code> to wait for the new pod to become ready so that we can run some basic tests.</p>
<p>The problem is, <code>kubectl rollout status</code> returns (implying the n... | <h2>Update</h2>
<blockquote>
<p>Even better would be to get the new_pod id and exec directly into that.</p>
</blockquote>
<p>Also possible, yes. Try this:</p>
<pre><code>k rollout status deploy/myapp >/dev/null && \
k get po -l app=myapp | grep Running | awk '{print $1}' | xargs -I{} kubectl exec {} -- sh... |
<p>I was under the impression that the main point of cluster-issuer is that its namespaced and doesn't have to be recreated across different resources, in general there could be one main cluster-issuer that will manage all ingresses across the cluster.</p>
<p>From what I am seeing the cluster-issuer can only create one... | <p>i would recommend creating the <strong>wildcard</strong> <strong>certificate</strong> using <strong>issuer/clusterissuer</strong>.</p>
<p>So you will be having the <strong>single secret</strong> with <strong>wildcard</strong> <strong>cert</strong> so you can use that across all ingress.</p>
<p>As you are already usi... |
<p>I have a helm chart A which depends on a third-party subchart B.
Chart B defines some CRDs which are used by chart A.
However, when I install chart A (hence B too), I get an error saying that the CRDs are not recognized. It seems that the CRs are being stored before CRDs.</p>
<p>Helm documentation about <a href="htt... | <p>There's a pretty simple way to let your main chart install the objects defined by your dependency chart's CRDs. Just make them installed and upgraded with the <code>post-install</code> and <code>post-upgrade</code> hooks.</p>
<p>Just a simple example for you. Let's imagine, you need to install a cert-manager as a su... |
<p>I'm trying to apply SSL to my kubernetes clusters (production & staging environment), but for now only on staging. I successfully installed the cert-manager, and since I have a 5 subdomains, I want to use wildcards, so I want to configure it with dns01. The problem is, we us GoDaddy for DNS management, but it's ... | <p>The accepted solution does work -- a different issuer is one way to go. Though if you want to use the ACME issuer, you'll need to solve challenges. This can be done via either a <a href="https://cert-manager.io/docs/configuration/acme/http01/" rel="nofollow noreferrer">HTTP01</a> solver or a <a href="https://cert-... |
<p>I need to reduce my 'if else code' in my helm chart template<br />
How can I do that ?.</p>
<pre><code> {{- if .Values.global }}
{{- if .Values.global.namespace }}
namespace: {{ .Values.global.namespace }}
{{- else }}
namespace: {{ .Values.namespace }}
{{- end }}
{{- else }}
namespace:... | <p>"If <code>x</code> is truthy, then use its value, otherwise use <code>y</code>" is what the Helm (Sprig) <a href="https://docs.helm.sh/docs/chart_template_guide/function_list/#default" rel="nofollow noreferrer"><code>default</code></a> function does. You could replace the inner conditional with</p>
<pre c... |
<p>I need to reduce my 'if else code' in my helm chart template<br />
How can I do that ?.</p>
<pre><code> {{- if .Values.global }}
{{- if .Values.global.namespace }}
namespace: {{ .Values.global.namespace }}
{{- else }}
namespace: {{ .Values.namespace }}
{{- end }}
{{- else }}
namespace:... | <p>You could use a variable and also <code>{{with}}</code> (which sets the dot), e.g.:</p>
<pre><code>{{- $ns := .Values.namespace -}}
{{- with .Values.global }}{{ with.namespace }}{{ $ns = . }}{{end}{{ end -}}
namespace: {{ $ns }}
name: {{.Values.name}}
</code></pre>
|
<p>I'm configuring startup/liveness/readiness probes for kubernetes deployments serving spring boot services. As of the spring boot documentation it's best practice to use the corresponding liveness & readiness actuator endpoints as describes here:
<a href="https://spring.io/blog/2020/03/25/liveness-and-readiness-p... | <p>The startup probe is optional.</p>
<p>Originally, there were two types of probes in Kubernetes: readiness and liveness. However, people have encountered issues with slow-start containers. When a container takes a long time to start, Kubernetes does the first check on the liveness probe after initialDelaySeconds. If ... |
<p>I'm experimenting with the new Flink Kubernetes operator and I've been able to do pretty much everything that I need besides one thing: getting a JAR file from the S3 file system.</p>
<h2>Context</h2>
<p>I have a Flink application running in a EKS cluster in AWS and have all the information saved in a S3 buckets. Th... | <p>The download of the jar happens in flink-kubernetes-operator pod. So, when you apply FlinkSessionJob, the fink-operator would recognize the Crd and will try to download the jar from jarUri location and construct a JobGraph and submit the sessionJob to JobDeployment. Flink Kubernetes Operator will also have flink run... |
<p>I am using loki-stack helm chart I am doing following configuration to disable kube-system namespace logs in promtail so that loki doesnt use it</p>
<pre><code>promtail:
enabled: true
#
# Enable Promtail service monitoring
# serviceMonitor:
# enabled: true
#
# User defined pipeline stages
pipelineS... | <p>I had the same issue with this configuration and it seems like the <code>pipelineStages</code> at this level is being ignored. I solved my problem by moving it to <code>snippets</code>.</p>
<pre><code>promtail:
enabled: true
config:
snippets:
pipelineStages:
- docker: {}
- drop:
... |
<p>Following the k8s/controller-runtime/client example code (see <a href="https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/client#example-Client-Create" rel="nofollow noreferrer">here</a>), which goes a bit like this</p>
<pre class="lang-golang prettyprint-override"><code>var c client.Client
func main() {... | <p>The correct way to initialise the client can be found here: <a href="https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/client#example-New" rel="nofollow noreferrer">https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/client#example-New</a></p>
<pre class="lang-golang prettyprint-override"><code... |
<p>I created this chart using Grafana and the query
<code>rate(container_memory_usage_bytes{ image!="", container_name!="POD"}[5m]) /1024 / 1024</code>.</p>
<p>When highlighting the data points I receive all the details about the pod that is too much information.</p>
<p>How can I show only the <code... | <p>Found the answer: go to Options / Legend and include the field to be used as legend :) In this case: <code>{{pod}}</code></p>
<p><a href="https://i.stack.imgur.com/ZVA8u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZVA8u.png" alt="enter image description here" /></a></p>
<p>Thanks <a href="http... |
<p>In Kubernetes, there is deletionTimestamp to signal an ongoing deletion and there are finalizers to model tasks during the process of deletion.
However, it could be, that during the deletion, the specification of a parent object changes in a way that would effective make cancelling the deletion the most desirable so... | <p>The answer is No,</p>
<p>Finalizers are namespaced keys that tell Kubernetes to wait until specific conditions are met before it fully deletes resources marked for deletion. Finalizers alert controllers to clean up resources the deleted object owned. Documentation is <a href="https://kubernetes.io/docs/concepts/over... |
<p>I have a redis statefulset running on my cluster, with 3 nodes (master, slave, slave), the master node is for write only, and the other 2 nodes for read, they replication is working fine, but I want to connect a backend application to this redis-cluster and somehow manage the requests, in which the write requests go... | <p>Not sure how you have setup the Redis and you are running the <strong>Redis cluster</strong> or running <strong>Redis master-slave</strong> with <strong>sentinel</strong> option.</p>
<p><a href="https://redis.io/docs/management/sentinel/" rel="nofollow noreferrer">Official doc</a></p>
<p>If you have used <strong>hel... |
<p>pinniped cli is not working in widnows.
pinniped-cli-windows-amd64.exe is downloaded but when i type pinniped, it's not recognized.</p>
<p>C:\Users\hello>pinniped
pinniped is not recognized as a internal command or external command, operable program or batch file.</p>
<p>Seem windows is not recognizing this .exe ... | <p>I have faced the same issue, so i had purged the cache here: C:\Users\user.kube\cache</p>
<p>And then, i have modified the path of the program pinniped in the config file below, at the line <strong>command</strong> (obviously, the program pinniped itself has to be present in this path) :</p>
<p>C:\Users\user.kube\c... |
<p>I'm using rke2 cluster, i.e. a k8s distribution.</p>
<p>And I want to add a nameserver for '*.example.org' to the cluster DNS system, for which I should change the core file of coredns like below.</p>
<pre><code>.:53 {
errors
health
kubernetes cluster.local in-addr.arpa ip6.arpa {
... | <p>You map or edit the configmap like</p>
<p>you can map the domain to the service name using <strong>rewrite</strong>, <code>rewrite name example.io service.default.svc.cluster.local</code></p>
<pre><code>rewrite name example.io service.default.svc.cluster.local
loadbalance round_robin
prometheus {$POD_IP}:9153
forwar... |
<p>I removing other versions from cert-manager. After that i install the new version with helm using.</p>
<p>Installation works fine.</p>
<p>but when i use the command:</p>
<pre><code>$ kubectl get orders,challenges,clusterissuers
Error from server: request to convert CR from an invalid group/version: acme.cert-manag... | <p>First of all, suggest to backup all your objects (certs, orders, issuer, clusterissuer, etc. with <a href="https://velero.io/" rel="nofollow noreferrer">velero</a> for example) !</p>
<p><a href="https://cert-manager.io/docs/installation/upgrading/remove-deprecated-apis/" rel="nofollow noreferrer">Cert-manger documen... |
<p>I’m quite new to k8s in general, only been using for smaller projects but made it work. I hope btw this is the right channel to ask questions (in this case about ingress-nginx). I’m trying to setup a cluster with a gateway-api and a few microservices (all written in NestJs). To give a little background, I first had ... | <p>Your output text:</p>
<pre><code>2023/02/17 15:51:44 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: "GET /api/health HTTP/2.0", upstream: "http://10.244.0.228:3000/", host: "... |
<p>Trying to get the <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#optional-kubectl-configurations-and-plugins" rel="nofollow noreferrer">auto-complete</a> feature of <code>kubectl</code> working with an alias of <code>k</code>, using <code>Windows PowerShell</code> and <code>PowerShell Core<... | <p>PowerShell completions by alias in cobra supported only from version 1.6.0. kubectl depends on cobra 1.6.0 since v1.26 version. So, you should use kubectl v1.26+ and <a href="https://github.com/spf13/cobra/blob/main/shell_completions.md#powershell-completions" rel="nofollow noreferrer">powershell 5.0+</a></p>
<p>I u... |
<p>How to deploy on K8 via Pulumi using the ArgoCD Helm Chart?</p>
<p>Pulumi up Diagnostics:</p>
<pre><code> kubernetes:helm.sh/v3:Release (argocd):
error: failed to create chart from template: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0
</code></pre>
<p>THE CLUSTER VERS... | <p>Upgrade helm. I had a similar issue where my k8s was 1.25 but helm complained it was 1.20. Tried everything else, upgrading helm worked.</p>
|
<p>I was using kubectl with Docker Desktop - everything was fine</p>
<p>I think logged into Openshift via the Command line and kubectl seemed to point to OC cluster</p>
<p>I then logged out of Openshift and now kubectl doesn't seem to point at anything? How do I get to point it at docker desktop again?</p>
| <p>sorted - kubectl config use-context docker-desktop</p>
|
<p>I am a beginner in Kubernetes and have been using the kubectl command to create pods for several months. However, I recently encountered a problem where Kubernetes did not create a pod after I executed the <code>kubectl create -f mypod.yaml</code> command. When I run kubectl get pods, the mypod does not appear in th... | <p>There might be multiple reasons for this, initially let’s check whether the pod is really created or not. Like <code>ehmad11</code> suggested use <code>kubectl get pods --all-namespaces</code> for listing pods in all the namespaces. However in your case it might not work because your application is getting directly ... |
<p>I'm new to spark and doing on POC to download a file and then read it. However, I am facing issue that the file doesn't exists.</p>
<blockquote>
<p>java.io.FileNotFoundException: File file:/app/data-Feb-19-2023_131049.json does not exist</p>
</blockquote>
<p>But when I printed the path of the file I find out the fil... | <p>If you are running in cluster mode then you need your input files to be shared on a shared FS like <code>HDFS</code> or <code>S3</code> but not on local FS, since both of driver and executors should have access to the input file.</p>
|
<p>How to delete the failed jobs in the kubernetes cluster using a cron job in gke?. when i tried to delete the failed jobs using following YAML, it has deleted all the jobs (including running)</p>
<pre><code>
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: XXX
namespace: XXX
spec:
schedule: "*/30 * * * *&... | <p>This one visually looks better for me:</p>
<pre><code>kubectl delete job --field-selector=status.phase==Failed
</code></pre>
|
<p>I am trying to use VPA for autoscaling my deployed services. Due to limitation in resources in my cluster I set the min_replica option to 1. The workflow of VPA that have seen so far is that it first deletes the existing pod and then re-create the pod. This approach will cause a downtime to my services. What I want ... | <p>This can be achieved by using python script or by using an IAC pipeline, you can get the metrics of the kubernetes cluster and whenever these metrics exceed a certain threshold, trigger this python code for creating new pod with the required resources and shutdown the old pod. Follow this github link for more info o... |
<p>I'm trying to setup <code>Nginx-ingress controller</code> to manage two paths on the same <code>hostname</code> in bare metal based cluster.</p>
<p>In the <strong>app1</strong> namespace i have below nginx resource:-</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app1-ingress
names... | <p>Default Nginx Ingress controller doesn't support having different <code>Ingress</code> resources with the same hostname. You can have one <code>Ingress</code> resource that contains multiple paths, but in this case all apps should live in one namespace. Like this:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind... |
<p>I tried the following but failed to get a list of all pods like these:</p>
<pre><code>my-pod-1
my-pod-19
my-pod-24
</code></pre>
<p>etc.</p>
<pre><code>kgp | grep -E my-pod-[0-9]+
kgp | grep -E my-pod-[0-9]
kgp | grep -i -E my-pod-[0-9]
kgp | grep -i -E "my-pod-[0-9]"
kgp | grep -i -E "^my-pod-[0-9]&q... | <p>This one worked!!!</p>
<p>kubectl get pods | grep -P 'my-pod-[0-9]+'</p>
<p>Thank you all (and especially to @Timur who enlightened me about the Perl regexp option)</p>
|
<p>I tried Keda with AKS and I really appreciate when pod are automatically instanciate based on Azure Dev Ops queue job for release & build.</p>
<p>However I noticed something strange and often AKS/Keda remove pod while processing which makes workflow failed.
<a href="https://i.stack.imgur.com/vbsm7.png" rel="nofo... | <p>Check <a href="https://keda.sh/blog/2021-05-27-azure-pipelines-scaler/" rel="nofollow noreferrer">the official Keda docs</a>:</p>
<blockquote>
<p>When running your agents as a deployment you have no control on which pod gets killed when scaling down.</p>
</blockquote>
<p>So, to solve it you need to use <code>ScaledJ... |
<p>I have already a google managed SSL certificate created (with dns verification option). I want to use same certificate in my istio-ingress for SSL. Is there any possible annotations available ?</p>
<p>We can create ManagedCertificate resource in GKE, but it is uses the loadbalancer verification option which does not... | <p>You can create the wild card certificate with the Cert-manger.</p>
<p>Here is my <a href="https://medium.com/@harsh.manvar111/wild-card-certificate-using-cert-manager-in-kubernetes-3406b042d5a2" rel="nofollow noreferrer">article</a> on requesting the <strong>wild card</strong> certificate with <strong>DNS</strong> v... |
<p>Is it possible to create a Kubernetes service and pod in different namespaces, for example, having myweb-svc pointing to the actual running myweb-pod, while myweb-svc and myweb-pod are in different namespaces?</p>
| <p>YAML manifest to create both the pod and the service in their respective namespaces. You need to specify the ‘namespace’ field in the ‘metadata’ section of both the ‘pod’ and ‘service’ objects to specify the namespace in which they should be created.</p>
<p>Also, if you want to point your Service to a Service in a d... |
<p>I upgrade AKS using Azure portal from 1.23.5 to 1.24.9. This part finished properly (or so I assumed) based on below status on Azure portal.
<a href="https://i.stack.imgur.com/RuT23.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RuT23.png" alt="enter image description here" /></a></p>
<p>I contin... | <p>Ok, posting the solution and journey to it here, so just in case someone comes across similar issue.</p>
<p>There was a network issue in the cluster after the upgrade. This was the reason all pods had DNS issue. Due to these network issues metrics-server was not in running state and it's pdb allowed disruption remai... |
<p>I have a k3s (light weighted k8s) cluster running on my Raspberry PI. So, I am not using any cloud hosted cluster but a bear metal one on my Raspberry PI.</p>
<p>I have deployed a application with this manifest:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
namespace: myapp
spec... | <p>I'm not K3S expert but I think I found a piece of documentation that is addressing your issue.</p>
<p>Take a look:</p>
<blockquote>
<h3>Service Load Balancer</h3>
<p>Any service load balancer (LB) can be used in your K3s cluster. By default, K3s provides a load balancer known as <a href="https://github.com/k3s-io/kl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.