Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p>We have a GKE cluster with 4 deployments/pods that need to be updated when we deploy new code. I know it's best practice to deploy the image with the latest digest for the images we are deploying but I'm wondering if anyone knows of a better way of updating the yaml file with that digest other than manually updating... | Jason Girdner | <p>There's a number of tools which will watch your Docker repository and will update things when a new image is available. The most commonly used is probably <a href="https://github.com/weaveworks/flux/" rel="nofollow noreferrer">https://github.com/weaveworks/flux/</a>. Kubernetes itself does not provide this feature a... | coderanger |
<p>I am trying to port a monolithic app to k8s pods. In theory, pods are considered ephemeral and it is suggested to use service concept to provide a static IP. But in my test so far, I have not seen the POD IP being changed. So now the question when will k8s assign a new IP to my POD?</p>
<p>I have created POD (witho... | Jay Rajput | <p>The IP won't change as long as the pod is running, but there are no promises that your pod will stay running. The closest there is to a stable network name is with a StatefulSet. That will create a consistent pod name, which means a consistent DNS name in kubedns/coredns. There is no generic way in Kubernetes to get... | coderanger |
<p>When I run <code>sudo minikube start --vm-driver=none</code> it gives me this error and I am using Ubuntu 16.0.4.</p>
<pre><code>Error starting cluster: cmd failed: sudo env PATH=/var/lib/minikube/binaries/v1.16.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--et... | Adarsha Jha | <p>The <code>none</code> driver makes a lot of assumptions that would normally be handled by the VM setup process used by all other drivers. In this case you can see that some of the ports it expects to use are already in use so it won't continue. You would need to remove whatever is using those ports. The <code>none</... | coderanger |
<p>I am trying to get a simple progress bar working in my Python container on Kubernetes. However, it doesn't output anything until the job is done and the progress bar reaches 100%. The same exact code works perfectly in a local Docker container. So what is it that Kubernetes has in place that prevents me from seeing ... | altskop | <p>When logging, rather than displaying things in a TTY to a human, you generally need to log in complete lines ending in <code>\n</code>. Rather than a progress bar, I would usually recommend something like printing out <code>10%...\n20%...\n etc</code>. Up to you how often you print the current state.</p>
<p><strong... | coderanger |
<p>I am trying to install Traefik as an Ingress Controller for my self-installed Kubernetes cluster. For convenience I try to install the <a href="https://github.com/helm/charts/tree/master/stable/traefik" rel="nofollow noreferrer">helm chart of Traefik</a> and this works excellent without the acme part; this is my var... | Joost Döbken | <p>It is highly recommended you use <a href="https://github.com/jetstack/cert-manager" rel="nofollow noreferrer"><code>cert-manager</code></a> instead of the built-in ACME support in Traefik, at least at this time. It is much better at dealing with multiple copies of Traefik, which you probably want. Ingress-shim (whic... | coderanger |
<p>I need to disable interactive session/ssh access to a Kubernetes pod.</p>
| Souvik Dey | <p>It’s controlled via the RBAC system, via the pods/exec subresource. You can set up your policies however you want.</p>
| coderanger |
<p>Below is my Nodejs microservices pattern:</p>
<pre class="lang-js prettyprint-override"><code>
// api.ts
import { Router } from 'express';
const router = Router();
router.get(':id', ...doSomething);
router.post(':id', ...doSomething);
export default router;
// index.ts
import * as Express from 'express';
import API... | Simon | <p>You can use the <a href="https://kubernetes.github.io/ingress-nginx/examples/rewrite/" rel="nofollow noreferrer">rewrite annotations</a>, but keep in mind these are a custom extension of the nginx controller and are not portable to all other implementations.</p>
<p>From their example:</p>
<pre><code>apiVersion: ex... | coderanger |
<p>I have an application that has 14 different services. Some of the services are dependent on other services. I am trying to find a good way to deploy these in the right sequences without using thread sleeps. </p>
<ol>
<li>Is there a way to tell kuberentes a service deployment tree like don't deploy service B or serv... | Hizzy | <p>This is not how Kubernetes works. You can kind of shim it with an initContainer that blocks until dependencies are available (usually via <code>kubectl</code> in a while loop, but you get fancy you can try using <code>--wait</code>).</p>
<p>But the expectation is that you set up your applications to be "eventually ... | coderanger |
<p>How can I duplicate a namespace with all content with a new name in the same kubernetes cluster?</p>
<p>e.g. Duplicate default to my-namespace which will have the same content.</p>
<p>I'm interested just by services and deployments, so
when I try with method with kubectl get all and with api-resources i have error... | Inforedaster | <p>There is no specific way to do this. You could probably get close with something like <code>kubectl get all -n sourcens -o yaml | sed -e 's/namespace: sourcens/namespace: destns/' | kubectl apply -f -</code> but <code>get all</code> is always a bit wonky and this could easily miss weird edge cases.</p>
| coderanger |
<p>I am running a Python app on production but my pod is restarting frequently on production environment. While on a staging environment it's not happening.</p>
<p>So I thought it could be CPU & Memory limit issue. I have updated that also.</p>
<p>Further debug I got <code>137</code> exit code.</p>
<p>For more d... | Harsh Manvar | <p>Technically all the 137 means is your process was terminated as a result of a SIGKILL. Unfortunately this doesn't have enough info to know where it came from. Tools like auditd or Falco on top of that can help gather that data by recording those kinds of system calls, or at least get you closer. </p>
| coderanger |
<p>I am building containers that are designed to build and publish things. So i need to configure the <code>.pypirc</code>, etc files. </p>
<p>I am trying to do it with a configmap. Creating a configmap with each of the dot files is easy enough, my problem is mapping it into the pod. </p>
<pre><code>apiVersion: v... | scphantm | <p>Your suspicion is correct. What you can use to fix that is <code>subPath</code> <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath</a></p>
<p>But the downside is you do need a volumeMount entry for... | coderanger |
<p>I'm writing Kustomize configs for several apps and using overlays to overwrite a base configuration for staging and production environments. The base config creates a secret from a file called dev.json and names that secret -dev-config. The staging environment also runs in dev mode and uses the same secret. Producti... | Kyle Baran | <p>I don’t think you can. You would move the dev config to a dev overlay instead. If you really don’t want to, you can use a jsonpatch to delete the content.</p>
| coderanger |
<p>I'm running a Kubernetes cluster on Google cloud. My cluster has a deployment that exposing the health-check interface (over HTTP). In my deployment <code>yaml</code> file, I configured:</p>
<pre><code>livenessProbe:
# an http probe
httpGet:
path: /hc
port: 80
scheme: HTTP
initialDelaySeconds: 30
... | No1Lives4Ever | <p>The somewhat convoluted standard answer to this is Kubernetes -> kube-state-metrics -> Prometheus -> alertmanager -> webhook. This might sound like a lot for a simple task, but Prometheus and its related tools are used much more broadly for metrics and alerting. If you wanted a more narrow answer, you could check ou... | coderanger |
<p>I would like to know, what are the actual memory and CPU capacity in mi and m in the following results:</p>
<pre><code>Capacity:
alpha.kubernetes.io/nvidia-gpu: 0
cpu: 2
memory: 2050168Ki
pods: 20
Allocatable:
alpha.kubernetes.io/nvidia-gpu: 0
cpu: ... | HamiBU | <p>2 CPUs (2 cores) and 2050168Kb of RAM (more simply, 2GB). Which also happens to be the Minikube defaults.</p>
| coderanger |
<p>I have tried to deploy one of the local container images I created but keeps always getting the below error</p>
<blockquote>
<p>Failed to pull image "webrole1:dev": rpc error: code = Unknown desc =
Error response from daemon: pull access denied for webrole1,
repository does not exist or may require 'docker lo... | Mo Haidar | <p>When you're working locally, you can use an image name like <code>webrole</code>, however that doesn't tell Docker where the image came from (because it didn't come from anywhere, you built it locally). When you start working with multiple hosts, you need to push things to a Docker registry. For local Kubernetes exp... | coderanger |
<p>I download a pod's log, it has size bigger then 1G, how to shrike/truncate the pod's log? so I can download it faster?</p>
<p>PS: I need erase the old part of logs so I can free the disk space</p>
| Yu Jiaao | <p><code>kubectl logs --tail=1000</code> to show only the most recent 1000 lines. Adjust as needed.</p>
<blockquote>
<p>--tail=-1: Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise
10, if a selector is provided.</p>
</blockquote>
| coderanger |
<p>Currently I have an Kubernetes cluster which is to analyze Video Feeds and send particular results based on the video. I wish to send an HTTP request from my Kubernetes pod from from time to time if the requested Video needs to be retrieved over the internet. However all of these requests seem to Fail. When I issued... | Ranika Nisal | <p>Answered in comments, kube-dns was unavailable due to resource constraints.</p>
| coderanger |
<p>Is it possible to modify a Kubernetes pod descriptor postponing the restart to a later event? </p>
<p>Basically I want to defer the changes to scheduled restart event.</p>
| pditommaso | <p>You cannot. That is not a feature of Kubernetes.</p>
| coderanger |
<p>Lets I have four separate microservice application which I want to deploy in K8's clusters. These applications interact with each other a lot. So is it recommended to have them in the same pod or individual pod for each microservcie</p>
| Sam | <p>Different pods. You only combine containers into one pod when they are very specifically for the same thing. Generally this means sidecars supporting the primary container in the pod for things like metrics, logging, or networking.</p>
| coderanger |
<p>The goal:
Using <strong>Helm Chart</strong> <strong>pre-install</strong> <strong>hook</strong>, take a file on the filesystem, encode it and place it as a resource file (referenced by a configMap.</p>
<p>Questions:</p>
<ul>
<li>Can a Helm Chart pre-install hook access files that are not under the root chart?</li>... | user1015767 | <p>No, Hooks run as Jobs inside the Kubernetes cluster, so they have no access to your workstation. What you want is the Events system (<a href="https://github.com/helm/community/blob/master/helm-v3/002-events.md" rel="nofollow noreferrer">https://github.com/helm/community/blob/master/helm-v3/002-events.md</a>) which i... | coderanger |
<p>I would like to deploy a RESTService in kubernetes behind a gateway and a service discovery. There is a moment where I will have my RestService version 1 and my RestService version 2. </p>
<p>Both will have the exact same URLs, but I might deploy them in pods where I label the version. When I make a call to the RES... | Elena | <p>Yes, a Service takes a label selector, which you can use if you set labels based on your versions. Most Ingress Controllers or other proxies than use a Service (or rather then Endpoints it manages) to pick the backend instances.</p>
| coderanger |
<p>I have a kubernetes cluster with a few different pod types. </p>
<ul>
<li>An Nginx frontend, </li>
<li>A flask backend on gunicorn, </li>
<li>Redis, and </li>
<li>A Redis queue (RQ).</li>
</ul>
<p>Based on what I can tell, the default liveness probing for the frontend, and flask backend are sufficient (200 OK retu... | JonathanC | <p>It would appear that RQ sets a heartbeat key in Redis: <a href="https://github.com/rq/rq/blob/e43bce4467c3e1800d75d9cedf75ab6e7e01fe8c/rq/worker.py#L545-L561" rel="nofollow noreferrer">https://github.com/rq/rq/blob/e43bce4467c3e1800d75d9cedf75ab6e7e01fe8c/rq/worker.py#L545-L561</a></p>
<p>You could check if this ex... | coderanger |
<p>I am deploy a eureka pod in kubernetes cluster(v1.15.2),today the pod turn to be pending state and the actual state is running.Other service could not access to eureka, the eureka icon to indicate pod status shows:<code>this pod is in a pending state</code>.This is my stateful deploy yaml:</p>
<pre><code>{
"kind"... | Dolphin | <p>Sounds like a Kubernetes bug? Try to reproduce it on the current version of Kubernetes. You can also dive into the kubelet logs to see if there is anything useful on those.</p>
| coderanger |
<p>Have a pretty simple <code>test.sql</code>:</p>
<pre><code>SELECT 'CREATE DATABASE test_dev'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'test_dev')\gexec
\c test_dev
CREATE TABLE IF NOT EXISTS test_table (
username varchar(255)
);
INSERT INTO test_table(username)
VALUES ('test name');
</code></p... | cjones | <p>You don’t want to mount a volume over the entry point folder. You are basically masking the script in your image with an empty folder. Also you aren’t using your modified image, so it wouldn’t have your script in the first place.</p>
| coderanger |
<p>According to "<a href="https://cloud.google.com/docs/authentication/production#finding_credentials_automatically" rel="nofollow noreferrer">Finding credentials automatically</a>" from Google Cloud:</p>
<blockquote>
<p>...ADC (Application Default Credentials) is able to implicitly find the credentials as long as t... | oldhomemovie | <p>Check out <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity</a> for how to up permissions for your pods. You have to do some mapping a so Google knows which pods get which perks, but af... | coderanger |
<p>My Kubernetes cluster is failing to deploy new applications with insufficient CPU on the cluster</p>
<p>After digging around rancher and kubectl I have found that I am using 5% of CPU, but Reserved 96% CPU. </p>
<p>This is due to wrongly configured values in my micro-services values.yaml</p>
<p>If there a way to ... | user3292394 | <p>The built in tool is <code>kubectl top</code> but this requires you have metrics-server running, which you probably do if you are using a hosted kube option but might not if running it yourself. Beyond that, Prometheus and tools like node-exporter and cadvisor can get you the data</p>
| coderanger |
<p>i am trying to setup a complete GitLab Routine to setup my Kubernetes Cluster with all installations and configurations automatically incl. decommissioning at the end. </p>
<p>However the Creation and Decommissioning Progress is one of the most time consuming because i am basically waiting for the provisioning till... | Bliv_Dev | <p>The closest is probably to do all your work in a new namespace and then delete that namespace when you are done. That automatically deletes all objects inside it.</p>
| coderanger |
<p>By mistake I created a service account to give admin permission for dashboard. But now I am unable to delete it.</p>
<p>The reason I want to get rid of that service account is if I follow the steps here <a href="https://github.com/kubernetes/dashboard" rel="noreferrer">https://github.com/kubernetes/dashboard</a>. W... | rgaut | <p>You have to specify the namespace when deleting it:</p>
<pre><code>kubectl delete serviceaccount -n kube-system kubernetes-dashboard
</code></pre>
| coderanger |
<p>I've raised the pod replicas to something like 50 in a cluster, watched it scale out, and then dropped the replicas back to 1. As it turns out I've disabled scale-down for one node. I've noticed that k8s will leave the remaining replica on that node. However, I've seen it remove that node when the annotation to p... | lucidquiet | <p>Roughly speaking it tries to keep things spread out over the nodes evenly. You can find the code in <a href="https://github.com/kubernetes/kubernetes/blob/edbbb6a89f9583f18051218b1adef1def1b777ae/pkg/controller/replicaset/replica_set.go#L801-L827" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/bl... | coderanger |
<p>I'm installing Prometheus on GKE with Helm using the standard chart as in</p>
<p><code>helm install -n prom stable/prometheus --namespace hal</code></p>
<p>but I need to be able to pull up the Prometheus UI in the browser. I know that I can do it with port forwarding, as in</p>
<p><code>kubectl port-forward -n h... | NickChase | <p>It is generally a very bad idea to expose Prometheus itself as it has no authentication mechanism, but you can absolutely set up a LoadBalancer service or Ingress aimed at the HTTP port if you want.</p>
<p>More commonly (and supported by the chart) you'll use Grafana for the public view and only connect to Prom its... | coderanger |
<p>I have been using saltstack for a few years with bare metal server. Now we need to setup a whole new environment on AWS. I'd prefer to use saltstack set everything up because I like the orchestration of salt and the event based stuff, like beacons & reactors. Plus it's easy to write your own customised python mo... | laocius | <p>There’s a few reusable setups floating around, last I remember <a href="https://github.com/valentin2105/Kubernetes-Saltstack" rel="nofollow noreferrer">https://github.com/valentin2105/Kubernetes-Saltstack</a> was the most complete of them. But all of them are less solid than tools closer to the community mainstream ... | coderanger |
<p>I want to deploy a distributed system with one master and N followers. All the followers run the same image but with different arguments. Since they all terminate after a successful run, <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="nofollow noreferrer"><code>Jobs</... | qweruiop | <p>There is support for a single job with multiple types of pods. You would want to make either two different jobs or a single job where the scripting inside the container detects on its own if it should be a leader or follower. If the leader/follower config is part of the command-line arguments, the former is probably... | coderanger |
<p>Is there a way to do active and passive load balancing between 2 PODs of a micro-service. Say I have 2 instance(PODs) running of Micro-service, which is exposed using a K8s service object. Is there a way to configure the load balancing such a way that one pod will always get the request and when that pod is down , t... | P.Das | <p>This is what the Kubernetes Service object does, which you already mentioned you are using. Make sure you set up a readiness probe in your pod template so that the system can tell when your app is healthy.</p>
| coderanger |
<p>I have two pods in a cluster. Lets call them A and B. I've installed kubectl inside pod A and I am trying to run a command inside pod B from pod A using <code>kubectl exec -it podB -- bash</code>.
I am getting the following error </p>
<p><code>Error from server (Forbidden): pods "B" is forbidden: User "system:servi... | samsri | <p>You would need to give access to the <code>pods/exec</code> subresource in addition to <code>pods</code> like you have there. That said, this is a very weird thing to do and probably think very hard as to if this is the best solution.</p>
| coderanger |
<p>Here we have a <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/jobs" rel="nofollow noreferrer">sample of the job</a> </p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
# Unique key of the Job instance
name: example-job
spec:
template:
metadata:
name: example-job
spec:
... | egor10_4 | <p>Would set your command to something like <code>[bash, -c, "mysql -hlocalhost -u1234 -p1234 --database=customer < script.sql"]</code>, since input redirection like that is actually a feature of your shell.</p>
| coderanger |
<p>If I run a minikube instance on ubuntu do I need a VM like virtualbox?</p>
<p>If I run <code>minikube start</code> it complains that I need to install a VM, seems weird to have to do that on linux tho.</p>
| Alexander Mills | <p>While it is possible to run without a VM via <code>--vm-driver=none</code> it really isn't recommended outside of ephemeral CI instances. Minikube expects to be able to take over the system pretty fully to do its thang. I would recommend checking out one of the other tools to manage a local environment like microk8s... | coderanger |
<p>i am relatively new to <code>kubernetes</code> and i am trying to catch things, in my understanding, a <code>pod</code> can have <code>single</code> container as well as <code>multiple</code> containers. Lets say i have a <code>pod</code> with <code>5</code> tightly coupled containers and is it possible to <code>aut... | doc_noob | <p>No, the definition of a pod is co-located containers. You can vertically scale them differently but there will always be exactly one of each per pod.</p>
| coderanger |
<p>I got a VPS server running ubuntu, which is technically simply a VM. Now I thought about hosting a cluster on that VM instead of using AWS. So I would need to run the cluster directly on ubuntu.</p>
<p>One solution would be to simply use minikube which initializes another VM on top. But I'd prefer to run the kubern... | elp | <p>Microk8s from Ubuntu makes this easy, or check out Kind from sig-testing.</p>
| coderanger |
<p>I have an angular(6) application that is running on Nginx and deployed to Kubernetes. Here are my configs:</p>
<p>Here is my docker file:</p>
<pre><code>FROM node:10-alpine as builder
COPY package.json ./
RUN yarn install && mkdir /myproject && mv ./node_modules ./myproject
WORKDIR /myproject
C... | Software Ninja | <p>The most Kubernetes-native way handle this is <a href="https://github.com/jetstack/cert-manager" rel="nofollow noreferrer">using <code>cert-manager</code></a>, which can handle creating the LetsEncrypt certs for you. As you noted, some Ingress controllers also have their own integrations with LetsEncrypt which you c... | coderanger |
<p>I'm new with Kubernetes and I'm trying to understand about the commands.
Basically what I'm trying to do is to create a Tomcat deployment, add an nfs and after that I copy the war file to the tomcat webapps.<br/>
But its failing</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: webapp... | radicaled | <p>No, what you want is probably something like this:</p>
<pre><code>command: ["sh","-c","cp /apps/build/v1/sample.war /usr/local/tomcat/webapps && exec /whatever/catalina.sh"]
</code></pre>
<p>Or you could move the <code>cp</code> into an <code>initContainer</code> so you don't have to override the default c... | coderanger |
<p>Considering <code>Kubernetes 1.13</code>, how does compare the features of the <code>Job</code> object to the features available around the <code>units</code> of <code>systemd</code>? And vice-versa? </p>
| piroux | <p>They do not meaningfully compare. The closest you could say is that a Job object is vaguely similar to a <code>oneshot</code>-mode service unit in systemd, in that both run a process until completion and that's it. But a service unit can't run multiple copies and systemd's containment features are different from K8s... | coderanger |
<p>my Kubernetes setup:</p>
<ul>
<li>v1.16.2 on bare metal</li>
<li>1 master node: used for Jenkins Master + Docker registry</li>
<li>5 slave nodes: used for Jenkins JNPL slaves</li>
</ul>
<p>I use kubernetes-plugin to run slave docker agents. All slave k8 nodes labeled as "jenkins=slave". When I use nodeSelector ("j... | Yaroslav Berezhinskiy | <p>This is generally handled by the inter-pod anti affinity configuration <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity</a... | coderanger |
<p>I have a query, What happens to traefik if Kubernetes goes down? Will it keep working or will it crash/stop serving traffic?</p>
<p>Currently, I am using EKS for Kubernetes, with ALB ingress controller. My understanding is that, if Kubernetes master goes down, there won't be any upscaling-downscaling of PODs, no ne... | kadamb | <p>As long as Traefik keeps running, it will be fine. But if it crashed and was restarted, it would be unable to load the endpoints API as you noted. Fortunately that is exceedingly rare.</p>
| coderanger |
<p>My kubernetes cluster has 3 pods for postgres. I have configured persistent volume outside of the cluster on a separate virtual machine. Now as per kubernetes design, multiple pods will be responding to read/write requests of clients. Is their any dead lock or multiple writes issues that can occur between multiple p... | Meta-Coder | <p>You would need a leader election system between them. There can be only one active primary in a Postgres cluster at a time (give or take very very niche cases). I would recommend <a href="https://github.com/zalando-incubator/postgres-operator" rel="nofollow noreferrer">https://github.com/zalando-incubator/postgres-o... | coderanger |
<p>I have a cronjob that runs and does things regularly. I want to send a slack message with the technosophos/slack-notify container when that cronjob fails.</p>
<p>Is it possible to have a container run when a pod fails?</p>
| Red 5 | <p>There is nothing built in for this that i am aware of. You could use a web hook to get notified when a pod changes and look for state stuff in there. But you would have to build the plumbing yourself or look for an existing third party tool.</p>
| coderanger |
<p>Does the bolt protocol which is used by Neo4j works with Traefik? </p>
<p>TCP is not supported yet by Traefik, but according to the Traefik documention, it supports WebSocket(which operates over a TCP connection), and this confuses me! </p>
<p>Is it possible to run Neo4j databases behind Traeffik and access them u... | UrmLmn | <p>This appears to be up to each client library, and from what I can see it looks like only a few browser-based clients actually use the WebSocket mode. So overall, probably no, pending 2.0 coming out.</p>
| coderanger |
<p>I am new to kubernetes. I have kubenetes and kubelet installed on my linux (RHEL7) system. I want to get kubeadm on my system, but due to the organization's policy, I can't install it via yum or ap-get, etc.
Now, I am trying to find the <code>kubeadm rpm</code> file, which is compatible for my Redhat linux system. ... | anuja tol | <p>You can find links to the official packages for all OSes included RHEL 7 on the docs page: <a href="https://kubernetes.io/docs/setup/independent/install-kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/independent/install-kubeadm/</a></p>
<pre><code>cat <<EOF > /etc/yum.repos.d/kubernet... | coderanger |
<p>We want to deploy an application that utilizes memory cache using docker and kubernetes with horizontal pod auto-scale, but we have no idea if the containerized application inside the pods would use the same cache since it won't be guaranteed that the pods would be in the same node when scaled by the auto-scaler.</p... | Ken Gopert Gerada | <p>No, separate pods do not generally share anything even if running on the same physical node. There are ways around this if you are very very careful and fancy but the idea is for pods to be independent anyway. Within a single pod it's easier, you can use normal shmem, but this is pretty rare since there isn't much r... | coderanger |
<p>If I have 1 Django project and multiple Django apps. Every Django app has it's own <code>requirements.txt</code> and settings. Hence every app has its own docker image. My doubt is, can I execute code from one Django app to other Django app while both apps have a different container?</p>
| Vimox Shah | <p>No, in the context of Django an “app” is a code level abstraction so they all run in one process, which means one image. You can, sometimes, break each app into its own project and have then communicate via the network rather than locally, this is commonly called “microservices” and smaller images is indeed one of t... | coderanger |
<p>I'm trying to add a new node pool into an existing GKE cluster. Failing with the below error.</p>
<pre><code>Node pool version cannot be set to 1.14.6-gke.1 when releaseChannel REGULAR is set.
</code></pre>
<p>Any advice on how i can get around this?</p>
<p><strong>EDIT:</strong> I finally managed to create a n... | Denounce'IN | <p>That version was removed from GKE yesterday: <a href="https://cloud.google.com/kubernetes-engine/docs/release-notes#version_updates" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/release-notes#version_updates</a></p>
<pre><code>The following versions are no longer available for new clust... | coderanger |
<p>My first thought was using the <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#capabilities-of-the-downward-api" rel="nofollow noreferrer">downward API</a>, but that doesn't seem to expose the scale of a deployment / statefulset. I was hoping to be able t... | user7876637 | <p>You would definitely have to use a StatefulSet for this, and I don't think you can pull it from the DownwardAPI because the replica count isn't part of the pod spec (it's part of the statefulset spec). You could get the parent object name and then set up a service account to be able to query the API to get the repli... | coderanger |
<p>Please, help me to deal with accessibility of my simple application of k8s, via traefik in AWS.</p>
<p>I tried to expose ports 30000-32767 on master node, in security group and app is accessible from the world, doesn't want to work just 80 port of traefik! When I tried to expose 80 port in security group of master,... | Stefan | <p>You've set things up using a NodePort service:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: traefik-ingress-service
# namespace: kube-system
spec:
selector:
k8s-app: traefik-ingress-lb
ports:
- protocol: TCP
port: 80
name: web
- protocol: TCP
port: 8080
name... | coderanger |
<p>I have a node.js application that sends out gmail notifications for certain events. We recently switched from being directly hosted on DO to a Kubernetes cluster. After we switched, we started getting invalid login exceptions in the Node.js app and critical security alerts from Google. After researching the issue... | mikeb | <p>Answered in comments, user did need to log into Google to acknowledge a blocker message.</p>
| coderanger |
<p>I am using Kubernetes HPA to scale up my cluster. I have set up target CPU utilization is 50% . It is scaling up properly. But, when load decreases and it scales down so fast. I want to set a cooling period. As an example, even the CPU util is below 50% , it should wait for 60 sec before terminating a node.</p>
<p>... | Dinesh Ahuja | <p>This is configured at the HPA level: <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-cooldown-delay" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-cooldown-delay</a></p>
<blockquote>
<p>--horizontal-... | coderanger |
<p>Try to append some new entries to /etc/hosts in pods, but failed:</p>
<pre><code>$ ips=$(cat ips.txt); kubectl exec -u root myspark-master-5d6656bd84-5zf2h echo "$ips" >> /etc/hosts
-sh: /etc/hosts: Permission denied
</code></pre>
<p>How to fix this?</p>
<p>Thanks</p>
<p><strong>UPDATE</strong></p>
<pre><... | BAE | <p>I think you mean to write to the file inside the container, but bash is parsing that on your workstation and try to apply the redirect locally. Use <code>kubectl exec ... -- sh -c “...”</code> instead. </p>
| coderanger |
<p>When we scrape the etcd exposing end point (i. e. "/metrics"), we get a flat text. Is there any way we can structure the whole data to work on it instead of working on string comparison on the required metric?</p>
<p>Note: I don't want to use prometheus for monitoring. Instead I want to create my own framework... | Sai Sushanth | <p><a href="https://github.com/prometheus/prom2json" rel="nofollow noreferrer">https://github.com/prometheus/prom2json</a> is probably what you are looking for.</p>
| coderanger |
<p>I understand that Kubernetes make great language-agnostic distributed computing clusters, easy to deploy, etc.</p>
<p>However, it seems that each platform has his own set of tools to deploy and manage Kubernetes.</p>
<p>So for example, If I use Amazon Elastic Container Service for Kubernetes (Amazon EKS), Google ... | Daniel Benedykt | <p>"It depends". The core APIs of Kubernetes like pods and services work pretty much the same everywhere, or at least if you are getting into provider specific behavior you would know it since the provider name would be in the annotation. But each vendor does have their own extensions. For example, GKE offers integrati... | coderanger |
<p>I noticed my job status is marked as Running when its pod is still pending for being scheduled. Is there a way to get the actual status from the job resource itself without looking at the pod resource?</p>
<p>Job:</p>
<pre><code>$ kubectl describe jobs sample-job
Name: sample-job
...
Start Time: Sat,... | Dagang | <p>Yes, the Job system understands "done and succeeded", "done and failed", and "still going" as statuses. Running means that it has requested that the job run, not that it's literally executing.</p>
| coderanger |
<p>I am new to kubernetes and have installed KOPS and now I want to use traefik as a ingress controller and cant get through it, I have a domain "xyz.com" and nameserver on cloudflare. I tried to create a "CNAME" record with my domain with ELB of aws which I get after deploying all files but it didn't worked and I don'... | Himanshu Sharma | <p>Given your comment, that is correct. You would set your DNS for all relevant domains to CNAME to the ELB generated for the Traefik Service.</p>
| coderanger |
<p>I am using docker and trying to enable kubernetes and set CPU and Memory via command line.</p>
<p>I have looked at this answer but unfortunately cannot find this file.</p>
<p><a href="https://stackoverflow.com/questions/54740934/is-there-any-way-to-enable-kubernetes-on-docker-for-mac-via-terminal">Is there any way... | J. Doe | <p>Docker does not have an app-ified version for Linux that I know of, so there is no relation to the Docker for Mac/Windows app. There are many tools to locally install Kubernetes on Linux so they probably didn't see much reason to make something new. Minikube is the traditional one, but you can also check out microk8... | coderanger |
<p>Assume deployment like that:</p>
<ol>
<li>Deployment contains two types of pods Config and App</li>
<li>Each App pod to start needs to have access to Config pod</li>
<li>There is always only one Config pod</li>
<li>Already launched App pods can work without access to Config pod service</li>
</ol>
<p>Situation I wo... | kamracik | <p>You would use either code in your app or an initContainer to block until a config pod is available. Combine this with a readinessProbe that checks if the app is up. Doing the block-and-retry loop in your own code is a bit more work but recommended since you can more carefully control the behavior. This means that ap... | coderanger |
<p>I am perfectly aware of the Kubernetes API and that a manifest can be broken down in several K8S API calls.</p>
<p>I am wondering if there is a way to apply a whole manifest at once in a single API call. A REST equivalent to <code>kubectl apply</code>.</p>
| znat | <p>The feature is still in alpha but yes, it's called "server-side apply". Given the in-flux nature of alpha APIs, you should definitely check the KEPs before using it, but it's a new mode for the PATCH method on objects.</p>
| coderanger |
<p>Right now I have a Docker file and a .gitlab-ci.yml , and SHELL runner</p>
<pre><code>FROM node:latest
RUN cd /
RUN mkdir Brain
COPY . /Brain/
WORKDIR /Brain/
RUN npm install
ENV CASSANDRA_HOST_5="10.1.1.58:9042"
ENV IP="0.0.0.0"
ENV PORT=6282
EXPOSE 6282
CMD npm start
</code></pre>
<p>and ci file</p>
<pr... | hesaum saboury | <p>Kubernetes has to be able to pull the image from somewhere. You can use an alternate repo for non-release builds or use some kind of naming scheme, and then clear out non-release builds more frequently.</p>
| coderanger |
<p>As per prometheus storage.md , the recommendation is not to use nfs storage as persistent volume for prometheus.</p>
<p>But solutions like prometheus operator and openshift shows examples which uses nfs as persistent volumes for prometheus.</p>
<p>So what am I missing here? If nfs is not recommended then why do th... | swetad90 | <p>The example in the prom-operator docs is just a hypothetical to show how to manually control the storage provisioning. NFS is generally an option of last resort in all cases :) Check out <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">https://kubernetes.io/docs/con... | coderanger |
<p>I created kubernetes cluster on aws ec2 using kubeadm. Now I need to autoscale the K8's cluster when there are not enough resources on nodes to schedule new pods, How can I achieve autoscaling feature for my cluster?</p>
| satya | <p>Unfortunately there isn't a great answer if you mean you manually ran <code>kubeadm</code> on some EC2 instance. <code>cluster-autoscaler</code> is the thing to use, but it requires you deploy your nodes using Autoscaling Groups. It's possible to use ASGs and <code>kubeadm</code> but I don't know of anything off-the... | coderanger |
<p>I'm new to Kubernetes. Got confused with how CustomResourceDefinations changes got to apply:-)
Ex: If I have a CustomResourceDefinations "Prometheus", it creates a Statefulsets which create one pod. After the CRD changed, I need to use the latest CRD to create my pod again. What is the correct way? Should I complete... | Whispererli | <p>The operator, or more specifically the custom controller at the heart of the operator, takes care of this. It watches for changes in the Kubernetes API and updates things as needed to respond.</p>
| coderanger |
<p>I am trying to understand security implications of running containers with <code>--cap-add=NET_ADMIN</code>. The containers will be running in k8s cluster and they will execute user provided code (which we can't control and can be malicious).</p>
<p>It is my understanding that unless I add <code>--network host</cod... | Jan Matas | <p>At a minimum, they would be able to turn on promiscuous mode on the pod's network adapter which could then potentially see traffic bound for other containers. Overall this seems like a very very very bad idea.</p>
| coderanger |
<p>In defining a service, can I somehow hook up a value, eg. TargetPort so that if I change the configmap, it will automatically update my service? I don't think so, but maybe I am unclear if I can fully psrameterize my application port.
I can do this with a manual script but w wondering what other solutions there are.... | ergonaut | <p>This is not something you do directly in Kubernetes. You would use a higher-level system like Kustomize or Helm to put the correct value in both places. That said, why would you? It's not like you ever need things to coexist so just pick a port and roll with it.</p>
| coderanger |
<p><code>error: unable to recognize "xxxxx-pod.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused</code>, </p>
<p>I tried the solutions available online but none of them really worked.</p>
| Venkateshreddy Pala | <p>This means your kubeconfig is not correct. It is using the default server URL which is probably not what you intended.</p>
| coderanger |
<p>I want to edit a configmap from <code>aws-auth</code> during a vagrant deployment to give my vagrant user access to the EKS cluster. I need to add a snippet into the existing <code>aws-auth</code> configmap. How do i do this programmatically?</p>
<p>If you do a <code>kubectl edit -n kube-system configmap/aws-auth</... | Eli | <p>There are a few ways to automate things. The direct way would be <code>kubectl get configmap -o yaml ... > cm.yml && patch ... < cm.yml > cm2.yml && kubectl apply -f cm2.yml</code> or something like that. You might want to use a script that parses and modifies the YAML data rather than a lit... | coderanger |
<p>How to have the input data ready before I deploy a POD on K8S?
As I understand, persistent volume is dynamically created using PVC (persistent volume claim), so in a POD yaml file, we can set the PVC and mount path like <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes" rel=... | Jaylin | <p>Mount it on another pod somewhere that does the pre-load. Alternatively you could do some fancy stuff with an initContainer.</p>
| coderanger |
<p>Does the following configuration for configMap create the test.json file of type <code>empty array</code> or <code>string []</code></p>
<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
name: myconfigmap
data:
test.json: |-
[]
</code></pre>
<p>The convertor to JSON suggests string:</p>
<pre><code>{
&qu... | maopuppets | <p>Sure, you can make it whatever string you want, it just has to be a string. The thing you <em>can't</em> do is <code>test.json: []</code> since that's an array. The fact that your string happens to be valid JSON is not something K8s knows or cares about.</p>
| coderanger |
<p>I followed the commands mentioned on this page...</p>
<p><a href="https://www.elastic.co/guide/en/cloud-on-k8s/current/index.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/current/index.html</a></p>
<p>elastic service is stared successfully. But I do not see external-ip</p>
<pre><cod... | shantanuo | <p>ClusterIP services are only available from inside the cluster. To make it visible from the outside you would need to change it to LoadBalancer type, and have an implementation of that available (read: be running on a cloud provider or use MetalLB).</p>
| coderanger |
<p>I deployed a kubernetes cluster and using 3 replicas for my backend NodeJS.</p>
<p>I am now applying some socket function and want to make sure my redis pub and sub function is working from different pod.</p>
<p>Therefore, I want to display the NodeJS pod name on client side to test whether is working.</p>
<p>*and I... | potato | <p>The server pod would have to put that in a header or otherwise purposefully send it down to the client.</p>
| coderanger |
<p>We've multiple k8s clusters which are used by many teams for their microservices. We've restricted the <code>kubectl</code> access to the limited members only. But many times we get a request for allowing <code>readonly kubectl</code> access. </p>
<p>Many on k8s clusters are running on <code>ec2</code> & provis... | K.Thanvi | <p>You need to make users in whatever authentication system you are using and then set the role binding to be aimed at those users, not a service account. Service accounts are for services, not humans.</p>
| coderanger |
<p>I am trying to implement pgbouncer on k8s, using a helm chart created deployment,service…now how do I expose the service to outside world? Not much familiar with k8s networking, tried to create an ingress resource and it created an elb in aws…how do I map this elb to the service and expose it?
the service is created... | nmakb | <p>Ingresses are only used for HTTP and friends. In this case what you want is probably a LoadBalancer type service. That will make a balancer fabric and then expose it via an ELB.</p>
| coderanger |
<p>I want to add some annotations to the metadata block of a service within an existing helm chart (I have to add an annotation for Prometheus so that the service is auto discovered). The chart (it is the neo4j chart) does not offer me a configuration that I can use to set annotations. I also looked into the yaml files... | Matthew Darton | <p>In Helm 2, you are correct. Either you would have to fork the chart or pass it through another tool after rendering like Kustomize. Helm 3 has some planned features to improve this in the future.</p>
| coderanger |
<p>on </p>
<pre><code> kops edit ig nodes
</code></pre>
<p>I am getting </p>
<pre><code>error determining default DNS zone: Found multiple hosted zones matching cluster ".domain"; please specify the ID of the zone to use
</code></pre>
<p>cluster looks like this</p>
<pre><code>$ kops get ig
Using cluster from kube... | Nabil Sham | <p>It lives in the ClusterSpec YAML file:</p>
<pre><code>// DNSZone is the DNS zone we should use when configuring DNS
// This is because some clouds let us define a managed zone foo.bar, and then have
// kubernetes.dev.foo.bar, without needing to define dev.foo.bar as a hosted zone.
// DNSZone will probably be a suff... | coderanger |
<p><strong>I'm stuck at creating a <code>user</code> for my <code>serivice_account</code> which I can use in my kubeconfig</strong></p>
<p><strong>Background</strong>:
I have a cluser-A, which I have created using the <a href="https://github.com/googleapis/google-cloud-python" rel="nofollow noreferrer">google-cloud-py... | Panda | <p>A Kubernetes ServiceAccount is generally used by a service within the cluster itself, and most clients offer a version of <a href="https://github.com/kubernetes/client-go/blob/master/rest/config.go#L433-L439" rel="nofollow noreferrer"><code>rest.InClusterConfig()</code></a>. If you mean a GCP-level service account, ... | coderanger |
<p>I have a kubernetes cluster that has many services on it. How can I make one pod publish a message, and receive it from another siblings pods (pods of the same service), using kubernetes-java-client. </p>
<p>Until now, I didn't find a way to do the job done.</p>
<p>Example:
1 Service -> 4 pod (4/4 replicaSet)</p>
... | Ali Adel Abed | <p>Other than using the Kubernetes API to discover the peer pods (usually via the endpoints API), it doesn’t provide anything in particular for the actual comms, that would be up to your code.</p>
| coderanger |
<p>I am writing an exporter and am having trouble with metrics for my collector. From what I can tell, metrics in Prometheus need to be defined beforehand. Is there any way to define them dynamically at runtime instead? I won't know how many metrics I'll have or what metrics I'll need until the code is running. (For ex... | Trevor Jordy | <p>You would handle this by using dynamic label values rather than dynamic metric names. That said, you can call <code>prometheus.Register()</code> at runtime just fine, client_golang won't know the difference.</p>
| coderanger |
<p>I have two application, both deployed in same cluster.</p>
<p>Now from web, there is an ajax request to get data from api, but it always return <code>502 Connection refused</code>.</p>
<p>here is my jquery code (web).</p>
<pre><code>$.get("http://10.43.244.118/api/users", function (data) {
console.log(dat... | Programmer | <p>ClusterIP services (usually) only work within the cluster. You can technically make your CNI address space available externally, but that is rare and you probably shouldn't count on it. The correct way to expose something outside the cluster is either a NodePort service or a LoadBalancer (which is a NodePort plus a ... | coderanger |
<p>Trying to see if there are any recommended or better approaches since <code>docker login my.registry.com</code> creates config.json with user id and password and it's not encrypted. Anyone logged into the node or jumpbox where there images are pushed/pulled from a private registry can easily see the registry credent... | cnu | <p>There is no direct solution for this. For some specific hosts like AWS and GCP you can use their native IAM system. However Kubernetes has no provisions beyond this (SealedSecrets won't help at all).</p>
| coderanger |
<p>The first and most minimal <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer">example of a Deployment in the Kubernetes documentation</a> has the <code>app: nginx</code> line that repeats itself three times. I understand it's a tag, but I haven't found anything that expl... | spro | <p>So 1 and 3 are technically unrelated. 1 is the labels for the deployment object and only matter for your own organizational purposes. 3 are the labels that will be put on the generated pods. As for why Deployments rely on manually specifying a selector against the pod labels, it is to ensure stay stateless. The depl... | coderanger |
<hr />
<h1>Background</h1>
<p>I have a large Python service that runs on a desktop PC, and I need to have it run as part of a K8S deployment. I expect that I will have to make several small changes to make the service run in a deployment/pod before it will work.</p>
<hr />
<h1>Problem</h1>
<p>So far, if I encounter an ... | Cloud | <p>There are two main options: one is to use a tool that reduces or automates that flow, the other is to develop locally with something like Minikube.</p>
<p>For the first, there are a million and a half tools but Skaffold is probably the most common one.</p>
<p>For the second, you do something like <code>( eval $(mi... | coderanger |
<p>I want to modify particular config file from kubernetes running pod at runtime.
How can I get pod name at runtime and I can modify the file from running pod and restart it to reflect the changes? I am trying this in python 3.6.</p>
<p>Suppose,
I have two running pods.
In one pod I have config.json file. In that I h... | ImPurshu | <p>Generally you would do this with an initContainer and a templating tool like envsubst or confd or Consul Templates.</p>
| coderanger |
<p>Is there a way to have the same label key but different values for a pod. For example, can a pod have labels as "app=db" and "app=web". I tried to use kubectl label command but it picks only one label.</p>
| Vikram | <p>Labels are a <code>map[string]string</code> so you are correct, this is not possible.</p>
| coderanger |
<p>I've had my services set with type <code>NodePort</code> however in reality external access it not required - they only need to be able to talk to each other.</p>
<p>Therefore I presume I should change these to the default <code>ClusterIP</code> however the question is - how can I continue to access these services ... | userMod2 | <p>You would need to access it like any other out-of-cluster case. Generally this means either <code>kubectl port-forward</code> or <code>kubectl proxy</code>, I favor the former though. In general, ClusterIP services are only accessible from inside the cluster, accessing through forwarders is only used for debugging o... | coderanger |
<p>I am learning rbac to do access control, here is my role definition:</p>
<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: foobar-role
labels:
# Add these permissions to the "view" default role.
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups: [... | qrtt1 | <p>You can limit to a single resource (<code>resourceNames</code> in the policy), but not beyond that. I don't think the API even supports partial access.</p>
| coderanger |
<p>I'm trying to automate the process of simultaneously deploying an app onto multiple machines with kubernetes clusters. I'm new to kubernetes.</p>
<p>Which tool/technology should I use for this?</p>
| Queilyd | <p>Kubernetes doesn't really think in terms of machines (nodes in k8s jargon). When you set up a Deployment object, you specify a number of replicas to create, that's how many copies of the Pod to run. So rather than deploying on multiple machines, you create/update the Deployment once and set it to have multiple repli... | coderanger |
<p><a href="https://i.stack.imgur.com/eqwQh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eqwQh.png" alt="enter image description here" /></a></p>
<p>Using Kubernetes deploying nginx in several pods. Each pod is mounting access.log file to hostPath in order to read by Filebeat to collect to other o... | iooi | <p>This will not usually work well since logrotate can't see the other nginx processes to sighup them. If nginx in particular can detect a rotation without a hup or other external poke then maybe, but most software cannot.</p>
<p>In general container logs should go to stdout or stderr and be handled by your container l... | coderanger |
<p>I got the following architecture:</p>
<pre><code> [Service]
/ | \
[Pod1][Pod2][Pod3]
</code></pre>
<p>We assert the following Pod IPs:</p>
<ul>
<li>Pod 1: 192.168.0.1</li>
<li>Pod 2: 192.168.0.2</li>
<li>Pod 3: 192.168.0.3</li>
</ul>
<p>I am executing a loop like this:</p>
<pre><code>for ((i=0;i<10... | elp | <p>You are probably using the default <code>iptables</code> mode of kube-proxy, which uses iptables NAT in random mode to implement load balancing. Check out the <code>ipvs</code> support (<a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs" rel="nofollow noreferrer">https://kubern... | coderanger |
<p>In kubernetes, you can listen for events using <code>kubectl get events</code>. This works for other resources, but I would like to know when a Service is created and destroyed.
When I run <code>kubectl describe my-service</code> I get <code>Events: <none></code>. </p>
<p>How can I know when a serv... | Nick | <p>Every api object has a creation timestamp in the metadata section. Though that doesn’t tell when it is edited. For that you might want an audit webhook or something like Brigade.</p>
| coderanger |
<p>I'm having issues with kubelet removing docker images because it believes the disk is full:</p>
<pre><code>Dec 29 18:00:14 hostname kubelet: I1229 18:00:14.548513 13836 image_gc_manager.go:300] [imageGCManager]: Disk usage on image filesystem is at 85% which is over the high threshold (85%). Trying to free 2160300... | Mike | <p>There's a lot of weird edge case bugs in there, see <a href="https://github.com/kubernetes/kubernetes/issues/66961" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/66961</a> as a starting point.</p>
| coderanger |
<p>Back-off restarting the failed container, the description is Container image <code>mongo:3.4.20</code> already present on the machine</p>
<p>I have removed all container into that system name mongo, removed all POD, svc, deployment, and rc, but getting the same error, also I tried to label another node with a diffe... | shufilkhan | <p>Addressed in comments, "already present on the machine" is not an error message. That's a pod event and is there only for debugging and tracing to give you an idea of what steps the kubelet is taking during the pod setup process.</p>
| coderanger |
<p>Here's my environment, I have k8s cluster and some physical machines outside k8s cluster. Now I create a pod in k8s, and this pod will act like a master to create some processes in these physical machines outside k8s cluster. And I need to establish rpc connection between the k8s pod and these external processes. I ... | zjffdu | <p>You would need to set up your CNI networking in such a way that pod IPs are routable from outside the cluster. How you do this depends on you CNI plugin and your existing network design. You could also use a VPN into the cluster network in some cases.</p>
| coderanger |
<p>I am new to Kubernetes and I am facing a problem that I do not understand. I created a 4-node cluster in aws, 1 manager node (t2.medium) and 3 normal nodes (c4.xlarge) and they were successfully joined together using Kubeadm.</p>
<p>Then I tried to deploy three Cassandra replicas using <a href="https://github.com/k... | João Matos | <p>Each node tracks the total amount of requested RAM (<code>resources.requests.memory</code>) for all pods assigned to it. That cannot exceed the total capacity of the machine. I would triple check that you have no other pods. You should see them on <code>kubectl describe node</code>.</p>
| coderanger |
<p>I have an existing configMap with JSON data. The data could be anything that is allowed in JSON format - arrays, objects, strings, integers, etc.
For example:</p>
<pre><code>{
"channels": ["10", "20", "30"],
"settings": "off",
"expiry": 1... | nsteiner | <p>This is not supported by Kubernetes. As you said, the data is JSON-encoded, it's a string. ConfigMap (and Secrets) only understand strings, not nested data of any kind. That's why you have to encode it before storage. You'll need to fetch the data, decode it, make your changes, and then encode and update/patch in th... | coderanger |
<p>I am attempting to set up ThingsBoard on a google k8s cluster following the documentation <a href="https://github.com/thingsboard/thingsboard/blob/release-2.3/k8s/README.md" rel="nofollow noreferrer">here</a>.</p>
<p>Everything is set up and running, but I can't seem to figure out which IP I should use to connect t... | ThomasVdBerge | <p>Public access is set up using an Ingress here <a href="https://github.com/thingsboard/thingsboard/blob/release-2.3/k8s/thingsboard.yml#L571-L607" rel="nofollow noreferrer">https://github.com/thingsboard/thingsboard/blob/release-2.3/k8s/thingsboard.yml#L571-L607</a></p>
<p>By default I think GKE sets up ingress-gce ... | coderanger |
<p>Right now I'm deploying applications on k8s using yaml files.</p>
<p>Like the one below:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: serviceA
namespace: flow
spec:
ports:
- port: 8080
targetPort: 8080
selector:
app: serviceA
---
apiVersion: extensions/v1beta1
kind: Ingress
metadat... | mchawre | <p>At heart a Helm chart is still just YAML so to make that a chart, just drop that file under templates/ and add a Chart.yml.</p>
| coderanger |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.