prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Recently I got this warning message, when I have builded <code>quarkus maven</code> project. I have tested with several later versions and I think this has to be something local in my environment.</p>
<pre><code>[WARNING] Error reading service account token from: [/var/run/secrets/kubernetes.io/serviceaccount/token]... | <p>Like <a href="https://stackoverflow.com/users/11023331/tapani-rundgren">Tapani Rundgren</a> mentioned in the comments, the solution is to export the variables:</p>
<pre><code>export KUBERNETES_MASTER=<your server here>
export KUBERNETES_NAMESPACE=<your namspace here>
</code></pre>
|
<p>I want to get specific output for a command like getting the nodeports and loadbalancer of a service. How do I do that?</p>
| <p>The question is pretty lacking on what exactly wants to be retrieved from Kubernetes but I think I can provide a good baseline.</p>
<p>When you use Kubernetes, you are most probably using <code>kubectl</code> to interact with <code>kubeapi-server</code>.</p>
<p>Some of the commands you can use to retrieve the inform... |
<p>I restarted the Prometheus pod and now the Prometheus pod is crashlooping. Found this error in the logs:</p>
<pre><code>level=error ts=2021-06-09T09:27:29.066Z caller=main.go:758 err="opening storage failed: block dir: \"/prometheus/01F6J0P4KBBWVJD2M8B1PE7C5E\": open /prometheus/01F6J0P4KBBWVJD2M8B1PE... | <p>So you have already found correct github related issues and asked there also.</p>
<ul>
<li><p><a href="https://github.com/prometheus/prometheus/issues/7090" rel="noreferrer">Still seeing "opening storage failed: block dir" on more recent version of prometheus #7090</a></p>
</li>
<li><p><a href="https://git... |
<p>I want to patch (overwrite) <strong>list</strong> in <strong>kubernetes</strong> manifest with <strong>Kustomize</strong>.
I am using patchesStrategicMerge method.
When I patch the parameters which are not in list the patching works as expected - only addressed parameters in patch.yaml are replaced, rest is untouche... | <p>What you can do is to use <a href="https://github.com/kubernetes-sigs/kustomize/blob/master/examples/jsonpatch.md" rel="noreferrer">jsonpatch</a> instead of <code>patchesStrategicMerge</code>, so in your case:</p>
<pre><code>cat <<EOF >./kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: K... |
<p>What is the purpose of args if one could specify all arguments using command in kubernetes manifest file?
for example i can use below syntax which totally negates the usage of the args.</p>
<pre><code>command: [ "bin/bash", "-c", "mycommand" ]
</code></pre>
<p>or also</p>
<pre><code>com... | <p>The main reason to use <code>args:</code> instead of <code>command:</code> is if the container has a specific entrypoint directive that you don't want to change. For example if the Dockerfile has <code>ENTRYPOINT ["/myapp"]</code> you might put <code>args: [--log-level=debug]</code> to add that one argumen... |
<p>I am implementing a Kubernetes based solution where I am autoscaling a deployment based on a dynamic metric. I am running this deployment with autoscaling capabilities against a workload for 15 minutes. During this time, pods of this deployment are created and deleted dynamically as a result of the deployment autosc... | <p>Yes, by default GKE sends logs for <em>all</em> pods to Stackdriver and you can view/query them there.</p>
|
<p>I am currently deploying <a href="https://docs.openfaas.com/" rel="nofollow noreferrer">openfaas</a> on my local virtual machine's <a href="https://kubernetes.io/" rel="nofollow noreferrer">kubernetes</a> cluster. I found that the time zone of the container started after publishing the function is inconsistent with ... | <p>As <strong>@coderanger</strong> pointed out in the comments section, the timezone difference is not related to <code>OpenFaaS</code>.<br />
It depends on the image you are using, most of the images use <code>UTC</code> timezone.
Normally this shouldn't be a problem, but in some special cases you may want to change t... |
<p>I have a microservice written in Haskell, the compiler is 8.8.3.
I built it with <code>--profile</code> option and ran it with <code>+RTS -p</code>. It is running about 30 minutes, there is <code><my-service>.prof</code> file but it is empty (literally 0 bytes). Previously I did it on my local machine and I st... | <p>I think the only way to do live profiling with GHC is to use the eventlog. You can insert <code>Debug.Trace.traceEvent</code> into your code at the functions that you want to measure and then compile with <code>-eventlog</code> and run with <code>+RTS -l -ol <output-file-name> -RTS</code>. You can use <a href=... |
<p>Is there any way to profile a runtime program written in golang?
In my case, kubelet shows steady increase in memory and I want to try memory profiling it.</p>
| <p>use <code>import _ "net/http/pprof"</code> in your application file and use <code>go tool pprof</code> commands or web UI to profile your application.</p>
<p>reference -</p>
<ul>
<li><a href="https://golang.org/pkg/net/http/pprof/" rel="nofollow noreferrer">golang.org/pkg/net/http/pprof</a></li>
<li><a hre... |
<p>I am running a KEDA enabled Queue Triggered Azure Function for which <code>terminationGracePeriodSeconds</code> has been set to <code>900</code> seconds (15 minutes). The function execution time varies between 30 seconds and 600 seconds (10 minutes). So grace period of 15 minutes seems to be reasonable.</p>
<p>Is t... | <p>Looks like this is a non-implemented event on the code side, and not necessarily something related to your configuration.
The most probable explanation is the SIGTERM is not handled and the function keeps processing events, no matter what.</p>
<p>There are reports here on GitHub (<a href="https://github.com/Azure/az... |
<blockquote>
<p><em>How to change the Docker <code>ENTRYPOINT</code> in a Kubernetes deployment, without changing also the Docker <code>CMD</code>?</em></p>
</blockquote>
<p>In the Pod I would do</p>
<pre><code>image: "alpine"
entrypoint: "/myentrypoint"
</code></pre>
<p>but this overwrites either <... | <p>That's not a thing.</p>
<ul>
<li><code>ENTRYPOINT</code> (in Dockerfile) is equal to <code>command:</code> (in PodSpec)</li>
<li><code>CMD</code> (in Dockerfile) equals <code>args:</code> (in PodSpec)</li>
</ul>
<p>So just override <code>command</code> but not <code>args</code>.</p>
|
<p>I am trying to have 1 redis master with 2 redis replicas tied to a 3 Quorum Sentinel on Kubernetes. I am very new to Kubernetes.</p>
<p>My initial plan was to have the master running on a pod tied to 1 Kubernetes SVC and the 2 replicas running on their own pods tied to another Kubernetes SVC. Finally, the 3 Sentinel... | <p>You can deploy Redis Sentinel using the <a href="https://helm.sh/" rel="noreferrer">Helm</a> package manager and the <a href="https://github.com/bitnami/charts/tree/master/bitnami/redis" rel="noreferrer">Redis Helm Chart</a>.<br />
If you don't have <code>Helm3</code> installed yet, you can use this <a href="https:/... |
<p>I am trying to access a secret on GCP Secrets and I get the following error :</p>
<pre><code>in get_total_results "api_key": get_credentials("somekey").get("somekey within key"), File
"/helper.py", line 153, in get_credentials response = client.access_secret_version(request={... | <p>The GCE instance might not have the correct authentication scope.</p>
<p>From: <a href="https://developers.google.com/identity/protocols/oauth2/scopes#secretmanager" rel="noreferrer">https://developers.google.com/identity/protocols/oauth2/scopes#secretmanager</a></p>
<p><code>https://www.googleapis.com/auth/cloud-pl... |
<p>I'm running into an issue with an nginx ingress controller (ingress-nginx v0.44.0) on EKS where the X-Forwarded-* headers are set to the kubernetes worker node the controller pod is running on as opposed to the details of the request of the actual user hitting the controller itself.
As we're terminating our SSL on t... | <p>It depends a lot on the exact networking setup in front of Nginx. By default, Kubernetes routes all external connections through the kube-proxy mesh which hides the true client IP. You also might have an AWS ELB of some kind in front of that which also can hide the client IP depending on settings.</p>
<p>For the fir... |
<p>sudo kubeadm init
I0609 02:20:26.963781 3600 version.go:252] remote version is much newer: v1.21.1; falling back to: stable-1.18
W0609 02:20:27.069495 3600 configset.go:202]</p>
<pre><code>WARNING: kubeadm cannot validate component configs `for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]`
`[init... | <p>Hi and welcome to Stack Overflow.</p>
<p><strong>"Port in use"</strong> means that there's a process running that uses that port. So you need to stop that process. Since you already ran kubeadm init once, it must have already changed a number of things.</p>
<p>First run <strong>kubeadm reset</strong> to u... |
<p>I have a cluster that has numerous services running as pods from which I want to pull logs with fluentd. <strong>All</strong> services show logs when doing <code>kubectl logs service</code>. However, some logs don't show up in those folders:</p>
<ul>
<li>/var/log</li>
<li>/var/log/containers</li>
<li>/var/log/pods</... | <p>This is how I would proceed to find out where a container is logging:</p>
<ol>
<li><p>Identify the node on which the Pod is running with:</p>
<pre><code>kubectl get pod pod-name -owide
</code></pre>
</li>
<li><p>SSH on that node, you can check which logging driver is being used by the node with:</p>
<pre><code>docke... |
<p>I want to get pod with label</p>
<p>app=vovo
component=db</p>
<p>When i get a pod with label app=vovo and component=db, i can get the result with below command.</p>
<pre><code>kubectl get pod -l app=vovo,component=db
</code></pre>
<p>However, when i want to get the result</p>
<p>app=vovo or component=db</p>
<p>How c... | <p><code>OR</code> operations for label selection is not supported as per the <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" rel="nofollow noreferrer">documentation</a></p>
<blockquote>
<p>Caution: For both equality-based and set-based conditions there is no
logical ... |
<p>i'm working on a new idea for which I've created a setup as follows on Azure Kubernetes:</p>
<ol>
<li>1 cluster</li>
<li>1 node pool in said cluster</li>
<li>1 deployment which creates 2 pods in the pool</li>
<li>1 load balancer service balancing requests between the 2 pods</li>
</ol>
<p>I'm trying to submit a json ... | <p>I don't see below annotations in your Ingress..</p>
<p>Can you add them and try?</p>
<pre><code>appgw.ingress.kubernetes.io/use-private-ip: "false"
kubernetes.io/ingress.class: azure/application-gateway
</code></pre>
<p>This is where you can see more details in <a href="https://learn.microsoft.com/en-us/a... |
<p>In <code>Pod</code> specification, there is an option to specify the user ID that needs to be run as by all containers</p>
<pre><code>podSecurityContext:
runAsUser: <a numeric Id>
</code></pre>
<p>Is there a way we can change the user name as well, the way we have for windows pods and container, like below</... | <p>Unfortunately, there is no such way. <code>WindowsSecurityContextOptions</code> contain <strong>Windows-specific</strong> options and credentials. <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context" rel="nofollow noreferrer">PodSecurityContext</a> allows you to u... |
<p>Reading Kubernetes documentation:</p>
<p><a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/</a></p>
<pre><code>128974848, 129e6, 129M, 123Mi
</code></pre>
<p>What are the dif... | <p>"MB" is the <a href="https://en.wikipedia.org/wiki/Byte#Multiple-byte_units" rel="noreferrer">metric unit</a>, where 1 MB = 10<sup>6</sup> B and 1 GB = 10<sup>9</sup> B.</p>
<p>"MiB" is the power 2 based unit, where 1 MiB = 1024<sup>2</sup> B = 1048576 B.</p>
<p>Thus, 128 GB = 128 · 10<sup>9</sup... |
<p>Why can't we create PV or PVC in imperative way?</p>
<p>Trying using create command, but it doesn't show any of them.</p>
<p><code>kubectl create --help</code></p>
<pre><code>Available Commands:
clusterrole Create a ClusterRole.
clusterrolebinding Create a ClusterRoleBinding for a particular ClusterRole... | <p>As described in the <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-command/" rel="noreferrer">documentation</a> <code>kubectl</code> uses imperative commands <strong>built into the kubectl command-line tool</strong> in order to help you creating objects quickly.</p>
<p>After some chec... |
<p>I'm trying to create an internal ingress for inter-cluster communication with gke. The service that I'm trying to expose is headless and points to a kafka-broker on the cluster.</p>
<p>However when I try to load up the ingress, it says it cannot find the service?</p>
<pre><code>Warning Sync 3m22s (x17 over 7m57s... | <p>Setting up ingress for internal load balancing requires you to configure a proxy-only subnet on the same VPC used by your GKE cluster. This subnet will be used for the load balancers proxies. You'll also need to create a fw rule to allow traffic as well.</p>
<p>Have a look at the <a href="https://cloud.google.com/... |
<p>I have deployed EFS file system in AWS EKS cluster after the deployment my storage pod is up and running.</p>
<pre><code>kubectl get pod -n storage
NAME READY STATUS RESTARTS AGE
nfs-client-provisioner-968445d79-g8wjr 1/1 Running 0 136m
</code></pre>
<p>Whe... | <p>Kubernetes <em>1.20</em> stopped propagating <code>selfLink</code>.<br />
There is a <a href="https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/25#issuecomment-742616668" rel="nofollow noreferrer">workaround</a> available, but it does not always work.</p>
<p>After the lines</p>
<pre><code>spe... |
<p>I am executing the below-mentioned command to install Prometheus.</p>
<pre><code>helm install my-kube-prometheus-stack prometheus-community/kube-prometheus-stack
</code></pre>
<p>I am getting the below error message. Please advise.</p>
<pre><code>Error: unable to build kubernetes objects from release manifest: error... | <p>Hello @saerma and welcome to Stack Overflow!</p>
<p>@rohatgisanat might be right but without seeing your current configs it's impossible to verify that. Please check if that was the case.</p>
<p>There are also two other things you should look for:</p>
<ol>
<li>If there was any previous installations of other prometh... |
<p>I have a container with IBM MQ (Docker image <code>ibmcom/mq/9.2.2.0-r1</code>) exposing two ports (9443 - admin, 1414 - application).</p>
<p>All required setup in OpenShift is done (Pod, Service, Routes).</p>
<p>There are two routes, one for each port.</p>
<ul>
<li><a href="https://route-admin.my.domain" rel="nofol... | <p>I'm not sure to fully understand your setup, but<code>"Routes"</code>only route HTTP traffic (On ports 80 or 443 onyl), not TCP traffic.<br />
If you want to access your MQ server from outside the cluster, there are a few solutions, one is to create a service of type: <code>"NodePort"</code></p>
... |
<p>We are deploying a spring-boot application using spring-session-hazelcast + hazelcast-kubernetes on an OpenShift/Kubernetes cluster.</p>
<p>Due to the nature of our platform, we can only use <code>service-dns</code> configuration. We expose a service on port 5701 for multicasting and set <code>service-dns</code> pro... | <p>You need to enable headless mode for your service in openshift.</p>
<p><a href="https://github.com/hazelcast/hazelcast-kubernetes#dns-lookup" rel="nofollow noreferrer">https://github.com/hazelcast/hazelcast-kubernetes#dns-lookup</a></p>
|
<p>I have a 3 node system, on which I have hosted a basic ArangoDB cluster having 3 dbservers. I am using Python-arango library, which says that to connect to the clusters, we need to supply the list of IPs with the port 8529 to ArangoClient class.My Python code is running in a different pod.</p>
<p>Using Arangosh, I c... | <p>if you follow this : <a href="https://www.arangodb.com/2018/12/deploying-arangodb-3-4-on-kubernetes/" rel="nofollow noreferrer">https://www.arangodb.com/2018/12/deploying-arangodb-3-4-on-kubernetes/</a></p>
<p>there is YAML config files it's creating multiple PODs. How your application should be connecting with Arra... |
<p>I had a working 3 node k8s cluster (v1.21.0 on Ubuntu 20.04 bare metal) installed using <code>kubeadm</code>. I removed one of the nodes and re-installed it from scratch (wipe disks, new OS but IP address is the same). Now it is unable to join the cluster:</p>
<pre><code># kubeadm join k8s.example.com:6443 --token w... | <p>Take a closer look at the error message you get:</p>
<pre><code>Failed to get etcd status for https://123.123.123.123:2379: failed to dial endpoint https://123.123.123.123:2379 with maintenance client: context deadline exceeded
</code></pre>
<p>This is quite common issue, related with <code>etcd</code> cluster, whic... |
<p>I am trying out external secrets operator (ESO) by following below:</p>
<p><a href="https://github.com/external-secrets/external-secrets" rel="nofollow noreferrer">https://github.com/external-secrets/external-secrets</a></p>
<p><a href="https://external-secrets.io/guides-getting-started/" rel="nofollow noreferrer">h... | <p>I solved the issue. It's on AWS side. I needed to create a new user and a new role. Put the newly created role in the <em>role:</em> section of the configmap and allow the user to assume that role by providing the aws creds for the user as environment variables in the k8s cluster.</p>
<p>Put this policy for the newl... |
<p>I'm working with Filebeat 7.9.3 as a daemonset on k8s.
I'm not able to parse docker container logs of a Springboot app that writes logs to stdout in json.
The fact is that the every row of the Springboot app logs is written in this way:</p>
<pre><code>{ "@timestamp": "2020-11-16T13:39:57.760Z", &... | <p>As processors are applied before the JSON parser of the input, you will need to first configure the <code>decode_json_fields</code> processors which will allow you to decode your json.log field. You will then be able to apply the json configuration fo the inputs on the <code>message</code> fields. Something like:</p... |
<p>I have a secret:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: secret-ssh-auth
type: kubernetes.io/ssh-auth
data:
ssh-privatekey: |
SEVMTE9PT09PT09PT09PT09PT09PCg==
</code></pre>
<p>and deployment:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
lab... | <p>Based on the Kubernetes documentation the <code>ssh-privatekey</code> key is mandatory, in this case, you can leave it empty via <code>stringData</code> key, then define another one by <code>data</code> key like this:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: secret-ssh-auth
type: kubernetes.io/ss... |
<p>After implementing istio, the service which was working before on browser has started giving 403 forbidden error.please note that this service still works inside k8 cluster and gives 200 response but on the browser it responds with 403 forbidden when it is called from other service.</p>
<p>what could be the reason?<... | <p>By fixing the http_upgrade in nginx.this issue got resolved</p>
|
<p>We are running our EKS node groups on AWS Spot Instances. In order to make sure that the services don't go down at any point of time we would like to run 1 pod of each service on a separate node group which uses reserved instances. Is there any way we can configure the deployments so that 1 pod runs on reserved nod... | <p>Couldn't find a way to do that in a single deployment, but achieved the same using two seperate deployments one deploys to spot node group and other to on-demand node group but the service uses both the pods.</p>
|
<p>I am searching for an specific information regarding kubernetes requests and limits and still didn't find an answer or just didn't understand quite well. Say I've defined two containers A and B for a single pod, both with its resources limits and requests:</p>
<p>A:
RAM request: 1Gi
RAM limit: 2Gi
B:
RAM request: 1G... | <blockquote>
<p>What happens to the pod? Is it evicted?</p>
</blockquote>
<p>If the memory limit of a container is exceeded, the kernel's OOM killer is invoked and terminates the container's process. The Pod then starts a new container on the same Node.</p>
<p>(CPU limits use a different mechanism (CFS Bandwidth Contro... |
<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>It seems there are issues with the default GKE auth method when connecting from local to a cluster when using <code>gcloud container clusters get-credentials...</code>.</p>
<p>What worked for me is creating a new SA and creating a kubeconfig for it:</p>
<pre><code>{
kubectl create sa deployer
kubectl create clusterr... |
<p>I am trying to connect to Firestore from code running on GKE Container. Simple REST GET api is working fine, but when I access the Firestore from read/write, I am getting Missing or insufficient permissions.</p>
<pre><code>An unhandled exception was thrown by the application.
Info
2021-06-06 21:21:20.283 EDT
... | <p>Looks like they key itself might not be correctly visible to the pod. I would start by getting into the pod with <code>kubectl exec --stdin --tty <podname> -- /bin/bash</code> and ensuring that the <code>/var/key.json</code> (per your config) is accessible and has the correct credentials.</p>
<p>The following ... |
<p>I need to connect a service running in a local container inside Docker on my machine to a database that's running on a Kubernetes cluster.</p>
<p>Everything I found on port forwarding allowed me to connect my machine to the cluster, but not the local container to the cluster (unless I install kubectl on my container... | <p><a href="https://www.telepresence.io/" rel="nofollow noreferrer">https://www.telepresence.io/</a> is what you're looking for. It will hook into the cluster network like a VPN and patch the services so traffic will get routed through the tunnel.</p>
|
<p>We are using client-go to talk to our kubernetes cluster (the api version: batchv1/appv1/corev1), and we mainly use three types of resources: Job, Deployment and Service.</p>
<p>My question is how do we judge when A Job or deployment is ready and is of running status?</p>
<p>For A Job, we found that when batchV1.Spe... | <p>To check the deployment status you need to check the pod status created by this deployment.
example:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: myapp
name: myapp
spec:
replicas: 2
selector:
matchLabels:
app: myapp
templat... |
<p>I've got the following:</p>
<p><strong>ingress.yaml</strong></p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: abcxyz
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: abcxyz
http:
paths:
- path: /a/
backend:
serviceName: se... | <p>The solution for me was:</p>
<pre><code>minikube addons enable ingress
</code></pre>
|
<p>I want to allow <strong>only</strong> listing of resources and not the manifest content.</p>
<p>Example,</p>
<pre><code>NAME READY STATUS RESTARTS AGE
airflow-redis-0 1/1 Running 0 32h
airflow-postgresql-0 1/1 Running 0 ... | <p>Showing only a listing of resources and not the object content is not possible by using any of the RBAC request verbs.</p>
<p><code>list</code> can't be used. It provides the listing but will also allow accessing full object content.</p>
|
<p>I'm trying to follow instructions on this <a href="https://kubernetes.io/docs/tutorials/hello-minikube/" rel="nofollow noreferrer">guide</a> but under docker.</p>
<p>I set up a folder with:</p>
<pre><code>.
├── Dockerfile
└── main.py
0 directories, 2 files
</code></pre>
<p><code>main.py</code> is:</p>
<pre><code>#!/... | <p>If you want to use kubernetes inside a docker container my suggestion is to use k3d .</p>
<blockquote>
<p>k3d is a lightweight wrapper to run k3s (Rancher Lab’s minimal Kubernetes distribution) in docker.k3d makes it very easy to create single- and multi-node k3s clusters in docker, e.g. for local development on Kub... |
<p>Currently I have a Spring containers running in a Kubernetes cluster. I am going through Udacity's Spring web classes and find the Eureka server interesting.</p>
<p>Is there any benefit in using the Eureka server within the cluster?</p>
<p>any help will be appreciated.</p>
<p>Thank you</p>
| <p>This is mostly an option question but ... probably not? The core Service system does most of the same thing. But if you're specifically using Eureka's service metadata system then maybe?</p>
|
<p>Upon digging deeper into the Kubernetes architecture it seems that all Kubernetes clusters (both on-premises and cloud) must use Linux as their control-plane (a.k.a. master) nodes.</p>
<p>With that being said the following questions come to mind:</p>
<ul>
<li>How come this is the case?</li>
<li>Why couldn't Windows ... | <p>First of all I want to say that from a technical perspective it <em>would</em> be possible to have a control plane running onto Windows. It is totally doable, however, no one wants to invest time into a solution which is worse than what already exist and it would take quite some time in order to make this work. Why ... |
<blockquote>
<p>readinessProbe: Indicates whether the container is ready to respond to requests. If the readiness probe fails, the endpoints controller removes the Pod's IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container d... | <blockquote>
<p>will the pod's readiness prob conditions checked again?</p>
</blockquote>
<p>yes, the condition will be checked again depends on the threshold you have set.</p>
<p>On each <code>periodSeconds</code>configuration readiness will be checked for POD.</p>
<blockquote>
<p>will it check again after the initial... |
<p>I originally posted this question as an issue on the GitHub project for the AWS Load Balancer Controller here: <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2069" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2069</a>.</p>
<p>I'm se... | <p>I think that the answer is to use <a href="https://github.com/kubernetes-sigs/external-dns" rel="nofollow noreferrer">external-dns</a>.</p>
<blockquote>
<p>ExternalDNS allows you to control DNS records dynamically via Kubernetes resources in a DNS provider-agnostic way.</p>
</blockquote>
|
<p>Helm Chart has the concept of Version and appVersion.</p>
<p>We are using the Version to document that a content of the Helm Chart changed or not (for ex, a template, deployment.yaml has new Envrionment value or a configmap.yaml has an additional) value, for these scenarios Version number should increase. We are usi... | <p>appVersion doesn't work this way, it isn't involved in dependency management. It's just for humans to know "this chart packages version 1.2 of Foobar", though these days many charts support multiple versions of the underlying thing so it usually is just set to the default one, if it's set at all.</p>
|
<p>I was able to successfully start <strong>keycloak server</strong> on <strong>AWS K3S Kubernetes Cluster</strong> with <strong>Istio Gateway</strong> and <strong>AWS HTTPS Application Load Balancer</strong>.</p>
<p>I can successfully see <strong>Keycloak Home Page</strong>:
<strong><a href="https://keycloak.skycompos... | <p>Investigating <strong>request headers</strong>, I finally found the cause of the issue.</p>
<p>This header was always "<strong>http</strong>" by default:</p>
<pre><code>X-Forwarded-Proto: http
</code></pre>
<p>Changing the value to:</p>
<pre><code>X-Forwarded-Proto: https
</code></pre>
<p>solved the issue.... |
<p><code>OpenShift 4.6</code></p>
<p>There is a basic set up in OpenShift: [Pod <- Service <- Route].
A service running in the pod have an HTTP endpoint responding for 90 seconds or longer. And in some cases it is normal, so I would like to allow this behavior.</p>
<p>Nevertheless, after a request to the route is... | <p>You might be looking for the <code>haproxy.router.openshift.io/timeout</code> annotation, with which you can annotate your Route:</p>
<pre><code>oc annotate route myroute --overwrite haproxy.router.openshift.io/timeout=2s
</code></pre>
<p>You can find more information about Route configuration in the documentation: ... |
<p>I am learning kubernetes and got into a point where I am very confused. I have installed metallb and <a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">ingress-nginx</a> so it is possible to access content from outside. I saw several examples that are using <a href="https://hub.docker.co... | <p>Short answer: <strong>No</strong><br />
But it's complicated.</p>
<p><code>nginx</code> <a href="https://hub.docker.com/_/nginx" rel="nofollow noreferrer">image</a> you mentioned is one of the most popular images (5th on the Docker Hub, by the time of this writing), is relatively small (133MB), and is easy to rememb... |
<p>I recently set up a GKE autopilot but realized it doesn't support webhooks which cert-manager is dependent on. What are the other options we have to add/manage SSL certificates to a GKE auto-pilot cluster?</p>
| <p>As of May 2021, GKE Autopilot has no support for 3rd party webhooks. Without webhooks, many Kubernetes plugins such as cert-manager cannot operate correctly. Cert-manager uses a custom mutating admission webhook to manage certificates, which is immutable on GKE Autopilot.</p>
<p>To add/manage SSL certificates for Au... |
<p>I have keycloak installed on kubernetes by oficial helm chart. I have 2 replicas on a statefulset. I have created a realm and configure the admin-cli client to go by confidential. When I ask for a token by this client (with the correct client secret), I get the token, and when I try to create a user, sometimes the c... | <p>Just setting 2 replicas doesn't mean that Keycloak runs in a cluster, it's just a K8s cluster, but not a Keycloak cluster. How should Keycloak know, if you don't tell it?</p>
<p>You'll have to configure Infinispan and JGroups properly, using some <code>*_PING</code> method for node discovery. Try using <code>JDBC_PI... |
<p>I'm trying to use the Python Kubernetes Client to get the run-time of each container for all my pods. Using the K8s CLI this information is available by using <code>kubectl describe pods</code>. </p>
<p>I can get the output for a single pod by using </p>
<pre class="lang-py prettyprint-override"><code>api_response... | <p>You are right about using this command to get all pod names:</p>
<pre><code>api_response = api_instance.read_namespaced_pod(name='pod-name',namespace='namespace-name')
</code></pre>
<p>But to get specifically the name of those, use something like this:</p>
<pre><code>for i in api_response.items:
print("%s&q... |
<p>We need to disable the automount of service account from our existing deployments in AKS cluster. There are 2 ways to do by adding the property "automountserviceaccount : false" in either in the service account manifest or pod template.</p>
<p>We are using separate service account specified in our applicat... | <blockquote>
<p>So inorder to secure our cluster, do we need to disable the automount property for both default and application specific service accounts?.</p>
</blockquote>
<p>The design behind the <code>default</code> ServiceAccount is that it does not have any rights unless you give them some. So from a security poi... |
<p>I am having a problem using Kubernetes Ingress with a ASP.NET core web API.</p>
<p>Lets say I have a web API with three controllers (simplified code to demonstrate three routes /, /ep1, /ep2):</p>
<pre><code>endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("##");
... | <p>Routing within the app should be handled by the app. So, there should be no need to define dynamic paths. Try this.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: myhost.com
http:
... |
<p>I got that error when deploying a k8s deployment, I tried to impersonate being a root user via the security context but it didn't help, any guess how to solve it? Unfortunately, I don't have any other ideas or a workaround to avoid this permission issue.</p>
<p>The error I get is:</p>
<pre><code>30: line 1: /scripts... | <p>From what I can see, your script does not have execute permissions.</p>
<p>Remove this line from your config map.</p>
<pre><code>defaultMode: 0700
</code></pre>
<p>Keep only:</p>
<pre><code>defaultMode: 0777
</code></pre>
<p>Also, I see missing leading / in your script path</p>
<pre><code>- /bin/sh scripts/get_data.... |
<p>Kubernetes documentation describes pod as a <code>wrapper</code> around one or more containers. containers running <code>inside</code> of a pod share a set of namespaces (e.g. network) which makes me think <code>namespaces</code> are nested (I kind doubt that). What is the <code>wrapper</code> here from container ru... | <p>The main difference is networking, the network namespace is shared by all containers in the same Pod. Optionally, the process (pid) namespace can also be shared. That means containers in the same Pod all see the same <code>localhost</code> network (which is otherwise hidden from everything else, like normal for loca... |
<p>I'm getting lots of errors on one of my K8s worker nodes saying "http: TLS handshake error from some_ip:port: remote error: tls: bad certificate", but I'm not having any problems using any of my K8s containers. The problem is being logged in /var/log/syslog seems to be specific to one particular K8s node.... | <p>This is more likely coming from the cert-manager.
You can find this from cert-manager-webhook- pod, usually in cert-manager namespace.</p>
|
<p>So, I have a specific chain of kubernetes and bash commands that I have to execute on gcloud, I'd like to know if there is any way to execute those commands automatically via scripting, without the need of actually having to open and interact with gcloud CLI. Maybe using a npm package but i don't know if there is a ... | <p>Please provide a little more detail as to what it is you're trying to automate as this will help guide recommendations.</p>
<p>There are several challenges automating subprocesses (e.g. invoking bash and it running <code>gcloud</code>) from within another program. High among these is that shell-scripting doesn't pro... |
<p>I have two network policies (one with pod selector app=db and the other with app=proxy) and I have one pod to apply both network policies, the pod config doesn't allow to have 2 different labels with the same key app.</p>
<p>How can I do it in this case without modifying any network policies?</p>
| <p>If the pod/label/app selector is the only selector in each policy then it's not possible. The net policy probably needs a <code>matchExpressions</code> selector then a new label.</p>
<p>Ingress and Egress rules can supply an array of <code>podSelector</code>s for the network targets, or similar <code>matchExpressi... |
<p>I have GKE Ingress with a backend referring to a kubernetes service of type ExternalName. The "external" service refers to another kubernetes service within the same cluster (in a different namespace, that's why the "external" service is used as a bridge). However, the healthcheck defined on the... | <p>I don't think you can use an <code>ExternalName</code> service as the backend for an Ingress. <code>ExternalName</code> is meant to be used for internal clients to alias an external service. You might be able to do what you want, but I've never tried that approach.</p>
<p><strong>EDIT</strong></p>
<p>As an alterna... |
<p>There are build environment variables (<a href="https://argoproj.github.io/argo-cd/user-guide/build-environment/" rel="noreferrer">https://argoproj.github.io/argo-cd/user-guide/build-environment/</a>) so can inject something like <code>$ARGOCD_APP_NAME</code> on the application/helm yaml file and it resolves to the ... | <p>It's a late answer, but you can. You can use the plugin field to add the ENV variables in the application level, the example follows:</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
...
spec:
...
source:
plugin:
env:
- name: ENV_VARIABLE
value: ENV_VA... |
<p>I am currently setting up a Kubernetes cluster but I noticed there are no default storage classes defined.</p>
<pre><code>u@n:~$ kubectl get sc
No resources found in default namespace.
</code></pre>
<p>When reading through the docs there are lo... | <p>In general, you can start from the Kubernetes documentation. <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner" rel="nofollow noreferrer">Here</a> you can find storage-classes concept. Each StorageClass has a provisioner that determines what volume plugin is used for provisioning PVs.... |
<p>I couldn't find an equivalent k8s cli command to do something like this, nor any ssh keys stored as k8s secrets. It also appears to do this in a cloud-agnostic fashion.</p>
<p>Is it just using a k8s pod with special privileges or something?</p>
<p>Edit: oops, it's open-source. I'll investigate and update this questi... | <p>Posting this community wiki answer to give more visibility on the comment that was made at a github issue that addressed this question:</p>
<blockquote>
<p>Lens will create <code>nsenter</code> pod to the selected node</p>
<blockquote>
<pre><code>protected async createNodeShellPod(podId: string, nodeName: string) { ... |
<p>Starting kubernetes 1.20 there has been a change regarding <code>ownerReferences</code> and how K8s performs GC.
Basically if a resource in <code>x</code> namespace spins up a pod/job in a <code>y</code> namespace with child having <code>ownerReferences</code> referencing to parent resource in <code>x</code>, K8s te... | <p>As per <a href="https://github.com/kubernetes/kubernetes/pull/92743#issuecomment-729701767" rel="nofollow noreferrer">Fix GC uid races and handling of conflicting ownerReferences #92743
</a></p>
<blockquote>
<p>namespaces are intended to be independent of each other, so cross-namespace references have not been permi... |
<p>when I run <code>kubectl get deploy/my-deploy -o yaml > my-deployment.yaml</code> and modify only the container image tag, and run <code>kubectl apply</code> with the fixed file, is there a command that I can check whether the configured deployment is ready or not?</p>
<p>When I create a new deployment by changin... | <p>The field that indicates how many pods are updated is the <code>status.updatedReplicas</code>.</p>
<p>According to the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#deploymentstatus-v1-apps" rel="nofollow noreferrer">documentation</a>, this is the meaning of that field:</p>
<blockquot... |
<p>I am trying to install jenkins on my kubernetes cluster under <code>jenkins</code> namespace. When I deploy my pv and pvc, the pv remains available and does not bind to my pvc.</p>
<p>Here is my yamls:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins
labels:
type: jenkins
spec:
... | <p>Based on the storage class spec, I think the problem is the <code>volumeBindingMode</code> being set as <code>WaitForFirstConsumer</code> which means the PV will remain unbound until there is a Pod to consume it.</p>
<p>You can change it <code>Immediate</code> to allow the PV to be bound immediately without requirin... |
<p>Why kubectl cluster-info is running on <strong>control plane</strong> and not <strong>master node</strong>
And on the control plane it is running on a specific IP Address <strong><a href="https://192.168.49.2:8443" rel="nofollow noreferrer">https://192.168.49.2:8443</a></strong>
and not not <strong>localhost</strong... | <p>The Kubernetes project is making an effort to move away from wording that can be considered offensive, with one concrete recommendation being <a href="https://github.com/kubernetes/community/blob/master/wg-naming/recommendations/001-master-control-plane.md" rel="noreferrer">renaming master to control-plane</a>. In o... |
<p>I have broken down my workflow scenario into 2 separate <code>WorkflowTemplates</code>. <code>outer-template</code> would just define the steps and <code>inner-template</code> would hold that <code>job</code> definition that will spin up desired container, with all other fancy stuff. Now when I submit a request <cod... | <p>When passing an argument to a template in a step, you have to explicitly set the argument value.</p>
<p>In the <code>outer-template</code> WorkflowTemplate, you invoke <code>inner-template</code> twice. In each case you have half-specified the <code>message</code> argument. You have to also set the <code>value</code... |
<p>Can someone explain to me what the role of the keyword "template" is in this code :</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: {{ template "identity-openidconnect" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "microService.name" . }}
re... | <p>The keyword "template" means, that Helm will find the previously created template and complete the yaml file according to the template in the template. It has to be created in advance. This type of construction allows you to refer to the same scheme many times.</p>
<p>For example, we can define a template ... |
<p>looking to understand the order in which kubenetes examine the pods using the 3 type of probes- startup, readiness and live.</p>
<p>How to understand or design these 3 probes correctly for normal applications? What is the chance of getting conflict or breaking the application if the startup probe has wrong entries</... | <h2>Startup probe</h2>
<p><strong>This runs first.</strong> When it succeeds, the Readiness Probe and Liveness Probe are run continuously. If this fails, the container is killed.</p>
<p>Use this for "slow staring apps", you can use the same command as Liveness if you want.</p>
<blockquote>
<p>The kubelet uses... |
<p>Setting the following pod configuration will enforce BW usage of 10MB on average or also prevent spikes of over 10MB. If this does not prevent spikes. Is there a way to configure CNI to "level off" spikes so it will queue the data and will send over a period of few seconds and within the BW limit of 10MB... | <p>There isn't a way to control the burst rate currently.</p>
<p><a href="https://github.com/kubernetes/kubernetes/blob/7735cf7f2674627283db081d61a2c45f4b70ee8f/pkg/kubelet/dockershim/network/cni/cni.go#L427-L443" rel="nofollow noreferrer">Here is the relevant code that implements bandwidth rate and burst</a>. Notice h... |
<p>I have multiple nodes, which are lying mostly idle, but getting an error while scheduling pods/services saying "Insufficient CPU"</p>
<p>Node usage output :-</p>
<pre><code>top - 17:59:45 up 17 days, 2:52, 1 user, load average: 5.61, 7.85, 8.58
Tasks: 2030 total, 3 running, 1771 sleeping, 0 stopped,... | <p>You cannot overcommit on requests, as those form the minimum required resources for a given pod to run. You can overcommit on limits, as you can see by your <code>192%</code> there.</p>
|
<p>How can I speedup the rollout of new images in Kubernetes?</p>
<p>Currently, we have an automated build job that modifies a yaml file to point to a new revision and then runs <code>kubectl apply</code> on it.</p>
<p>It works, but it takes long delays (up to 20 minutes PER POD) before all pods with the previous revis... | <blockquote>
<p>I would rather kill all 3 pods and have 3 new ones with the new image.</p>
</blockquote>
<p>You can do that. Set <code>strategy.type:</code> to <code>Recreate</code> instead of the default <code>RollingUpdate</code> in your <code>Deployment</code>. See <a href="https://kubernetes.io/docs/concepts/worklo... |
<p>I understand that a pod can have multiple containers. But, I am trying to find if there is a max limit on the number of containers within a pod. I have googled around, but could not find an answer.</p>
| <p>AFAIK, there is no such pod-specific limit. Though there are some cluster-specific criteria (k8s v1.21) like:</p>
<ul>
<li>No more than 110 pods per node</li>
<li>No more than 5000 nodes</li>
<li>No more than 150000 total pods</li>
<li>No more than 300000 total containers</li>
</ul>
<p><strong>N.B.</strong>: Since a... |
<p>I am trying to get the current Kubernetes version via the API, because depending on the version some things are not supported (e.g. readyz endpoint is not available before 1.16, so I want to check healthz endpoint instead).</p>
<p>I found the following endpoint: <code>/version</code></p>
<p>Example result:</p>
<pre>... | <p><code>GitVersion</code>/<code>gitVersion</code> is the semantic versioning field.</p>
<p>This is the version of the <code>kube-api-server</code> component specifically.</p>
<p>The parsing is done by <a href="https://github.com/kubernetes/apimachinery/blob/57f2a0733447cfd41294477d833cce6580faaca3/pkg/util/version/ver... |
<p>I'm trying to use the free tier (autopilot mode) to learn k8s on gcp. However I cam across the following <a href="https://stackoverflow.com/questions/63987678/is-it-possible-to-have-google-cloud-kubernetes-cluster-in-the-free-tier">Is it possible to have Google Cloud Kubernetes cluster in the free tier?</a>. Howev... | <p>There is no way to get a free GKE cluster on GCP, but you can get a very cheap one by following the instructions at
<a href="https://github.com/Neutrollized/free-tier-gke" rel="nofollow noreferrer">https://github.com/Neutrollized/free-tier-gke</a>.</p>
<p>Using a combination of GKE's free management tier and a low c... |
<p>How can I retrieve a configmap value using jsonpath?</p>
<p>I'm trying to retrieve the value of haproxy.cfg from my configmap, but I can't get it just right:</p>
<pre><code>kubectl get cm -l app=haproxy -o jsonpath="{['items'][0]['data']['haproxy.cfg']}"
</code></pre>
<p>The above returns no results. But ... | <p>Escape the <code>.</code> inside single quotes</p>
<pre><code>kubectl get cm -l app=haproxy -o jsonpath="{.items[0].data['haproxy\.cfg']}"
</code></pre>
<p>* This didn't work a long time ago, pre 1.5. Then you needed to use <code>go-template</code> formatting.</p>
|
<p>I am trying to deploy my react app to a kubernetes cluster by serving it via an nginx server. As you can see in the below Dockerfile I am building my app and afterwards copying the build artefacts into the <code>/usr/share/nginx/html/</code> path on my nginx server.</p>
<pre><code># Stage 1 - build container
FROM no... | <p>For all of you who are having a similar problem, set pathType to <strong>Prefix</strong>. Otherwise only requests to "/" will get routed to your service. Requests to "/static/..." were simply not routed to the services and therefore to my nginx server.</p>
|
<p>I noticed some of my clusters were reporting a CPUThrottlingHigh alert for metrics-server-nanny container (image: gke.gcr.io/addon-resizer:1.8.11-gke.0) in GKE. I couldn't see a way to configure this container to give it more CPU because it's automatically deployed as part of the metrics-server pod, and Google auto... | <p>This is a known issue in <a href="https://github.com/kubernetes/kubernetes/issues/67577" rel="nofollow noreferrer">Kubernetes</a> that CFS leads to Throttling Pods that exhibit a spikey CPU usage pattern. As Kubernetes / GKE uses to implement CPU quotas, this is causing pods to get throttled even when they really ar... |
<p>I am working with ingress-nginx in kubernetes to set up a server.
The issue is that the paths are not routing at all and I get a 404 error from the nginx server on any request I make.
Below is my code for ingress:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-srv
annotatio... | <p>So the reason why this wasn't routing properly was because of the:</p>
<pre><code> - host: app.dev
- http:
</code></pre>
<p>The "-" in front of the "http" made the controller think it was its own ruleset so the following routes had a host of "*". After I Removed the "-"... |
<p>Trying to set up MongoDB in a Kubernetes cluster on my local machine using Minikube but getting the following error. (I tried multiple MongoDB images; latest, 5.0.0, 4.0, etc. The problem continued.)</p>
<p>My <code>mongodb-secret.yaml</code> is as follows:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name... | <p>Checking your secret values, something's wrong:</p>
<pre><code>$ echo dXNlcm5hbWUNCg==| base64 --decode | cat -e
username^M$
$ echo cGFzc3dvcmQNCg== | base64 --decode | cat -e
password^M$
</code></pre>
<p>Try re-creating your secret without those un-printable characters (<code>\r</code> as well as <code>\n</code>)... |
<p>I have spent days now trying to figure out a dependency issue I'm experiencing with (Py)Spark running on Kubernetes. I'm using the <a href="https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/" rel="noreferrer">spark-on-k8s-operator</a> and Spark's Google Cloud connector.</p>
<p>When I try to submit my spar... | <p>If the zip files contain jar which you always shall require while running your spark job, facing a similar issue I just added</p>
<pre><code>FROM gcr.io/spark-operator/spark-py:v2.4.5
COPY mydepjars/ /opt/spark/jars/
</code></pre>
<p>And everything is getting loaded within my spark session. Could be one way to do it... |
<p>I am trying to find min/max/average memory consumed by particular pod over a time inteval.</p>
<p>Currently I am using</p>
<pre><code>sum(container_memory_working_set_bytes{namespace="test", pod="test1", container!="POD", container!=""}) by (container)
Output -> test1 = 92... | <p>You can do that with a range vector (add an <code>[interval]</code> to a metric name/selector) and an <a href="https://prometheus.io/docs/prometheus/latest/querying/functions/#aggregation_over_time" rel="nofollow noreferrer">aggregation-over-time function</a>:</p>
<pre><code>min_over_time(container_memory_usage_byte... |
<p>I have a k8s ingress with more than 5 backend services behind it. The ingress spawns a GoogleCloud LoadBalancer.</p>
<p>Each of the services is routed traffic to by an http <code>path</code> rule. Eg. one app is on <code>/foo</code>, another is on <code>/bar</code>, etc.
All of them work fine. Then I added a new app... | <p>So, the problem was that the LB health-check was hitting <code>/</code> which was a non-existing endpoint on the app (aka. it wasn't returning <code>OK 200</code>).</p>
<p>I added <code>readiness</code> probe to the k8s Deployment. According to the <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/in... |
<p>How can I speedup the rollout of new images in Kubernetes?</p>
<p>Currently, we have an automated build job that modifies a yaml file to point to a new revision and then runs <code>kubectl apply</code> on it.</p>
<p>It works, but it takes long delays (up to 20 minutes PER POD) before all pods with the previous revis... | <p>Jonas and SYN are right but I would like to expand this topic with some additional info and examples.</p>
<p>You have two types of strategies to choose from when specifying the way of updating your deployments:</p>
<ul>
<li><p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#recreate-de... |
<p>I have deployed minikube on Windows VM and the minikube VM is created on Virtualbox with the host-only IP.</p>
<p>I have deployed the Kubernetes dashboard with NodePort IP so I can access it from outside the cluster. The svc is as follows:</p>
<pre><code>PS C:\Users\XXX\Desktop\ingress> kubectl get svc -n kuberne... | <p>According to <a href="https://github.com/kubernetes/dashboard/issues/5017" rel="nofollow noreferrer">this issue</a> this is a limitation/bug of the kubernetes dashboard.</p>
<p>They suggest using this config as a workaround:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kubernetes-das... |
<p>I'm a beginner to Kubernetes, Helm and Yaml. I'm trying to access the QuestDB Console via Kubernetes Ingress Controller setup in my minikube, but i'm getting the below error when running a helm upgrade. Could anyone advice how I can correct this?</p>
<pre><code>Error: UPGRADE FAILED: failed to create resource: Ingre... | <p>The Ingress template expects things to stay under <code>.Values.ingress.hosts</code> but in your values are under <code>.Values.ingress.rules</code>.</p>
<p>Additionally, paths needs to stay directly under hosts items, not under http, because the ingress is using it with a</p>
<pre><code>{{- range .paths }}
</code><... |
<p>Use case:
Get stream from Kafka store in parquet file using spark.
Open these parquet files and generate graph using graphframes.</p>
<p>Infra:
i have a bitnami spark infra on kubernetes connected to Kafka.</p>
<p>The goal is to call the spark-submit into a kubernetes pods.
With that all the code run into kubernetes... | <p>Using exec command of kubernetes</p>
<pre><code>minikube kubectl -- exec my-spark-master-0 -- spark-submit \
--master spark://0.0.0.0:7077 \
--deploy-mode client \
--conf spark.cores.max=1 \
--conf spark.executor.memory=1g \
--conf spark.eventLog.enabled=true \
--conf spark.eventLog.dir=/tmp/... |
<p>I am trying to make my kubernetes cluster pull from a container registry service running inside itself. I have kube dns setup, I have a registry deployment and service running. I can resolve the service internal name via host command on the node. I have added <code>--dns</code> flag to docker daemon with the address... | <p>Question: "I am trying to make my kube-cluster pull from a registry running inside itself." (Note I plan to going to edit the title of your question to clarify slightly / make it easier to search)</p>
<p><strong>Short Answer: You can't</strong>*<br />
*<strong>Nuanced Answer: Technically it is possible wit... |
<p>I have the following imagepolicy:</p>
<pre><code>apiVersion: image.toolkit.fluxcd.io/v1alpha2
kind: ImagePolicy
metadata:
name: cps-kul-beta-imagepolicy
namespace: flux-system
spec:
imageRepositoryRef:
name: cps-kul-image
filterTags:
pattern: '^sha-(?P<ts>.*)-.+'
extract: '$ts'
policy:
... | <p>This error means that there's no images in the registry which conform to the tag pattern prescribed in the filterTags section. Uploading a new image to the registry will fix this problem.</p>
|
<p>I'm looking for a way to create a live Kubernetes cluster without too much hassle.</p>
<p>I've got a nice HP server, which could run a few VM's with kubernetes on top. The reason for VM's is to isolate this from the host machine. Ideally, the VMs should only run containerd and kubelet and are essentially disposable ... | <p>I have tried a lot of tools to train for the CKAD certification. For my usage, the better option for a local cluster was k3s and multipass (for online clusters, I have used Civo). Both are very fast to proceed their respective tasks, so it allows me to create clusters at will and dispose them to be able to work on c... |
<p>I'm running kubernetes 1-21-0 on Centos7. I've set up a keycloak service to test my ingress controller and am able to access the keycloak on the host url with the keycloak port like <code>myurl.com:30872</code>. These are my running services:</p>
<pre><code>NAMESPACE NAME TYPE ... | <p>You have to specify <code>31110</code> port because your nginx ingress is set up with <code>NodePort</code> which means kubernetes listens to this port and all traffic that goes here is redirected to <code>nginx-ingress-controller</code> pod.</p>
<p>Depending on your setup and goals, this can be achieved differently... |
<p>Is there any way I can have an AWS deployment using kubernetes where I have a variable and scalable number of pods for my app BUT the environment on the VM is different for a single host?</p>
<p>Basically I want that one of my pods doing a task that no of the other pods will do all the time. I am planning to control... | <p>You can have multiple deployments, however if you are in need of <code>uniqueness</code> between the pods, you should consider <code>statefulsets</code> over deployments. However, deciding between <code>statefulset</code> and <code>deployment</code> is <strong>mostly decided by the type of the application and it is ... |
<p>I've got a Next.js app which has 2 simple <code>readiness</code> and <code>liveness</code> endpoints with the following implementation:</p>
<pre><code>return res.status(200).send('OK');
</code></pre>
<p>I've created the endpoints as per <a href="https://nextjs.org/docs/api-routes/introduction" rel="noreferrer">the a... | <p>Error tells you: <code>Client.Timeout exceeded while awaiting headers</code>. Meaning the TCP connection is established (not refused, nor timing out).</p>
<p>Your liveness/readiness probe timeout is too low. Your application doesn't have enough time to respond.</p>
<p>Could be due to CPU or memory allocations being ... |
<p>I'm new to Kubeflow and k8s. I have setup a single node k8s cluster and installed Kubeflow on this. I'm now trying the 'conditional pipeline' simple example from "Kubeflow for Machine Learning" book but I am getting "cannot post /apis/v1beta1/experiments" error ...</p>
<pre><code>Reason: Not Foun... | <p>I've made some progress. However, issues are not fully resolved but I can at least proceed with client creation, do health check, list existing pipelines.</p>
<p>I could find ml-pipeline service is running on following internal IP:</p>
<p>kubeflow service/ml-pipeline ClusterIP 172.19.31.22... |
<p>I am trying to use the --tmpfs flag from the docker run command in the Kubernetes YAML file but could not find the way.</p>
<pre><code>sudo docker run --name=ubuntu-gnome -d --rm \
--tmpfs /run --tmpfs /run/lock --tmpfs /tmp \
--cap-add SYS_BOOT --cap-add SYS_ADMIN \
-v /sys/fs/cgroup:/sys/fs/cgroup \
-p 590... | <p>You're looking for an emptyDir volume, such as the following:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: demo
spec:
containers:
- name: container
...
volumeMounts:
- mountPath: /tmp
name: tmp
subPath: tmp
- mountPath: /run
name: tmp
subPath: run
- mountP... |
<p>I am trying to copy files from a <strong>Kubernetes</strong> pod to a <strong>GCP Bucket</strong>.
I can get the path of my file, but I was wondering if I want to do this programmatically using python, how can I do this.</p>
<p>I get my buckets using <code>gcsfs</code>. How can I copy a file in my program without us... | <p>I need to agree with the comment made by @anemyte:</p>
<blockquote>
<p>There is <a href="https://stackoverflow.com/questions/59703610/copy-file-from-pod-to-host-by-using-kubernetes-python-client">this question</a> about how to copy a file from a pod. You can download it and then use your code to upload it to the buc... |
<p>The cluster nodes are on-prem vmware servers, we used rancher just to build the k8s cluster.</p>
<p>Built was successful, when trying to host apps that are using PVC we have problems, the dynamic volume provisioning isn't happening and pvc are stuck in 'pending' state.</p>
<p>VMWare storage class is being used, we g... | <p>The whole thing is about just the path defined for the storage end, in the cloud config yaml the PATH was wrong. The vpshere admins gave us the PATH where the vm
's residing instead they should have given the path where the Storage Resides.</p>
<p>Once this was corrected the PVC came to bound state.</p>
|
<p>I'm currently dealing with this situation.</p>
<p>Whenever I create multi-node cluster using Minikube, when I stop it and restart it again. It will lose track of the "middle" nodes, e.g. I create 4 nodes: <code>m1</code>, <code>m2</code>, <code>m3</code>, <code>m4</code>; by some reason Minikube loses trac... | <p>There seems to be some issue with minikube v1.20.0 and it also happens on linux with kvm2 driver (my setup) so it is not OS or driver specific.</p>
<p>It also happens on minikube v1.21.0, although it doesn't happen until stopped second time. After the first stop and start all seems to work fine but after second stop... |
<p>I have read a few documentations and figured out how to set up readiness and liveness endpoints with Actuator, like <a href="https://spring.io/blog/2020/03/25/liveness-and-readiness-probes-with-spring-boot" rel="noreferrer">this</a> one. But I am not able to figure out how to set-up the endpoint for the 'startup' pr... | <p>Spring boot does not expose a separate endpoint for the startup probe. You could use the liveness probe for this use case as well.
The reasoning to have a different probe in kubernetes is to enable a long timeout for the initial startup of the application, which might take some time. After the first successful start... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.