prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I have a parent chart which contains 4 subcharts, out of these I want to deploy the 1 specific subchart to different namespace and all the template files in that subchart are referring to <code>{{ .Release.Namespace. }}</code>. Is their any way to modify the <code>.Release.Namespace.</code> of subchart from the pare... | <p>I don't believe this is possible using vanilla Helm and charts you don't control.</p>
<p>When a chart depends on a subchart, there's fairly little that it's possible to customize. The parent chart can provide a default set of values for the subchart, but nothing computed, and those can be overridden by the person r... |
<p>I want to collect docker container logs, By default, log files will be deleted when removing container. It cause several logs lost each time i update my service. How to keep log files after removing containers?
Or, Is there another way to collect all logs from containers without losing?</p>
| <p>There will be two situations:</p>
<ul>
<li>If your logs are the stdout or stderr, you can save them before removing the container:</li>
</ul>
<pre class="lang-sh prettyprint-override"><code>docker logs CONTAINER_ID > container.log
</code></pre>
<ul>
<li>If your logs are stored in some files, in this case, you can... |
<p>we successfully configured the <a href="https://learn.microsoft.com/en-us/azure/key-vault/general/key-vault-integrate-kubernetes" rel="nofollow noreferrer">CSI Driver for Azure Kubernetes Services</a>. This allows us to pull in secrets from Azure Key Vault as "files" in our Pods (in our AKS Kubernetes clu... | <p>It turns out .Net core has exactly what is needed for this (although a little underdocumented IMHO) :</p>
<pre><code>config.AddKeyPerFile("/app/secrets", optional: true);
</code></pre>
<p>(see also : <a href="https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#... |
<p>In my project I have to create a kubernetes cluster on my GCP with an External Load Balancer service for my django app. I create it with this <code>yaml</code> file:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: mydjango
namespace: test1
labels:
app: mydjango
spec:
ports:
- name: http
... | <p>I whole wholeheartedly agree with the answer provided by @guillaume blaquiere.</p>
<p>You should use following guide to have the <code>HTTPS</code> connection to your Django.</p>
<p>I would also like to add some additional information/resources to the whole question.</p>
<hr />
<p>Addressing the following statement:... |
<p>I heard that statefulset is suitable for database.
But StatefulSet will create different pvc for echo pod.
If I set the replicas=3.then I get 3 pod and 3 different pvc with different data.
For database users,they only want a database not 3 database.
So Its clear we should not use statefulset in this situation.
But w... | <p>A StatefulSet does three big things differently from a Deployment:</p>
<ol>
<li>It creates a new PersistentVolumeClaim for each replica;</li>
<li>It gives the pods sequential names, starting with <code>statefulsetname-0</code>; and</li>
<li>It starts the pods in a specific order (ascending numerically).</li>
</ol>
<... |
<pre><code> <hz:properties>
.
.
<hz:property name="service-label-name">
${com.app.hazelcast.service.label.name:app}
</hz:property>
<hz:property name="service-label-value">
${com.app... | <p>Please set <code>service-port</code> to <code>5701</code> in order to avoid Hazelcast communicating with <code>8080</code>.</p>
<p>Read more at <a href="https://github.com/hazelcast/hazelcast-kubernetes#hazelcast-configuration" rel="nofollow noreferrer">Hazelcast Kubernetes: Hazelcast Configuration</a>.</p>
|
<p>How to do a canary upgrade to existing istio customised setup.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>We have existing customised setup of istio 1.7.3 (installed using istoctl method and no revision set for this) for AKS 1.18.14.</li>
<li>Now we need to upgrade to istio 1.8 with no downtime or minimal.</... | <ol>
<li><p>No. You should go through <a href="https://istio.io/latest/news/releases/1.8.x/announcing-1.8/change-notes/" rel="nofollow noreferrer">changelog</a> and <a href="https://istio.io/latest/news/releases/1.8.x/announcing-1.8/upgrade-notes/" rel="nofollow noreferrer">upgrade notes</a>. See what's new, what's cha... |
<p>Is it possible to use pipe output as input for grep or git grep? The data im trying to pass to grep/git grep is the following</p>
<pre><code> kubectl get namespace -o name -l app.kubernetes.io/instance!=applications | cut -f2 -d "/"
argocd
default
kube-node-lease
kube-public
kube-system
nsx-system
pks-... | <p>The problem is that (as your screenshot shows) the result is multiple terms which I'm guessing you want to be <em>OR</em>-ed together, and not searching for the first term in the files identified by the last terms (which is what the current xargs command does)</p>
<p>Since OR in regex is via the <code>|</code> chara... |
<p>I am building an application which should execute tasks in a separate container/pods.
this application would be running in a specific namespace the new pods must be created in the same namespace as well.</p>
<p>I understand we can similar via custom CRD and Operators, but I found it is overly complicated and we need... | <p>Yes, this is certainly possible using a <code>ServiceAccount</code> and then connecting to the API from within the Pod.</p>
<ul>
<li><p>First, create a <code>ServiceAccount</code> in your namespace using</p>
<pre><code>kubectl create serviceaccount my-service-account
</code></pre>
</li>
<li><p>For your newly created... |
<p>I understand kubectl gets the kubeconfig file in the order</p>
<ol>
<li>command line option <code>--kubeconfig</code></li>
<li>environment variable <code>KUBECONFIG=</code></li>
<li>default path <code>~/.kube/config</code></li>
</ol>
<p>But is there a way to get the kubeconfig path/file details from the kubectl whic... | <p><strong>Question: But is there a way to get the kubeconfig path/file details from the kubectl which one being currently used?</strong></p>
<p>Yes, you can run any <code>kubectl</code> command with <code>verbose</code> level 6+ to see the <code>kubeconfig</code> in use.</p>
<pre><code>kubectl get pod -v6 ... |
<p>From the <a href="https://github.com/bazelbuild/rules_docker/pull/310/files" rel="nofollow noreferrer">PR</a> that implemented empty_dirs, it seems there's support for defining dir owners (with the names argument) and mode into the add_empty_dir method of TarFile class.</p>
<p>But the container_image rule (and conta... | <p>In a BUILD file, the attribute you're looking for is <code>ownername</code>. See the <a href="https://github.com/bazelbuild/rules_pkg/blob/main/pkg/docs/reference.md#pkg_tar" rel="nofollow noreferrer">pkg_tar reference documentation</a> documentation for more details. Also, I don't think you can pass it directly to ... |
<p>I have a helm chart and I want to add it to my gitlab repository. But when I run:</p>
<pre><code>helm repo add repo_name url
</code></pre>
<p>I am getting the following error:</p>
<pre><code>Error: looks like "https://gitlab.<domain>.com/group/infra/repo/helm/charts/" is not a valid chart repository... | <p>It looks like you want to use the helm chart that is hosted on the gitlab. Unfortunately, it won't work as you want it to. As <a href="https://stackoverflow.com/users/1518100/lei-yang">Lei Yang</a> mentioned well in the comment:</p>
<blockquote>
<p><code>helm</code> repo and <code>git</code> repo are different thing... |
<p>I have a PostgreSQL cluster with three nodes with Patroni. The cluster manages a very high workload and for this reason, it runs in production on bare metal machines.
We need to migrate this infrastructure to Kubernetes (for several reasons) and I am doing some performance tests executed with PgBench. First I compar... | <p>this is a great question and it also took me some time earlier this year to find out by experience.</p>
<p>It is important to understand that <strong>request have no actual effect on the resource usage of containers</strong>. You can check by connecting to your Server and running <code>htop</code> or <code>kubectl t... |
<p>my current setup involves Helm charts,Kubernetes</p>
<p>I have a requirement where i have to replace a property in configMap.yaml file with an environment variable declared in the deployment.yaml file</p>
<p>here is a section my configMap.yaml which declares a property file</p>
<pre><code>data:
rest.properties: |... | <p>confd will give you the solution, you can tell it to look at the configmap and change all the environment variables that is expected by the file to the env values that had been set.</p>
|
<p>I have two <code>kind: Deployment</code> in my <code>yaml</code> file
The main one</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: accounts-management-service
labels:
app: accounts-management-service
spec:
replicas: $($env:WEB_REPLICAS)
selector:
matchLabels:
app: accounts-m... | <p>Deployment manage the replicas count basically for any workload configured.</p>
<p>Deployment in the background uses the <code>Replicasets</code> or <code>ReplicationController</code>.</p>
<p>So if in deployment you have the desired replica 1 it will get managed by deployment.</p>
<p>Deployment continuously checks f... |
<p>I'm running Jenkins on Kubernetes with a dynamic slave pod provisioning setup.</p>
<p>It used to work well for a long time but somehow started to giving this issue from yesterday.</p>
<p>This is the log that I'm getting from the slave pods</p>
<pre><code>Warning: SECRET is defined twice in command-line arguments and... | <p>Self reply:</p>
<p>I was able to provision slave pods again after I upgraded my Jenkins and Kubernetes plugin to the latest.</p>
<p>The version I'm at is Jenkins 2.289.1, and Kubernetes plugin 1.30.0.</p>
|
<p>By default most people seem to avoid running anything on the masters. These nodes are less likely to be re-provisioned or moved around than the rest of the cluster. It would make them a perfect fit for ingress controllers.</p>
<p>Is there any security and/or management implications/risks in using the masters as ingr... | <p>As always, the risk is that if your Ingress Controller eats all your IOPS (or memory or CPU but in this case it would probably be IOPS) then your control plane can go unavailable, leaving you fewer ways to fix the problem.</p>
|
<p>I have two <code>kind: Deployment</code> in my <code>yaml</code> file
The main one</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: accounts-management-service
labels:
app: accounts-management-service
spec:
replicas: $($env:WEB_REPLICAS)
selector:
matchLabels:
app: accounts-m... | <p>Basically Deployments find out which pods they are managing by labels defined in the deployments spec section as well as under .spec.template.spec section.</p>
<p>Deployments check for running pods that match the supplied labels while figuring out whether the available replica count is the desired replica count.</p>... |
<p>Need to understand why pods are automounting the service accounts secret.</p>
<p>If we disable the automout of service account, will this affect any operation of our application which is already have service account specified in the pod spec part, but automount of the service account is not disabled.</p>
| <p>How to disable automounting of the service account is explained in the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server" rel="nofollow noreferrer">linked documentation</a>:</p>
<blockquote>
<p>In version 1.6+, you ca... |
<p>I have two <code>kind: Deployment</code> in my <code>yaml</code> file
The main one</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: accounts-management-service
labels:
app: accounts-management-service
spec:
replicas: $($env:WEB_REPLICAS)
selector:
matchLabels:
app: accounts-m... | <p>If you want to figure out which pods were created by specified deployment, you could use <code>kubectl get pods</code> command with <code>--selector</code> option to filter these pods.</p>
<p>The labels you defined in deployment templates were <code>app=accounts-management-service</code> and <code>app=accounts-manag... |
<p>I'm trying to encode a database string using base64 on the command line in linux.</p>
<p>Once I do I add the value to a secret in kubernetes but my application is failing to connect to the database due to the db string not being accepted. There seems to be a newline getting added when I check the value in lens and t... | <p>You can fix those easy with</p>
<pre><code>echo -n "string" | base64
</code></pre>
<p>"echo -n" removes the trailing newline character.</p>
<p>You can also see my last answer i gave to following Question
<a href="https://stackoverflow.com/questions/68032810/kubernetes-secrets-as-environment-varia... |
<p>I am working in microservices architecture. Every service has few long-running tasks (data processing, report generation) which can take up to 1-2 hours. We are using Kafka for the queue.
How to handle cases where pod restart or any deployment happens just before the completion of the task? The task will start again... | <p>you can use the Kubernetes jobs to do these types of tasks so as soon as the task is done Kubernetes will auto-delete the pods also.</p>
<p>Jobs are also configurable and will be running standalone so if you will deploy the job again it fetches the data from Kafka and jobs new job will start.</p>
|
<p>I'm writing a program that can deploy to Kubernetes.
The main problem that I'm facing is "Offline mode" when I disconnect the computer from the router Kubernetes stops working because it needs the default route in the network interfaces.</p>
<p>Does anyone know how to set up Kubernetes so it will work with... | <p>Few Kubernetes installers support air-gapped installation and doing it yourself is way out of scope for a new user. If this is for work, you'll want to talk to some of the major commercial distros (OpenShift I'm pretty sure has an air-gap installer, probably also Tanzu) but for new-user home use you should consider ... |
<p>I have a pod and NodePort service running on GKE.</p>
<p>In the Dockerfile for the container in my pod, I'm using <code>gosu</code> to run a command as a specific user:</p>
<p>startup.sh</p>
<pre><code>exec /usr/local/bin/gosu mytestuser "$@"
</code></pre>
<p>Dockerfile</p>
<pre><code>FROM ${DOCKER_HUB_PUB... | <p>When you run a useradd inside the container (or as part of the image build), it adds am entry to the <code>/etc/passwd</code> <em>inside the container</em>. The uid/gid will be in a shared namespace with the host, unless you enable user namespaces. However the mapping of those ids to names will be specific to the fi... |
<p>I have a pod and NodePort service running on GKE.</p>
<p>In the Dockerfile for the container in my pod, I'm using <code>gosu</code> to run a command as a specific user:</p>
<p>startup.sh</p>
<pre><code>exec /usr/local/bin/gosu mytestuser "$@"
</code></pre>
<p>Dockerfile</p>
<pre><code>FROM ${DOCKER_HUB_PUB... | <p>When you <code>RUN adduser</code>, it assigns a user ID in the <em>image's</em> <code>/etc/passwd</code> file. Your script launches the process using that numeric user ID. When you subsequently run <code>ps</code> from the host, though, it looks up that user ID in the <em>host's</em> <code>/etc/passwd</code> file,... |
<p>Defined labels in temp with top of the same deployment.yml file-</p>
<pre><code>{{- define "chart.labels" }}
version: v1.0
method: http
internet: enabled
{{- end }}
</code></pre>
<p>I have deployment.yml file in template folder-</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: a... | <p>You need to follow sane indentation. You have:</p>
<pre><code>{{- define "chart.labels" }}
version: v1.0
method: http
internet: enabled
{{- end }}
</code></pre>
<p>Note there is no double space in chart.labels definition below.</p>
<p>The below works:</p>
<pre><code>{{- define "chart.labels&quo... |
<p>I am trying to connect a pod which is running in <strong>Kind</strong> with a local Postgres database which runs in a Docker container. I tried to add the following service but the pod still cannot connect when using the DNS name <code>postgres.dev.svc</code>.</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
... | <p>First of all it's not the correct usage of the <code>ExternalName</code> service type. Although putting an IP address in <code>externalName</code> field it's perfectly feasible i.e. the resource will be created and you won't get any complaint from kubernetes API server. ❗<strong>But this value is treated as a domai... |
<p>I have some microservices deployed on Google Kubernetes Engine composed of 3 "e2-medium" nodes with 10GB of disk each.</p>
<p>Every time I perform a new deployment of the services I get the following load shedding event on the nodes:</p>
<pre><code>Stopping container alice
The node was low on resource: ep... | <p>In order to get a sense of your of your ephemeral-storage, you may check the following steps:</p>
<p>Menu>Monitoring>Metrics Explorer></p>
<p>Resource type: kubernetes node</p>
<p>Metric: Ephemeral Storage</p>
<p>Also have a look at the graph in the following <a href="https://cloud.google.com/kubernetes-eng... |
<p>When I am trying to create an ingress resource for my Kubernetes cluster(ingress controller is already created), Ingress resource/rules are creating and I am able to see in the kubectl get ing.
But when I do kubectl describe, I am seeing a error:</p>
<blockquote>
<p>Default backend: default-http-backend:80 (<erro... | <p>You may want add <code>defaultBackend</code> as a part of your Ingress definition like so</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: default-backend-ingress-example
spec:
defaultBackend:
service:
name: hotel-svc
port:
number: 80
</code></pre>
<p>Environm... |
<p>Assuming I have set <code>resource.limits.ephemeral-storage</code> for containers in a Kubernetes cluster (using Docker), and the following Docker daemon.json logging configuration on the worker nodes:</p>
<pre><code>{
"log-driver": "json-file",
"log-opts": {
"max-size"... | <p>Based on the function <a href="https://github.com/kubernetes/kubernetes/blob/d88fadbd65c5e8bde22630d251766a634c7613b0/pkg/kubelet/stats/helper.go#L344" rel="nofollow noreferrer">calcEphemeralStorage</a> from <a href="https://github.com/kubernetes/kubernetes/tree/d88fadbd65c5e8bde22630d251766a634c7613b0" rel="nofollo... |
<p>We are running a Spring Boot app in a k8s pod that is hosted behind an NGINX ingress with a EC2 load balancer. Our app occasionally needs to send a very large file (10/20 GB). We have observed that this operation occasionally times out when querying through the ingress, but does not timeout when queried directly. To... | <p>I had a similar issue with one of my SpringBoot Apps and the issue was with the Springboot configuration in the application.properties file.</p>
<pre><code>spring:
mvc:
async:
request-timeout: 3600000
</code></pre>
<p>Reference: <a href="https://stackoverflow.com/a/43496244/2777988">https://stackoverflow... |
<p>I am reaching out for ideas on the following topic. Imagine that we have 1 application. This application needs to execute an interval (cron) job. It doesn't make sense to execute however on all instances of the app. It needs to elect just one of X and execute the task, then on the next execution it would again pick ... | <p>Job pattern is what you are looking for. There are many examples in official <a href="https://kubernetes.io/docs/tasks/job/" rel="nofollow noreferrer">Kubernetes Documentation/Tasks/Run Jobs</a></p>
<p>Your need seems to match with working with a queue. In this example, as each pod is created, it picks up one unit o... |
<p>Asked in <a href="https://stackoverflow.com/questions/65358738/is-there-any-way-to-configure-skaffold-to-build-images-on-my-local-docker-daemon/65395223?noredirect=1#comment120508501_65395223">a different question</a>:</p>
<blockquote>
<p>why does <code>skaffold</code> need two tags to the same image?</p>
</blockquo... | <p>During deployment, Skaffold rewrites the image references in the Kubernetes manifests being deployed to ensure that the cluster pulls the the newly-built images and doesn't use stale copies (read about <code>imagePullPolicy</code> and some of the issues that it attempts to address). Skaffold can't just use the comp... |
<p>I have a container running in a GKE autopilot K8s cluster. I have the following in my deployment manifest (only relevant parts included):</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
resources:
requests:
memory: "250Mi"... | <p>If the resources that you've requested are following:</p>
<pre><code> memory: "250Mi"
cpu: "512m"
</code></pre>
<p>Then they are not compliant with the minimal amount of resources that <code>GKE Autopilot</code> will assign. Please take a look on the documentation:</p>
... |
<p>I have a deployment (starterservice) that deploys a single pod with a persistent volume claim. This works. However restart fails:</p>
<pre><code>kubectl rollout restart deploy starterservice
</code></pre>
<p>The new pod is started before the old one has terminated and it cannot attach the volume (Multi-Attach error ... | <p>You need to set deployment strategy = recreate.</p>
<pre><code>spec:
strategy:
type: Recreate
</code></pre>
<p>The difference between the <code>Recreate</code> strategy compared to <code>RollingUpdate</code> (default) is that <code>Recreate</code> will terminate the old pod before creating new one while <code>... |
<p>The issue I have is that <code>kubeadm</code> will never fully initialize. The output:</p>
<pre><code>...
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s pass... | <p>You can create a VPC endpoint for accessing Ec2 (service name - com.amazonaws.us-east-1.ec2), this will allow the kubelet to talk to Ec2 without internet and fetch the required info.</p>
<p>While creating the VPC endpoint please make sure to enable private DNS resolution option.</p>
<p>Also from the error it looks l... |
<p>I am trying to deploy a <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/" rel="nofollow noreferrer">PodDisruptionBudget</a> for my deployment, but when I deploy this example</p>
<pre><code>apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: example-pdb
spec:
minAvailable: 1
... | <p>As mentioned by <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget" rel="noreferrer">Specifying a PodDisruptionBudget</a>:</p>
<blockquote>
<p>A <code>PodDisruptionBudget</code> has three fields:</p>
<ul>
<li><p>A label selector <code>.spec.selector</code> to sp... |
<p>I'm using the <a href="https://github.com/kubernetes-client/javascript" rel="nofollow noreferrer">Javascript Kubernetes Client</a> and I'm trying to read all resources from a custom resource definition. In particular I want to run <code>kubectl get prometheusrule</code> (prometheusrule is my CRD).</p>
<p>I couldn't ... | <p>You can use the <a href="https://github.com/kubernetes-client/javascript/blob/master/src/gen/api/customObjectsApi.ts#L1491" rel="nofollow noreferrer">listNamespacedCustomObject</a> function. This function has four required arguments as described below:</p>
<ul>
<li><strong>group</strong> - the custom resource's grou... |
<p>I am using argo events/sensors to create a Kubernetes Job , the sensor gets triggered correctly but it is giving me error "the server could not find the requested resource"</p>
<p>Here is my sensor.yaml</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: exp-webhook
spec:
templ... | <p>So the error was , instead of</p>
<pre><code>resource: Job
</code></pre>
<p>it should be</p>
<pre><code>resource: jobs
</code></pre>
<p>That fixed this issue.</p>
|
<p>I got this error messages in my pod, using this command:</p>
<pre><code>kubectl create deploy fastapi-helloworld --image=juanb3r/fastapi-multi:latest
</code></pre>
<p>I don´t know why the container can't be created.</p>
<p><a href="https://i.stack.imgur.com/qXV6r.png" rel="nofollow noreferrer"><img src="https://i.st... | <p>I just needed to install this:</p>
<pre><code>zypper install apparmor-parser
</code></pre>
<p>on my vagrant</p>
|
<h3>Take this scenario:</h3>
<p><a href="https://i.stack.imgur.com/wSqHg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wSqHg.png" alt="enter image description here" /></a></p>
<p>I want to delete every <strong>running</strong> pod <strong>automatically</strong> using the <strong>Commandline</strong... | <p>You can use <code>awk</code> to filter pod names based on their <code>STATUS==RUNNING</code>. Below code will delete all(in Running state) the pods from <code>$NAMESPACE</code> namespace.</p>
<pre><code> kubectl get pod -n $NAMESPACE|awk '$3=="Running"{print $1}'
</code></pre>
<p>Example:</p>
<pre><code>f... |
<p>I created a cluster on an Ubuntu server using this command:</p>
<pre><code>> kubeadm init --cri-socket /var/run/dockershim.sock --control-plane-endpoint servername.local --apiserver-cert-extra-sans servername.local
</code></pre>
<p>I added Calico like this:</p>
<pre><code>> curl https://docs.projectcalico.org/... | <p>I had the same issue, in my case adding <code>--apiserver-advertise-address=<server-address></code> parameter was the solution.</p>
|
<p>I used 2 pods and service on my Kubernetes cluster. They are Redis and my nodeJs application. Also I used scaffold for dev environment.</p>
<p>I want to connect Redis from my nodeJs application. I set environment variable on my nodeJs_app.yaml file for connection to Redis.</p>
<p>My nodeJs_app.yaml file look like:</... | <p>Error occurs because you are trying to connect to redis database with NaN instead of number (number indicates database, 1-16). Check your code, because in some place you put NaN instead of number while trying to connect to redis database.</p>
<p><a href="https://stackoverflow.com/questions/35621324/how-to-create-own... |
<p>I tried to do a deployment for some applications in spring dataflow,
Routinely each diploi takes a few minutes and passes successfully or fails.
But this time the diplomacy took longer than usual. At one point I pressed "undeploy"
Since the system does not respond.
Under Stream all flickers in UNKNOWN mode... | <p>OK,
I seem to have been able to solve the problem.</p>
<p>Due to the CrashLoopBackOff status I realized that the system is unable to pull the image or the image is corrupt.</p>
<p>I have overwritten all the images in EKS that are associated with the project.</p>
<p>I changed the problematic <code>skipper_status.stat... |
<p>I have a spring boot application ( set of services ) deployed in k8s cluster. For micromter metrics I need to dynamically get the namespace this application runs so that i can add that as tag in metrics. Following is my custom tag creation bean</p>
<pre><code>@Bean
public MeterRegistryCustomizer<MeterRegistry>... | <p>Kubernetes has a feature for accessing such fields, it's called the <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="nofollow noreferrer">Downward API</a> .</p>
<p>With the help of the Downward API the pod's namespace can be accessed by defining an e... |
<p>I have a deployment that deploys a single pod with a persistent volume claim. If I switch off the node it is running on, after a while k8s terminates the pod and tries to spin it up elsewhere. However the new pod cannot attach the volume (Multi-Attach error for volume "pvc-...").</p>
<p>I can manually dele... | <p>According to <a href="https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/" rel="nofollow noreferrer">the docs</a>:</p>
<blockquote>
<p>A Pod is not deleted automatically when a node is unreachable. The
Pods running on an unreachable Node enter the 'Terminating' or
'Unknown' state after a ... |
<p>I often run tasks like:</p>
<ul>
<li>Read the log of the service <code>X</code>
or</li>
<li>Attach a shell inside the service <code>Y</code></li>
</ul>
<p>I always use something in my history like:</p>
<pre><code>kubectl logs `kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep <partial_n... | <p>added to my <code>.zshconfig</code></p>
<pre><code>sshpod () {
kubectl exec --stdin --tty `kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep ${1} | head -n 1` -- /bin/bash
}
</code></pre>
<p>usage</p>
<p><code>sshpod podname</code></p>
<p>this</p>
<ol>
<li>finds all pods</li>
<li>gr... |
<p>I need to block pods communication to each other but I failed to do it.<br />
I installed <a href="https://www.weave.works/docs/net/latest/kubernetes/kube-addon/" rel="nofollow noreferrer">weave plug-in</a> on my <strong>Minikube</strong> (v1.21.0), and started two pods in the same namespace:</p>
<pre><code> kubectl... | <p>When you specify the Egress and Ingress resources, you do not specify the network protcol. In the <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">kubernetes docs</a> you can see that the protocol can be specified too. Your kubernetes cluster defaults your... |
<p>When we are trying to extract a large table from a sql server, we are getting an error:</p>
<pre><code>Containerized process terminated by signal 119.
</code></pre>
<p>As per my understanding, kubernetes containers have a limit of how many GB is allocated to memory for each POD.
So suppose if we have a limitation on... | <blockquote>
<p>A Container can exceed its memory request if the Node has memory available. But a Container is not allowed to use more than its memory limit. If a Container allocates more memory than its limit, the Container becomes a candidate for termination. If the Container continues to consume memory beyond its li... |
<p>So in my environment i am using Docker and Kubernete ,now i have to import a certificate in Pods Java Keystore .
But my Container running as a <code>NON-ROOT</code> user .When i am trying to import the certificate to Java Keystore its failing as to accessing Java Keystore user have to be root user only.</p>
<pre><co... | <p>As per the shared information, you are using WSO2 MI and trying to generate a token from the Mediation sequence with Keycloak. In such a case, it is not required to add the Keycloak's cert to the <code>cacerts</code> of the JDK. You can make use of the WSO2 MI's <code>client-truststore.jks</code> to import the certs... |
<p>I'm not sure if I have a configuration error or I just don't know where to look but I can't seem to find where my files are being stored with these configurations</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: tmp-storage
spec:
storageClassName: manual
capacity:
storage: 2Gi
accessM... | <p><strong>Here how I found it on my Mac:</strong></p>
<p><strong>1.</strong> Create PV, PVC, Deployment as you've mentioned. I've just change the PV <code>spec.hostPath.type</code> to <code>DirectoryOrCreate</code></p>
<p><strong>2.</strong> Create a file on the volume using pod shell:</p>
<pre><code>kubeclt exec -ti ... |
<p>I'm trying to configure Kubernetes Dashboard using NGINX INGRESS but for some reason I'm getting a 503 error.</p>
<p>I'm running Kubernetes locally in my macbook with docker desktop.</p>
<p>First thing I did was apply/install NGINX INGRESS CONTROLLER</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/... | <p>I was able to fix this issue.
In my ingress ymal file I had a typo. Port number was set to <code>433</code> instead of <code>443</code></p>
<p>As soon as I made and applied that change, I was able to access the dashboard login page with: https://localhost and http://localhost</p>
|
<p>I have a use case where there will be telecom application running within the several pods(every pod will host some configured service for billing for specific client) and this expects the service to store the state so obvious choice is statefulset .
Now the problem is I need to use iscsi as storage in the backend fo... | <p>Yes you are right <code>statefulset</code> is option however you might can also use the <code>deployment</code>.</p>
<p>You have not mentioned which <code>cloud provider</code> you will be using but still sharing one <strong>note</strong> : <code>iscsi storage</code> is not optimized with <strong>GKE cotnainer OS</s... |
<p>I want to get all events that occurred in Kubernetes cluster in some python dictionary using maybe some API to extract data from the events that occurred in the past. I found on internet that it is possible by storing all data of Kube-watch on Prometheus and later accessing it. I am unable to figure out how to set i... | <p>I'll describe a solution that is not complicated and I think meets all your requirements.
There are tools such as <a href="https://github.com/heptiolabs/eventrouter" rel="nofollow noreferrer">Eventrouter</a> that take Kubernetes events and push them to a user specified sink. However, as you mentioned, you only need ... |
<p>I'm learning Kubernetes over Minikube.
My demo consists of a Flask API and a MySQL Database.
I made all the <em>.yaml</em> files but something strange happens with services of the deployments...</p>
<p>I cannot communicate with the API <strong>externally</strong> (neither with Postman, Curl, browser...)</p>
<p>By &q... | <p>I <strong>did not</strong> found any solution to my problem.
I run Kubernetes with Minikube on Vmware Fusion on my Mac with BigSur.</p>
<p>I found out that the SAME EXACT deployment works on a machine with ubuntu installed, OR on a virtual machine made with VirtualBox.</p>
<p>Actually seems that this is a known issu... |
<p>I am trying to setup RabbitMQ Cluster on K8S Cluster (CentOS 7) but it errored with</p>
<pre><code>2021-07-01 16:30:10.048 [error] <0.273.0> Failed to fetch a list of nodes from Kubernetes API: {failed_connect,[{to_address,{"kubernetes.default",443}}, {inet,[inet],nxdomain}]}
</code></pre>
<p>I tried... | <p>I found the following link from SO which helped me to resolve the issue <a href="https://stackoverflow.com/questions/45805483/kubernetes-pods-cant-resolve-hostnames">KubeDNS Masquerade</a></p>
<pre><code>firewall-cmd --list-all
...
masquerade: yes
</code></pre>
<p>Enable if it's "no":</p>
<pre><code>f... |
<p>I am following the <code>Installation Instructions</code> from <a href="https://argoproj.github.io/argo-cd/getting_started/#3-access-the-argo-cd-api-server" rel="nofollow noreferrer">https://argoproj.github.io/argo-cd/getting_started/#3-access-the-argo-cd-api-server</a>
and even though the service type has been chan... | <p>I managed to successfully login argocd-server by the following</p>
<pre><code>kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
argoPass=$(kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d... |
<p>I just installed bitnami/wordpress image using helm. Is it possible to sync it with git and when I will change some files in this git repository to update kubernetes pods?</p>
<p>I mean update Wordpress source code because Im modyficating plugins in wp-content/plugins dir.</p>
| <p>You can use <a href="https://argo-cd.readthedocs.io/en/stable/" rel="nofollow noreferrer">ArgoCD</a> or <a href="https://fluxcd.io/" rel="nofollow noreferrer">Flux</a> to automate this types of GitOps workflow. Check their documentation. They are pretty powerful and popular for GitOps in Kubernets.</p>
|
<p>I have a simple restful django project that return 'hello world' when you GET localhost:8000.
I want to run it using microk8s.
Using following instruction (<a href="https://microk8s.io/docs/registry-images" rel="nofollow noreferrer">https://microk8s.io/docs/registry-images</a>) i created the image and apply my yaml ... | <p>It's due to you are using the <strong>ClusterIP</strong> which is only accessible internally from CLuster.</p>
<p>Here you require the <strong>Nginx</strong> ingress controller to expose the service. Or you can try with the Host IP once to connect with the service.</p>
<p>You can also try the command</p>
<pre><code>... |
<p>I am trying to setup RabbitMQ Operator and RabbitMQ Cluster on K8S cluster on bare metal using this <a href="https://www.rabbitmq.com/kubernetes/operator/using-operator.html#create" rel="nofollow noreferrer">link</a></p>
<p>K8S Cluster has got 1 master and 1 worker node</p>
<p>RabbitMQ Cluster pod log</p>
<p>[root@... | <p>I managed to resolve the issue after spending lot of time</p>
<p>I added the host <code>definition-server-0.definition-nodes.rabbitmq-system</code> to <code>/etc/hosts</code> file of RabbitMQ Cluster pod using <strong>hostAliases</strong></p>
<p>YAML to add <strong>hostAliases</strong> is given below</p>
<pre><code>... |
<p>Sometimes when I use helm charts, not all things I want to modify are usable with the given values. Is it practical to use kustomize to modify the rendered helm chart?<br />
So like this:<br />
chart -> helm template -> kustomize -> kubectl deploy</p>
| <p>We do use it sometimes. You can use Helm directly in Kustomize with the helmCharts plugin. In my example, <code>values-prod.yaml</code> has to be in the same directory as the <code>kustomization.yaml</code>. <code>namespace: custom-metallb</code> will override <code>namespace: metallb</code> for example.</p>
<pre><c... |
<p>I'm trying to capture some logs that are file-based in an application pod on GKE and view them from Google Cloud Logging.</p>
<p>For various reasons, these application logs are not sent to STDOUT or STDERR (since those logs are automatically sent to Cloud Logging). I have been suggested to implement a scripting solu... | <p>I’ve tried implementing the configuration you’ve implemented and faced the same issue. I then configured all sources to stream output to STDOUT and was able to view logs on the Cloud Logging dashboard.</p>
<p>Below are the sample configurations I’ve used.</p>
<p>Sample_map-config.yaml:</p>
<pre><code>apiVersion: v1
... |
<p>Goal is to terminate the pod after completion of Job.
This is my yaml file. Currently, my pod status is <strong>completed</strong> after running the job.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
# Unique key of the Job instance
name: example-job
spec:
template:
metadata:
name: example-... | <p>A job of a pod basically terminates itself after the main container of that pod finishes successful. If it returns a failure error code it will retry as many times as you specified in your backoffLimit.</p>
<p>So it seems as if your container does not terminate after it finishes whatever job it is supposed to do. Wi... |
<p>I am trying to configure an aws alb ingress for an existing cluster which already has nginx ingress configured. This is the resource file I'm using in nginx ingress which works fine.</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "stage-ingress-1"
namespace: "teststage... | <p>It is not regex. Its much more simple matching than that
you want.</p>
<pre><code>spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
- path: /*
backend:
serviceName:... |
<p>I am using a Nginx Ingress Controller in a Kubernetes Cluster. I've got an application within the cluster, which was available over the internet. Now I'm using the Ingress Controller to access the application, with the intent of showing some custom errors.</p>
<p>If i access the application (which is not written by ... | <p><strong>It could not achievable by using layer 7 ingress controller.</strong></p>
<p>If Ingress preserves the source IP then response will got directly from the app pod to the client, so the client will get a response from a IP:port different from what he connected to. Or even worse - client's NAT drops the response... |
<p>I have to setup a monitoring environment for my EKS cluster.
Prometheus is running on external node and I am trying to use node exporter daemonset for getting metrics.
But on prometheus when I see the targets I am not able to see any target instead of just local host.</p>
<p><strong>Kubernetes_sd_config block</stron... | <p>The logs you shared point to the problem:</p>
<pre><code>... unable to read authorization credentials file /etc/prometheus/token: open /etc/prometheus/token: no such file or directory"
</code></pre>
<p>The token file for in-cluster workloads is by default mounted at <code>/var/run/secrets/kubernetes.io/servicea... |
<p>I followed this instruction to set up a cert-manager on my EKS cluster <a href="https://cert-manager.io/docs/tutorials/acme/ingress/" rel="nofollow noreferrer">https://cert-manager.io/docs/tutorials/acme/ingress/</a>.</p>
<p>here is my ingress</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
... | <p>It's not working due you are using the staging URL in <code>cluster issuer</code> to verify the image.</p>
<p>Please try with the Production URL.</p>
<p>here a simple and proper example of Clusterissuer and ingress YAML (do note you were trying with staging API <a href="https://acme-staging-v02.api.letsencrypt.org/d... |
<p>I'm not sure if there is a ready condition in DaemonSet. By that, I mean all pods owned by that DaemonSet are ready.</p>
<p>I'm aware of <code>kubectl wait</code>, but it seems can not check the readiness of DaemonSet.</p>
| <p>Simpler method from <a href="https://starkandwayne.com/blog/silly-kubectl-trick-5-waiting-for-things-to-finish-up-2/" rel="nofollow noreferrer">https://starkandwayne.com/blog/silly-kubectl-trick-5-waiting-for-things-to-finish-up-2/</a> -></p>
<pre><code>kubectl rollout status daemonset \
rke2-ingress-nginx-cont... |
<p>I have a <strong>module</strong> definition as below:</p>
<p>===</p>
<p><strong>providers.tf</strong></p>
<pre><code>provider "kubernetes" {
#load_config_file = "false"
host = azurerm_kubernetes_cluster.aks.kube_config.0.host
username = azurerm_kubernetes_clu... | <p>I'm one of the maintainers of the Terraform Kubernetes provider, and I see this particular issue pretty often. As a former devops person myself, I empathize with the struggle I keep seeing in this area. It's something I would really love to fix in the provider, if it were possible.</p>
<p>The issue you're facing is ... |
<p>I have been getting more and more into k8s and I am trying some stuff on a personal VPS I have.
I have created a Deployment of a POD that uses another Service internally.
I would love to validate that these two services are being somewhat loadbalanced.</p>
<p>Here was my attempt to create this:
I have a simple servi... | <p>If I remember correctly, TCP load balancing was not working when using port forwarding. Try to run the script from a container inside k8s instead of doing port forwarding.</p>
|
<p>I want to connect to Neo4j database using my creds. I am tunneling into a machine and once that is done, I open my broswer at the port: <code>localhost:7474</code>.
I tried with both neo4j and bolt scheme to connect at the url:
<code>bolt://<node_ip>:7687</code> and <code>neo4j://<node_ip>:7687</code> bu... | <p>Perhaps you've already checked this, but if not, can you ensure that port <code>7687</code> is also forwarded. When I tunnelled via browser, my expectation was that <code>7474</code> would be sufficient, but it turned out that forwarding <code>7687</code> is also necessary.</p>
|
<p>I have a situation where i have an application for which i would like to run several set of instances configured differently. I guess from readying online, people would usually having several version of the same application in your clusters.</p>
<p>But let me somewhat describe the use case at the high level. The app... | <p>Helm supports this pretty straightforwardly.</p>
<p>In Helm terminology, you would write a <em>chart</em> that describes how to install one copy of your application. This creates Kubernetes Deployments and other manifests; but it has templating that allows parts of the application to be filled in at deploy time. O... |
<p>I feel a bit like an idiot but I cannot seem to get the logging working on persistent volumes when using the KubernetesExecutor and the freshly released official Helm chart.</p>
<p>After creating a simple <a href="https://github.com/marclamberti/webinar-airflow-chart/blob/master/pv.yaml" rel="nofollow noreferrer">PV... | <p>I assumed that using standard persistent volume approach was the easiest (I am still a k8s novice) I did not expect that setting up one using azure-file-storage-class (SC) was this easy. These mounts can be set up using 777 rights from the SC yaml file, not sure if this is the sole cure as I also set the uid/gid in ... |
<p>I am trying to set Gitlab runner to connect to Artifactory and pull images.My yml file to set RUnner looks like below :</p>
<p>gitlabUrl: <a href="https://gitlab.bayer.com/" rel="nofollow noreferrer">https://gitlab.bayer.com/</a><br />
runnerRegistrationToken: r*******-<br />
rbac:<br />
create: false<br />
serviceA... | <p>This is an example where my runner runs as docker container with an image having artifactory cli configured in it, so in your case your runner should have jfrog cli configured , next it needs an api key to access artifactory which you ll generate in artifactory and store in gitlab like below picture , exact path wou... |
<p>I am pulling my hair out here. I deployed my template, deleted it, and then I go to deploy it again without any changes and am getting the following error:</p>
<p>The Deployment "blog" is invalid: spec.template.metadata.labels: Invalid value: map[string]string(nil): <code>selector</code> does not match tem... | <p>You have two template block. I think thats the problem. Try this.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: blog
labels:
app: web
spec:
selector:
matchLabels:
app: web
replicas: 1
template:
metadata:
labels:
app: web
spec:
containers:
... |
<p>I am using the following kubectl command to get the Ingress host IP address after my Seldon Deployment is avaible.</p>
<pre><code>kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
</code></pre>
<p>I would like to run the same command from the Kubernetes Pytho... | <p>There's a separate client function for each REST operation on each Kubernetes object type. Once you have that object, you can navigate it like any other Python object.</p>
<pre class="lang-py prettyprint-override"><code>service = kubernetes.client.read_namespaced_service('istio-ingressgateway', 'istio-system')
prin... |
<p>Have been trying to setup Kubeflow on bare metal (on prem etc) on a shared server i.e. not my laptop. I followed the <a href="https://www.kubeflow.org/docs/started/k8s/kfctl-k8s-istio/" rel="nofollow noreferrer">Kubeflow Deployment with kfctl_k8s_istio</a> setup instructions which all well.</p>
<p>Under "Access Kub... | <p>So, in the end i went with k3s as it is a one-liner to setup</p>
<pre class="lang-sh prettyprint-override"><code>curl -sfL https://get.k3s.io | sh -
</code></pre>
<p>and there are <a href="https://rancher.com/docs/k3s/latest/en/installation/install-options/" rel="nofollow noreferrer">many options</a> which you can s... |
<p>I want to connect to Neo4j database using my creds. I am tunneling into a machine and once that is done, I open my broswer at the port: <code>localhost:7474</code>.
I tried with both neo4j and bolt scheme to connect at the url:
<code>bolt://<node_ip>:7687</code> and <code>neo4j://<node_ip>:7687</code> bu... | <p>So, instead of providing localhost in the connection string, I made a silly mistake of writing down the actual IP and that was the reason for connection timeout.</p>
|
<p>Digging into www, didn't found an answer:
I want to know how I can use cert-manager with haproxy-ingress and lets encrypt.</p>
<p>Any documentation / guidelines?</p>
| <ol>
<li><p><strong>Deploy Certmanager with</strong>:</p>
<p><code>kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.yaml</code></p>
<p><code>kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.crds.yaml</code></p>
</li>
<li><p><s... |
<p>How do I <code>docker run</code> private image from Container Registry in GCP using <code>--privileged</code>
Running this locally works fine:</p>
<pre><code>docker run -it --privileged --entrypoint /bin/bash ${GKE_APP}
</code></pre>
<p>I followed <a href="https://stackoverflow.com/questions/59001647/kubernetespodop... | <p>Have you checked whether you are missing some sort of capability?</p>
<p>I see in the example you posted they also add this to the <code>security_context</code></p>
<pre class="lang-py prettyprint-override"><code>'capabilities': {'add': ['SYS_ADMIN']}
</code></pre>
|
<p>Is there anyway we can migrate Redis Cluster data that are running inside 2 different Kubernetes cluster? How we can communicate between Redis stateful pods which are running on two different Kubernetes Clusters?</p>
<p>We have two Redis Clusters which are running on two different Kubernetes Clusters X & Y. I wa... | <p>There are two possible approaches to establish connection between clusters:</p>
<ol>
<li>Built-in solutions</li>
<li>3rd party solution</li>
</ol>
<h3>Built-in solutions</h3>
<ul>
<li><a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer"><code>NodePort</code></... |
<p>I want to limit the maximum number of restarts for a pod. I have restartPolicy as always and I don't want to change it to Never,but want to limit the number of restarts.Is it possible to do so somehow ?</p>
| <blockquote>
<p>I just don't want the service to restart like 900 or 1000 times. In few restarts, it should stop trying...</p>
</blockquote>
<p>Say, you want to do something (by the program runs inside the pod) which requires a couple of retries but you also don't want it to retry an infinite number of times.</p>
<p>In... |
<p>Can anybody explain me how MetalLB gets IP addresses in a Kubernetes environment? I have installed Kubernetes cluster in GCP compute engines. I have provided a range of Internal IP addresses in MetalLB ConfigMap.</p>
<pre><code>NAME STATUS INTERNAL-IP EXTERNAL-IP
instance-1 Ready 10.140.0.20 56... | <p>to summarize my comments:</p>
<p>MetalLB in layer 2 mode is deploying on each node a <em>Speaker</em> Pod which responds to ARP(IPv4) and NDP(IPv6) requests.</p>
<p>If you now connect to the IP, which your Kubernetes Service with <code>type: LoadBalancer</code> got from the range you have defined in the MetalLB conf... |
<h3>Background</h3>
<p>We're hosting a proprietary web application, which we like to customize rudimentary to our CD (mainly colors). Since the application doesn't support this and I don't have access to the source, I'd like to create a custom css stylesheet and include it in the app by manipulating it's ingress (= inj... | <p>Found out that the problem was something completely different: The application supports gzip, so this compression was enabled. But the <code>http_sub_module</code> doesn't support gzip, as <a href="https://github.com/yaoweibin/ngx_http_substitutions_filter_module/blob/master/README" rel="nofollow noreferrer">documen... |
<p>I'm confused with one behavior of pod in k8s. I pulled and run my alpine container and it is working fine when I see the docker ps -a command, but when I run it through k8s the output of the kubectl get pod shows complete. although in the Dockerfile I typed
CMD ["sleep", "3600"], it is not going ... | <p><a href="https://kubernetes.io/docs/concepts/workloads/pods/" rel="nofollow noreferrer">The documentation</a> has some useful explanations:</p>
<blockquote>
<p>Pods are the smallest deployable units of computing that you can create and manage in Kubernetes.</p>
</blockquote>
<p>Think of such as the unit of “deployme... |
<p>How do you get around waiting on resources not yes created?</p>
<p>In script I get:</p>
<pre><code>kubectl wait --for=condition=ready --timeout=60s -n <some namespace> --all pods
error: no matching resources found
</code></pre>
| <p>This is a community wiki answer posted for better visibility. Feel free to expand it.</p>
<p>As documented:</p>
<blockquote>
<p>Experimental: Wait for a specific condition on one or many resources.</p>
<p>The command takes multiple resources and waits until the specified
condition is seen in the Status field of ever... |
<h2>Problem</h2>
<p>Deploying OpenLibertyApplication rewrites the /config/server.xml specified in the container image</p>
<h3>What did you do?</h3>
<ol>
<li>Deployed OpenLibertyApplication with initial configuration in src/main/liberty/config/server.xml:</li>
</ol>
<pre><code> <httpEndpoint id="defaultHttpEn... | <p>The problem in this case was cached image with the <code>latest</code> tag. If the application is created without specifying policy, it is set to <code>pullPolicy: IfNotPresent</code> to optimize creating container. Since the OP first created image with incorrect settings, and then overwrite image with the same tag,... |
<p>Create one liner (Imperative way) command in kubernetes</p>
<pre><code>kubectl run test --image=ubuntu:latest --limits="cpu=200m,memory=512Mi" --requests="cpu=200m,memory=512Mi" --privileged=false
</code></pre>
<p>And also I need to set <code>securityContext</code> in one liner, is it possible? b... | <p>Posting this answer as a community wiki to highlight the fact that the solution was posted in the comments (a link to another answer):</p>
<blockquote>
<p>Hi, check this answer: <a href="https://stackoverflow.com/a/37621761/5747959">stackoverflow.com/a/37621761/5747959</a> you can solve this with --overrides – CLNRM... |
<p>I'm trying to make sense of container_memory_rss or container_memory_working_set_bytes with respect to <strong>node_memory_used</strong> i.e (<em>node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes</em>)</p>
<p>Here what I meant</p>
<p><strong>PROMQL 1:</strong></p>
<pre><code>sum(container_memory_rss) by (i... | <h2>tl;dr</h2>
<p>Use container name filter (<code>container!=""</code>) to exclude totals:</p>
<pre><code>sum(container_memory_rss{container!=""}) by (instance) / 2^30
</code></pre>
<h2>Explanation</h2>
<p>If you ran the first query grouping results by container name, you would have noticed that mo... |
<pre><code>apiVersion: apps/v1
kind: deployment
metadata:
name: mongodb-deployment
labels:
app: mongodb
spec:
replicas: 1
selector:
matchLebels:
app: mongodb
template:
metadata:
lebels:
app: mongodb
spec:
containers:
- name: mongodb
image: mongo
por... | <ul>
<li>There are multiple typos in the yaml you have provided in the question.</li>
<li>I have corrected them as following , use following yaml and check</li>
</ul>
<pre><code>apiVersion: apps/v1
kind: Deployment #corrected typo deployment to Deployment
metadata:
name: mongodb-deployment
labels:
app: mongo... |
<p>I am deploying Elasticsearch 7.10.1 to AWS EKS Fargate but I got below error when running them:</p>
<pre><code>ERROR: [2] bootstrap checks failed
[1]: max number of threads [1024] for user [elasticsearch] is too low, increase to at least [4096]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, incre... | <p>Your best bet is to set these via privileged init containers within your Elasticsearch pod/deployment/statefulset, for example:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: elasticsearch-node
spec:
initContainers:
- name: increase-vm-max-map
image: busybox
command: ["sysctl",... |
<p>An existing Pod(<code>P</code>) is running 3 containers for API.</p>
<p>To scale Pod <code>P</code> horizonatally,</p>
<p>Is it possible to add one(or n) more container to an existing Pod(running 3 containers)?</p>
<p>or</p>
<p>Is Pod replica set concept supposed to be applied for this scenario(to scale horizontally... | <p>No, you don't use multi-container Pods for scaling. Pods with multiple containers are for cases where you need multiple daemons running together (on the same hardware) for a single "instance". That's pretty rare for new users so you almost certainly want 3 replicas of a Pod with one container.</p>
|
<p>I'm trying to figure out which tools from GKE stack I should apply to my use case which is a dynamic deployment of stateful application with dynamic HTTP endpoints.</p>
<p>Stateful in my case means that I don't want any replicas and load-balancing (because the app doesn't scale horizontally at all). I understand tho... | <p>I participated in a similar project and our decision was to use <a href="https://kubernetes.io/docs/reference/using-api/client-libraries/" rel="nofollow noreferrer">Kubernetes Client Library</a> to spawn instances. The instances were managed by a simple web application, which took some customisation parameters, save... |
<p>I have a Kubernetes <code>Job</code>, <code>job.yaml</code> :</p>
<pre><code>---
apiVersion: v1
kind: Namespace
metadata:
name: my-namespace
---
apiVersion: batch/v1
kind: Job
metadata:
name: my-job
namespace: my-namespace
spec:
template:
spec:
containers:
- name: my-container
image: ... | <p>In simpler terms , you want to run multiple commands , following is a sample format to execute multiple commands in a pod :</p>
<pre><code>command: ["/bin/bash","-c","touch /foo && echo 'here' && ls /"]
</code></pre>
<p>When we apply this logic to your requirement for tw... |
<p>I want to install Selenium Grid 4 in Kubernetes. I am new to this. Could anyone share helm charts or manifests or installation steps or anything. I could not find anything.</p>
<p>Thanks.</p>
| <p>You can find the selenium docker hub image at : <a href="https://hub.docker.com/layers/selenium/hub/4.0.0-alpha-6-20200730" rel="nofollow noreferrer">https://hub.docker.com/layers/selenium/hub/4.0.0-alpha-6-20200730</a></p>
<p>YAML example</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: seleniu... |
<p>Kubernetes <code>vertical pod autoscaler</code> (autoscale memory, cpu resources of pods) necessitates a restart of the pod to be able to use the newly assigned resources which might add small window of unavailability.</p>
<p>My question is that if the deployment of the pod is running a <code>rolling update</code> w... | <p>From the <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer">official documentation</a>:</p>
<blockquote>
<p><strong>Rolling updates</strong> allow Deployments' update to take place with zero downtime by incrementally updating Pods instances with new ones. ... |
<p>I have application running in K3s and want to implement network policy based on namespace only.
<br/><br/> Let's assume that currently I have three namespace A, B and C. I want to allow egress (external call to internet from pod) for <code>namespace-A</code> and remaining <code>namespace[B & C]</code> egress cal... | <p>You can define a <code>deny all egress</code> policy like described in <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/#default-deny-all-egress-traffic" rel="nofollow noreferrer">the documentation</a>:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
n... |
<p>I have a single node Kubernetes instance from <a href="https://microk8s.io/" rel="noreferrer">microk8s</a>. It is installed on a Ubuntu Server 20.20 running on Raspberry Pi 4.</p>
<p>I am tring to setup an ingress resource which cannot get working.</p>
<p>When I run <code>kubectl describe ingress my-ingress</code> I... | <p>The <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules" rel="noreferrer">default backend</a> is a fallback for when the ingress controller cannot match any of the rules.</p>
<h2><code>apiVersion: networking.k8s.io/v1</code></h2>
<pre class="lang-yaml prettyprint-override"><code>s... |
<p>I am trying my hands on creating my own kubernetes operator by following this <a href="https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/" rel="nofollow noreferrer">link</a>. In the Reconcile function, I need to create multiple Deployments and each will vary in some attributes (like name for e... | <p>Yes, you can have your <code>Deployment</code> in a yaml file and read it in code.</p>
<p>Given this file structure:</p>
<pre><code>example.go
manifests/deployment.yaml
</code></pre>
<p>You would have something like this in <code>example.go</code>:</p>
<pre class="lang-golang prettyprint-override"><code>import (
... |
<p>I'm new in kubernetes and docker world :)</p>
<p>I try to deploy our application in docker in kubernetes, but i can't connect to external mysql database..
my steps:
1, Install kubernetes with kubeadm in our new server.
2, Create a docker image from our application with <code>mvn spring-boot:build-image</code>
3, I c... | <p>hold on. you don't create endpoints yourself. endpoints are registered by kubernetes when a service has matching pods. right now, you have deployed your application and exposed it via a service.</p>
<p>if you want to connect to your mysql database via service it needs to be deployed and kubernetes as well. if it is ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.