prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I've implemented Traefik on Kubernetes following the <a href="https://docs.traefik.io/user-guide/kubernetes/" rel="noreferrer">User Guide</a>. That gives me an ingress-controller and I was able to create an ingress and the traefik-ingress-service listening on 80 and 8080.</p>
<p>I've also setup a "gce" ingress:</p>... | <p>The way to get health check to work on the gce load balancer is to add an argument to the traefik container. The <code>--ping</code> and <code>--ping.entrypoint=http</code> lets me setup a gce health check to the <code>/ping</code> path.</p>
<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: tra... |
<p>When a Pod is evicted I'm supposed to find messages about the eviction at <code>/dev/termination-log</code> (or other path defined in <code>terminationMessagePath</code> property) inside the container filesystem.</p>
<p>I'm trying to track OOMKilled events, but after OOMKilled occured and the Pod was restarted, the ... | <p>You can ssh to the machine the pod was running and exec <code>journalctl -u kubelet</code></p>
|
<p>I've been studying Kubernetes for a few weeks now, and using the kube-lego NGINX examples (<a href="https://github.com/jetstack/kube-lego" rel="noreferrer">https://github.com/jetstack/kube-lego</a>) have successfully deployed services to Kubernetes cluster using Rancher on DigitalOcean.</p>
<p>I've deployed sample ... | <p>I investigated my setup a bit more today, and I think I found out why I was having difficulty. The "LoadBalancer" is often mentioned as for use with Cloud Providers (in both docs, and what @fiunchinho describes). I was using it with a Rancher setup, which auto creates an HA-Proxy LoadBalancer ingress for you on the ... |
<p>(A very similar question was asked about 2 years ago, though it was specifically about secrets, I doubt the story is any different for configmaps... but at the least, I can present the use case and why the existing workarounds aren't viable for us.) </p>
<p>Given a simple, cut-down <code>deploym... | <p>From a "container-native" perspective, having a large file system tree of configuration files that the application processes at startup to arrive at its canonical configuration is an anti-pattern. Better to have a workflow that produces a single file, which can be stored in a ConfigMap and easily inspected in its fi... |
<p>I'm trying to create an Ingress for my Kubernetes cluster on Google Compute Engine. It was working fine while I was using the <code>gke</code> controller class. But I had to change it to <code>nginx</code> controller to be able to specify the back end timeout. The problem is that my Ingress is not being provided wit... | <p>Found the issue. It was due to the fact I had not configured the Nginx controller for the Ingress.</p>
|
<p>How to change ip when I run kubeadm init? I create master node on google compute engine and want to connect node from aws and azure, but kubeadm use internal ip address which see only from google cloud platform network. I tried to use --apiserver-advertise-address=external ip, but in this case kubeadm stuck in [init... | <p>If I understand correctly what you are trying to do is using a GCP instance running kubeadm as the master and two nodes located on two other clouds.</p>
<p>What you need for this to work is to have a working load balancer with external IP pointing to your instance and forwarding the TCP packets back and forth.</p>
... |
<p>What versions of Docker does Kubernetes <code>v1.9</code> support?
Is there a road map for these?</p>
<p>Trend here:</p>
<p><a href="https://stackoverflow.com/questions/48400574/docker-version-supported-in-kubernetes-1-8">Docker version supported in Kubernetes 1.8</a></p>
<p><a href="https://stackoverflow.com/que... | <p>The validated docker versions are the same as for <em>v1.8</em></p>
<ul>
<li><strong><code>1.11.2</code></strong> to <strong><code>1.13.1</code></strong></li>
<li><strong><code>17.03.x</code></strong></li>
</ul>
<p>Source: <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.9.md#external-depe... |
<p>I'm planning a kubernetes cluster (to be created on public cloud infrastructure). One important question:
Should worker nodes be exposed to internet (have public IP)? I suppose they shouldn't but I wonder what is the best practice.
Thanks.</p>
| <p>From a security perspective it is always wise to limit the number of publicly reachable nodes as much as possible and there are multiple ways to achieve that. </p>
<p>The most common and easiest way is that you could place your worker nodes behind a LB solution of your cloud provider. The LB is publicly reachable, ... |
<p>I have my application running on google kubernetes engine and currently uses pvc for data storage. I am just not able to decide which storage option should we use PVC or Disk? </p>
<p>In case of PVC we can't have snapshot, apart from this is there any strong reason we should go for disk based storage. what is advis... | <p>You are mixing two different yet connected concepts here. Persistent Volume Claim and Volume.</p>
<p>Persistent Volume Claim is not a storage device / service. It is a declaration of need for storage of particular characteristic. In a way, you could say it's an equivalent of an async programming <strong>promise</st... |
<p>According to <a href="https://kubernetes.io/docs/reference/api-overview/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/api-overview/</a>, everything at <code>/api/v1</code> is the "legacy" API group. Although the docs don't go into any further detail than that, my natural inference from t... | <p>All newer Kubernetes API objects can be found in <em>named</em> API groups (like, for example, the <code>Deployment</code> object in the <code>apps/v1</code> API group) -- which is also the group that you use in the <code>apiVersion</code> field when declaring new objects.</p>
<p>Older API objects (like the <code>P... |
<p>I'm using <strong>gcsfuse</strong> to mount a volume in a container, and I need it to start my node.js application.</p>
<p>To mount the volume I'm using the <strong>lifecycle hooks of kubernetes</strong>, but it doesn't ensure that it will be executed before the entrypoint of my container.</p>
<p>I've been thinkin... | <p>You can run this dockerfile in privileged mode:</p>
<pre><code>FROM ubuntu
RUN echo "deb http://packages.cloud.google.com/apt gcsfuse-stretch main" | tee /etc/apt/sources.list.d/gcsfuse.list
RUN apt-get update && apt install curl -y
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key... |
<p>What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation?</p>
<p>What is the difference between both in simple terms?</p>
| <p>From the <a href="https://docs.openshift.org/latest/architecture/additional_concepts/storage.html#lifecycle-of-a-volume-and-claim" rel="noreferrer">docs</a></p>
<blockquote>
<p>PVs are resources in the cluster. PVCs are requests for those resources and also act as claim checks to the resource.</p>
</blockquote>
... |
<p>Say I have some (.NET Core) code running in a k8s pod and I ask for:</p>
<pre><code>DateTime.Now
</code></pre>
<p>I assume I will get the date-time from the host that the pod is running on. Is there any way of getting a date-time value that is consistent across the k8s cluster?</p>
| <p>The clock in a container is the same as the host machine because it’s controlled by the kernel. </p>
<p>The timezone is controlled by the OS layer tho and so may be different in the container. You can mount in the time zone file to overcome this.</p>
<p>Synchronization of clocks across machines is a complicated to... |
<p>I'm attempting to create a cluster on Google Kubernetes Engine that runs nginx, RStudio server and two Shiny apps, following and adapting <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="noreferrer">this guide</a>.</p>
<p>I have 4 workloads that are all green in the UI, deploye... | <p>As Radek suggested, <code>ingress.kubernetes.io/rewrite-target: /</code> is required to re-write your requests. However, this is not currently supported by the GKE ingress controller and is the reason that you're receiving 404 responses.</p>
<p>Instead, on GKE, you must use an <a href="https://github.com/kubernetes... |
<p>I am using Azure Container Services (AKS - not ACS) to stand up some API's - some of which are for public consumption, some of which are not.</p>
<p>For the public access route everything is as you might expect, a load-balancer service bound to a public IP is created, DNS zone contains our A record forwarding to th... | <p>If you need to access these services from other services outside the AKS cluster, you still need an ILB to load balance across your service on the different nodes in your cluster. You can either use the ILB created by using the annotation in your service. The alternative is using NodePort and then stringing up your ... |
<p>I followed the kubernetes-engine tutorial, used local gloud in terminal. Looks everything is working, but I can't reach exposed external-ip <a href="http://104.197.4.162/" rel="nofollow noreferrer">http://104.197.4.162/</a> in my browser, as the tutorial said. Thank you!</p>
<p>$ kubectl get service</p>
<pre><code... | <p>I think you need opening firewall and access your deployments in compute engine instance by instance external ip address and port. You can use <code>curl ip:port</code> in for check it.</p>
|
<p>Is it possible to delete POD in kubernetes based on creation time or age? </p>
<p>Example : I would like to delete all PODs which are older than 1 day. These PODs are orphaned , therefore no new PODs will be created. </p>
| <p>This command will delete all PODs older than one day :</p>
<pre><code>kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' | awk '$2 <= "'$(date -d 'yesterday' -Ins --utc | sed 's/+0000/Z/')'" { print $1 }' | xargs --no-run-if-empty kubect... |
<p>I am trying to deploy the "cert-manager" (<a href="https://github.com/jetstack/cert-manager" rel="nofollow noreferrer">https://github.com/jetstack/cert-manager</a>) project which is the successor to "kube-lego". I'm finding that the certificates don't match what is being created, and I'm wondering if anybody else ha... | <p>The secret and the nginx ingress controller are in a different namespace, there is an option where you can set the certificate from another namespace.</p>
<p><a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/cli-arguments.md" rel="nofollow noreferrer">https://github.com/kubernetes/ing... |
<p>I am unable to get circuit breaking configuration to work on my elb through egress config.</p>
<p><strong>ELB</strong>
elb has success rate of 25% (75% 500 error & 25% with status 200),
the elb has 4 instances, only 1 returns a successful response, other instances are configured to returns 500 error for testing... | <p>Currently, Istio considers an <code>Egress Rule</code> to designate a single host. This single host will not be ejected due to the load balancer's panic threshold of Envoy (the sidecar proxy implementation of Istio). The default panic threshold of Envoy is 50%. This means that at least two hosts are required for one... |
<p>I deployed these two services to my cluster under namespace <code>prisma</code>: </p>
<pre><code>kubectl get services -n prisma
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
database ClusterIP 10.23.252.18 <none> 3306/TCP 3d
prisma NodePort 10.23.248.0 ... | <p>Yes, that's correct. kubectl cluster-info --help says:</p>
<pre><code>Display addresses of the master and services with label kubernetes.io/cluster-service=true
</code></pre>
<p>That label, under the kubernetes.io "namespace" (referring to the hierarchical syntax used in labels, not to namespace objects in cluste... |
<p>I'm trying to install SAP Vora 2.0 on AWS Minikube but I'm getting this error: "Docker build failed." Have tried with version 2.1 of Vora but still encountering similar error. </p>
<p>This is the actual error log I'm getting:</p>
<pre><code>Downloading/unpacking kubernetes
Cleaning up...
Exception:
Traceback (most... | <p>Please follow below SAP note to resolve the issue:
<a href="https://launchpad.support.sap.com/#/notes/2608651" rel="nofollow noreferrer">https://launchpad.support.sap.com/#/notes/2608651</a></p>
<p>Editing the post:</p>
<p>We need to edit 2 files to resolve this issue.</p>
<p>Locate the below file in Vora install... |
<p>I have been trying Docker Swarm and looking into other solutions, such as Kubernetes, but I just can't figure out what would be the best for my use-case, and I could use some help from experts, so your input is very welcome.</p>
<p>I have some requirements for the cloud I want to build, and it (obviously) should be... | <p>Honestly, from a pure ROI and operational load perspective, it doesn't sound like container runtimes at your current datacenter is the right solution for this problem. </p>
<p>From an operator perspective, a container system makes sense when there are tenancy and heterogeneity problems that are hard to solve with V... |
<h2>Objective</h2>
<p>Clarify the behaviour of K8S container cpu usage when limit is set far below available CPU, and confirm if the understanding how to set limit is correct.</p>
<h2>Background</h2>
<p>I have a node of 2CPU, hence 2000m can be the upper limit. Every namespace is set with the LimitRange which limits... | <h2><a href="https://rads.stackoverflow.com/amzn/click/com/1617293725" rel="nofollow noreferrer" rel="nofollow noreferrer">Kubernetes in Action 1st Edition by Marko Luksa</a><br></h2>
<p>14.1.3. Understanding how CPU requests affect CPU time sharing </p>
<blockquote>
<p>But <strong><em>if one container wants to use... |
<p>My VPS provider doesn't have possibility to have private network between VSes. So master and nodes are interconnected over the internet. Is it safe enough practice? Or it is better to move to AWS?</p>
| <p>While the other answer states it is not safe I would strongly disagree on it.</p>
<p>1: It is perfectly fine to expose master on the public internet, as you would do with any other server. It is by design protected with authentication/cipher. Obviously a regular sec hardening should be in place, but that is a case ... |
<p>Trying to build k8s cluster on bare metal. I use CoreOS as host OS for my nodes. And I'm a bit confusing with the way I should install flannel for cluster networking.</p>
<p>I see from docs that I can either download it to my host machine and start it using <code>systemd</code> or use a <a href="https://raw.githubu... | <p>That manifest includes a ClusterRole, a ClusterRoleBinding, a ConfigMap, and the DaemonSet resources (which implicitly defines the pod resources), so it can't be run with --pod-manifest, which only wants pod resource definitions. </p>
<p>I don't have comparative experience running flannel under systemd vs as a daem... |
<p>To install kubernetes using flannel, one initially needs to run:</p>
<pre><code>kubeadm init --pod-network-cidr 10.244.0.0/16
</code></pre>
<p>Questions are:</p>
<ul>
<li>What is the purpose of "pod-network-cidr"?</li>
<li>What's the meaning of such IP "10.244.0.0/16"?</li>
<li>How flannel uses this afterwards?</... | <p>pod-network-cidr is the virtual network that pods will use. That is, any created pod will get an IP inside that range. </p>
<p>The reason of setting this parameter in flannel is because of the following: <a href="https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml" rel="noreferrer">https://... |
<p>I'm trying to wrap my head around how/if Kubernetes manages multiple Pods in terms of a clustered client model. Based on this documentation <a href="https://kubernetes-v1-4.github.io/docs/user-guide/pods/multi-container/" rel="nofollow noreferrer">Multi-container</a> it sounds as though Kubernetes is only concerned... | <p>The diagram has the right idea, but not quite the right terminology. </p>
<p>The diagram would be more accurate if the "Pod" label was replaced with "Namespace", and the "Container" label was replaced with "Pod". </p>
<p>A single Kubernetes cluster is intended to be able to support multi-tenancy, where the workloa... |
<p>I have 3 nodes, running all kinds of pods. I would like to have a list of nodes and pods, for an example:</p>
<pre><code>NODE1 POD1
NODE1 POD2
NODE2 POD3
NODE3 POD4
</code></pre>
<p>How can this please be achieved?</p>
<p>Thanks.</p>
| <p>You can do that with <a href="https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns" rel="noreferrer">custom columns</a>:</p>
<pre><code>kubectl get pod -o=custom-columns=NAME:.metadata.name,STATUS:.status.phase,NODE:.spec.nodeName --all-namespaces
</code></pre>
<p>or just:</p>
<pre><code>kubectl ... |
<p>I'd like to update a value config for a helm release on my cluster.</p>
<p>Something like </p>
<p><code>helm update -f new_values.yml nginx-controller</code></p>
| <pre><code>helm upgrade -f ingress-controller/values.yml nginx-ingress stable/nginx-ingress
</code></pre>
<p>Or more generally:</p>
<pre><code>helm upgrade -f new-values.yml {release name} {package name or path} --version {fixed-version}
</code></pre>
<p>The command above does the job. </p>
<p>Unless you manually s... |
<p>Is there a way to retrieve the oms workspace ID and Key in Azure via the az cli or azure powershell?
I am deploying k8s clusters (in Azure) and automatically want to deploy the oms container agent via helm. I need a workspace ID and key for that and I don't want to create the workspace by hand and manually put the I... | <p>You could use Azure Power Shell to do this, for example:</p>
<pre><code>$rgname = "shuioms"
$omsname = "shuioms"
##get workspaceid
$oms=Get-AzureRmOperationalInsightsWorkspace -ResourceGroupName shuioms -Name shuioms
$workspaceID = $oms.CustomerId
#get oms key
$key=Get-AzureRmOperationalInsightsWorkspaceSharedKeys ... |
<p>So I am fairly new to Kubernetes. I am a Windows user (sorry) and have installed Minikube. I am trying to learn Kubenetes using MiniKube. I have created very simple REST API that should work with port 5000 exposed where there is a simple route /Hello/{somestring} </p>
<p>I have created a POD/Deployment and Service ... | <p>kube-dns is internal DNS. You can only use the DNS name for a service from inside the cluster. </p>
<p>Since your service type is Nodeport, you can connect to the service using the IP of the machine (minikube) on that port.</p>
|
<p>I've followed <a href="https://kubernetes.io/docs/getting-started-guides/kops/" rel="nofollow noreferrer">these instructions for setting up a kubernetes cluster on AWS using kops.</a> </p>
<p>I've then been able to run <code>kubectl create -f ...</code> commands to get an application running. </p>
<p>I can access ... | <p>Ok, there was a bit of confusion about what the token is. </p>
<p>Best way to retrieve the token is: </p>
<pre><code>kubectl get secrets
</code></pre>
<p>To list the secrets</p>
<p>Then</p>
<pre><code>kubectl describe secret SECRET_NAME
</code></pre>
<p>To retrieve the token. </p>
|
<p>Running on Google Cloud platform / Container Engine - How do I set it up to point to this Ingress in the following?</p>
<p>I have installed Nginx-ingress on Kubernetes with Helm and it works for the <code>default backend - 404</code>.</p>
<p>I want to be able to use different http uri path, like <code><domain.c... | <p>I went ahead and reproduced your use case. <br>
Assuming the installation of nginx ingress controller though helm went smoothly and when listing resources everything seems to be fine, you need to specify the paths in the ingress yaml file, as follows:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
meta... |
<p>New to Kubernetes but want to quickly run some Docker containers on different machines, e.g, containers 1, 2 and 3 on node 1 (physical machine 1) and container 4, 5, and 6 on node 2 (physical machine 2). Can someone help me with the config files and commands to get it up and running, and all containers can communica... | <p>The simple way to assign <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/" rel="nofollow noreferrer"><code>Pods</code> to <code>Nodes</code></a> is to use <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" rel="nofollow noreferrer">label sel... |
<p>I have a deployment object with the following <code>rake jobs:work</code> command:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: staging-delayed-job-deployment
namespace: staging
spec:
template:
metadata:
labels:
env: staging
name: delayed-job
spe... | <p>I needed to add an initializer: <code>config/initializers/delayed_job.rb</code> and set the worker's logger to stdout like so: </p>
<p><code>Delayed::Worker.logger = Logger.new(STDOUT)</code></p>
|
<p>I've already some environments setted with docker and docker compose, so I have diferent containers with diferent services, and all of them are orchestrated by docker-compose, and it works ok in my local dev environment. Recently I've read about kubernetes and minikube, but aparently, kubernetes is a tool more for s... | <p>There are lots of decision criteria. If there is a target environment for this application- use local tools that best approximate that target environment. If the target environment runs kubernetes, best to use minikube. If the target environment is some flavor of clustered docker, use compose. If there is no target ... |
<p>I have successfully created a Kubernetes POD/Service using MiniKube on windows. But I would now like to ensure that DNS is working correctly.</p>
<p>The DNS service is shown as running</p>
<pre><code>.\kubectl get pod -n kube-system
</code></pre>
<p>Which shows me the kube-dns pod is running</p>
<p><a href="http... | <p>To do it like this your container needs to include the command you want to use inside of the built image.</p>
<p>Sidenote: <code>kubectl debug</code> is coming to kube in near future <a href="https://github.com/kubernetes/kubernetes/issues/45922" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/is... |
<p>This is my deployment for the django app with rest framework:</p>
<pre><code>#Deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
service: my-api-service e
name: my-api-deployment
spec:
replicas: 1
template:
metadata:
labels:
name: my-api-selector
s... | <p>Looking at your static files section:</p>
<pre><code>location /static/ {
autoindex on;
alias /static/;
}
</code></pre>
<p>Is <code>/static/</code> an absolute path to your static web files?, if not, use the full path on alias since root has not been defined earlier.</p>
<p>Again ... |
<p>We are using managed Kubernetes in Azure (AKS) and have run out of public IP addresses. We only need one, but AKS creates a new public IP every time we deploy a service and it does not delete it when the service is deleted. For example: </p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: somename
spec:
... | <p>It should delete the IPs after some time (like 5 minutes tops). So the issue you are having is a bug. You can check k8s events to find the error and look at it.</p>
<p>Also, its perfectly safe to delete Azure resources. k8s wont freak out if they are gone.</p>
<p>Tested with k8s 1.9.1</p>
|
<p>I have multiple MSA on k8s on GKE. Each is on separate subdomain like:</p>
<ul>
<li>msa1.example.com</li>
<li>msa2.example.com</li>
</ul>
<p>I have it in single ingress:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: main-ingress
annotations:
kubernetes.io/ingress.global-stati... | <p>A way around it could be to run your own nginx-ingress controller in your cluster and expose it via LoadBalancer service type. Then you would have 1 IP for your ingress and be able to serve all ingresses via nginx controller by adding annotation <code>kubernetes.io/ingress.class: "nginx"</code></p>
<p>Reference: <a... |
<p>I have a Kubernetes node with a small root disk and a large disk plumbed into /var/lib/docker</p>
<p>Kubernetes does GC on disk images when the used space reaches X%. Whats it looking at though? I can't find it in the docs.</p>
<p>Just to clarify, if you've got / with 20GB of space and /var/lib/docker with a secon... | <p>Configuration info for kubelet cleanup of unused images and containers is here:</p>
<p><a href="https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/</a></p>
<p>Default... |
<p>In <a href="https://kubernetes.io/docs/admin/authorization/rbac/" rel="nofollow noreferrer">this</a> documentation of Kubernetes is says:</p>
<pre><code>To enable RBAC, start the apiserver with --authorization-mode=RBAC
</code></pre>
<p>How do you upgrade an existing cluster and/or how to see if RBAC is enabled?</... | <p>Could you SSH to the master node/nodes and edit <code>/etc/kubernetes/manifests/kube-apiserver.yaml</code> </p>
<p>You should see something like below in the file ></p>
<pre><code>command:
- "/hyperkube"
- "apiserver"
- "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageCl... |
<p>I'm using k8s on GCP. It is required to set ingress to setup TLS connection so I set ingress for my application, it works !!!<br>
BTW what is Ingress controller like as <a href="https://github.com/kubernetes/ingress-nginx" rel="noreferrer">Nginx Ingress Controller</a>? </p>
<p>I'm sure that ingress create new load... | <p>You may have some misunderstandings about Ingress.
Ingress should be the rules for the traffic, which indicate the destination of a request will go through in the cluster.
Ingress Controller is the implementation for the Ingress. GCE and Nginx are both supported by k8s. They will take care of L4 or L7 proxy.</p>
|
<p>Say I am running my app in GKE, and this is a multi-tenant application.</p>
<p>I create multiple Pods that hosts my application.</p>
<p>Now I want:
Customers 1-1000 to use Pod1
Customers 1001-2000 to use Pod2
etc.</p>
<p>If I have a gcloud global IP that points to my cluster, is it possible to route a request ba... | <p>You can guarantee session affinity with services, but not as you are describing. So, your customers 1-1000 won't use pod-1, but they will use all the pods (as a service makes a simple load balancing), but each customer, when gets back to hit your service, will be redirected to the same pod.</p>
<p>Note: always with... |
<p>I successfully deployed my web app on kubernetes in Google cloud. It is serving via http. I followed all guides on how to add ssl certificate and it was added according to Google cloud console however, it only work as http , when you try to access the web app as HTTPS. the browser says "This site can’t be reached"</... | <p>I used this command to upload my ssl certificate </p>
<pre><code>kubectl create secret tls tls-secret --key=/tmp/tls.key --cert=/tmp/tls.crt
</code></pre>
<p>instead of yaml file Secret below and it works better. At least for Google Cloud </p>
<pre><code>apiVersion: v1
data:
tls.crt: [crt]
tls.key: [key]
kind... |
<p>I am trying to do some experiments with Kubernetes in google cloud.</p>
<p>I have docker image in google cloud registry and need to deploy that image to a kubernetes cluster.</p>
<p>Here are the steps I need to perform.</p>
<ol>
<li>Create a Kubernetes cluster.</li>
<li>Copy the image from GCR and deploy to Kuber... | <p>There is a RESTful kubernetes-engine API:</p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/reference/api-organization" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/reference/api-organization</a></p>
<p>e.g. create a cluster:</p>
<p><a href="https://cloud.google.com/kube... |
<p>I used kubeadm to deploy my Kubernetes dashboard.
When I tried to deploy the <em>nginx-ingress-controller</em> in my dev namespace with default service-account, I was getting <em>liveness probe</em> and readiness failing with status code.</p>
<p>nginx-ingress-controller image is</p>
<pre><code>gcr.io/google_containe... | <p>You're most likely adding too little resources try removing the resources for debugging</p>
|
<p>I'm trying to deploy Nexus3 as a Kubernetes pod in IBM Cloud service. I am getting this error, probably because the PVC is mounted as read only for that user. I have had this problem other times in Postgres for example but I can't recall how to solve it:</p>
<pre><code>mkdir: cannot create directory '../sonatype-wo... | <p>The nexus3 Dockerfile is structured such that it runs as a non-root user. However, the NFS file storage requires root user to access and write to it. There are a couple of ways to fix this. One, you can restructure your Dockerfile to temporarily add the non-root user to root and change the volume mount permissions. ... |
<p>I'm encountering the following error for my ingress controller. </p>
<pre><code>Warning GCE googleapi: Error 403: Quota 'BACKEND_SERVICES' exceeded. Limit: 9.0, quotaExceeded
</code></pre>
<p>My limit is set as 9, and this has previously worked so I'm not sure why this error is being encountered now. </p>
<p>... | <p>You could also ask for a small up on the <a href="https://console.cloud.google.com/iam-admin/quotas" rel="noreferrer">backend # quota page</a>.</p>
<p>If it's small enough it will get auto accepted.</p>
|
<p>I'm getting below error while creating cassandra operator for kubernetes.</p>
<pre><code># kubectl create -f example-cassandra-cluster.yaml
error: unable to recognize "example-cassandra-cluster.yaml": no matches for cassandra.database.instaclustr.com/, Kind=CassandraCluster
</code></pre>
<p><code>example-cassandr... | <p>The</p>
<pre><code>apiVersion: "cassandra.database.instaclustr.com/v1beta2"
</code></pre>
<p>indicates that the CassandraCluster kind</p>
<pre><code>kind: "CassandraCluster"
</code></pre>
<p>depends on a Custom Resource Definition.</p>
<p>That CRD has to be created in the cluster before instantiating its object... |
<p>Is there option to connect to external database cluster from POD? I need to connect to elastic search, zookeeeper, Kafka and couchbase, each of them has its own cluster. Per my understanding <a href="https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors" rel="nofollow noreferrer... | <p>The k8s doc on your link has more info on exposing services running on k8s but not externally</p>
<p>You generally want to expose your service using a DNS entry and manage the HA for that service separately. </p>
<p>For example you can a single DNS entry <code>mykafka.mydomain.com</code> and then assign IP address... |
<p>Why does k8s secrets need to be base64 encoded when configmaps does not?</p>
<p>When creating a configmap you simply do somthing like this:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
SOME_KEY: a string value
</code></pre>
<p>But when you want to create a secret you have t... | <p>Secrets can contain binary data (the type is <code>map[string][]byte</code>), and byte arrays are base64-encoded in JSON serialization.</p>
<p>ConfigMaps only contain string data (the type is <code>map[string]string</code>), so the JSON serialization just outputs the string.</p>
<p>In 1.10, ConfigMaps have a new <... |
<p>I'm looking at Prometheus metrics in a Grafana dashboard, and I'm confused by a few panels that display metrics based on an ID that is unfamiliar to me. I assume that <code>/kubepods/burstable/pod99b2fe2a-104d-11e8-baa7-06145aa73a4c</code> points to a single pod, and I assume that <code>/kubepods/burstable/pod99b2fe... | <p>OK, now that I've done some digging around, I'll attempt to answer all 3 of my own questions. I hope this helps someone else.</p>
<p><strong>How to do I map this ID to the pod name I see when I run kubectl get pods?</strong></p>
<p>Given the following, <code>/kubepods/burstable/pod99b2fe2a-104d-11e8-baa7-06145aa73... |
<p>I am new to Kubernetes and Minikube. Both look amazing tools, but I wonder if is there any way to have a single .yml file to deploy my services/deployments in all the environments, including local dev env...</p>
<p>The first limitation I see is related to service discovery since I would like to have my services beh... | <p>There are other common differences between environments- names; credentials for any database or other permissioned resources; allocation of RAM/CPU; replica counts. There are limitations that minikube has as a runtime, compared to production k8s. </p>
<p>So- though one <em>can</em> use the same single yaml file in ... |
<p>I am taking a deep look inside Flink to see how I can use it on a project and had a question for the creators / high level thinkers... why does Flink use Yarn as the default resource manager? </p>
<p>Was Kubernetes considered? Or is it one of those things where we started on Yarn, it works pretty well...</p>
<p>I ... | <p>Flink is not tied to YARN. It can also run on Apache Mesos and there are also users running it on Kubernetes. In the current version (Flink 1.4.1), there are a few things to consider when running Flink in Kubernetes (see this <a href="https://berlin-2017.flink-forward.org/kb_sessions/flink-in-containerland/" rel="no... |
<p>I'm deploying K8s to the Oracle Cloud Infrastructure where while I can make sure that the public internet facing IP stays static even when the instances are restarted. But for some reason the private IP of the instances always changes. Which brings me to the question - can Kubernetes work with nodes who's IP changes... | <p>Yes, kubernetes can handle that case easily, and on OCI it works just fine. The individual worker nodes will (using the kubelet on that host) call to the master IP, which we would recommend using a load balancer to front to achieve a static IP and allow you to change, scale, and otherwise adjust your master kuberne... |
<p>I have successfully created a Kubernetes POD/Service using MiniKube on windows. But I would now like to ensure that DNS is working correctly.</p>
<p>The DNS service is shown as running</p>
<pre><code>.\kubectl get pod -n kube-system
</code></pre>
<p>Which shows me the kube-dns pod is running</p>
<p><a href="http... | <p>So more on this I installed busybox into a POD to allow me to use nslookup and this enabled me to do this</p>
<p><a href="https://i.stack.imgur.com/8ULrL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ULrL.png" alt="enter image description here"></a></p>
<p>So this looks cool, but should I not... |
<p>I'm implementing <a href="https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example" rel="nofollow noreferrer">this example</a> with <code>az aks</code>. I want to use ingress in order to use easily the reverse proxy as in the example with a container redirected to <code>/tea</code> and th... | <p>It took me a while to publish the answer. I wanted to understand a bit more what was happening in the container.</p>
<p>Anyway, the problem with the <a href="https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example" rel="nofollow noreferrer">implementation</a> I was testing, it is that a... |
<p>I am trying to use below command to curl to the pod itself using podip as currently I don't want kubelet to request my pod for health check.</p>
<pre><code>livenessProbe:
exec:
command:
- curl
- $POD_IP:9990/admin/ping
initialDelaySeconds: 3
periodSeconds: 5
</code></pre>
<p>but the env variable ... | <p>try following :</p>
<pre><code>command:
- bash
- -c
- curl $POD_IP:9990/admin/ping
</code></pre>
|
<p>First time using Kubernetes. I have an API and a database, and I want the two pods to communicate with each other. </p>
<p>Based on the docs, I should create a service.</p>
<p>I have created a service for each of the two pods, though still not able to connect to the pod using the services IP address. </p>
<p>For ... | <p>your service has a selector defined</p>
<pre><code>selector:
app: mysql
</code></pre>
<p>yet your Pod has no labels whatsoever, hence the service can not identify it as its backend and has no endpoint to direct traffic for ClusterIP. You should also stick to standard port number on service as well, so like this ... |
<p>I am running a Kubernetes 1.8 on Azure AKS. I have docker images deployed to a pod. I have created a Azure public ip(static) which I give to the NGinx ingress-controller when I create it. Kubectl get ingress shows that the ip has been assigned to it and /healthz endpoint returns 200 OK.</p>
<p>kubectl describe ingr... | <p>What's happening is that the wiring between the ingress and the service your pods back is not correct. The logs from the ingress pod will probably help. There could be a few specific things wrong.</p>
<p>The reason that requesting the IP directly gives a response is that the IP does not match an ingress -> service ... |
<p>I am new to kubernetes administration. While trying to list & setup new cronjobs, one of the users is getting the following error: </p>
<blockquote>
<p>Error from server (Forbidden): cronjobs.batch is forbidden: User
cannot list cronjobs.batch in the namespace </p>
</blockquote>
<p>The role while creating... | <p>The <code>Cronjob</code> resource belongs to the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#cronjob-v1beta1-batch" rel="nofollow noreferrer"><code>batch</code> API group</a>. </p>
<p>In your RBAC role, you have only granted access to the <code>core</code> (empty name), <code>exte... |
<p>When I run multiple instances of WordPress on Google Kubernetes Engine and drop session affinity I get weird behavior in the cart, items disappear and come back. And people get logged out. (When I use session affinity, 100% of my traffic gets sent to one pod).</p>
<p>It seemed to be an issue of session persistence,... | <p>It looks like woocommerce uses PHP sessions for Cart info:</p>
<p><a href="https://woocommerce.github.io/code-reference/classes/WC-Cart.html#108" rel="nofollow noreferrer">https://woocommerce.github.io/code-reference/classes/WC-Cart.html#108</a>
<a href="https://woocommerce.github.io/code-reference/classes/WC-Cart-S... |
<p>I have followed this <a href="https://blog.kublr.com/how-to-install-a-single-master-kubernetes-k8s-cluster-34ec16efefff" rel="nofollow noreferrer">tutorial</a> and this <a href="https://blog.alexellis.io/kubernetes-in-10-minutes/" rel="nofollow noreferrer">tutorial</a> and <a href="https://kubernetes.io/docs/setup/i... | <p>So after following the advice from @errordeveloper and still hitting the wall, I was able to solve the issue that turns out to be pretty simple.</p>
<p>Both my VMs had the same hostname. </p>
<pre><code>hostname -f
</code></pre>
<p>would return </p>
<pre><code>ubuntu
</code></pre>
<p>on both, and that causes i... |
<p>All my <code>kubectl get</code> commands are failing with the following error <code>The connection to the server localhost:8080 was refused - did you specify the right host or port?</code></p>
<p>I checked the ip of my <code>/etc/kubernetes/admin.conf</code> and it has the following apart from other stuff: <code>se... | <p><code>/etc/kubernetes/admin.conf</code> is the location that the provisioning system placed your config in, but it is not the one used by kubectl by default. The usual place that kubectl looks at for configuration is <code>~/.kube/config</code> so either put your config file there or hint to kubectl that it needs to... |
<p>I am having trouble trying to understand the Kubernetes authentication model, specially what "users" are.</p>
<p>Suppose I am on a computer, which is inside a kubernetes cluster. I want to do a request to the API server, using <code>kubectl</code>.</p>
<p>So:
- I need to have the public key from the api-server HTT... | <p>The user to be used depends on the kubeconfig for you to use (e.g. ~/.kube/config) and the current context. For example if your ~/.kube/config is below, kubernetes-admin is the user.</p>
<pre><code>apiVersion: v1
kind: Config
current-context: kubernetes-admin@kubernetes
preferences: {}
contexts:
- context: ... |
<p>According to the Kubernetes documentation, services of the <code>ClusterIP</code> type will populate a <code>DNS</code> <code>A</code> type record with the following schema:</p>
<pre><code>pod-ip-address.my-namespace.pod.cluster.local
</code></pre>
<p>I am having difficultly parsing this schema into a resolvable a... | <p>If your application is in the same namespace as the service you wish to consume, you can use the servicename:</p>
<pre><code>subway-explorer-gmaps-proxy-service
</code></pre>
<p>as the DNS name. Kube dns will resolve to the service IP. </p>
<p>If your application is not in the same namespace as that service, serv... |
<p>I'm using the Kubernetes Jenkins plugin in order to create Jenkins slaves on demand. The slaves job is to deploy and provision my apps to the Kubernetes cluster.</p>
<p>I created a pipeline project and wrote a very simple Jenkinsfile:</p>
<pre><code>podTemplate(label: 'jenkins-pipeline', containers: [
containerTem... | <p>This</p>
<pre><code>def version = params.${VERSION}
def environment = params.${ENVIRONMENT}
</code></pre>
<p>Should be this</p>
<pre><code>def version = params."${VERSION}"
def environment = params."${ENVIRONMENT}"
</code></pre>
|
<p>So, i have a k8s cluster running on AWS, provisioned using kops. I have created a secret locally, using kubectl:</p>
<pre><code> kubectl create secret generic aws-es --from-file=./aws_key.txt --from-file=./aws_secret_key.txt
</code></pre>
<p>My service.yml has this env:</p>
<pre><code> - name: AWS_ACCESS_KE... | <p>Fixed it. The problem was i created secrets in default namespace, while my pods were running in kube-system namespace.</p>
|
<p>I have created a kubernetes cluster and deployed jenkins by following file </p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins-ci
spec:
replicas: 1
template:
metadata:
labels:
run: jenkins-ci
spec:
containers:
- name: jenkins-ci
image: jenkins:2.32.2
... | <p>Just <code>kubectl delete pods -l run=jenkins-ci</code> - Will delete all pods with this label (your jenkins containers).
Since they are under Deployment, it will re-create the containers. Network routing will be adjusted automatically (again because of the label selector).</p>
<p>See <a href="https://kubernetes.io... |
<p>I'm looking to mount docker socket from one container to another without involving the host. Is it possible? I searched around and couldn't find an example of such a situation. The issue is that host uses a very old version of docker so I setup docker within the container which works okay. Now I need other docker co... | <p>The only way comes in mind is to use hostPath volume with type socket, and mount it into multiple containers:
<a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath</a></p>
<p>Even if it works you will end up wi... |
<p>I want to create a customized docker image and be able to use kubernetes to pull my customized docker image from private docker registry. Here are my setups:</p>
<p>Environment:
docker registry ip:10.179.143.115
kubernetes master ip: 10.179.143.113</p>
<ol>
<li>generate a certificate:</li>
</ol>
<blockquote>
<pre... | <p>Thanks for all the help guys! Here is a follow up on how I make it works.</p>
<p>When I copy all the certs to kubenetes master, I am able to pull and push docker images from my private registry. But it was not working when I want to create kubernetes pods. And I realized that I need also to copy all the certs to my... |
<p>Is it possible in Kubernetes to create a pod template and reuse it later when specifying a pod within a deployment? For example:</p>
<p>Say I have pod template...</p>
<pre><code>apiVersion: v1
kind: PodTemplate
metadata:
name: my-pod-template
template:
metadata:
labels:
app: "my-app"
spec:
cont... | <p>There is not. </p>
<p>Specifically in the case of Pods, there are PodPresets:</p>
<p><a href="https://kubernetes.io/docs/tasks/inject-data-application/podpreset/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/inject-data-application/podpreset/</a></p>
<p>But those don't apply to other objects. </p>
... |
<p>I'm trying to setup Kubernetes locally.</p>
<p>I've just run <code>kubeadm init</code>, and it's provided me with a <code>join</code> command, however it seems I can't join the cluster on the same machine. As running the provided join command results in:</p>
<pre><code>[preflight] Running pre-flight checks.
[W... | <p>I would suggest using <code>kubeadm</code> to provision the master and then remove the taint that is causing master to be unschedulable for normal workloads. Gives you great flexibility for future expansion if you need, and it's a well established tool in kube comuunity.</p>
|
<p>AKS- Can't log into one of the worker nodes (VM). I assigned the public IP as per <a href="https://gist.github.com/tsaarni/624d5406e442f08fe11083169c059a68" rel="nofollow noreferrer">https://gist.github.com/tsaarni/624d5406e442f08fe11083169c059a68</a> but still no luck. I get the error below:</p>
<blockquote>
<p>Joh... | <p>if you create AKS from Azure portal, you can specify the user name of VM.</p>
<p>at that case, user name is not <strong>azureuser</strong> any more</p>
<p>you can find out the user name and public key from Azure portal</p>
<p><a href="https://i.stack.imgur.com/GTelq.jpg" rel="nofollow noreferrer"><img src="https://i... |
<p>In dockers, I had two containers <code>Mosquitto</code> abd <code>userInfo</code></p>
<p><code>userInfo</code> is a container which performs some logic and then send the result to mosquitto container. Mosquitto container then use this information to send it to IOT hub. To start these containers in Docker, I created... | <p>A Kubernetes pod may contain multiple containers. People generally run multiple containers in a pod when the two containers are tightly coupled, and it sounds like this is what you're looking for. These containers are guaranteed to be hosted on the same machine (they can contact each other via localhost), share the ... |
<p>I have 2 pods running in my kubernates cluster. One is simple a wordpress application and the 2nd one contains a mysql DB. Now wordpress is communicating with mysql DB. </p>
<p>I want to find this dependancies between pods. Is there any kubectl command or any tool like prometheus by which I can find dependancies be... | <p>No, there is no native kubernetes primitive which can define dependencies between pods. An easy thing you can do is to define labels like <code>dependsOn</code> and attach them to the corresponding pod.</p>
<p>For example, your <code>wordpress</code> pod can have a label which says <code>dependsOn: mysql</code> whe... |
<p>I am trying to create a custom Docker image based on Rocker using Dockerfile. In the Dockerfile I am pulling my own R package from a custom GitLab server using:</p>
<p><code>RUN R -e "devtools::install_git('[custom gitlab server]', quiet = FALSE)"</code></p>
<p>Everything usually works, but I have noticed that wh... | <p>The Docker build process should stop once one of the commands in the <code>Dockerfile</code> returns a non zero status.</p>
<p><code>install_git</code> doesn't seem to throw an error when the package wasn't installed successfully, so the execution keeps on.</p>
<p>An obvious way to go would be to wrap the installa... |
<p>Suppose I have 2 network policies, for nodes matching labels "app=database". Suppose:</p>
<ul>
<li>First policy has rules that block all ingress traffic.</li>
<li>Second policy has a rule allows ingress traffic on port 5660.</li>
</ul>
<p>Even though this is a simple example, how does kubernetes decides which rule... | <p>Kubernetes network policies right now does not allow <em>deny</em> policies. There are only <em>allow</em> policies. You basically put together all the allowed policies for the pod to get the allowed connections.</p>
<p>When there are one or more network policies on a pod, then all the connections <em>allowed by ... |
<p>In the basic example of the documentation for declaring a network policy:
<a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/#the-networkpolicy-resource" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/network-policies/#the-networkpolicy-resource</a></p>
<p>So... | <p>The <a href="https://github.com/ahmetb/kubernetes-network-policy-recipes/blob/master/10-allowing-traffic-with-multiple-selectors.md" rel="nofollow noreferrer">kubernetes network recipe "<strong>ALLOW traffic from apps using multiple selectors</strong>"</a> is clear:</p>
<blockquote>
<ul>
<li>Rules specified in ... |
<p>below is the metrics returned by the kubelet summary endpoint</p>
<pre><code>"node":{
"nodeName":"shayeeb-virtualbox",
"systemContainers":[ ],
"startTime":"2018-03-05T04:52:39Z",
"cpu":{
"time":"2018-03-05T05:06:00Z",
"usageNanoCores":989865279,
"u... | <p>As mentioned in <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#monitoring-compute-resource-usage" rel="nofollow noreferrer">K8s Managing Compute Resources for Containers/ "Monitoring compute resource usage"</a>:</p>
<blockquote>
<p>The resource usage of a Pod... |
<p>I have set up a Kubernetes cluster. The cluster contains, among other things, a cluster and deployment surfacing an API webservice (based on the <a href="https://github.com/ResidentMario/subway-explorer-gmaps-proxy" rel="nofollow noreferrer"><code>subway-explorer-gmaps-proxy</code></a> container).</p>
<p>I've deplo... | <p>You can try running through the official docs on debugging services: <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/</a></p>
<p>Beyond that, have you confirmed you're querying the ... |
<p>I need to load balance a cluster of Kubernetes API servers (version 1.7) on DigitalOcean, but the problem is that the Kubernetes API server seemingly only supports HTTPS and the DigitalOcean load balancer can only do <a href="https://developers.digitalocean.com/documentation/v2/#load-balancers" rel="noreferrer">HTTP... | <p>do a kubectl proxy and then use postman or any tool to send a get request to
<a href="http://127.0.0.1:8001/healthz/poststarthook/apiservice-status-available-controller" rel="noreferrer">http://127.0.0.1:8001/healthz/poststarthook/apiservice-status-available-controller</a></p>
<p>you can use other too </p>
<ul>
<... |
<p>I recently launched with gke and kubernetes in production.
I have regular outages with no obvious reasons.
No event shows anything, pods are not restarting and seems stable.
I have a similar qa env that has no issue at all whereas it's way smaller.</p>
<p>Where can I find potential infos on the outage reason?</p>
| <p>Stack driver makes you pay and configure it... kubernetes comes with a tool for it... just use this:</p>
<p><code>kubectl top nodes</code></p>
<pre><code>al@host:~/$ kubectl top nodes
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
gke-learn-pool-1-10f60e0a-s44c 104m 11% ... |
<p>im getting </p>
<blockquote>
<p>Error: YAML parse error on myApp-infra/templates/my.yaml: error
converting YAML to JSON: yaml: line 20: found unexpected ':'</p>
</blockquote>
<p>below is helm install --dry-run --debug ./myApp output</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: spark-slave-se... | <p>When helm encounters parse errors while processing multiple YAML documents in a single file (like your case) the error message can be a bit misleading. Although it says <code>line 20</code>, that point is in reference to the beginning of one of the YAML documents in the file, not the beginning of the file itself. Wi... |
<p>I'm trying to understand the Kubernetes design on how/if worker nodes communicate with each other. I found documentation on the <a href="https://kubernetes.io/docs/concepts/architecture/master-node-communication/" rel="noreferrer">node-master communication</a> but nothing on node-node. I've understood that pods can ... | <blockquote>
<p>Do worker nodes communicate with each other or does that only occur
between pods? Or rather, do the nodes communicate even if their pods
do not?</p>
</blockquote>
<p>A worker node represents a collection of a few processes: <code>kubelet</code>, <code>kube-proxy</code>, and a container runtime (d... |
<p>The <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/%22Kubernetes%20Docs%22" rel="nofollow noreferrer">Kubernetes Docs</a> say the following:</p>
<blockquote>
<p>In general, Pods do not disappear until someone destroys them. This
might be a human or a controller. The only exception to ... | <p>I believe this documentation is out of date.<br>
Pod garbage collection using TTL <a href="https://github.com/kubernetes/kubernetes/pull/12055" rel="nofollow noreferrer">was abandoned</a> in favor of a threshold number of terminated pods. <code>--terminated-pod-gc-threshold</code> on the kube controller manager (<a ... |
<p>We are migrating legacy java and .net applications from on-premises VMs to an on-premises Kubernetes cluster. </p>
<p>Many of these applications make use of windows file shares to transfer files from and to other existing systems. Deploying to Kubernetes has less priority than re-engineering all the solutions to av... | <p>I asked the same question on r/kubernetes and a user commented with this. We are trying this now and it seems ok.</p>
<p><a href="https://www.reddit.com/r/kubernetes/comments/7wcwmt/accessing_windows_smbcifs_shares_from_pods/duzx0rs/" rel="noreferrer">https://www.reddit.com/r/kubernetes/comments/7wcwmt/accessing_wi... |
<p>I could understand, different ways to access docker image from local machine to Minikube VM.</p>
<p><a href="https://stackoverflow.com/questions/46065342/kubernetes-minikube-cant-get-docker-image-from-local-registry">(Kubernetes + Minikube) can't get docker image from local registry</a></p>
<p>All these exampl... | <p>I found relatively easy way to point docker client(docker-machine) to minikube’s docker environment by running below commands in PowerShell -></p>
<p>PS C:\Users\ABC> minikube docker-env</p>
<p>PS C:\Users\ABC> minikube docker-env | Invoke-Expression</p>
|
<p>Before creating an object in Kubernetes (Service, ReplicationController, etc.), I'd like to test that the JSON or YAML specification of the object is valid. But I don't want to actually create the object.</p>
<p>Is there some to do a "dry run" that would be equivalent to running <code>kubectl create --validate=true... | <p>This works for me (kubernetes 1.7 and 1.9):</p>
<pre><code>kubectl apply --validate=true --dry-run=client --filename=file.yaml
</code></pre>
|
<p>I have installed Heapster in my Kubernetes cluster.I can give resource usage from command line, for example <code>kubectl top pods</code>, and Kubernetes web panel.</p>
<p>I'm trying to get resource usage via web API from Heapster. Actually I'd like to get resource usage (e.g: ram and cpu) a node, pod or namespace ... | <p><strong>Question has been answered in the above comment section.</strong></p>
<p>In order to access the Node as well as Pod Metrics, It's better to use <a href="https://github.com/kubernetes-incubator/metrics-server" rel="nofollow noreferrer">Metrics_server</a> which is the successor of heapster.</p>
<p>The metric... |
<p>I've built a docker image within the minikube VM. However I don't understand why Kubernetes is not finding it?</p>
<pre><code>minikube ssh
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
diyapploopback l... | <pre><code>imagePullPolicy: IfNotPresent
</code></pre>
<p>The above was not present (and it is required...) in my image config within the deployment...</p>
|
<p>I am new to Kubernetes. I am using Kops to deploy my Kubernetes application on AWS. I have already registered my domain on AWS and also created a hosted zone and attached it to my default VPC.</p>
<p>Creating my Kubernetes cluster through kops succeeds. However, when I try to validate my cluster using <code>kops va... | <p>From what you describe, you created a Private Hosted Zone in Route 53. The validation is probably failing because Kops is trying to access the cluster API from your machine, which is outside the VPC, but private hosted zones only respond to requests coming from within the VPC. Specifically, the hostname <code>api.uc... |
<p>I was following this <a href="https://kubernetes.io/docs/tutorials/configuration/configure-redis-using-configmap/#real-world-example-configuring-redis-using-a-configmap/" rel="nofollow noreferrer">tutorial</a> to setup a configmap for a redis.conf. After I create the Redis deployment, I check to ensure that the redi... | <p>It looks like you are pulling the default redis container. If you check the redis Dokerfiles, for example <a href="https://github.com/docker-library/redis/blob/d53b982b387634092c6f11069401679034054ecb/4.0/alpine/Dockerfile" rel="nofollow noreferrer">https://github.com/docker-library/redis/blob/d53b982b387634092c6f11... |
<p>We have a couple of clusters running on GKE and up until now I've only been maintaining a CPU request/limit for pods. We've recently run into issues where the cluster autoscaling isn't responding when pods begin to be evicted for low memory, and we can visibly see in the GKE console that there is memory pressure on ... | <p>There is no magic trick for calculating limits. You need to start with reasonable limits and refine using trial and error.</p>
<p>I can suggest a video from YouTube that explains quite well a method to refine your limits: <a href="https://youtu.be/-lsJyni7EQA" rel="noreferrer">https://youtu.be/-lsJyni7EQA</a></p>
... |
<p>I have a frontend application built with React and backend on nodejs.
Both have a separate Docker image and therefore a separate deployment on k8s (gce).</p>
<p>Each deployment has a corresponding k8s service, let's say <code>fe-serice</code> and <code>be-service</code>.</p>
<p>I am trying to setup an Ingress so tha... | <p>I can't explain why /foo is not working </p>
<p>But</p>
<p>/api/* does not cover /api, it covers only anything after /api/</p>
|
<p>I have an environment variable called <code>GOOGLE_MAPS_DIRECTIONS_API_KEY</code>, populated by a Kubernetes secret <code>YAML</code>: </p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: google-maps-directions-api-secret
type: Opaque
data:
GOOGLE_MAPS_DIRECTIONS_API_KEY: QUl...QbUpqTHNJ
</code></pre>
<... | <p>If you previously created the secret without the <code>-n</code> option to <code>echo</code>, verify the Secret persisted in the API (<code>kubectl get secret/google-maps-directions-api-secret -o yaml</code>) matches the secret in your yaml file, and also verify the consuming app has been redeployed since the secre... |
<p>I have two docker images <code>Mosquitto</code> & <code>user-info</code>. <code>userInfo</code> is a container which performs some logic and then send the result to <code>mosquitto</code>. Mosquitto then use this information to send it to IOT hub. Inside <code>user-info</code> I have mentioned to use <code>hostn... | <p>A quote from the book "Up and running with Kubernetes" should give you a hint;</p>
<blockquote>
<p>In general, the right question to ask yourself when designing Pods is,
“Will these containers work correctly if they land on different
machines?” If the answer is “no,” a Pod is the correct grouping for
the co... |
<p>I'm setting up my Jenkins server, and on simple requests in the web interface, like creating a folder, a pipeline, a job, etc., I periodically get the following error:</p>
<pre><code>HTTP ERROR 403
Problem accessing /job/Mgmt/createItem. Reason:
No valid crumb was included in the request
</code></pre>
<p>The ... | <p>Enabling proxy compatibility may help to solve this issue.
Go to Settings -> Security -> <strong>Enable proxy compatibility</strong> in CSRF Protection section</p>
<blockquote>
<p>Some HTTP proxies filter out information that the default crumb issuer uses to calculate the nonce value. If an HTTP proxy sits betwe... |
<p>I have a PHP daemon script downloading remote images and storing them local temporary before uploading to object storage.</p>
<p>PHP internal memory usage remains stable but the memory usage reported by Docker/Kubernetes keeps increasing.</p>
<p>I'm not sure if this is related to PHP, Docker or expected Linux beha... | <p>Yes, a similar issue has been reported <a href="https://github.com/moby/moby/issues/10824#issuecomment-347499296" rel="noreferrer">here</a>.</p>
<p><a href="https://github.com/moby/moby/issues/10824#issuecomment-347725280" rel="noreferrer">Here's the answer</a> of coolljt0725, one of the contributors, answering why... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.