Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p>Can I lint only changes or pull requests in the kubernetes file instead of linting whole kubernetes files everytime I make any changes in the kubernetes folder?</p>
<p>I was trying this <a href="https://docs.kubelinter.io/#/?id=using-docker" rel="nofollow noreferrer">https://docs.kubelinter.io/#/?id=using-docker</a>... | Priyanka Kumari | <p>I'm assuming that you are referering to the <a href="https://github.com/marketplace/actions/kube-linter" rel="nofollow noreferrer"><em>kube-linter</em> GitHub action</a>, because that's the one <a href="https://docs.kubelinter.io/#/?id=kubelinter-github-action" rel="nofollow noreferrer">referenced by the kube-linter... | Martijn Pieters |
<p>I am new at kubernetes so apologies in advance for any silly questions and mistakes. I am trying to setup external access through ingress for ArgoCD. My setup is an aws eks cluster. I have setup alb following the guide <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/tree/v2.2.3/helm/aws-load... | Abhishek | <p>Service type needs to be NodePort.</p>
| Joey Guerra |
<p>How do I make the <code>celery -A app worker</code> command to consume only a single task and then exit.</p>
<p>I want to run celery workers as a kubernetes Job that finishes after handling a single task.</p>
<p>I'm using KEDA for autoscaling workers according to queue messages.
I want to run celery workers as jobs ... | WolfThreeFeet | <p>There's not really anything specific for this. You would have to hack in your own driver program, probably via a custom concurrency module. Are you trying to use Keda ScaledJobs or something? You would just use a ScaledObject instead.</p>
| coderanger |
<p>I am using this command to deploy kubernetes dashboard:</p>
<pre><code> wget -c https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl create -f kubernetes-dashboard.yaml
</code></pre>
<p>and the result is:</p>
<pre><code>[root@iZuf63refzweg1d9dh9... | Dolphin | <p>Take a look at the file you downloaded. It defines several objects including a <code>Deployment</code> kind. Let's assume that you know that this is the one that does the creating, then you can do:</p>
<pre><code>kubectl describe deployment kubernetes-dashboard -n kube-system
</code></pre>
<p>This will give you a ... | Jamie |
<p>On step 8 of <em>Deploying the app to GKE</em> in <a href="https://cloud.google.com/python/django/kubernetes-engine" rel="nofollow noreferrer">Running Django on Kubernetes Engine</a>, it asks you to run this command:</p>
<pre><code>kubectl create secret generic cloudsql-oauth-credentials --from-file=credentials.jso... | Pablo Fernandez | <p>As it says in the previous line, it's the "location of the key you downloaded when you created your service account".</p>
| Daniel Roseman |
<p>My goal is to create a <code>StatefulSet</code> in the <code>production</code> namespace and the <code>staging</code> namespace. I am able to create the production StatefulSet however when deploying one to the staging namespace, I receive the error:</p>
<pre><code>failed to connect to server [127.0.0.1:27017] on fi... | Nick | <p>It seems like the error you are getting is from the mongo-sidecar container in the pod. As for why the mongo container is failing, can you obtain more detailed information? It could be something like a failed PVC.</p>
| Jamie |
<p>Is there a way to disable WAL replay on crash for Prometheus?</p>
<p>It takes a while for a pod to come back up due to WAL replay:</p>
<p>We can afford to lose some metrics if it meant faster recovery after the crash.</p>
<pre><code>level=info ts=2021-04-22T20:13:42.568Z caller=head.go:714 component=tsdb msg="W... | Steve | <p>Not specifically that I'm aware of. You would have to <code>rm -rf wal/</code> before starting Prom. Usually better to run multiple via Thanos or Cortex than to go down this path.</p>
| coderanger |
<p>I am new to Kubernetes and I am not really sure on how to proceed to implement correctly a watch; especially I am not sure on how to deal with the resourceVersion parameter.</p>
<p>The goal is to watch for new pods with a specific label, and in case of error or disconnection from the cluster being able to restart th... | G. Bricconi | <p>Adam is right.</p>
<p>This is best explained by <strong><a href="https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes" rel="noreferrer">https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes</a></strong></p>
<p>Quoting relevant parts (emph... | krousey |
<p>we want to create e2e test (integration test ) for our applications on k8s and we want to use
minikube but it seems that there is no proper (maintained or official ) docker file for minikube. at least
I didn’t find any…In addition I see <a href="https://k3s.io" rel="nofollow noreferrer">k3s</a> and not sure which ... | Rayn D | <p>Currently there's no official way to run minikube from within a container. Here's a two months old <a href="https://github.com/kubernetes/minikube/issues/3192#issuecomment-496186427" rel="nofollow noreferrer">quote</a> from one of minikube's contributors:</p>
<blockquote>
<p>It is on the roadmap. For now, it is V... | oldhomemovie |
<p>I recently encountered an issue where something (which I was not able to identify) deleted a PVC and the corresponding PV in my k8s cluster. The data can be recovered but I have two questions:</p>
<ol>
<li>Is there some hack to prevent the PVC from being deleted accidentally if someone issues a wrong command which d... | Axel Chauvin | <p>For question 1, you can set the Reclaim Policy to <code>Retain</code>. This means that the PV and PVC can be deleted but the underlying storage volume will stick around forever (or until you delete it in whatever the underlying system is).</p>
<p>For 2, yes if you have audit logging turned on. <a href="https://kuber... | coderanger |
<p>Is there a way to specify the nodeSelector when using the Kubernetes run command? </p>
<p>I don't have a yaml file and I only want to override the nodeSelector.</p>
<p>I tried the following but didn't work:</p>
<pre><code>kubectl run myservice --image myserviceimage:latest --overrides='{ "nodeSelector": { "beta.k... | nbilal | <p><code>nodeSelector</code> must be wrapped with a <code>spec</code>. Like so</p>
<pre><code>kubectl run -ti --rm test --image=ubuntu:18.04 --overrides='{"spec": { "nodeSelector": {"kubernetes.io/hostname": "eks-prod-4"}}}'
</code></pre>
| RubenLaguna |
<p>in the output of $ kubectl describe node ip-10-0-1-21</p>
<p>I receive the following annotations:</p>
<pre><code>Annotations: node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
</code></pre>
<p>can you please tell me the meaning of them and if ther... | yurasov | <p><code>node.alpha.kubernetes.io/ttl</code> is a tuning parameter for how long the Kubelet can cache objects, only rarely used for extreme high-density or high-scale clusters. <code>controller-managed-attach-detach</code> is a feature flag from long ago, Kubernetes 1.3. It was originally used to enable or disable the ... | coderanger |
<p>Is there a recommended way to use <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="noreferrer">Kubernetes Secrets</a>? They can be exposed as environment variables or using a volume mount. Is one more secure than the other?</p>
| Muhammad Rehan Saeed | <p><a href="https://www.oreilly.com/library/view/velocity-conference-2017/9781491985335/video316233.html" rel="noreferrer">https://www.oreilly.com/library/view/velocity-conference-2017/9781491985335/video316233.html</a></p>
<p>Kubernetes secrets exposed by environment variables may be able to be enumerated on the host... | tmc |
<p>Apologies if this question is asked before, am new to Kubernetes</p>
<p>Am trying to access the k8s cluster through ingress-nginx as proxy running on my machine, through react app running on localhost</p>
<p><a href="https://i.stack.imgur.com/KDrMn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K... | Shreyas Chorge | <p>If you don't install a real TLS certificate, you're just getting the default, self-signed one that the ingress controller includes as a fallback. Check out cert-manager for a path forward or just ignore the error for now (but probably don't ignore it, that's bad).</p>
| coderanger |
<p>Earlier today I had increased my Docker desktop resources, but when ever since it restarted Kubernetes has not been able to complete its startup. Whenever I try to run a kubectl command, I get <code>Unable to connect to the server: EOF</code> in response.</p>
<p>I had thought that it started because I hadn't delet... | shenyongo | <p>I'll share that what solved this for me was Docker Desktop settings feature for "<strong>reset kubernetes cluster</strong>". I know that @shenyongo said that a "reset kubernetes" didn't work, and I suppose they mean this.</p>
<p>But <strong>for the sake of other readers who may find this</strong>... | charlie arehart |
<p>I am trying to copy files from the pod to local using following command:</p>
<pre><code>kubectl cp /namespace/pod_name:/path/in/pod /path/in/local
</code></pre>
<p>But the <code>command terminates with exit code 126</code> and copy doesn't take place.</p>
<p>Similarly while trying from local to pod using following c... | kkpareek | <p><code>kubectl cp</code> is actually a very small wrapper around <code>kubectl exec whatever tar c | tar x</code>. A side effect of this is that you need a working <code>tar</code> executable in the target container, which you do not appear to have.</p>
<p>In general <code>kubectl cp</code> is best avoided, it's usua... | coderanger |
<p>I have a simple wordpress site defined by the <code>ReplicationController</code> and <code>Service</code> below. Once the app is deployed and running happily, I enabled autoscaling on the instance group created by Kubernetes by going to the GCE console and enabling autoscaling with the same settings (max 5, cpu 10).... | nathanjosiah | <h2>TLDR;</h2>
<p>In your usecase kubernetes is only giving you overhead. You are running 1 pod (docker container) on each instance in your instance group. You could also have your Docker container be deployed to App Engine flexible (former Managed VM's) <a href="https://cloud.google.com/appengine/docs/flexible/custom... | Mark van Straten |
<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... | Sasha Shpota | <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... | Robert |
<p>I have a 'UI' and an 'API' microservice that I'm deploying on k8s default namespace with Istio enabled. My k8s environment is a dev box and doesn't have an External Load Balancer.</p>
<p>The UI's port configuration is 80(service port):80(container port in pod).<br />
The API's port configuration is 8000(service port... | user1452759 | <p>one option is to add a host header.</p>
<p>an easier way for local dev stuff is to use a <code>*.nip.io</code> address.</p>
<p>If your ingress got an IP (look for an external IP in the result of <code>k get svc -n istio-system istio-ingressgateway</code>), then that's what you would use in the url.</p>
<p>e.g.</p>
<... | Stand__Sure |
<p>I have a nodejs pod running in kubernetes production environment. Additionally there is staging and review environment in the same cluster running the same app. I recently added --inspect to the start command in the dockerfile which gets deployed to all environments.
My question is, if I enable debugging in producti... | Jayadeep KM | <blockquote>
<p>will it impact performance or memory usage?</p>
</blockquote>
<p>Both probably negligiable if just having the flag enabled, mileage may vary if actually live debugging.</p>
<blockquote>
<p>Is it good practice</p>
</blockquote>
<p>I would say no, and it does have <a href="https://nodejs.org/de/doc... | James |
<p>I have a Kubernetes cluster (installed on premise), and I deployed an application based on Websphere Liberty image (from docker hub).</p>
<p>I configured a session affinity (or sticky session) for my service, then it can keep session via requests (access the same pod). But now, I want to keep application session wh... | taibc | <p>You can configure session persistence via hazelcast or via a traditional database running inside or outside of the cluster. This frees the application from being sensitive to scaling up/down.</p>
<p><a href="https://openliberty.io/guides/sessions.html" rel="nofollow noreferrer">https://openliberty.io/guides/sess... | covener |
<p>this question is about k8s readiness probe.
I am trying to add the command in readiness probe curl to the new pod that is creating.</p>
<p>I mean that I want to check that the new pod that is created is ready to accept traffic, before the old one is terminated.
I alrady have a command that is execute in the readine... | Sariel | <p>You are missing some colons and a then.</p>
<p>You have:</p>
<pre><code>status=$( curl -s -o -k /dev/null -w %{http_code} /health); echo "statusCode: $status" if [ "$status" -ne "200" ]; exit 1 fi
</code></pre>
<p>instead of</p>
<pre><code>status=$( curl -s -o -k /dev/null -w %{http_code} /health); echo "statusC... | vladmihaisima |
<p>Reading the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-patterns" rel="nofollow noreferrer">Kubernetes official docs</a> on Job parallel execution (e.g. one job, multiple pods with <code>parallelism</code> set to > 1), under the section, "<a href="https://kubernetes.io/docs/co... | David Parks | <p>Yes, this feature will be released as alpha in 1.21 which is due in a few weeks. <a href="https://github.com/kubernetes/kubernetes/pull/98812" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/98812</a> has details and links to the KEP.</p>
| coderanger |
<p>I am trying to deploy production grade Elasticsearch 6.3.0 on Kubernetes.</p>
<p>Came across few articles, but still not sure what is the best approach to go with.</p>
<ol>
<li><a href="https://github.com/pires/kubernetes-elasticsearch-cluster" rel="nofollow noreferrer">https://github.com/pires/kubernetes-elasticsea... | user1578872 | <p>One of the most promising new developments for running Elasticearch on Kubernetes is the <a href="https://github.com/upmc-enterprises/elasticsearch-operator" rel="nofollow noreferrer">Elasticsearch Operator</a>.</p>
<p>Kubernetes <a href="https://coreos.com/operators/" rel="nofollow noreferrer">Operators</a> allow ... | orangejulius |
<p>I have the following minimal example of a pod list:</p>
<pre><code>{
"items": [
{
"metadata": {
"name": "app"
},
"spec": {
"containers": [
{
... | micxer | <p>You are testing all images against the old version. As soon as a single image does not contain the old version string, you have a match. Your "app" images do not contain the old version, therefore your full item is matched.</p>
<p>You want to use <code>all(… | not)</code> or <code>any(…) | not</code> inste... | knittl |
<p>Please help me to understand one thing about <code>Prometheus</code> and <code>Prometheus operator</code> integration into Kubernetes.</p>
<p>From the documentation I see that a new and not standard kinds of Kubernetes objects are used to configure <code>Prometheus operator</code>. By standard kinds I mean <code>Po... | Alexey Usharovski | <p>This is a Kubernetes <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/" rel="nofollow noreferrer">Custom Resource</a>.</p>
| brian-brazil |
<p>I'm trying to write a jsonschema for a list of dictionaries (aka an array of objects) where I validate the keys in the dictionary. The labels in this example are what I'm interested in. I'd like to allow an arbitrary number of labels and like to validate that the <code>name</code> and <code>value</code> fields alway... | Joe J | <p>Known/fixed keys of a dictionary can be defined in <code>properties</code> and included in the <code>required</code> list:</p>
<pre class="lang-yaml prettyprint-override"><code> labels:
type: array
items:
type: object
required: [name, value]
properties:
name:
type: strin... | Helen |
<p>I have a master node that has disk pressure and is spamming the log full with endless messages like these:</p>
<blockquote>
<p>Mar 18 22:53:04 kubelet[7521]: W0318 22:53:04.413211 7521 eviction_manager.go:344] eviction manager: attempting to reclaim ephemeral-storage</p>
<p>Mar 18 22:53:04 kubelet[7521]: I0318 22... | Markus Bawidamann | <p>There's three ways to set Kubelet options. First is <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">command line options</a> like <code>--eviction-hard</code>. Next is a <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/" r... | coderanger |
<p>I have deployed my Kubernetes cluster on EKS. I have an ingress-nginx which is exposed via load balancer to route traffic to different services. In ingress-nginx first request goes to auth service for authentication and if it is a valid request then I allow it to move forward. This is done using ingress-nginx annota... | Devendra Singh khurana | <p>Here's a solution that worked for me. It allows the auth service to return a custom error message for each request.</p>
<p>The caveat is that because nginx can't access auth response body, the <code>pth-auth</code> service needs to put the data in <code>Pth-Auth-Error</code> header (base64-encoded).</p>
<p>This exam... | Tereza Tomcova |
<p>I've been doing a lot of digging on Kubernetes, and I'm liking what I see a lot! One thing I've been unable to get a clear idea about is what the exact distinctions are between the Deployment and StatefulSet resources and in which scenarios would you use each (or is one generally preferred over the other).</p>
| SS781 | <p>Deployments and ReplicationControllers are meant for stateless usage and are rather lightweight. <a href="https://kubernetes.io/blog/2016/12/statefulset-run-scale-stateful-applications-in-kubernetes/" rel="noreferrer">StatefulSets</a> are used when state has to be persisted. Therefore the latter use <code>volumeClai... | pagid |
<p>I am using Terraform to provision resources in Azure, one of which is a Postgres database. My Terraform module includes the following to generate a random password and output to console.</p>
<pre><code>resource "random_string" "db_master_pass" {
length = 40
special = true
min_special ... | Confounder | <p>One solution is to generate the Kubernetes yaml from a template.</p>
<p>The pattern uses <a href="https://www.terraform.io/docs/configuration/functions/templatefile.html" rel="nofollow noreferrer">templatefile</a> function in Terraform 0.12 or the <a href="https://www.terraform.io/docs/providers/template/index.html... | Giulio Vian |
<p>I am currently provision my EKS cluster/s using EKSCTL and I want to use Terraform to provision the cluster/s. I am using Terraform EKS module to create cluster. I have use EKSCTL to create identity mapping with following command</p>
<pre><code>eksctl create iamidentitymapping -- region us-east-1 --cluster stage-clu... | Ruwan Vimukthi Mettananda | <p>I haven't found a clear matching for this particular command, but you can achieve something similar by setting the <code>aws-auth</code> config map in kubernetes, adding all of the users/roles and their access rights in one go.</p>
<p>For example we use something like the following below to supply the list of admins... | SztupY |
<p>I’m looking for a way to differentiate between Prometheus metrics gathered from different dynamically discovered services running in a Kubernetes cluster (we’re using <a href="https://github.com/coreos/prometheus-operator" rel="nofollow noreferrer">https://github.com/coreos/prometheus-operator</a>). E.g. for the met... | Florian | <blockquote>
<p>Is there a way to implement this over Prometheus itself, e.g. that Prometheus adds a service-specific label per time series after a scrape?</p>
</blockquote>
<p>This is how Prometheus is designed to be used, as a target doesn't know how the monitoring system views it and prefixing metric names makes ... | brian-brazil |
<p>Below is the report for liveness & readiness after running <code>kubectl -n mynamespace describe pod pod1</code>:</p>
<pre><code>Liveness: http-get http://:8080/a/b/c/.well-known/heartbeat delay=3s timeout=3s period=10s #success=1 #failure=3
Readiness: http-get http://:8080/a/b/c/.well-known/heartbeat delay=3... | overexchange | <p>The results are completely right:</p>
<ul>
<li>http://:8080 indicates that it will try an http-get in port 8080 inside your pod</li>
<li>#success=1 indicates a success threshold of 1 (the default), so the first time it gets an answer it will mark the pod as live or ready</li>
<li>#failure=3 indicates a failure thres... | jmservera |
<p>In the <em><a href="https://rads.stackoverflow.com/amzn/click/com/B072TS9ZQZ" rel="nofollow noreferrer" rel="nofollow noreferrer">Kubernetes Book</a></em>, it says that it's poor form to run pods on the master node.</p>
<p>Following this advice, I'd like to create a policy that runs a pod on all nodes, except the m... | Behram Mistree | <p>How about something like this:</p>
<ol>
<li>During node provisioning, assign a particular label to each node that should run the job. In a single node cluster, this would be the master. In a multi-node environment, it would be every node except the master(s).</li>
<li>Create a deamonset that has tolerations for any... | captncraig |
<p>How via command line can I detect if a Kubernetes node is a master/control plane or not? Is there an environment variable I can check?</p>
| Justin | <p>Kubernetes provides <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">labels and selectors</a> which can be used to select the role assigned to a node.</p>
<p>To select controlplane nodes, use a selector to select that role:</p>
<pre><code># kubectl get nod... | Stefan Lasiewski |
<p>I have a service on my kubernetes cluster that generates massive assets to my machine's hard disk. Some of that information could also be served statically by a different service in my system. The save location is mapped to an actual folder on my disk.</p>
<p>I already found that I can see some information about my ... | Oren_C | <p>Kubernetes does not track overall storage available. It only knows things about emptyDir volumes and the filesystem backing those. If you're using a hostPath mount (which it sounds like you are), that is outside of Kube's view of the world. You can use something like node_exporter to gather those statistics yourself... | coderanger |
<pre><code>minikube start
kubectl config use-context minikube
kubectl create ns my-namespace
</code></pre>
<p>About half the time this succeeds and about half the time I get an error creating the namespace:
<strong>Unable to connect to the server: dial tcp 192.168.99.100:8443: getsockopt: operation timed out</strong><... | Aliisa Roe | <p>There's a lot of configuration variation possible with minikube, so I'm going to have to make a bit of a leap and assume you're running pretty close to the default configuration.</p>
<p>By default, the VM minikube runs on Virtual Box, using a dynamically allocated IP address. Frequently it will be assigned 192.168.... | Swiss |
<p>Backstory: I was running an Airflow job on a daily schedule, with a <code>start_date</code> of July 1, 2019. The job gathered requested each day's data from a third party, then loaded that data into our database.</p>
<p>After running the job successfully for several days, I realized that the third party data source... | Ashley O | <p>Click on the green circle in the Dag Runs column for the job in question in the web interface. This will bring you to a list of all successful runs.</p>
<p>Tick the check mark on the top left in the header of the list to select all
instances, then in the menu above it choose "With selected" and then "Delete" in the... | Lars Haugseth |
<p>Team,
I need to execute a shell script that is within a kubernetes pod. However the call needs to come from outside the pod. Below is the script for your reference:</p>
<p><code>echo 'Enter Namespace: '; read namespace; echo $namespace;</code></p>
<p><code>kubectl exec -it `kubectl get po -n $namespace|grep -i podNa... | Sandeep Kumar | <p>There isn't really a good way. A simple option might be <code>cat script.sh | kubectl exec -i -- bash</code> but that can have weird side effects. The more correct solution would be to use a debug container but that feature is still in alpha right now.</p>
| coderanger |
<p>I have a pod which contains two containers. One container is a web application and another store some static data for this web application. </p>
<p>The data here is a set of files which are stored in the folder of this container with name <code>/data</code> and that's only function of the container to store this da... | Alexey Usharovski | <p>You can use an <a href="https://kubernetes.io/docs/concepts/storage/volumes/#emptydir" rel="noreferrer">EmptyDir</a> volume for this. Specify the container that contains the files as an <code>initContainer</code>, then copy the files into the EmptyDir volume. Finally, mount that volume in the web app container.</p>
| Jamie |
<p>I'm trying to start kubernetes with an iscsi plugin inside rkt on CoreOS using the <a href="https://coreos.com/kubernetes/docs/latest/kubelet-wrapper.html#customizing-rkt-options" rel="nofollow">instruction here</a>. The problem is the iscsi daemon can't start, so I'm getting an error and can't mount the volume to t... | SerCe | <p>It doesn't look like they'll add it default into CoreOS but you can add it in the ignition config. The <code>iscsid-initiatorname.service</code> will create the name for you.</p>
<pre><code> "storage": {
"files": [{
"filesystem": "root",
"path": "/etc/modules-load.d/iscsi_tcp.conf",
"content... | KRavEN |
<p>I am using Rancher Pipelines and catalogs to run Helm Charts like this:</p>
<p><code>.rancher-pipeline.yml</code></p>
<pre><code>stages:
- name: Deploy app-web
steps:
- applyAppConfig:
catalogTemplate: cattle-global-data:chart-web-server
version: 0.4.0
name: ${CICD_GIT_REPO_NAME}-${CICD_GIT_BRA... | Romulus Urakagi Ts'ai | <p>Does not appear to be supported from what I can find of their code. It would appear they just shell out to <code>helm upgrade</code>, would need to use the <code>--wait</code> mode.</p>
| coderanger |
<p>I had a "stuck" namespace that I deleted showing in this eternal "terminating" status.</p>
| ximbal | <p>Assuming you've already tried to force-delete resources like:
<a href="https://stackoverflow.com/q/35453792">Pods stuck at terminating status</a>, and your at your wits' end trying to recover the namespace...</p>
<p>You can force-delete the namespace (perhaps leaving dangling resources):</p>
<pre><code>(
NAMESPAC... | Brent Bradburn |
<p>I have a simple setup that is using OAuth2 Proxy to handle authentication. It works fine locally using minikube but when I try to use GKE when the oauth callback happens I get a 403 status and the the following message...</p>
<blockquote>
<p>Login Failed: Unable to find a valid CSRF token. Please try again.</p>
</bl... | Jackie | <p>In my case it was because I needed to set the cookie to <code>secure = false</code>. Apparently I could still have secure true no problem with http and an IP but once I uploaded with a domain it failed.</p>
| Jackie |
<p>When using <a href="https://docs.gitlab.com/ee/topics/autodevops/" rel="nofollow noreferrer">GitLab Auto DevOps</a> to build and deploy application from my repository to <a href="https://microk8s.io/" rel="nofollow noreferrer">microk8s</a>, the build jobs often take a long time to run, eventually timing out. The iss... | knittl | <p>This seems to be a networking problem caused by incompatbile MTU settings between the Calico network layer and Docker's network configuration (and an inability to autoconfige the MTU correctly?) When the MTU values don't match, network packets get fragmented and the Docker runners fail to complete TLS handshakes. As... | knittl |
<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... | Nejc | <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 ... | coderanger |
<p>Note: solution can use netcat or any other built-in Linux utility</p>
<p>I need to implement an initContainer and liveness probe that confirms my redis pod is up for one of my redis dependent pods. I have attempted the netcat solution offered as the answer <a href="https://stackoverflow.com/questions/33243121/abuse... | bbmhmmad | <p>You could always send in your <code>AUTH</code> command as part of your probe, like:</p>
<pre><code>`"AUTH ....\r\nPING\r\n"`
</code></pre>
<p>Unless you're getting <code>INFO</code> from the server, you don't seem to care about the nature of the response, so no auth is required, just test for <code>NOAUTH</code>.... | tadman |
<p>I have 2 yaml files with configuration and certs and everything from 2 different hyperscaler to use to access kubernetes clusters in each of them, so I wonder if I can add to my actual .kube/config file both of them , on my mac I have kind clusters and also in a VM so everything is fine I see them configured on my c... | Ray Escobar | <p><code>export KUBECONFIG=/path/to/first/config:/path/to/second/config"</code></p>
<p><a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/<... | coderanger |
<p><strong>Summary</strong></p>
<p>I have a flask application deployed to Kubernetes with python 2.7.12, Flask 0.12.2 and using requests library. I'm getting a SSLError while using requests.session to send a POST Request inside the container. When using requests sessions to connect to a https url , requests throws a S... | StarJedi | <p>The problem may be in the Alpine Docker image that lacks CA certificates. On your laptop code works as it uses CA certs from you local workstation. I would think that running Docker image locally will fail too - so the problem is not k8s.</p>
<p>Try to add the following line to the Dockerfile:</p>
<pre><code>RUN a... | lexsys |
<p>From <a href="https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes" rel="nofollow noreferrer">Kubernetes API Concepts > Efficient detection of changes</a>:</p>
<blockquote>
<p>When retrieving a collection of resources (either namespace or cluster scoped), the response from t... | RubenLaguna | <p>From <a href="https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions" rel="nofollow noreferrer">Resource Version Semantics</a></p>
<blockquote>
<p>You must <strong>not assume resource versions are numeric</strong> or collatable. API clients may only compare two resource versions for equality ... | RubenLaguna |
<p>I am using openshift with glusterfs as storage system. Dynamic provisioning works very well but always rounds the allocated capacity to the next GB value. E.g.: I request a volume of 400MB but a volume of 1GB is created.</p>
<p>Is this behavior configurable? I setup openshift via the advanced installation with open... | siavash9000 | <p>It is how Kubernetes underneath works. Where you have static volumes defined, the allocation request is used to grab the best match available. So if there isn't one of the exact size, it will grab the next size up. It isn't able to split up a persistent volume and just give part of it to you. It also doesn't enforce... | Graham Dumpleton |
<p><em>This applications which are programmed to use the kubernetes API.</em></p>
<p>Should we assume that openshift container platform, from a kubernetes standpoint, matches all the standards that openshift origin (and kubernetes) does?</p>
<p><em>Background</em></p>
<p>Compatibility testing cloud native apps that ... | jayunit100 | <p>In practice you should be able to regard OpenShift Container Platform (OCP) as being the same as OKD (previously known as Origin). This is because it is effectively the same software and setup.</p>
<p>In comparing both of these to plain Kubernetes there are a few things you need to keep in mind.</p>
<p>The OpenShi... | Graham Dumpleton |
<p>I read a bit about <code>Deployment</code> vs <code>StatefulSet</code> in Kubernetes. We usually need <code>StatefulSet</code> when we have a stateful app, so every pod can have its own volume.</p>
<p>Now, I have a task to introduce persistence for <code>RabbitMq</code>. I will have only one pod replica of <code>Rab... | Spasoje Petronijević | <p>Even with 1 replica, a statefulset still gets you some thing, like stable network ID. You are right that most features stop mattering but it's really up to your specific needs.</p>
| coderanger |
<p>I'm facing an issue with the deployement of my Node.js application on my Kubernetes container.</p>
<p>The container is stuck on Crashlooping with this error "Back-off restarting failed container" and as error code i have this "Reason: Error - exit code: 243"</p>
<p>I did a describe of the pod i f... | Blitz crank | <p>I'm not sure why this worked, but it seems to be something with using <code>npm run...</code> to start the node service. I experimented with changing my Docker file to launch the container using:</p>
<p><code>CMD npm run start</code></p>
<p>To just running the node command, using exactly what NPM should have been ru... | Jereme |
<p>By some reason Kubernetes cannot pull an image from my private account on Docker Hub. I tried all possible ways of creating a secret (from config.json, by providing credentials directly on command line) but still no success.</p>
<p>Last time I did <code>docker login</code> and executed the following command to creat... | Volodymyr Usarskyy | <p>OK, the problem lies in namespaces: all my deployments, pods, services, etc. live inside a separate namespace BUT command that creates a secret does in 'default' namespace.</p>
<p>By some reason, I thought that these secrets in 'default' namespace are visible from another namespace, which is not the case. So, if you... | Volodymyr Usarskyy |
<p>I need to deploy Grafana in a Kubernetes cluster in a way so that I can have multiple persistent volumes stay in sync - similar to what they <a href="https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/" rel="nofollow noreferrer">did here</a>.</p>
<p>Does anybody know how I can use t... | FestiveHydra235 | <ol>
<li>StatefulSets are not what you think and have nothing to do with replication. They just handle the very basics of provisioning storage for each replica.</li>
<li>The way you do this is as you said by pointing Grafana at a "real" database rather than local Sqlite.</li>
<li>Once you do that, you use a D... | coderanger |
<p>I created a microk8s cluster, pods could be listed by <code>get pod</code> command:</p>
<pre><code>ubuntu@ip-172-31-16-34:~$ microk8s.kubectl get pod --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-f7867546d-mlsbm ... | qrtt1 | <p>I found the correct namespace for <code>microk8s.ctr</code> from issue <a href="https://github.com/ubuntu/microk8s/issues/756" rel="noreferrer">https://github.com/ubuntu/microk8s/issues/756</a></p>
<p>it works after adding <code>-n k8s.io</code></p>
<pre><code>ubuntu@ip-172-31-16-34:~$ microk8s.ctr -n k8s.io c ls ... | qrtt1 |
<p>I get this log error for a pod like below but I updated kubernetes orchestrator, clusters, and nodes to kubernetes v1.21.2. Before updating it, they were v1.20.7. I found a reference that from v1.21, selfLink is completely removed. Why am I getting this error? How can I resolve this issue?</p>
<p><strong>error log f... | yunlee | <p>Kubestone has had no releases since 2019, it needs to upgrade its copy of the Kubernetes Go client. That said, this appears to only impact the event recorder system so probably not a huge deal.</p>
| coderanger |
<p>Currently I've deployed Spark to <code>minikube</code> in my local machine. Pod and its containers are up and running, and I've already checked that port <code>7077</code> is listening from the host machine (local machine).</p>
<p>Now I want to <code>spark-submit</code> from the host machine. Thus, I've downloaded S... | Matías Fidemraizer | <p>According to the <a href="https://spark.apache.org/docs/latest/submitting-applications.html#master-urls" rel="nofollow noreferrer">master URL docs</a> that parameter accepts either some keywords like <code>local</code>, <code>yarn</code> or specific URL protocols, <code>spark://</code>, <code>mesos://</code>, <code>... | Panagiotis Kanavos |
<p>Somehow, I have 2 versions of fluentd running in my cluster:</p>
<p><a href="https://i.stack.imgur.com/73Lt6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/73Lt6.png" alt="enter image description here"></a></p>
<p>They end up fighting over the same port, they just keep cranking away, trying to ... | Mark | <p>I seem to have fixed it. I went to GCP dashboard cluster edit page, <code>Kubernetes Engine Monitoring</code> dropdown <strong>was blank</strong>. It seems not even the dropdown could decide what to display here.</p>
<p>It seems the automated agent, or whatever, seriously messed up here, and had 2 versions of the l... | Mark |
<p>I am following argocd-autopilot <a href="https://github.com/argoproj-labs/argocd-autopilot/blob/main/docs/Getting-Started.md" rel="nofollow noreferrer">Getting Started</a> guide on windows 10 using powershell.</p>
<p>I am creating these env variable:</p>
<p>$env:GIT_TOKEN = ghp_oOaezyetwer345345</p>
<p>$env:GIT_REPO... | Rad | <p>i have responded to your <a href="https://github.com/argoproj-labs/argocd-autopilot/issues/454" rel="nofollow noreferrer">issue</a> in argocd-autopilot issues page. i <em>think</em> you might be running an outdated version to the binary. the original problem was with the <code>argo-cd.yaml</code> file tries to refer... | Noam Gal |
<p>I need to set a custom error in traefik ingress on kubernetes so that when there is no endpoint or when the status is "404", or "[500-600]" it redirects to another error service or another custom error message I used the annotation as it's in the documentation in the ingress file as this (Note: this a helm template ... | yara mohamed | <p>The answer by ldez is correct, but there are a few caveats:</p>
<ul>
<li>First off, these annotations only work for traefik >= 1.6.x (earlier versions may support error pages, but not for the kubernetes backend)</li>
<li>Second, the traefik backend <strong>must</strong> be configured through kubernetes. You cannot ... | averell |
<p>I have created an image of my TWAS application and deployed it in a container inside an openshift POD. In my TWAS ND I use to go to the admin console WebSphere environment truststore on a node on a virtual machine and set up TLS certificates so my application can have communication with external API's in the secure... | Marcer | <p>When you build your application image, you can add a trusted signer and a short script into /work/ prior to configure.sh</p>
<p><a href="https://www.ibm.com/docs/en/was/9.0.5?topic=tool-signercertificatecommands-command-group-admintask-object#rxml_atsignercert__cmd1" rel="nofollow noreferrer">https://www.ibm.com/doc... | covener |
<p>Is there a way to reference a secret value from a configmap?</p>
<p>Example:</p>
<p><strong>CONFIGMAP: app.properties</strong></p>
<pre><code>context-path=/test-app1
dbhost=www.db123.com
username=user1
password=[getValueFromSecret]
</code></pre>
<p>the value of password here is saved in k8s secret</p>
| letthefireflieslive | <p>Not in core, but you can use the configmapsecrets operator for this. <a href="https://github.com/machinezone/configmapsecrets" rel="nofollow noreferrer">https://github.com/machinezone/configmapsecrets</a></p>
<p>Helm also has accessors to do it client side.</p>
| coderanger |
<h2>Deployment overview</h2>
<p>We are using the Azure Gateway Ingress Controller (AGIC) to automatically create listeners and back-ends on an app gateway for ingresses in our AKS cluster</p>
<p><a href="https://argoproj.github.io/argo-cd/" rel="nofollow noreferrer">ArgoCD</a> is deployed to the K8s cluster to create a... | Joon | <p>There appears to be a bug in AGIC where when some back-ends are resolved, and some are not, as soon as the first back-end in the list is unresolved, the rest of the backends are not created.</p>
<p>I have logged the following issue in Github to get it fixed: <a href="https://github.com/Azure/application-gateway-kube... | Joon |
<p>I have a SpringBoot application, dockerized, and deployed in a kubernetes cluster.
There is any way to log the pod name and pod ip from the springboot application inside the container?</p>
<p>Thanks in advance.</p>
| rocky | <p>One approach is to run a Fluentd agent on each cluster node. The agent collects all pod sysouts, decorates the logs with pod attributes and pipes them into ElasticSearch or some other searchable store. ala <a href="https://docs.fluentd.org/v0.12/articles/kubernetes-fluentd" rel="nofollow noreferrer">kubernetes-flu... | MarkOfHall |
<p>I have built two services in k8s cluster, how can they interact with each other, if I want to make http request from one service to another, I know I can’t use local host, but how can I know the host when I am coding.</p>
| John Wu | <p>Service objects are automatically exposed in DNS as <code><servicename>.<namespace>.svc.<clusterdomain></code> where <code>clusterdomain</code> is usually <code>cluster.local</code>. The default resolv.conf allows for relative lookups so if the service is in the same namespace you can use just the ... | coderanger |
<p>I have a kubernetes cluster</p>
<p>In Master node,</p>
<p>If I give the command <code>kubectl get nodes</code> it should show all the nodes.</p>
<p>But, If I give the same command in nodes it should not show the master node.</p>
<p>Is it possible in kubernetes?</p>
<p>Please help anyone. Thanks in advance.</p>
| az rnd | <p>No, this is not possible. The kubernetes API will always respond to the same queries in the same way. <code>kubectl get nodes</code> is asking for information about all nodes, and the api will always answer an authorized user with all of the nodes. </p>
<p>With RBAC it is possible to limit what a particular user or... | captncraig |
<p>I am currently trying to execute a simple bash command onto my kubernetes pod but seem to be getting some errors which does not make sense.</p>
<p>If I exec into the docker container an run the command plain</p>
<pre><code>I have no name!@kafka-0:/tmp$ if [ $(comm -13 <(sort selectedTopics) <(sort topics.sh) |... | kafka | <p>When you write:</p>
<pre><code> kubectl ... "$(cmd)"
</code></pre>
<p><code>cmd</code> is executed on the local host to create the string that is used as the argument to <code>kubectl</code>. In other words, you are executing <code>comm -13 </tmp/selectedTopics </tmp/topics.sh| wc -l</code> on the l... | William Pursell |
<p>I am currently using ubuntu machines for creating a kubernetes cluster.</p>
<p>All machines are on-prem.</p>
<p>but adding / upgrating machines, require lot of maintanence like installing ubuntu, adding needed packages, open-ssh, then adding kubernetes and adding to cluster.</p>
<p>Is there a better way to install a... | shrw | <p>There are many products and projects available for this. You'll just have to try some and see which you like. I couldn't list them all if I tried but a few I'm pretty sure are compatible with Ubuntu (in no particular order):</p>
<ul>
<li>kubespray</li>
<li>Rancher (and RKE with it)</li>
<li>Microk8s (uses Snaps)</li... | coderanger |
<p>We have the following code (don't ask me why...even as none-javascript dev it doesn't look pretty to me), which throws error after Kubernetes upgrade:</p>
<pre><code>module.exports.getReplicationControllers = async function getReplicationControllers(namespace) {
const kubeConfig = (await getNamespacesByCluster()).... | Anton Kim | <p><strong>Answering the question in general</strong> (rather than getting you to switch to a different tool), for people who have this question and may be using other apps:</p>
<blockquote>
<p>RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded</p>
</blockquote>
<p><strong>The issue is cau... | mikemaccana |
<p>I'm trying to use minikube and kitematic for testing kubernetes on my local machine. However, kubernetes fail to pull image in my local repository (<code>ImagePullBackOff</code>).</p>
<p>I tried to solve it with this : <a href="https://stackoverflow.com/questions/38748717/can-not-pull-docker-image-from-private-repo... | Xero | <p>Use the minikube docker registry instead of your local docker</p>
<p><a href="https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/#create-a-docker-container-image" rel="noreferrer">https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/#create-a-docker-container-image</a></p... | Doug |
<p>I am new to Docker/Kubernetes and inherited an application and I am looking to upgrade a JAR file on a pod.</p>
<p>This is the pod:</p>
<pre><code>Name: app-name-7c7fddfc7c-vthhr
Namespace: default
Node: ip-ip-address-goes-here.us-east-2.compute.internal/ip.address.goes.here
Start Time: ... | Steven Matthews | <p>Pods are ephemeral. You know, "Cattle versus Pets". They're put to slaughter not taken to the vet.</p>
<p>When you want to add new code / new dependancies you build a new Docker image and deploy it to the cluster.</p>
<p>Somewhere in your code / CI pipeline there is a Dockerfile file that defines what / how depe... | MarkOfHall |
<p>I'm relatively new (< 1 year) to GCP, and I'm still in the process of mapping the various services onto my existing networking mental model.</p>
<p>Once knowledge gap I'm struggling to fill is how HTTP requests are load balanced to services running in our GKE clusters.</p>
<p>On a test cluster, I created a serv... | James Healy | <p>I think I found the answer to my own question - can anyone confirm I'm on the right track?</p>
<p>The network load balancer redirects the traffic to a node in the cluster without modifying the packet - packets for port 80/443 still have port 80/443 when they reach the node.</p>
<p>There's nothing listening on port... | James Healy |
<p>I recently came across this canary deployment process, it is said </p>
<p><em>Canary deployments are a pattern for rolling out releases to a subset of users or servers. The idea is to first deploy the change to a small subset of servers, test it, and then roll the change out to the rest of the servers. The canary d... | pavan reddy | <p>Canary deployments are a way of gradually opening the requests firehose to a new server while continuing to respond to the majority of the requests with an already-deployed service. So yes, it is really a "test in production" strategy, but the idea is that if the canary falls over you don't deploy to to the whole cl... | holdenweb |
<p>I'm testing kubernetes behavior when pod getting error.</p>
<p>I now have a pod in CrashLoopBackOff status caused by liveness probe failed, from what I can see in kubernetes events, pod turns into CrashLoopBackOff after 3 times try and begin to back off restarting, but the related Liveness probe failed events won't ... | Sean Yu | <p>I think you might be confusing Status Conditions and Events. Events don't "update", they just exist. It's a stream of event data from the controllers for debugging or alerting on. The <code>Age</code> column is the relative timestamp to the most recent instance of that event type and you can see if does so... | coderanger |
<p>I have installed postgres cluster Zalando postgres operator <a href="https://github.com/zalando/postgres-operator" rel="nofollow noreferrer">https://github.com/zalando/postgres-operator</a>
How can I get access to postgres database from outside?
I tried to change cluster service type from ClusterIP to NodePort, but ... | NameOff | <p>The process is explained here:
<a href="https://postgres-operator.readthedocs.io/en/latest/user/" rel="nofollow noreferrer">https://postgres-operator.readthedocs.io/en/latest/user/</a></p>
<p>You need 2 steps.</p>
<ol>
<li>script that opens up and forwards a port to your local machine.</li>
</ol>
<p>I created a scri... | Stephan |
<blockquote>
<p>Updated with more information</p>
</blockquote>
<p>I am trying to set up OpenTSDB on Bigtable, following this guide:
<a href="https://cloud.google.com/solutions/opentsdb-cloud-platform" rel="nofollow noreferrer">https://cloud.google.com/solutions/opentsdb-cloud-platform</a></p>
<p>Works well, all go... | Pinguin Dirk | <p>My guess is that this relates to the opentsdb flush frequency. When a tsdb cluster is shutdown, there's an automatic flush. I'm not 100% sure, but I think that the <code>tsd.storage.flush_interval</code> configuration manages that process.</p>
<p>You can reach the team that maintains the libraries via the google-... | Solomon Duskis |
<p>I am currently learning Kubernetes, and i am facing a bit of a wall.
I try to pass environmentalvariables from my YAML file definition
to my container. But the variables seem not to be present afterwards.
<code>kubectl exec <pod name> -- printenv</code> gives me the list of environmental
variables. But the ... | Martin | <p>If I correct the errors in your <code>Deployment</code> configuration so that it looks like this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world-boot
labels:
app: hello-world-boot
spec:
selector:
matchLabels:
app: hello-world-boot
template:
metadata:
l... | larsks |
<p>How can I replace the Image used in a Kubernetes Deployment manifest with jq?</p>
<p>For example:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: myapp
name: myapp-deployment
spec:
replicas: 1
template:
spec:
containers:
- name: myapp
image: myapp:v1
</c... | Frederik | <p>Using <a href="https://kislyuk.github.io/yq/" rel="nofollow noreferrer"><code>yq</code></a>, you can simply write:</p>
<pre><code>yq -y '.spec.template.spec.containers[0].image = "foo:latest"' pod.yml
</code></pre>
<p>Which produces:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
... | larsks |
<p>Need to define RBAC based on the audit log. This can be a regular process to onboard a team and provide access.</p>
<p>I find audit2rbac tool simple and clear to use. </p>
<p>Need guidance wrt kubernetes service on azure.</p>
| atul sahu | <p>Here is an example query for getting audit logs from Azure Log Analytics.</p>
<p>It removes some of the noise to try and give just logs for when a user has modified a resource in Kubernetes. The requestURI and requestObject fields will give you the most info about what the user was doing.</p>
<pre><code>AzureDiagnos... | Tom Ferguson |
<p>I have a requirement to implement Server Sent Events capability in a micro service. The application in question runs in a Kubernetes cluster of two pods. However, I don't believe Server Sent Events in a clustered environment will reliably notify all clients of events they have registered for, for the following reaso... | user1608142 | <p>The fundamental problem is with holding state information in the pod(s) itself.</p>
<p>A server running in a Kubernetes environment needs to be completely stateless. Not just so that it doesn't matter which pod the load-balancer sends the request to. But more fundamentally, Kubernetes expects to be able to shut down... | Ian Goldby |
<p>I am trying to terminate the namespace argo in Kubernetes. In the past, I have succesfully followed the directions found here <a href="https://stackoverflow.com/questions/52954174/kubernetes-namespaces-stuck-in-terminating-status">Kubernetes Namespaces stuck in Terminating status</a></p>
<p>this time, however, I am ... | user3877654 | <p>You need to use an authenticated user that has permissions for the subresource (or more often, for <code>*</code>).</p>
| coderanger |
<p>I had run the following command <code>poetry install</code> when following instruction on <a href="https://docs.wire.com/how-to/install/kubernetes.html#ansible-kubernetes" rel="nofollow noreferrer">this page</a>.</p>
<p>I had received an <code>RuntimeError</code>, does any one know how to solve it?</p>
<pre><code>Ru... | user2120882 | <p>It looks as if those instructions are out-of-date; looking at the repository history, the use of poetry was removed in January in commit <a href="https://github.com/wireapp/wire-server-deploy/commit/567dcce8f66769ff5fec802e34015a0053c5cef7" rel="nofollow noreferrer">567dcce</a>. The commit message reads (partially):... | larsks |
<p>Whenever I am trying to run the docker images, it is exiting in immediately.</p>
<pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited ... | UME | <p>In my particular case, this exact error was caused by a Bash entry script with incorrect Windows/DOS line endings.</p>
<p>Add this to the Docker file:</p>
<pre><code>RUN dos2unix /entrypoint.sh
</code></pre>
<p>If <code>dos2unix</code> is not installed, prefix with:</p>
<pre><code># For Alpine Linux:
RUN apk add dos... | Contango |
<p>I want to deploy hyperkube in a Kubernetes pod. <br/>
I already have a Kubernetes cluster. I tried few docker images in the docker hub. But all pods are failing with some issues. <br>
I am not able to deploy hyperkube image in a Kubernetes pod. </p>
| Nikhil Kumar Agrawal | <p><code>hyperkube</code> is the binary to run k8s components on the nodes. It is not intended to run inside the k8s cluster.</p>
<p>You may want to start with <code>busybox</code> image:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: busybox
spec:
containers:
- image: busybox
command:
- slee... | lexsys |
<p>In <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/ingress" rel="noreferrer">GKE Ingress documentation</a>
it states that:</p>
<blockquote>
<p><em>When you create an Ingress object, the GKE Ingress controller creates a Google Cloud HTTP(S) Load Balancer and configures it according to the informatio... | Jarppe | <p>I think the question you're actually asking is slightly different than what you have written. You want to know if multiple Ingress resources can be linked to a single GCP Load Balancer, not GKE Ingress controller. Based on the <a href="https://kubernetes.io/docs/concepts/architecture/controller/" rel="noreferrer">c... | mltsy |
<p>I wrote a k8s deployment yml sample, but it failed every time I apply it to the cluster, the logs is that</p>
<blockquote>
<p>standard_init_linux.go:228: exec user process caused: exec format error</p>
</blockquote>
<p>the yml file is as follows, I am new to kubernetes, and stuck here now, wish you could help me</p>... | John Wu | <p><code>exec format error</code> means you're trying to run a binary on a platform other than the one for which it was compiled. Looking at your image, it appears the binaries are built for an ARM platform:</p>
<pre><code>$ file bash
bash: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, i... | larsks |
<p>While creating a secret:</p>
<pre class="lang-bash prettyprint-override"><code>kubectl -n customspace create secret tls localhost.customspace.svc.customspace-tls-pair --cert=certs/webhook.crt --key=certs/webhook.key
</code></pre>
<p>I get the error:</p>
<pre><code>error: failed to create secret the server could not ... | BeastMaster64 | <p>This probably means your namespace (<code>customspace</code>) doesn't exist.</p>
| Mike Conigliaro |
<p><strong>given is following scenario</strong></p>
<ul>
<li>Terraform is used to generate 2 Kubernetes Namespaces</li>
<li><strong>Namespace A</strong> contains RabbitMQ
<ul>
<li>RabbitMQ is installed via HELM-chart via terraform</li>
<li>Password-secret for RabbitMQ is generated, if not set, in HELM-chart</li>
</ul>
... | masterchris_99 | <p>Terraform's kubernetes provider appears to have a kubernetes_secret data source:
<a href="https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/secret" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/secret</a></p>
<p>So ... | mltsy |
<p>I am trying to delete a persistent volume, to start form scratch a used kafka cluster into kubernetes, <strong>i changed the Retain mode to Delete, it was Retain.</strong>
But i am not able to delete two of the three volumes:</p>
<pre><code>[yo@machine kafka_k8]$ kubectl describe pv kafka-zk-pv-0
Name: ... | jacktrade | <p>I changed the policy "Retain" to "<strong>Recycle</strong>" and the volume now is able to be recreated.</p>
<pre class="lang-sh prettyprint-override"><code>kubectl patch pv kafka-zk-pv-0 -p '{"spec":{"persistentVolumeReclaimPolicy":"Recycle"}}'
</code></pre>
| jacktrade |
<p>We have an application deployed on GKE that would benefit from having fast temporary storage on disk.</p>
<p>The GKE <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd" rel="nofollow noreferrer">local SSD</a> feature is almost perfect, however we have multiple pod replicas ... | James Healy | <p>Kubernetes 1.11 added an alpha feature called <a href="https://github.com/kubernetes/kubernetes/issues/48677" rel="nofollow noreferrer">Downward API support in volume subPath</a>, which allows volumeMount subpaths to be set using the downward API.</p>
<p>I tested this by creating a GKE 1.11 alpha cluster:</p>
<pre... | James Healy |
<p>Using the example to <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/" rel="nofollow noreferrer">set env variables</a> I can set them, but I cannot find documentation on where I can USE them in the manifest. Replacing a literal value with an env variable for h... | mm_sml | <p>You can't use environment variables in the manifest. You can only make use of them inside the pod. They describe the environment of the pod, not the environment in which your manifest is parsed.</p>
| larsks |
<p>I have been reading about <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes" rel="nofollow noreferrer">liveness and readiness probes in kubernetes</a> and I would like to use them to check and see if a cluster has come alive.</p>
<p>The qu... | FrobberOfBits | <p>You need to change <code>.spec.podManagementPolicy</code> for a <code>StatefulSet</code> from <code>OrderedReady</code> to <code>Parallel</code> policy. </p>
<p>This way K8S will start all your pods in parallel and won't wait for probes.</p>
<p>From <a href="https://kubernetes.io/docs/reference/generated/kubernete... | lexsys |
<p>I've build the following script:</p>
<pre><code>import boto
import sys
import gcs_oauth2_boto_plugin
def check_size_lzo(ds):
# URI scheme for Cloud Storage.
CLIENT_ID = 'myclientid'
CLIENT_SECRET = 'mysecret'
GOOGLE_STORAGE = 'gs'
dir_file= 'date_id={ds}/apollo_export_{ds}.lzo'.format(ds=ds)
... | D_usv | <p>If it works in one environment and fails in another, I assume that you're getting your auth from a .boto file (or possibly from the OAUTH2_CLIENT_ID environment variable), but your kubernetes instance is lacking such a file. That you got a 403 instead of a 401 says that your remote server is correctly authenticating... | Brandon Yarbrough |
<p>I have a docker image with below entrypoint.</p>
<pre><code>ENTRYPOINT ["sh", "-c", "python3 -m myapp ${*}"]
</code></pre>
<p>I tried to pass arguments to this image in my kubernetes deployments so that <code>${*}</code> is replaced with them, but after checking the logs it seem that th... | Soroush Vafaie Tabar | <p>First, your <code>command</code> has quoting problems -- you are effectively running <code>bash -c echo</code>.</p>
<p>Second, you need to closely read the documentation for the <code>-c</code> option (emphasis mine):</p>
<blockquote>
<p>If the <code>-c</code> option is present, then commands are read from
the first... | larsks |
<p>Just noticed that after I update my appname:latest tag to a new image, the command I expected to run an exact debugging clone of a terminated POD is actually pulling the latest! I've searched (briefly) in Kubernetes and Openshift references, but found nothing specific. Looks like a bug, or at least counter-intuitive... | ptrk | <p>The <code>oc debug</code> command would usually be run against the deployment config. Since there is no concept of versioning of resources such as deployment config, the command will use whatever image is matched by the deployment config at that time.</p>
<p>If the way you have set up the deployment config uses an ... | Graham Dumpleton |
<p>I'm currently trying to alert on Kubernetes pods stacking within an availability zone. I've managed to use two different metrics to the point where I can see how many pods for an application are running on a specific availability zone. However, due to scaling, I want the alert to be percentage based...so we can aler... | Alistair Webster | <pre><code> your_expression
/ ignoring(created_by_name) group_left
sum without(created_by_name)(your_expression)
</code></pre>
<p>will give you the ratio of the whole for each, and then you can do <code>> .8</code> on that.</p>
| brian-brazil |
<p>Sorry if this sounds like I'm lazy, but I've search around, around and around, but couldn't find it!</p>
<p>I'm looking for a reference that explains each of the fields that may exist in an OpenShift / Kubernetes template, e.g. what possible values there are.</p>
| His | <p>The templates you get in OpenShift are OpenShift specific and not part of Kubernetes. If you mean the purpose of each of the possible fields you can specify for a parameter, you can run <code>oc explain template</code>. For example:</p>
<pre><code>$ oc explain template.parameters
RESOURCE: parameters <[]Object&g... | Graham Dumpleton |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.