prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am following the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/deployment/resource-providers/native_kubernetes/#starting-a-flink-session-on-kubernetes" rel="nofollow noreferrer">Flink official tutorial</a> to start a session in native Kubernetes.</p>
<p>First I created a clean new clus... | <p>After being stuck here for a long time, I finally made it. Hope it saves some time for future people.</p>
<p>In the <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/deployment/resource-providers/native_kubernetes/#rbac" rel="noreferrer">RBAC</a> section, it mentions</p>
<blockquote>
<p>Ever... |
<p>For at least some of the ingress controllers out there, 2 variables must be supplied: <code>POD_NAME</code> and <code>POD_NAMESPACE</code>. The nginx ingress controller makes sure to inject these 2 variables in the container(s) as seen <a href="https://github.com/kubernetes/ingress-nginx/blob/402f21bcb7402942f91258c... | <p><strong>It is done by design</strong>, a community that develops this functionality as it approaches the subject.</p>
<p>When the environment variable is started, the variables are known. <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow nor... |
<p>While creating stateful set for mongodb on kubernetes, I am getting below error.</p>
<p>"is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden"</p>
<p>statefulset.yaml</p>
<pre><code>---
apiVersion: "apps/v1"
... | <p>You probably applied the statefulset.yaml, changed something like a label afterwards and tried to reapply the statefulset.yaml. As the error says you can only change certain fields after creating a statefulset.</p>
<p>Just delete the statefulset and create it again:</p>
<pre><code>kubectl delete -f statefulset.yaml
... |
<p>When describing a node, there are history conditions that show up.</p>
<pre><code>Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ... | <p>You're right, the <code>kubectl describe <NODE_NAME></code> command shows the current condition status (<code>False</code>/<code>True</code>).</p>
<p>You can monitor Nodes events using the following command:</p>
<pre><code># kubectl get events --watch --field-selector involvedObject.kind=Node
LAST SEEN TYPE... |
<p>I am using this command in linux to see (currently) established TCP connections:</p>
<pre><code>netstat -ant | grep ESTABLISHED | wc -l
</code></pre>
<p>How can i translate this command to PromQL (per node) ?</p>
<p>I am using prometheus with node exporter in my kubernetes cluster</p>
| <p>To get number of currently open TCP connections, you can use <code>node_netstat_Tcp_CurrEstab</code> (Gauge) metric.</p>
<p>you can also use <code>node_netstat_Tcp_ActiveOpens</code> (Counter) metrics with appropriate rate such as</p>
<p><code>rate(node_netstat_Tcp_ActiveOpens[10m])</code></p>
<p>These metrics are b... |
<p>I have deployed an nginx-ingress controller in an aws eks cluster using an helm chart from artifact hub (<a href="https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx" rel="nofollow noreferrer">https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx</a>) .</p>
<p>I have edited the annotation to... | <p>If you are attaching the SSL/TLS certificate on <strong>LB</strong> level from ACM (AWS cert-manager)</p>
<p>You have to create the two listener, <strong>TCP</strong> with port <strong>80</strong> & <strong>TLS</strong> with <strong>443</strong> port attach the necessary <strong>cert</strong> into the <strong>TL... |
<p>I have a node.js API run inside a Docker container on Kubernetes cluster within a pod.
The pod is connected to Kubernetes service of type LoadBalancer, so I can connect to it from outside, and also from the Swagger UI, by passing to the Swagger UI which is run as another Docker container on the same Kubernetes clust... | <p>I solved it by adding nginx reverse proxy to /etc/nginx/nginx.conf file in swagger UI container which redirects all requests ended with /swagger.json to the API service.</p>
<p>After this file changes you need to reload the nginx server: <code>nginx -s reload</code></p>
<pre><code>server {
listen 8080... |
<p>What api endpoint can I call to get a pod or service's yaml?</p>
<p>The kubectl command to get a pod's yaml is</p>
<blockquote>
<p>kubectl get pod my-pod -o yaml</p>
</blockquote>
<p>but what endpoint does kubectl use to get it?</p>
| <blockquote>
<p>kubectl get pod my-pod -o yaml</p>
</blockquote>
<blockquote>
<p>but what endpoint does kubectl use to get it?</p>
</blockquote>
<p>If you add <code>-v 7</code> or <code>-v 6</code> to the command, you get verbose logs that show you all the <strong>API requests</strong></p>
<p>Example:</p>
<pre><code>ku... |
<p>I built a kubernetes cluster on CentOS 8 first. I followed the how-to found here: <a href="https://www.tecmint.com/install-a-kubernetes-cluster-on-centos-8/" rel="nofollow noreferrer">https://www.tecmint.com/install-a-kubernetes-cluster-on-centos-8/</a></p>
<p>And then I built an Ubuntu 18.04 VM and installed Ranch... | <p>I also found that disabling the firewall "fixes" the issue, but that's not a great fix. Also, adding ports 30000-32767 for tcp/udp didn't work for me. Still no route to host.</p>
|
<p>Trying to deploy <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/" rel="nofollow noreferrer">aws-load-balancer-controller</a> on Kubernetes.</p>
<p>I have the following TF code:</p>
<pre><code>resource "kubernetes_deployment" "ingress" {
metadata {
name = &... | <p>With your Terraform code, you apply an <code>Deployment</code> and an <code>Ingress</code> resource, but you must also add the <code>CustomResourceDefinitions</code> for the <code>TargetGroupBinding</code> custom resource.</p>
<p>This is described under "Add Controller to Cluster" in the <a href="https://k... |
<p>Below is the config for probes in my application helm chart</p>
<pre><code>{{- if .Values.endpoint.liveness }}
livenessProbe:
httpGet:
host: localhost
path: {{ .Values.endpoint.liveness | quote }}
port: 9080
initialDelaySeconds: {{ .Values.l... | <p>You're getting those different paths because those are globally configured across mesh in Istio's control plane component i.e., istio-sidecar-injector configmap
This is coming via sidecar's webhook injection.
See for the below property in "istio-sidecar-injector configmap"</p>
<blockquote>
<p>sidecarInject... |
<p>After deploying your pods, how one can identify that all the pods are up and running? I have listed down few options which I think could be correct but wanted to understand what is the standard way to identify the successful deployment.</p>
<ol>
<li>Connect to application via its interface and use it to identify if ... | <p>All your approaches sounds reasonable and will do the job, but why not just use the tools that Kubernetes is giving us exactly for this purpose ? ;)</p>
<p>There are two main health check used by Kubernetes:</p>
<ul>
<li><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-s... |
<p>I attempt to build a Pod that runs a service that requires:</p>
<ol>
<li>cluster-internal services to be resolved and accessed by their FQDN (<code>*.cluster.local</code>),</li>
<li>while also have an active OpenVPN connection to a remote cluster and have services from this remote cluster to be resolved and accessed... | <p>I had rather solved the problem by running a sidecar DNS-server, because:</p>
<ul>
<li>it is easier to implement, maintain and understand;</li>
<li>it works without surprises.</li>
</ul>
<p>Here is an example pod with <code>CoreDNS</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Po... |
<p>How do I make an optional block in the values file and then refer to it in the template?</p>
<p>For examples, say I have a values file that looks like the following:</p>
<pre><code># values.yaml
foo:
bar: "something"
</code></pre>
<p>And then I have a helm template that looks like this:</p>
<pre><code>{... | <h3>Simple workaround</h3>
<p>Wrap <strong>each nullable level</strong> with parentheses <code>()</code>.</p>
<pre><code>{{ ((.Values.foo).bar) }}
</code></pre>
<p>Or</p>
<pre><code>{{ if ((.Values.foo).bar) }}
{{ .Values.foo.bar }}
{{ end }}
</code></pre>
<h3>How does it work?</h3>
<p>Helm uses the go <code>text/templ... |
<p>I am trying to create a deployment using its deployment yaml file in minikube.
I have saved the deployment file locally.Please share the minikube kubectl command to create the deployment from the yaml file.</p>
| <p>Using native <code>kubectl</code> client you do this with the <code>kubectl apply</code> command and pass the <code>--filename</code> flag followed by the name of your yaml-file.</p>
<p>Example:</p>
<pre><code>kubectl apply --filename my-deployment.yaml
</code></pre>
<p>When using <a href="https://minikube.sigs.k8s.... |
<p>I have installed and deployed botfront on kubernetes, but when I go to interface using node ip and port where service is running it prompts me to add root_url like this</p>
<p><a href="https://i.stack.imgur.com/gycqc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gycqc.png" alt="enter image descr... | <p>You can set up the <strong>ingress controller</strong> to manage the traffic and expose the UI.</p>
<p>So your service will be running as the Cluster IP or Node port and ingress which will manage the traffic and expose the UI.</p>
<p>inside config.yaml file</p>
<pre><code>botfront:
app:
# The complete external ho... |
<p>I've got application with 10 pods and traffic is load balanced between all pods. There was an issue that caused transactions queued up and few pods could not recover properly or took a long time to process the queue once the issue was fixed. The new traffic was still too much for some of the pods.</p>
<p>I'm wonderi... | <p>For that you can use the probe to handle this scenario</p>
<p>A <strong><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes" rel="noreferrer">Readiness</a></strong> probe is one way to do it.</p>
<p>What <strong>probes</strong> to do ... |
<p>I have a mongodb service up and running. I port-forward to access it locally and in the meantime, I try to check connection with a go app. But I get the error below.</p>
<pre><code>panic: error parsing uri: lookup _mongodb._tcp.localhost on 8.8.8.8:53: no such host
</code></pre>
<p>Port-forward:</p>
<pre><code>kubec... | <p>Your client is trying to a DNS service lookup because you specified the <code>+srv</code> connection type in your URI. Stop doing that and use the correct connection string instead. We do support that in-cluster but not via port forward. I suspect you're trying to mix and match tutorials for both in-cluster and out ... |
<p>Situation:
The metrics-server deployment image is: <code>k8s.gcr.io/metrics-server/metrics-server:v0.4.2</code>
I have used <code>kops</code> tool to deploy a kubernetes cluster into one AWS account.</p>
<p>The error and reason why it is failing, fetched by
<code>kubectl -n kube-system logs metrics-server-bcc948649-... | <p>Kubelet certificates created by kOps contain only node hostname among their SANs, while metrics server deployed with default manifest is trying to use node private IPs for scraping. Changing the <code>kubelet-preferred-address-types</code> argument resolves this issue:</p>
<pre><code>- --kubelet-preferred-address-t... |
<p>I have a server that is receiving <strong>multicast messages</strong> on a network interface called "em2".</p>
<p>I need to get the information coming over into my pods running in minikube so I can use it in an application which I am writing. How would I go about doing this?</p>
<p>The network interfaces s... | <p>There are a few ways to achieve traffic towards Kubernetes pod(s):</p>
<ul>
<li><p>Adding <code>hostNetwork: true</code> flag to the yaml file along with <code>hostPort</code> configuration in order to receive the traffic directly to the pod.</p>
</li>
<li><p>The <a href="https://github.com/k8snetworkplumbingwg/mult... |
<p>I have deployed a HPA the configuration showed at the bottom. It scales up when either CPU or Memory usage is above 75%. The initial replicas count is 1 and the max is 3. But I can see the pod count was scaled up to 3 1 few minutes after I deploy the HPA.</p>
<p>The current usage of CPU/Memory is shown below. You ca... | <p>You have mentioned the resource <strong>without unit</strong> : <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes</... |
<p>I am trying to implement rate limiting feature to my AKS using nginx ingress rate limiting. I have just provided <code>limit-rps:10</code> in nginx ingress resource. Still, i dont see expected behavior which is rps * default burst rate. Could somebody help on how rate limiting works in nginx and how to set the confi... | <p><code>limit-rps</code> is a <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#rate-limiting" rel="nofollow noreferrer">local rate limit settings</a> that is applied on a specific ingress object rather than in a config map provided to the ingress controller.</p>
<p>It wil... |
<p>I'm trying to export a helm chart to a folder. I've seen examples of using the command like this:</p>
<pre><code>helm chart export mycontainerregistry.azurecr.io/helm/hello-world:0.1.0 \ --destination ./install
</code></pre>
<p>What is the <code>"\"</code> between the chart's name and the <code>--destina... | <p>I assume, you must have copied multi-line example, in bash <code>\</code> is used to split long single line into multiple one. You can remove it, if you run this command on the single line.</p>
|
<p>From this page: <a href="https://www.pingidentity.com/en/company/blog/posts/2019/jwt-security-nobody-talks-about.html" rel="noreferrer">https://www.pingidentity.com/en/company/blog/posts/2019/jwt-security-nobody-talks-about.html</a>:</p>
<blockquote>
<p>The fourth security-relevant reserved claim is "iss."... | <p><em>JWT token issuer</em> - is the <strong>party</strong> that "created" the token and signed it with its private key.</p>
<p>Anyone can create tokens, make sure that the tokens you receive is created by a party that you trust.</p>
|
<p>I am using <code>kubectl port-forward</code> in a shell script but I find it is not reliable, or doesn't come up in time:</p>
<pre><code>kubectl port-forward ${VOLT_NODE} ${VOLT_CLUSTER_ADMIN_PORT}:${VOLT_CLUSTER_ADMIN_PORT} -n ${NAMESPACE} &
if [ $? -ne 0 ]; then
echo "Unable to start port forwarding t... | <p>I took @AkinOzer's comment and turned it into this example where I port-forward a postgresql database's port so I can make a <code>pg_dump</code> of the database:</p>
<pre><code>#!/bin/bash
set -e
localport=54320
typename=service/pvm-devel-kcpostgresql
remoteport=5432
# This would show that the port is closed
# n... |
<p>I'm building a Micro-services E-commerce project, I need to create a docker image for each server in my project and run them inside K8s cluster. After successfully creating images for all back-end server I tried creating a docker image for my React front-end app, every time I try creating the image this error happen... | <p>This is a community wiki answer posted for better visibility. Feel free to expand it.</p>
<p>To resolve described issues, steps below need to be done.</p>
<ol>
<li><p>Upgrade Dockerfile:</p>
<pre><code>WORKDIR /src
COPY package*.json ./
RUN npm install --silent
COPY . .
CMD ["npm","start"];
</cod... |
<p>I have setup a cluster on AWS using kops. I want to connect to the cluster from my local machine.</p>
<p>I have to do <code>cat ~/.kube/config</code>, copy the content and replace it with my local kube config to access to the cluster.</p>
<p>The problem is that it expires after certain amount of time. Is there a way... | <p>Not sure if you can get permanent access to the cluster, but based on official <code>kOps</code> <a href="https://kops.sigs.k8s.io/cli/kops_update_cluster/" rel="nofollow noreferrer">documentation</a> you can just run <code>kops update cluster</code> command with <code>--admin={duration}</code> flag and set expire t... |
<p>I deployed Istio <a href="https://istio.io/latest/docs/setup/install/operator/" rel="nofollow noreferrer">using the operator</a> and added a custom ingress gateway which is only accessible from a certain source range (our VPN).</p>
<pre><code>apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
name... | <p>You can create an ingress class that references the ingress controller that is deployed by default in the istio-system namespace. This configuration with ingress will work, however to my current knowledge, this is only used for backwards compatibility. If you want to use <a href="https://istio.io/latest/docs/tasks/t... |
<p>I'm trying to create a simple microservice, where a JQuery app in one Docker container uses this code to get a JSON object from another (analytics) app that runs in a different container:</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
$('#get-info-btn').click(function(){... | <p>@P.... is absolutely right, I just want to provide some more details about <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">DNS for Services</a> and communication between containers in the same Pod.</p>
<h4>DNS for Services</h4>
<p>As we can find in the <a ... |
<p>I was having K3s cluster with below pods running:</p>
<pre><code>kube-system pod/calico-node-xxxx
kube-system pod/calico-kube-controllers-xxxxxx
kube-system pod/metrics-server-xxxxx
kube-system pod/local-path-provisioner-xxxxx
kube-system pod/coredns-xxxxx
xyz-system pod/som... | <ol>
<li><p>I think you need to restart K3s via systemd if you want your cluster back after kill. Try command: <br/><code>sudo systemctl restart k3s</code>
This is supported by the installation script for systemd and openrc. Refer <a href="https://www.rancher.co.jp/docs/k3s/latest/en/running/" rel="noreferrer">rancher... |
<p>I'm using Grafana based on the helm chart, at the moment I have all the configurations as code, the main configuration is placed into the <code>vales.yaml</code> as part of the <code>grafana.ini</code> values, the dashboards and datasources are placed into configmaps per each datasource or dashboard and the sidecar ... | <p>To update this answer, this plugin began support of API tokens in December 2020. In order to have the Grafana provisioner pick up your token, if you're using an API token instead of the email/API key, you must specify:</p>
<pre><code> jsonData:
bearerSet: true
secureJsonData:
bearer: "your-ap... |
<p>How do you find the creator of a namespace in Kubernetes? There was a debate today about who had created a namespace and we weren't able to find who the creator was.</p>
| <p>If you didn't configure it already you cannot, the information is not being saved by Kubernetes unless you explicitly want to log it.</p>
<p>In order to do so you would have to activate <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/audit/" rel="nofollow noreferrer">audit logs</a>.
Audit logs ca... |
<p><strong>Describe the bug</strong>
Followed doco here, but it's out of date so had to guess ... <a href="https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-letsencrypt-certificate-application-gateway" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/application-gateway/ing... | <p>If you are using the cluster issuer with the ingress you have to pass the value of</p>
<pre><code>privateKeySecretRef:
name: example-issuer-account-key
</code></pre>
<p>inside the ingress only as a secret.</p>
<p>If you will check using command</p>
<pre><code>kubectl get secret
</code></pre>
<p>you will see th... |
<p>I'm trying to access minikube dashboard from host OS (Windows 10).</p>
<p>Minikube is running on my virtual machine Ubuntu 20.04 server.</p>
<p>The host is Windows 10 and I use VirtualBox to run my VM.</p>
<p>These are the commands I ran on Ubuntu:</p>
<pre><code>tomas@ubuntu20:~$ minikube start
* minikube v1.22.0 o... | <h2>Reproduction</h2>
<p>I reproduced this behaviour on Windows 10 and ubuntu 18.04 LTS virtual machine running using <code>VirtualBox</code>.</p>
<p>I have tried both <code>minikube drivers</code>: docker and none (last one means that all kubernetes components will be run on localhost) and behaviour is the same.</p>
<... |
<p>I'm new to Kubernetes and Helm Charts and was looking to find an answer to my question here.</p>
<p>When I run <code>kubectl get all</code> and look under services, I get something like:</p>
<pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/leader ... | <p>Furthermore, to read more about accessing your resources from outside of your cluster using Publishing Services (NodePort is also mentioned there) you can refer to <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">the official docu... |
<p>I have installed minikube in my local machine and have created a deployment from a yaml file with <code>imagePullPolicy: Always</code>.</p>
<p>On runnning, minikube kubectl -- get pods,the status of the pods is <code>imagePullPolicy: ImagePullBackOff</code>.
and on running</p>
<pre><code> minikube kubectl -- descri... | <p>It means either you are trying to pull a image from a private repo or you don't have connectivity to outside. You can test this, but running command <code>kubectl run <pod_name> --image=nginx</code>. If this works then it means you are trying to pull a image from a repo which requires auth.</p>
|
<p>Is it possible to list the kubernetes CNI and pod-network-cidr details used on kubernetes cluster? Preferably using <code>kubectl</code>.</p>
| <p>Additionally to the previous answer you can use:</p>
<pre><code>kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}'
</code></pre>
<p>to get pod CIDR addresses for each of the nodes in your cluster.</p>
|
<p><strong>The scenario</strong>: Selenium is a browser automation tool that can be run in a K8s cluster, it consists of Selenium-hub (master) and selenium-nodes (workers) where the hub receives test requests and creates nodes (pods) ondemand (dynamically) to run the test-case, after execution of a test-case the runner... | <p>Technically: yes you can either configure or edit-the-code of your CNI plugin (or write one from scratch).</p>
<p>In practice: I know of none that work quite that way. I know Calico does allow having multiple IP pools so you could have a small one just for Selenium pods but I think it still attempts to minimize reus... |
<p>I have a wrote an ansible based kubernetes operator and I am trying to figure out a way to reduce the log generated by the operator deployment pod by reducing the log verbosity level.</p>
<blockquote>
<p>kubectl logs netqedge-7f8885fb85-5jk9c</p>
</blockquote>
<p>netqedge is the ansible based operator</p>
<p>Operato... | <p>I think <code>--zap-log-level</code> is what you are looking for.</p>
<p>It looks like this documentation isn't correctly in place, but you can look at the go documentation. I've also filed an issue for the Ansible docs.</p>
<p><a href="https://sdk.operatorframework.io/docs/building-operators/golang/references/loggi... |
<p>The nodeSelectorTerms in a PersistentVolume help the volume identify which node to bind to. For example:</p>
<pre><code>nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- mynodename
</code></pre>
<p... | <p>This is not supported. Apparently I need more words than just that.</p>
|
<p>I'm new to Kubernetes and Helm Charts and was looking to find an answer to my question here.</p>
<p>When I run <code>kubectl get all</code> and look under services, I get something like:</p>
<pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/leader ... | <p>To access your application via NodePort, then you need to hit your node ip and the nodeport which you have been assigned.</p>
<pre><code>kubectl get node -owide
</code></pre>
<p>The above command will give your node ip address, which you can use to access the app via NodePort and yes external Ip : 80 will fail as t... |
<p>I'm installing fluent-bit in our k8s cluster. I have the helm chart for it on our repo, and argo is doing the deployment.</p>
<p>Among the resources in the helm chart is a config-map with data value as below:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit
labels:
app: fluent-bit
da... | <p>Instead of using <code>helm install</code> you can use <code>helm template ... --set ... > out.yaml</code> to locally render your chart in a yaml file. This file can then be processed by Argo.</p>
<p><a href="https://helm.sh/docs/helm/helm_template/" rel="nofollow noreferrer">Docs</a></p>
|
<p>I am trying to set up Argo CD on Google Kubernetes Engine Autopilot and each pod/container is defaulting to the default resource request (0.5 vCPU and 2 GB RAM per container). This is way more than the pods need and is going to be too expensive (13GB of memory reserved in my cluster just for Argo CD). I am following... | <p>So right now you are just using kubectl with the manifest from github and you cannot edit it. What you need to do is</p>
<blockquote>
<p>1 Download the file with wget
<a href="https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com... |
<p>We have the following code (don't ask me why...even as none-javascript dev it doesn't look pretty to me), which throws error after Kubernetes upgrade:</p>
<pre><code>module.exports.getReplicationControllers = async function getReplicationControllers(namespace) {
const kubeConfig = (await getNamespacesByCluster()).... | <p><strong>Answering the question in general</strong> (rather than getting you to switch to a different tool), for people who have this question and may be using other apps:</p>
<blockquote>
<p>RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded</p>
</blockquote>
<p><strong>The issue is cau... |
<pre><code>$ minikube image ls
...
docker.io/library/crasher:latest
...
$ minikube image rm crasher crasher:latest docker.io/library/crasher:latest
$ minikube image ls
...
docker.io/library/crasher:latest
...
</code></pre>
<p>It looks like minikube rm doesn't remove the image from minikubes internal cache. I would li... | <p>I figured it out, the problem was that I still had services running that were using the image.</p>
<p>You either can't delete an image in use, or minikube is adding the in use image back into the list faster than I can run commands.</p>
<p>So if you want to do a local hotswap of your image on minikube, you need to:<... |
<p>What is the difference between Master Node and Control Plane?</p>
<p>Is the same or is there any difference?</p>
| <p>Have a look at <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#urgent-upgrade-notes" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#urgent-upgrade-notes</a> . This should answer your Question:</p>
<ul>
<li><strong>The label ... |
<p>I am creating a Kubernetes Job within NodeJS class After importing the library <code>@kubernetes/client-node</code>, I created an object to use the module <code>BatchV1Api</code> inside the function which I am exporting to other class in which I have defined the body of the Kubernetes job like this:</p>
<p>//listJob... | <p>Status code 422 <strong>Unprocessable Entity</strong> means that server understand the content type, and the syntax of the request is correct, but it was unable to process the contained instructions.</p>
<p>In your case though, the Job manifest looks off.</p>
<p>I'm not an expert in JavaScript kubernetes client, but... |
<p>I have setup EFK stack in K8s cluster. Currently fluentd is <strong>scraping</strong> logs from all the containers.</p>
<p>I want it to only scrape logs from containers <code>A</code>, <code>B</code>, <code>C</code> and <code>D</code>.</p>
<p>If I had some prefix with as <code>A-app</code> I could do something like ... | <p>To scrape logs only from specific Pods, you can use:</p>
<pre><code>path /var/log/containers/POD_NAME_1*.log,/var/log/containers/POD_NAME_2*.log,.....,/var/log/containers/POD_NAME_N*.log
</code></pre>
<p>To scrape logs from specific containers in specific Pods, you can use:</p>
<pre><code>path /var/log/containers/PO... |
<p>Apologies in advance for such a long question, I just want to make sure I cover everything...</p>
<p>I have a react application that is supposed to connect to a socket being run in a service that I have deployed to kubernetes. The service runs and works fine. I am able to make requests without any issue but I cannot... | <p>In case somebody stumbles on this in the future and wants to know how to fix it, it turns out it was a really dumb mistake on my part..</p>
<p>In:</p>
<pre><code>export const socket = io(server, {
cors: {
origin: process.env.ACCESS_CONTROL_ALLOW_ORIGIN,
methods: ["GET", "POST"]
},
});... |
<p>I have been searching but I cannot find answer to my question.</p>
<p>What I am trying to do is to connect to remote shell of openshift container and create db dump, which works if i put username,password and db name by hand (real values).</p>
<p>I wish to execute this command to access env variables: (this command ... | <p>Thanks to @msaw328 comment here is solution:</p>
<pre><code>C:\Users\xxx\Desktop>oc rsh mon-rs-nr-0 bash -c "mongodump --host=rs/mon-rs-nr-0.mon-rs-nr.xxx.svc.cluster.local,mon-rs-nr-1.mon-rs-nr.xxx.svc.cluster.local,mon-rs-nr-2.mon-rs-nr.xxx.svc.cluster.local --username=$MONGODB_USER --password=$MONGODB_PA... |
<p>Is there any way to inject a port value for a service (and other places) from a <code>ConfigMap</code>? Tried this:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
name: service
namespace: namespace
spec:
ports:
- port: 80
targetPort:
valueFrom:
... | <p>OK, so I've checked it more in-depth and it looks like you can't make a reference like this to the ConfigMap in your <em>service.spec</em> definition. This kind of usage of the <code>valueFrom</code> can be used only for container environment variables as described in <a href="https://kubernetes.io/docs/tasks/config... |
<p>I'm writing a helm chart where I need to supply a <code>nfs.server</code> value for the volume mount from the <code>ConfigMap</code> (<strong>efs-url</strong> in the example below).</p>
<p>There are examples in the docs on how to pass the value from the <code>ConfigMap</code> to env variables or even mount <code>Con... | <p>Having analysed the comments it looks like using ConfigMap approach is not suitable for this example as ConfigMap</p>
<blockquote>
<p>is an API object used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps as environment variables, command-line arguments, or as configuration files in a v... |
<p>I have a <code>.net core</code> application which is dockerized and running in Kubernetes cluster (AKS).</p>
<p>I want to apply securityContext <code>readOnlyRootFilesystem = true</code> to satisfy the requirement <code>Immutable (read-only) root filesystem should be enforced for containers</code>.</p>
<blockquote>
... | <p>At the location you have defined as the path of the cert store, attach a volume that is not read-only. If you only want that data to last as long as the pod exists, an <a href="https://kubernetes.io/docs/concepts/storage/volumes/#emptydir" rel="nofollow noreferrer">emptyDir</a> type volume will fit the bill nicely.<... |
<p>I'm trying to get automatic backups to work for my arangodb cluster deployment.
I'm trying to follow the <a href="https://www.arangodb.com/docs/stable/deployment-kubernetes-backup-resource.html" rel="nofollow noreferrer">documentation</a> but I think I have messed it up somehow.</p>
<p>Here is my database-config.yam... | <p>This is how I solved it (credits to the offical arangodb github for the first part of the script). <br>
<strong>What is the script doing?</strong><br>
We are creating a cronjob which will run every 14 days. Then we spin up a pod which will use the <code>arangodump</code> tool to dump (in this case) the whole databas... |
<p>I am looking to implement global rate limiting to a production deployment on Azure in order to ensure that my application do not become unstable due to an uncontrollable volume of traffic(I am not talking about DDoS, but a large volume of legitimate traffic). Azure Web Application Firewall supports only IP based rat... | <p>According to Kubernetes slack community, anything that requires global coordination for rate limiting is going to have a potentially severe bottleneck for performance and will create a single point of failure. Therefore even if we do use an external solution to this would cause bottlenecks and hence it is not recomm... |
<p>This is my yaml file, tried using both with putting the value in and using secrets</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: dockuser-site-deployment
spec:
replicas: 1
selector:
matchLabels:
component: dockuser-site
template:
metadata:
labels:
component: ... | <p>You can use the React-dotenv : <a href="https://www.npmjs.com/package/react-dotenv" rel="nofollow noreferrer">https://www.npmjs.com/package/react-dotenv</a></p>
<p>React example code :</p>
<pre><code>import React from "react";
import env from "react-dotenv";
export function MyComponent() {
ret... |
<p>I've been debugging a 10min downtime of our service for some hours now, and I seem to have found the cause, but not the reason for it. Our redis deployment in kubernetes was down for quite a while, causing neither django nor redis to be able to reach it. This caused a bunch of jobs to be lost.</p>
<p>There are no ev... | <p><code>PersistentVolumeClaim</code> is an object in <em>kubernetes</em> allowing to decouple storage resource requests from actual resource provisioning done by its associated <code>PersistentVolume</code> part.</p>
<p>Given:</p>
<ul>
<li>no declared <code>PersistentVolume</code> object</li>
<li><a href="https://kube... |
<p>I am using <a href="https://kustomize.io/" rel="nofollow noreferrer">https://kustomize.io/</a> have below is my <code>kustomization.yaml</code> file,</p>
<p>I have multiple docker images and during deployment all having same <code>tag</code>. I can manually change all the <code>tag</code> value and I can run it <cod... | <p>It my opinion using <em>"<strong>file</strong>"</em> approach is the correct way and the best solution even while working with your test scenario.</p>
<p>By the <em>"<strong>correct way</strong>"</em> I mean this is how you should work with kustomize - keeping your environment specific data into ... |
<p>Let's say I have a service that maps to pod that has 2 containers, 1 expose port 8080, the other one expose port 8081. The service expose both ports. The ingress uses nginx-ingress, and has the cookie based session affinity annotations. It has 2 paths, 1 is <code>/</code> mapping to port 8080, the other one is <code... | <p>I managed to test your configuration.</p>
<p>Actually this affinity annotation will work only for <code>/</code> path - this is how <code>nginx ingress</code> <a href="https://stackoverflow.com/questions/59272484/sticky-sessions-on-kubernetes-cluster/59360370#59360370">works</a> - to make affinity annotation work fo... |
<pre><code>helm install airflow . --namespace airflow -f my_values.yaml -f my_other_values.yaml
</code></pre>
<p>I executed the command from above but had to interrupt it, cannot re-execute it because gives me the error:</p>
<pre><code>Error: cannot re-use a name that is still in use
</code></pre>
<p>How can I fix it?<... | <p>Either <a href="https://docs.helm.sh/docs/helm/helm_uninstall/" rel="nofollow noreferrer"><code>helm uninstall</code></a> the existing release</p>
<pre class="lang-sh prettyprint-override"><code>helm uninstall airflow
helm install airflow . -n airflow -f values.dev.yaml ...
</code></pre>
<p>or use <a href="https://d... |
<p>I am able to create an EKS cluster but when I try to add nodegroups, I receive a "Create failed" error with details:
"NodeCreationFailure": Instances failed to join the kubernetes cluster</p>
<p>I tried a variety of instance types and increasing larger volume sizes (60gb) w/o luck.
Looking at the... | <p>Adding another reason to the list:</p>
<p>In my case the <strong>Nodes</strong> were running <strong>in a private subnets</strong> and <strong>I haven't configured a private endpoint</strong> under <em>API server endpoint access</em>.</p>
<p>After the update the nodes groups weren't updated automatically so I had to... |
<p>We have a .NET 5 (Blazor Server) app running in Azure Kubernetes that uses OpenID Connect to authenticate with a 3rd party. The app is running behind Ingress. Ingress uses https. The app is only http. After we authenticate with OIDC and get redirected back to /signin-oidc, we get a .NET error that we haven't bee... | <p>It's a good question - there are a couple of interesting points here that I've expanded on since they are related to SameSite cookies.</p>
<p><strong>REVERSE PROXY SETUP</strong></p>
<p>By default the Microsoft stack <a href="https://learn.microsoft.com/en-us/aspnet/core/security/samesite/rp31?view=aspnetcore-3.1#sa... |
<p>We have deployed Apache Spark on Azure Kubernetes Services (AKS).</p>
<p>Able to submit spark application via CLI <a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html#cluster-mode" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/running-on-kubernetes.html#cluster-mode</a></p>
<p><s... | <h5>High-Level Architecture</h5>
<p><a href="https://i.stack.imgur.com/4QFj3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4QFj3.png" alt="enter image description here" /></a></p>
<p>Quick explanation of the architecture flow:</p>
<ul>
<li><p>In order to connect any on-premise data sources to Azure... |
<p>I have deplyonment.yml file which looks like below :</p>
<pre><code>apiVersion : apps/v1
kind: Deployment
metadata:
name: worker
spec:
progressDeadlineSeconds: 3600
replicas: 1
selector:
matchLabels:
app: worker
template:
metadata:
labels:
app: worker
spec:
containers:... | <p>You can do something like</p>
<p><strong>deployment.yaml</strong></p>
<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: test-image
labels:
app: test-image
spec:
selector:
matchLabels:
app: test-image
tier: frontend
strategy:
type: RollingUpdate
template:
metad... |
<p>Currently I deployed Cassandra in k8s without multi-rack in single/multiple data-centers using single rack.</p>
<p>Now I am planning to deploy Cassandra across multiple racks in single/multiple DCs. I am planning to use <code>topologySpreadConstraints</code> for this. I will define to constraints one for <code>zone<... | <p>I'm going to assume that you're not using the cass-operator in <a href="https://dtsx.io/3znMa05" rel="nofollow noreferrer">K8ssandra</a> since the <code>CassandraDatacenter</code> in cass-operator owns the StatefulSets.</p>
<p>You don't need to create a StatefulSet for each logical Cassandra rack. It should be able ... |
<p>I'm trying to deploy AWX on k3s and everything works just fine, however I'd like to enforce SSL - so, redirect HTTP to HTTPS.</p>
<p>I've been trying to test the SSL enforcement part, however it's not working properly. Here is my traefik config:</p>
<pre><code>apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
... | <p>I struggled myself to make redirection work, and finally found a working configuration.</p>
<p>You should define a Middleware object in kubernetes, and your Ingress object must reference it. Beware, because the documentation in traefik is very misleading here, because the Middleware manifest found on many pages forg... |
<p>I am running a GPU server by referring to <a href="https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/" rel="nofollow noreferrer">this document</a>.
I have found that GPU is used in DL work with Jupyter notebook by creating a virtual environment of CPU pod on the GPU node as shown below.</p>
<p>Obviously t... | <p>Based on <a href="https://github.com/NVIDIA/k8s-device-plugin/issues/146" rel="nofollow noreferrer">this topic</a> on github:</p>
<blockquote>
<p>This is currently not supported and we don't really have a plan to support it.</p>
</blockquote>
<p>But...</p>
<blockquote>
<p>you might want to take a look at the CUDA_VI... |
<p>I'm running a single node k3s installation. The machine it's running on has two NICs installed with two IP addresses assigned. I want the ingress only bind to one of these, but no matter what I tried, nginx will always bind to both/all interfaces.</p>
<p>I'm using the official Helmchart for ingress-nginx and modifie... | <p>You'll want to set the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#bind-address" rel="nofollow noreferrer">bind-address</a> in the configmap settings.</p>
<blockquote>
<p>Sets the addresses on which the server will accept requests instead of *. It should be noted tha... |
<p>I'm following the example for creating an EKS managed node group from <a href="https://docs.aws.amazon.com/eks/latest/userguide/cni-increase-ip-addresses.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/cni-increase-ip-addresses.html</a></p>
<p>The configuration requires me to pass ad... | <p>If you need to pass the <code>--kubelet-extra-args</code> you have the option of passing user data to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.</p>
<p>In my point of view, you should have a tpl (template) file with the script you wil... |
<p>I have created a kubernetes project in visual studio 2019, with the default template. This template creates a WeatherForecast controller.
After that I have published it to my ARC.</p>
<p>I used this command to create the AKS:</p>
<pre><code>az aks create -n $MYAKS -g $MYRG --generate-ssh-keys --z 1 -s Standard_B2s -... | <p>It's working now. For other people who have the same problem. I have updated my deployment config from:</p>
<pre><code># deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubernetes1-deployment
labels:
app: kubernetes1-deployment
spec:
replicas: 2
selector:
matchLabels:
app: ... |
<p>I have a .net core API using Entity Framework Core. The DB context is registered in startup.cs like this:</p>
<pre><code> services.AddDbContext<AppDBContext>(options =>
options.UseSqlServer(connectionString,
providerOptions => providerOptions.CommandTimeout(60)));
</code></pre>
<p>In ... | <blockquote>
<p>Error:Timeout expired. The timeout period elapsed prior to obtaining a
connection from the pool. This may have occurred because all pooled
connections were in use and max pool size was reached.</p>
</blockquote>
<p>This is almost always a connection leak. And here the fact that your queries are short-r... |
<p>Example : I would like to get all namespaces which are running more than 3 days. I have already sorted my namespaces by label and creation timestamp with help of this command:
<em><strong>kubectl get namespaces -l provisioner=foo --sort-by=.metadata.creationTimestamp</strong></em></p>
| <p>If you could use <code>shell/bash</code>:</p>
<pre><code>kubectl get ns -o jsonpath='{range .items[*]}{.metadata.name} {.metadata.creationTimestamp}{"\n"}{end}' | while read -r name timestamp; do
echo "$name" | awk -v current_time=$(date +%s) -v three_days_back=$(date +%s -d "3 day a... |
<p>I have a Kubernetes cluster with following versions:</p>
<pre><code>$ kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:3... | <p>Got the issue now. The version difference was causing the main problem. Installed the version matching the one in server side and ran the query again without issues.</p>
|
<p>Having single celery beat running by:</p>
<pre><code>celery -A app:celery beat --loglevel=DEBUG
</code></pre>
<p>and three workers running by:</p>
<pre><code>celery -A app:celery worker -E --loglevel=ERROR -n n1
celery -A app:celery worker -E --loglevel=ERROR -n n2
celery -A app:celery worker -E --loglevel=ERROR -n ... | <p>You should do two things in order to achieve what you want:</p>
<ul>
<li>Run workers with the <code>-O fair</code> option. Example: <code>celery -A app:celery worker -E --loglevel=ERROR -n n1 -O fair</code></li>
<li>Make workers prefetch as little as possible with <code>worker_prefetch_multiplier=1</code> in your co... |
<p>Currently I try to use <code>KubeVirt</code> with <code>GKE</code> cluster.</p>
<p>What I have done (follow the official document):</p>
<ol>
<li>Create a <code>GKE</code> cluster with 3 nodes via GCP console</li>
<li>Install <code>kubectl</code> locally and connect to this cluster</li>
<li>Install <code>kubevirt</... | <p>You can start vm without <code>virtctl</code> by updating VM's manifest using <code>kubectl</code></p>
<pre><code>kubectl patch virtualmachine testvm --type merge -p '{"spec":{"running":true}}'
</code></pre>
|
<p>I am trying to create a K8s cluster in Azure AKS and when cluster is ready I can see couple of resources are created within the <code>default</code> namespace. Example secret, configmap:</p>
<p><a href="https://i.stack.imgur.com/6cIag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6cIag.png" alt=... | <p><strong>I have found the same question asked</strong> <a href="https://learn.microsoft.com/en-us/answers/questions/522874/how-to-avoid-resource-creation-in-default-namespac.html" rel="nofollow noreferrer"><strong>here</strong></a>:</p>
<p>User <a href="https://learn.microsoft.com/answers/users/6678978/srbose-msft.ht... |
<p>We had setup kubernetes 1.10.1 on CoreOS with three nodes.
Setup is successfull</p>
<pre><code>NAME STATUS ROLES AGE VERSION
node1.example.com Ready master 19h v1.10.1+coreos.0
node2.example.com Ready node 19h v1.10.1+coreos.0
node3.example.com Ready ... | <p>In my case the problem was that somehow context was changed. Checked it by</p>
<pre><code>kubectl config current-context
</code></pre>
<p>and then changed it back to the correct one by</p>
<pre><code>kubectl config use-context docker-desktop
</code></pre>
|
<p>I see that Kubernetes <code>Job</code> & <code>Deployment</code> provide very similar configuration. Both can deploy one or more pods with certain configuration. So I have few queries around these:</p>
<ul>
<li>Is the pod specification <code>.spec.template</code> different in <code>Job</code> & <code>Deploym... | <p>Many resources in Kubernetes use a <a href="https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates" rel="noreferrer">Pod template</a>. Both <code>Deployments</code> and <code>Jobs</code> use it, because they manage Pods.</p>
<blockquote>
<p>Controllers for workload resources create Pods from a pod templat... |
<p>After I deployed the webui (k8s dashboard), I logined to the dashboard but nothing found there, instead a list of errors in notification.</p>
<pre><code>tatefulsets.apps is forbidden: User "system:serviceaccount:kubernetes-dashboard:default" cannot list resource "statefulsets" in API group "... | <p>I have recreated the situation according to the attached tutorial and it works for me.
Make sure, that you are <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui" rel="noreferrer">trying properly login</a>:</p>
<blockquote>
<p>To protect your cluster dat... |
<p>I'm trying to use a container that contains a Java tool to do some DB migrations on a MySQL database in a Kubernetes Job.</p>
<p>When I run the container locally in Docker (using a MySQL container in the same network), the tool runs as expected.
And if I create a Pod using the container and set the command arguments... | <p>The problem was that Istio doesn't play nice with Kubernetes Jobs (I forgot to mention that Istio is active on the Namespace, sorry).</p>
<p>Once I added a short delay (<code>sleep 5</code> before starting the Java tool), the connection could be established.</p>
<p>But then I had another issue: After the container t... |
<p>I am trying to patch a cronjob, but somehow it doesn't work as I would expect. I use the same folder structure for a deployment and that works.</p>
<p>This is the folder structure:</p>
<pre class="lang-sh prettyprint-override"><code>.
├── base
│ ├── kustomization.yaml
│ └── war.cron.yaml
└── overlays
└── sta... | <p>It's known bug in <code>kustomize</code> - check and follow <a href="https://github.com/kubernetes-sigs/kustomize/issues/4062" rel="nofollow noreferrer">this</a> topic (created ~ one month ago) on GitHub for more information.</p>
<p>For now, fix for your issue is to use <code>apiVersion:batch/v1beta1</code> instead ... |
<p>I'm trying to deploy Airflow on kubernetes (on Azure Kubernetes Service) with the celery Executor. However, once a task is done, I get the following error while trying to access its logs:</p>
<pre><code>*** Log file does not exist: /opt/airflow/logs/maintenance/clean_events/2021-08-23T14:46:18.953030+00:00/1.log
***... | <p>You need to have the same webserver secret configured for both webserver and workers: <a href="https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key</a></p>
<p>It's b... |
<p>First off, I'm aware of the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">Kubernetes RBAC</a> method. My question is: is there a way to create Kubernetes resources that can only be read and/or written by a specific <code>Role</code> (or a <code>ClusterRole</code>)?... | <p>You can use the RBAC for managing the Role-based access in K8s</p>
<blockquote>
<p>For example, let's say I have a Kubernetes Secret. I want this Secret
to be bound to a specific ClusterRole, so only a ServiceAccount bound
to this specific ClusterRole could read it. Is there a way to set up
something like that?</p>
... |
<p>I have a general helm chart in my Kubernetes cluster taking a multiline text field with environment variables (identified by KEY=VALUE), translating them into the deployment.yaml like this:</p>
<p>Inside the Rancher dialog:
<a href="https://i.stack.imgur.com/ENJLM.png" rel="nofollow noreferrer"><img src="https://i.s... | <p>Plan 1:</p>
<p>One of the simplest implementation methods</p>
<p>You can directly use the yaml file injection method, put the env part here as it is, so you can write the kv form value and the ref form value in the values in the required format.</p>
<p>As follows:</p>
<p><strong>values.yaml</strong></p>
<pre><code>e... |
<p>I'm new to k8s, so this question might be kind of weird, please correct me as necessary.</p>
<p>I have an application which requires a <code>redis</code> database. I know that I should configure it to connect to <code><redis service name>.<namespace></code> and the cluster DNS will get me to the right pl... | <h2>Design for resiliency</h2>
<p>Modern applications and Kubernetes are (or should be) designed for resiliency. The applications should be designed without <em>single point of failure</em> and be resilient to changes in e.g. network topology. Also see <a href="https://12factor.net/backing-services" rel="nofollow noref... |
<p>i have tomcat backend service running on kubernetes cluster try to rewrite using ingress with path /blob/api/v1/test-backend > /api/v1/test-backend so
the configuration now is running so can hit to xx.somedomain.com/blob/api/v1/test-backend and i want change to xx.somedomain.com/api/v1/test-backend with rewrites... | <p>Try this</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
name: rewrite
namespace: default
spec:
rules:
- host: rewrite.bar.com
http:
paths:
- backend:
serviceName: http-svc
servicePo... |
<p>We have a Java based kafka streams application which is deployed to a kubernetes cluster using helm charts. For scaling up the deployment we are using the Kubernetes option of replica sets which will run multiple instances of the app. But running multiple instances of the app keeps crashing the pods with the error b... | <p>Too much of your config is static.
As per documentation:</p>
<pre><code>group.instance.id
A unique identifier of the consumer instance provided by the end user. Only non-empty strings are permitted. If set, the consumer is treated as a static member, which means that only one instance with this ID is allowed in the ... |
<p>I wanted to understand if a sidecar container can send a unix signal to the main container process).</p>
<p>The use-case is I have Nginx running as the main content serving app container and I want the sidecar container to receive Nginx config updates and reload Nginx by sending a signal. These two containers would ... | <p>You can share process namespace by setting <code>shareProcessNamespace: true</code>.</p>
<p>The Kubernetes documentation has an example where a sidecar sends a <code>SIGHUP</code> to an nginx container in the same pod: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/#configu... |
<p><strong>THE PLOT:</strong></p>
<p>I am working on a kubernetes environment where we have PROD and ITG setup. The ITG setup has multi-cluster environment whereas PROD setup is a single-cluster environment.
I am trying to automate some process using Python where I have to deal with kubeconfig file and I am using the <... | <p>As described in the comments:
If we want to use <code>kubeconfig</code> file to work out of the box by default, with specific cluster using kubectl or python script we can mark one of the contexts in our <code>kubeconfig</code> file as the default by specifying <code>current-context</code>.</p>
<p>Note about <a href... |
<p>I'm running an AKS cluster on 3 nodes in different availability zones (for HA). There's an API running on it with pods on each cluster.</p>
<p>The plan is to add FileBeat as a DaemonSet (one pod on each node), and Logstash collecting the logs from each FileBeat instance. I chose DaemonSet over SidecarProxy pattern t... | <p><strong>To answer your question</strong>:</p>
<p>You can add a storage solution in between which manages Azure Disks, and then create your volumes using that storage solution instead. An example would be <code>Ceph</code>, and you can use <a href="https://rook.io" rel="nofollow noreferrer">rook operator</a> to set t... |
<p>I'm using <strong>ECK 1.5.0</strong> and I have to use Ingress to expose Elasticsearch. But I'm getting a 502 gateway when I go to the url (<code>http://my-db-url.com</code>). I have confirmed the database is running fine and able to collect / display data.</p>
<p>I was only able to find solutions to exposing Kibana... | <p>Turns out the same question was asked here: https://discuss.elastic.co/t/received-plaintext-http-traffic-on-an-https-channel-closing-connection/271380</p>
<p>and the solution is to force HTTPS using annotations, which for the nginx ingress controller can be found here: <a href="https://github.com/elastic/helm-charts... |
<p>We have an ArgoCD project. In this project we have multiple apps (lets call them A, B, and C), which pass messages to each other via a Kafka cluster. In order to do this the topics need to be created.</p>
<p>App A is responsible for managing the Kafka cluster (amongst other things). We have a PreSync hook in app A f... | <p>As of version 1.8 of ArgoCD the part responsible for making this possible has been removed. More details can be found <a href="https://github.com/argoproj/argo-cd/issues/3781" rel="nofollow noreferrer">here</a> .</p>
<p>The argocd-cm will need to be updated to enable the app of an app health check using <strong>reso... |
<p>I have two Kubernetes clusters in datacenters and I'm looking to create a third in public cloud. Both of my clusters use Azure AD for authentication by way of OIDC. I start my API server with the following: </p>
<pre><code>--oidc-issuer-url=https://sts.windows.net/TENAND_ID/
--oidc-client-id=spn:CLIENT_ID
--oidc-us... | <p>This is now supported! Check out <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/oidc" rel="nofollow noreferrer">the documentation</a> on how to configure an external OIDC provider.</p>
|
<p>I have stuck resources after delete a jitsi stack in my master node. The only pending resources are this two <code>statefullset.appsset</code>, no pods are running.</p>
<p><a href="https://i.stack.imgur.com/rZqnr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rZqnr.png" alt="My issue" /></a></p>
... | <p>Posting the answer as community wiki, feel free to edit and expand.</p>
<hr />
<p><strong>Stuck objects in general</strong></p>
<p>Sometimes objects can't be deleted due to <code>finalizer</code>(s), you will need to find them by viewing at the whole object e.g. <code>kubectl get pod pod-name -o json</code>.</p>
<p>... |
<p>I can't seem to get cert-manager working:</p>
<pre><code>$ kubectl get certificates -o wide
NAME READY SECRET ISSUER STATUS AGE
tls-secret False tls-secret letsencrypt Issuing certificate as Secret does not exist 115m
$ kubectl get Certificate... | <p>You have not created the <strong>clusterissuers</strong> so it wont be there.</p>
<p>As you have created the <strong>certificate</strong> you can try the</p>
<pre><code>kubectl get certificate
</code></pre>
<p>Your error is clearly saying the issue you have to create the <strong>clusterissuers</strong></p>
<blockquo... |
<p>I have a pod called <code>mypod0</code> with two persistent volumes.</p>
<p><code>mypd0</code>, <code>mypd1</code> (provided through two persistent volume claims <code>myclaim0</code>, <code>myclaim1</code>) mounted into <code>mypod0</code> at <code>/dir0</code>, <code>/dir1</code> as shown in the pod definition bel... | <p><strong>As <a href="https://stackoverflow.com/users/213269/jonas">Jonas</a> mentioned in the comment, this action is not possible:</strong></p>
<blockquote>
<p>Nope, this is not possible. Pod-manifests is intended to be seen as immutable and pods as disposable resources.</p>
</blockquote>
<p>Look at the definition o... |
<p>I have a Kubernetes cluster in Digital Ocean, I want to pull the images from a private repository in GCP.</p>
<p>I tried to create a secret that make me able to to pull the images following this article <a href="https://blog.container-solutions.com/using-google-container-registry-with-kubernetes" rel="nofollow noref... | <p>Verify that you have enabled the Container Registry API, Installed Cloud SDK and Service account you are using for authentication has <a href="https://cloud.google.com/container-registry/docs/access-control" rel="nofollow noreferrer">permissions</a> to access Container Registry.</p>
<p>Docker requires privileged acc... |
<p>I'm trying to authenticate against AAD (Azure Active Directory) with <a href="https://oauth2-proxy.github.io/" rel="nofollow noreferrer">oauth2_proxy</a> used in Kubernetes to obtain Access Token.</p>
<p>First of all, I'm struggling to get the correct authentication flow to work.</p>
<p>Second, after being redirecte... | <p>Here is some input on authentication against Azure Active Directory (AAD) using <a href="https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview" rel="nofollow noreferrer">oauth2_proxy</a> in kubernetes.</p>
<p>First you need to create an application in AAD and add it <code>email</code>, <code>profil... |
<p>I'm using the cert-manager to manage my ssl certificates in my Kubernetes cluster. The cert-manager creates the pods and the challenges, but the challenges are never getting fulfilled. They're always saying:</p>
<blockquote>
<p>Waiting for HTTP-01 challenge propagation: failed to perform self check GET request 'http... | <p>Make sure your POD is returning something on the home URL or on the Home page of the domain that you are configuring on <strong>ingress</strong> host</p>
<p>You can also use the <strong>DNS-01</strong> method for verification if <strong>HTTP-01</strong> is not working</p>
<p>Here example for the <strong>DNS-01</stro... |
<p>I wish to run the Spring batch application in Azure Kubernetes.</p>
<p>At present, my on-premise VM has the below configuration</p>
<ul>
<li>CPU Speed: 2,593</li>
<li>CPU Cores: 4</li>
</ul>
<p>My application uses multithreading(~15 threads)</p>
<p>how do I define the CPU in AKS.</p>
<pre><code>resources:
limits:
... | <p>First of all, please note that <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu" rel="nofollow noreferrer">Kubernetes CPU is an absolute unit</a>:</p>
<blockquote>
<p>Limits and requests for CPU resources are measured in cpu units. One
cpu, in Kubernetes, is equi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.