prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am running some internal services and also some customer facing services in one K8s cluster. The internal ones should only be accessible from some specific ips and the customer facing services should be accessible worldwide.</p>
<p>So I created my Ingresses and an nginx Ingress Controller and some K8s LoadBalance... | <p>As surprising as it is, the L7 (http/https) load balancer in GCP created by a Kubernetes Ingress object <strong>has no IP whitelisting capabilities</strong> by default, so what you described is working as intended. You can filter on your end using the <code>X-Forwarded-For</code> header (see Target Proxies under <a ... |
<p>I'm encountering a situation where pods are occasionally getting evicted after running out of memory. Is there any way to set up some kind of alerting where I can be notified when this happens?</p>
<p>As it is, Kubernetes keeps doing its job and re-creating pods after the old ones are removed, and it's often hours... | <p>GKE exports Kubernetes Events (<code>kubectl get events</code>) to Stackdriver Logging, to the "GKE Cluster Operations" table:
<a href="https://i.stack.imgur.com/SsvHR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SsvHR.png" alt=""></a></p>
<p>Next, write a query specifically targeting evictions (the qu... |
<p>I really like the kubernetes Ingress schematics. I currently run <code>ingress-nginx</code> controllers to route traffic into my kubernetes pods.</p>
<p>I would like to use this to also route traffic to 'normal' machines: ie vm's or physical nodes that are not part of my kubernetes infrastructure. Is this possible?... | <p>In Kubernetes you can define an externalName service in which you define a FQND to an external server.</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: my-service
namespace: prod
spec:
type: ExternalName
externalName: my.database.example.com
</code></pre>
<p>Then you can use <code>my-service</co... |
<p>I am using <code>launcher.gcr.io/google/jenkins2</code> to run jenkins in gcp kubernetes engine.</p>
<p>Everything seems ok except that I get <code>Could not initialize class org.jfree.chart.JFreeChart</code> error for every chart that jenkins attempt to draw. I googled the error and almost everyone solves that wit... | <p>One other possible solution/workaround is seen in <a href="https://issues.jenkins-ci.org/browse/JENKINS-39636" rel="nofollow noreferrer">JENKINS issue 39636</a>:</p>
<blockquote>
<p>I installed <code>libxext6 libxrender1 fontconfig libfontconfig</code> but it didn't help. After that I also installed <code>libjfreech... |
<p>I got yaml file for specifying ssl certificate (provided by aws certificate manager)to load balancer for kubernetes deployment. But, we are running kubernetes cluster in aws china account where certification manager option is not available. Now if I have SSL certificate provided by Godaddy, how can I install it? Is ... | <p>As far as I know, you cannot setup an ELB deployed with a kubernetes <code>Service</code> to use a certificate which is NOT an ACM certificate. In fact, if you take a look at the possibile annotations <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go#L72" rel="nofol... |
<p>I've set up an application stack running on Google Kubernetes Engine + Google Cloud SQL. When developing locally, I would like my application to connect to a postgres database server running <em>outside</em> the cluster to simulate the production environment.</p>
<p>It seems that the way to do this is by defining a... | <p>May not be an answer for Minikube, but I ended up here so I share what I did for Kubernetes in Docker for Mac.</p>
<p>I added a service like this for PostgreSQL:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
name: postgres
namespace: default
spec:
type: ExternalName
# https://docs.docker.com/docker... |
<p>I have a local kubernetes cluster setup using the edge release of docker (mac). My pods use an env var that I've defined to be my DB's url. These env vars are defined in a config map as:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: my-config
data:
DB_URL: postgres://user@localhost/my_dev_db?ss... | <p>You can use the private lan address of your computer, but please ensure that your database software is listening to all network interfaces and there is no firewall blocking incoming traffic.</p>
<p>If your LAN address is dynamic, you could use an internal DNS name pointing to your computer if your network setup pro... |
<p>I am trying to setup a spark cluster on k8s. I've managed to create and setup a cluster with three nodes by following this article:
<a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="noreferrer">https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/</a></p>
<p>After t... | <p>The error message comes from <a href="https://github.com/apache/spark/commit/5d7c4ba4d73a72f26d591108db3c20b4a6c84f3f" rel="noreferrer">commit 5d7c4ba4d73a72f26d591108db3c20b4a6c84f3f</a> and include the page you mention: "<a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html#dependency-management... |
<p>I was setting up microservices based on <a href="https://github.com/Netflix/eureka" rel="noreferrer">Netflix Eureka</a> and experimenting on top of <a href="https://cloud.spring.io/spring-cloud-netflix/" rel="noreferrer">spring-cloud</a> and after weeks of research and development the question rose! </p>
<p>Why do ... | <p>I conclude and the top highlights for the reason why using <code>Eureka</code> and/or <code>Kubernetes</code> can be listed as:</p>
<ul>
<li>Java only</li>
<li>developer friendly</li>
<li>lower server costs for the complete stack</li>
<li>less OPS dependent</li>
<li>more resources on developer communities and tutor... |
<p>I have this basic Dockerfile:</p>
<pre><code>FROM nginx
RUN apt-get -y update && apt install -y curl
</code></pre>
<p>In the master node of my Kubernetes cluster I build that image:</p>
<pre><code>docker build -t cnginx:v1 .
</code></pre>
<p><code>docker images</code> shows that the image has been corre... | <p>Your PODs are scheduled on your worker nodes. Since you set <code>imagePullPolicy</code> to <code>Never</code> you need to make your image available to both nodes. In other words, you need to build it on both nodes as you did on the master.</p>
<p>As a sidenote, it would be probably easier in the long term if you s... |
<p>I'm trying to use Kubernetes integration with AWS, but kube-controller-manager don't start.
(BTW: Everything works perfectly without the ASW option) </p>
<p>Here is what I do:</p>
<p>-- 1 --</p>
<p>ubuntu@ip-172-31-17-233:~$ more /etc/kubernetes/aws.conf</p>
<pre><code>apiVersion: kubeadm.k8s.io/v1alpha1
kind: ... | <blockquote>
<p>Any idea?</p>
</blockquote>
<p>Check following points as potential issues:</p>
<ul>
<li><p><code>kubelet</code> has proper provider set, check <code>/etc/systemd/system/kubelet.service.d/20-cloud-provider.conf</code> containing:</p>
<pre><code>Environment="KUBELET_EXTRA_ARGS=--cloud-provider=aws --... |
<p>I am writing a Jenkins Global pipeline library where I have a stage to deploy my docker image to K8s cluster.
So after building my docker image during CI process I am promoting(deploying) the image to multiple environments(sequentially lower to higher).
So, to get the correct status of deployment after running </p>
... | <p>You should take a look at <code>progressDeadlineSeconds</code>. Once this exceeds the deadline the <code>rollout status</code> will exit out.</p>
<pre><code>kubectl rollout status deployment ng
Wait... |
<p>Output of <code>kubectl create -f redis.yaml</code>:</p>
<blockquote>
<p>Error from server (BadRequest): error when creating "redis.yaml":
DaemonSet in version "v1" cannot be handled as a DaemonSet: no kind
"DaemonSet" is registered for version "apps/v1"</p>
</blockquote>
<p>What does this error indicate? Ho... | <p>The version was set too low:</p>
<pre><code>apiVersion: apps/v1beta2
</code></pre>
|
<p>I have noticed that when I create and mount a config map that contains some text files, the container will see those files as symlinks to <code>../data/myfile.txt</code> .</p>
<p>For example, if my config map is named tc-configs and contains 2 xml files named stripe1.xml and stripe2.xml, if I mount this config map ... | <p>I think this solution is satisfactory : specifying exact file path in mountPath, will get rid of the symlinks to <code>..data and ..2018_06_04_19_31_41.860238952</code></p>
<p>So if I apply such a manifest : </p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: my-lamp-site
spec:
containers:
- name: ... |
<p>I understand that <code>kubelet</code> is responsible for taking PodSpecs (usually from the API Server) and running the Pod.</p>
<blockquote>
<p><strong><a href="https://kubernetes.io/docs/concepts/overview/components/#node-components" rel="nofollow noreferrer">Kubernetes Components > Node Components > kubelet... | <p>kubelet does everything on the node. A typical process to create a pod would be the following:</p>
<ol>
<li>By default, kubelet is hooked up to api-server through this "thing" called <em>watch</em>. It's a sort of pub/sub. So kubelet would be subscribed to "create pod" event, and api-server would notify it when a p... |
<p>I have kubernetes + minicube installed (MacOs 10.12.6) installed. But while trying to start the minicube i get constant errors:</p>
<pre><code>$: minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster... | <p><a href="https://kubernetes.io/docs/getting-started-guides/minikube/" rel="nofollow noreferrer">Minikube</a> is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.</p>
<p... |
<p>I am using kubernetes : v1.10.3 , i have one external NFS server which i am able to mount anywhere ( any physical machines). I want to mount this NFS directly to pod/container . I tried but every time i am getting error. don't want to use privileges, kindly help me to fix. </p>
<blockquote>
<p>ERROR: MountVolume... | <p>As stated in the error log:</p>
<pre><code>for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program
</code></pre>
<p>According to this <a href="https://askubuntu.com/questions/525243/why-do-i-get-wrong-fs-type-bad-option-bad-superblock-error">question</a>, you might be missing the nfs-... |
<p>I am using kubernetes to deploy a simple application. The pieces are:</p>
<ul>
<li>a rabbitMQ instance</li>
<li>a stateless HTTP server</li>
<li>a worker that takes jobs from the message queue and processes them</li>
</ul>
<p>I want to be able to scale the HTTP server and the worker up and down independently of ea... | <p>You should definitely choose different deployment for HTTP Server and the worker. For following reasons:</p>
<ul>
<li><p>Your scaling characteristics are different for both of them. It does not make sense to put them in the same deployment</p></li>
<li><p>The parameters on which you will scale will be different too... |
<p><a href="https://i.stack.imgur.com/Ctb2f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ctb2f.png" alt="enter image description here"></a></p>
<p>Why sometimes kubernetes has 2 internal endpoints for a service, sometimes 4?
why do the internal endpoints always come in pairs?</p>
| <p>This is based on my loose understanding of things and an assumption. The assumption is that this seems to be the case when the cluster is deployed to GKE.</p>
<p>Since I don't have Kafka manager installed, I will use the example of Kubernetes service, which has a similar port configuration in the console. This serv... |
<p>I am using Google Kubernetes Engine and have the Google HTTPS Load Balancer as my ingress.</p>
<p>Right now the load balancer uses Let's Encrypt certificates. However, is there a simple way to ensure that the certificates are automatically renewed prior to their 90 day expiry?</p>
| <p>You have not specified how you configured Let's Encrypt for your load balancer. Right now Google does not offer this for you, so I assume you mean you set the Let's Encrypt certificate yourself. In this case, Google can't renew your certificate.</p>
<p>Until there's an official support you can install a third-party... |
<p>We noticed when we <code>exec -it</code> to connect into a pod, after certain idle time the connection get destroyed. Is there any option to leave the connection open longer?</p>
<p>I see there is an open <a href="https://github.com/kubernetes/kubernetes/pull/63793/files" rel="nofollow noreferrer">PR</a>, but wond... | <p>The short answer is no. And that's why:</p>
<p><a href="https://stromasys.atlassian.net/wiki/spaces/KBP/pages/43221121/Enabling+TCP+keepalive+for+console+connections" rel="nofollow noreferrer">Enabling TCP keepalive for console connections</a></p>
<blockquote>
<p>TCP keepalive is a TCP option that causes packets... |
<p>I am unable to get the TLS termination at nginx ingress controller working on my kubernetes cluster.</p>
<p>my ingress rule looks as the following : </p>
<pre><code>Christophers-MacBook-Pro-2:acme-microservice cjaime$ kubectl describe ing myapp-ingress-1
Name: myapp-ingress-1
Namespace: default
... | <p>Your tests with openssl are executed correctly and they show that nginx does offer the valid certificate for <strong>myapp-default.acme.io</strong> when that hostname is provided in the request via <a href="https://en.m.wikipedia.org/wiki/Server_Name_Indication" rel="nofollow noreferrer">SNI</a>. This is in harmony ... |
<p>Trying to generate deployments for my helm charts by using this template</p>
<pre><code>{{- range .Values.services }}
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: myapp-{{ . }}
spec:
replicas: {{ .replicaCount }}
template:
metadata:
labels:
app: myapp-{{ . }}
chart: myap... | <p>I think you should reconsider the way the data is structured, this would work better:</p>
<pre><code> services:
- name: backend
settings:
port: 80
targetPort: 8080
replicaCount: 1
environmentVariables:
- name: SOME_VAR
value: "hello"
- name: web
settings:
... |
<p>I want to have a instance group that scales from 0 to x pods. I get <code>Insufficient nvidia.com/gpu</code>. Does someone see what I'm doing wrong here? This is on Kubernetes v1.9.6 with autoscaler 1.1.2. </p>
<p>I have two instance groups, one with cpus, and a new one I want to scale down to 0 nodes called gpus,... | <p><a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md" rel="nofollow noreferrer">Cluster Autoscaler</a>
is a standalone program that adjusts the size of a Kubernetes cluster to meet the current needs.
Cluster Autoscaler can manage GPU resources provided by the cloud provider in the ... |
<p>We have a pod in a Google Cloud Platform Kubernetes cluster writing JsonFormatted to StdOut. This is picked up by Stackdriver out of box. However, we see the disk usage of the pod just growing and growing, and we can't understand how to set a max size on the Deployment for log rotation.</p>
<p>Documentation on Goog... | <p>Are you sure that disk usage of the pod is high because of the logs?
If the application writes logs to stdout, it doesn't use any disk space inside the pod.
All logs are usually stored in a log file on the node’s filesystem and can be managed by the node logrotate process.</p>
<p>Perhaps application uses pod's disk ... |
<p>I followed the Quickstart docs (<a href="https://learn.microsoft.com/en-gb/azure/aks/kubernetes-walkthrough-portal" rel="nofollow noreferrer">here</a>) to deploy a k8s cluster in the Western Europe region. The cluster boots up fine, but I cannot connect to it using kubectl - kubectl times out while trying to perform... | <p>The solution to this one for me was to scale the nodes in my Cluster from the Azure Kubernetes service blade web console.</p>
<h1>Workaround / Solution</h1>
<p>An interesting solution (worked for me!) to test...</p>
<ol>
<li>Log into the Azure Console — Kubernetes Service blade.</li>
<li>Scale your cluster up by ... |
<p>I'm using Kubernetes 1.7 and I have a GPU machine in the cluster. The <code>kubectl top nodes</code> gives only CPU and Memory usage like this </p>
<pre><code>NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
machine1 183m 1% 5284Mi 8%
machine2 181m 1% 5543Mi ... | <p>I'm afraid that <code>kubectl top</code> does not provide GPU metrics, regardless if drivers are installed or not.</p>
<p>To inspect GPU statistics, I recommend using <a href="https://github.com/kubernetes/heapster/blob/master/docs/storage-schema.md" rel="nofollow noreferrer">Heapster</a> monitoring tool
and <a hre... |
<p>Team,
I am running kubectl from my laptop and captured Wireshark trace of the same. how could I decrypt the traffic hitting the api server?</p>
<p>ex: we decrypt the http calls using private key of the web server. in k8s world, how would I decrypt the calls to cluster? new to this so need to understand. </p>
| <p>The traffic itself and the (api)server keys will not be enough for that. Current TLS implementation is using <a href="https://en.m.wikipedia.org/wiki/Forward_secrecy" rel="nofollow noreferrer">forward secrecy</a> so you would need the session keys as well. Browsers can be configured to log session keys (which you ca... |
<p>Installed Rancher server and 2 Rancher agents in Vagrant. Then switch to K8S environment from Rancher server.</p>
<p>On Rancher server host, installed <code>kubectl</code> and <code>helm</code>. Then installed <code>Prometheus</code> by <code>Helm</code>:</p>
<pre><code>helm install stable/prometheus
</code></pre>... | <p>I had same issues as you. I found two ways to solve this:</p>
<ul>
<li><p>edit <code>values.yaml</code> under <code>persistentVolumes.enabled=false</code> this will allow you to use <code>emptyDir</code> "this applies to Prometheus-Server and AlertManager"</p></li>
<li><p>If you can't change <code>values.yaml</cod... |
<p>I am trying to run a Factorio game server on Kubernetes (hosted on GKE).</p>
<p>I have setup a Stateful Set with a Persistent Volume Claim and mounted it in the game server's save directory. </p>
<p>I would like to upload a save file from my local computer to this Persistent Volume Claim so I can access the save ... | <p>It turns out there is a much simpler way: The <code>kubectl cp</code> command. </p>
<p>This command lets you copy data from your computer to a container running on your cluster. </p>
<p>In my case I ran:</p>
<pre><code>kubectl cp ~/.factorio/saves/k8s-test.zip factorio/factorio-0:/factorio/saves/
</code></pre>
... |
<p>I stared my kubernetes cluster on AWS EC2 with kops using a private hosted zone in route53. Now when I do something like <code>kubectl get nodes</code>, the cli says that it can't connect to <code>api.kops.test.com</code> as it is unable to resolve it. So I fixed this issue by manually adding <code>api.kops.test.com... | <p>Pragmatically speaking, I would add the public IP as a <code>IP</code> SAN to the master's x509 cert, and then just use the public IP in your kubeconfig. Either that, or the DNS record <em>not</em> in the private route53 zone.</p>
<p>You are in a situation where you purposefully made things private, so now they are... |
<p>I created a new cluster as per the <a href="https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough" rel="noreferrer">Azure guide</a> and created the cluster without issue but when I enter the <code>kubectl get nodes</code> to list the nodes I only get this response <code>Unable to connect to the server: ... | <p>The solution to this one for me was to scale the nodes up — and then back down — for my impacted Cluster from the Azure Kubernetes service blade web console.</p>
<h1>Workaround / Potential Solution</h1>
<ol>
<li>Log into the Azure Console — Kubernetes Service blade.</li>
<li>Scale your cluster up by 1 node.</li>
<... |
<p>I'm currently migrating a legacy server to Kubernetes, and I found that <code>kubectl</code> or dashboard only shows the latest log file, not the older versions. In order to access the old files, I have to ssh to the node machine and search for it.</p>
<p>In addition to being a hassle, my team wants to restrict ac... | <p>So there are a couple of ways to and scenarios for this. If you are just interested in the log of the same pod from before last restart, you can use the <code>--previous</code> flag to look at logs:</p>
<pre><code>kubectl logs -f <pod-name-xyz> --previous
</code></pre>
<p>But since in your case, you are inte... |
<p>I set up a deployment of storm nimbus and another deployment of storm supervisor (and a UI), but supervisor dies because it can't resolve nimbus... which always registers itself with the pod FQDN:</p>
<blockquote>
<p>2018-06-06 17:07:01.935 o.a.s.n.NimbusInfo main [INFO] Nimbus figures out its name to storm-nimbu... | <p>Here's where Nimbus figures out its hostname <a href="https://github.com/apache/storm/blob/c9b73a5e3ffcfc458772100dc6bd62ad1cf468de/storm-client/src/jvm/org/apache/storm/nimbus/NimbusInfo.java#L56" rel="nofollow noreferrer">https://github.com/apache/storm/blob/c9b73a5e3ffcfc458772100dc6bd62ad1cf468de/storm-client/sr... |
<p>The Jenkinsfile similar to the one below works fine for me without <code>properties</code> section. But when I add <code>properties</code> Jenkins job fails with</p>
<pre><code>java.lang.NoSuchMethodError: No such DSL method 'properties' found among steps [archive, bat, build, catchError, checkout, container, conta... | <p>Ok, I've figured out the problem. Some of the plugins were not updated and apparently caused some conflicts. I updated all the plugins and the problem has gone.</p>
|
<p>I'm new to Kubernetes development, and I have a task to change some features in Kuberenetes services. </p>
<p>I have the <a href="https://github.com/kubernetes/community/tree/master/contributors/devel#readme" rel="nofollow noreferrer">Kubernetes local cluster</a>, and also I have a testbed consisting of 4 RPI's, My... | <p>All nodes should run kube-proxy. (Running kube-proxy on a “master” node is not strictly required, but being consistent is easier.) Obtain a binary as described for kubelet.</p>
<p>Arguments to consider:</p>
<p>If following the HTTPS security approach:</p>
<pre><code>--master=https://$MASTER_IP
--kubeconfig=/var/l... |
<p>I am reviewing Azure Kubernetes Service for my current employer and trying to determine if there are any limitations to using istio on AKS. Does anyone have any experience doing so? Does it work as normal?</p>
| <p>Here is some information for you to refer.</p>
<p>In the article of <a href="https://istio.io/docs/setup/kubernetes/quick-start" rel="nofollow noreferrer">Quick start instructions to install and configure Istio in a Kubernetes cluster</a> , you will find the <strong>Prerequisites</strong> of using Istio in a Kubern... |
<p>have issue with </p>
<pre><code>kubectl run -ti
</code></pre>
<p>in gitlab ci.
For testing in CI we run docker container with "npm t" command in interactive mode and it was perfectly work on docker.
After migrate to Kubernetes have issue, as kubectl run give next error: <code>Unable to use a TTY - input is not a ... | <p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core" rel="nofollow noreferrer">PodSpec <code>container:</code></a> has a <code>tty</code> attribute, which defaults to <code>false</code> but which one can set to <code>true</code> (that's what the <code>-t</code> option,... |
<p>We are on Kubernetes 1.9.0 and wonder if there is way to access an "ordinal index" of a pod with in its statefulset configuration file. We like to dynamically assign a value (that's derived from the ordinal index) to the pod's label and later use it for setting pod affinity (or antiaffinity) under spec.</p>
<p>Alte... | <p><a href="https://github.com/kubernetes/kubernetes/issues/30427" rel="noreferrer">Right now</a> the only option is to extract index from host name</p>
<pre><code>lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "export INDEX=${HOSTNAME##*-}"]
</code></pre>
|
<p>i'm launching a glassfish pod on my Kubernetes cluster, and i'm trying to copy some .war files from a folder that's on my host, but the command cp always seems to fail.</p>
<p>my yaml file:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-cod... | <p>Two things to note here:</p>
<ol>
<li>If you want to copy a direcyory using <code>cp</code>, you have to provide the <code>-a</code> or <code>-R</code> flag to <code>cp</code>:</li>
</ol>
<blockquote>
<pre><code> -R If source_file designates a directory, cp copies the directory and the entire subtree connected ... |
<p>Rancher 2 provides 4 options in the "Ports" section when deploying a new workload:</p>
<ul>
<li>NodePort</li>
<li>HostPort</li>
<li>Cluster IP</li>
<li>Layer-4 Load Balancer</li>
</ul>
<p>What are the differences? Especially between NodePort, HostPort and Cluster IP?</p>
| <p><strong>HostPort (nodes running a pod):</strong> Similiar to docker, this will open a port on the node on which the pod is running (this allows you to open port 80 on the host). This is pretty easy to setup an run, however:</p>
<blockquote>
<p>Don’t specify a hostPort for a Pod unless it is absolutely necessary. ... |
<p>I've got a deployment that has a pod that is stuck at :</p>
<p>The <code>describe</code> output has some sensitive details in it, but the events has this at the end:</p>
<pre><code> ...
Normal Pulled 18m (x3 over 21m) kubelet, ip-10-151-21-127.ec2.internal Successfully pulled image "example/... | <p>The <strong>kubelet</strong> process is responsible for pulling images from a registry.</p>
<p>This is how you can check the <code>kubelet</code> logs:</p>
<pre><code>$ journalctl -u kubelet
</code></pre>
<p>More information about images can be found in <a href="https://kubernetes.io/docs/concepts/containers/imag... |
<p>I am using the Kubernetes Helm requirements.yaml file for dependencies addition. Based on the values.yaml condition, it will create the dependencies pods.</p>
<p>Here I want to execute required dependencies when apache.enabled == false</p>
<pre><code>values.yaml
external_apache:
enabled: false
</code></pre>
<h... | <p>What version of Helm are you using?</p>
<p>There was a similar issue in the Kubernetes repository on GitHub:</p>
<p><a href="https://github.com/kubernetes/helm/issues/2111" rel="nofollow noreferrer">Unable to use condition in 'requirements.yaml' #2111</a></p>
<p>The solution was to upgrade Helm to v2.2.0+. In that v... |
<p>i'm launching a glassfish pod on my Kubernetes cluster, and i'm trying to copy some .war files from a folder that's on my host, but the command cp always seems to fail.</p>
<p>my yaml file:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-cod... | <blockquote>
<p>What am I doing wrong?</p>
</blockquote>
<p>here is correct command to execute:</p>
<pre><code>command: ["sh", "-c", "cp -r /mnt/apps/* /usr/local/glassfish4/glassfish/domains/domain1/autodeploy/ && asadmin start-domain --verbose"]
</code></pre>
<p>With your cp command you effectively overw... |
<p>I am trying to label gpu to my node
This does not work</p>
<pre><code>kubectl label node gke-kubia-default-pool-98519add-25c1/10.164.0.3 gpu=true
error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'kubectl get resource/<resource_name>' ... | <p>I have solved my problem.First</p>
<pre><code>kubectl get no
NAME STATUS ROLES AGE VERSION
gke-kubia-default-pool-98519add-25c1 Ready <none> 20h v1.8.10-gke.0
gke-kubia-default-pool-98519add-5kfr Ready <none> 20h v1.8.10-gke.0
g... |
<p>I would like to resolve the kube-dns names from outside of the Kubernetes cluster by adding a stub zone to my DNS servers. This requires changing the cluster.local domain to something that fits into my DNS namespace.</p>
<p>The cluster DNS is working fine with cluster.local. To change the domain I have modified the ... | <p>I had a similar problem where I have been porting a microservices based application to Kubernetes. Changing the internal DNS zone to cluster.local was going to be a fairly complex task that we didn't really want to deal with.</p>
<p>In our case, we <a href="https://coredns.io/2018/01/29/deploying-kubernetes-with-co... |
<p>I got the task to setup a Kubernetes setup in place 2 days ago with no background in that technology. So sorry if my questions or setup are not good.</p>
<p>The topology is quite simple, a <em>public IP</em>, a dedicated <em>HA proxy</em> configured to forward requests to a <strong>Kubernetes services</strong> cont... | <p>from the service documentation for <a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs" rel="nofollow noreferrer">proxy mode: IPVS</a>: </p>
<blockquote>
<p>In any of these proxy model, any traffic bound for the Service’s
IP:Port is proxied to an appropriate backend without... |
<p>I have the following Ingress resource:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: main-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.... | <p>Your patch has a number of problems; for example <code>"- path"</code> instead of <code>"path"</code> but also incorrect referencing of object levels. However, even if you fixed the mistakes this would not work as intended. Let's see why.</p>
<p><code>kubectl patch</code> is a request for a <strong><em>strategic me... |
<p>I'm configuring a highly available kubernetes cluster using GKE and terraform. Multiple teams will be running multiple deployments on the cluster and I anticipate most deployments will be in a custom namespace, mainly for isolation reasons.</p>
<p>One of our open questions is how to manage to manage GCP service acc... | <p>You are on the right track. GCP service accounts can be used in GKE for PODs to assign permissions to GCP resources.</p>
<p>Create an account:</p>
<pre><code>cloud iam service-accounts create ${SERVICE_ACCOUNT_NAME}
</code></pre>
<p>Add IAM permissions to the service account:</p>
<pre><code>gcloud projects add-... |
<p>Yesterday I spun up an Azure Kubernetes Service cluster running a few simple apps. Three of them have exposed public IPs that were reachable yesterday.</p>
<p>As of this morning I can't get the dashboard tunnel to work or the <code>LoadBalancer</code> IPs themselves.</p>
<p>I was asked by the Azure twitter account... | <p>If you are getting <strong>getsockopt: connection timed out</strong> while trying to access to your AKS Dashboard, I think deleting tunnelfront pod will help as once you delete the tunnelfront pod, this will trigger creation of new tunnelfront by Master. Its something I have tried and worked for me. </p>
|
<p>I have the following <strong>PersistentVolumeClaim</strong>:</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginx-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 256Mi
storageClassName: fask
</code></pre>
<p>and <strong>Deployment</strong>:</p>
... | <blockquote>
<p>However, if I have more than 2 replicas it will fail to create the second PV</p>
</blockquote>
<p>You should then probably use <code>StatefulSet</code> and <code>volumeClaimTemplates</code> within it instead of <code>Deployment</code> and <code>PersistentVolumeClaim</code>.</p>
<p>In your case each ... |
<p>It seems by default Kubernetes creates a hostPath volume with <code>755</code> permission on a directory.</p>
<p>Is it possible to set this value to something else by a <code>volume</code> spec? As opposed to manually doing a <code>chmod</code> on the relevent host directory.</p>
| <pre><code> initContainers:
- name: volume-mount-hack
image: busybox
command: ["sh", "-c", "chmod -R 777 /tmp/docker"]
volumeMounts:
- name: redis-socket
mountPath: /tmp/docker
</code></pre>
|
<p>I trying to debug it for few hours to no effect. I either do know how to google it or it unusual issue.</p>
<p>I have Kubernetes Engine cluster on google cloud. To test it I deploy simple app:
<a href="https://github.com/iniside/uSpark" rel="nofollow noreferrer">https://github.com/iniside/uSpark</a>
It is composed ... | <p>I fixed issue and it was two fold. First as @spender suggested I did changed gRPC addresses to 0.0.0.0 both backend and frontend.</p>
<p>But the changes were not picked up by cluster. Because all this time it was pulling wrong images.</p>
<p>Every time I made changes, I deleted old images, with old tags (both loca... |
<p>I have a few kubefiles defining Kubernetes services and deployments. When I create a cluster of 4 nodes on GCP (never changes), all the small <code>kube-system</code> pods are spread across the nodes instead of filling one at a time. Same with the pods created when I apply my kubefiles. </p>
<p>The problem is somet... | <p>You can write your own scheduler. Almost all components in k8s are replaceable.</p>
<p>I know you won't. If you don't want to deal with affinity, you def won't write your own scheduler. But know that you have that option.</p>
<p>With GCP native, try to have all your pods with resource request and limits set up.</p... |
<p>How does pods get unique IP addresses even if they reside in the same worker node?</p>
<p>Also pod is not a device what is logic behind having it an IP address?<br>
Is the IP address assigned to a pod a virtual IP? </p>
| <p>A <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/" rel="nofollow noreferrer">pod</a> is part of a cluster (group of nodes), and <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/" rel="nofollow noreferrer">cluster networking</a> tells you that:</p>
<blockquote>
<p>In ... |
<p>I'm pretty new to Kubernetes, trying to figure it out. I haven't been able to google this answer tho, so I'm stumped. Can Kubernetes mount two secrets to the same path? say given the following deployment:</p>
<pre><code>apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
... | <blockquote>
<p>would it be possible to mount both SSL certs to the same directory (/etc/nginx/ssl/*)?</p>
</blockquote>
<p>No, because (at least when using a docker runtime) it uses volume mounts, which behave exactly the same as <code>mount -t ext4 /dev/something /path/something</code> in that <code>/path/somethin... |
<p>I'm trying to add my Azure AKS Kubernetes cluster to my GitLab CI/CD Kubernetes integration.</p>
<p>I can execute <code>kubectl</code> commands on the cluster from my pc, after I ran this command:</p>
<p><code>az aks get-credentials --resource-group <resource-group-name> --name <kubernetes-cluster-name>... | <p>I found out later that the base64 string in the <code>certificate-authority-data</code> of the <code>.kube/config</code> file that I was coping its content into the <code>CA Certificate</code> field of GitLab "Add Kubernetes cluster" form, it is the PEM format, but base64 encoded.</p>
<p>The PEM format already is a... |
<p>I have a StatefulSet with pods <code>server-0</code>, <code>server-1</code>, etc. I want to expose them directly to the internet with URLs like server-0.mydomain.com or like mydomain.com/server-0.</p>
<p>I want to be able to scale the StatefulSet and automatically be able to access the new pods from the internet. F... | <p>I don't think you can do it. Being part of the same statefulSet, all pods up to pod-x, are targeted by a service. As you can't define which pod is going to get a request, you can't force "pod-1.yourapp.com" or "yourapp.com/pod-1" to be sent to pod-1. It will be sent to the service, and the service might sent it to p... |
<blockquote>
<p>Our previous GitLab based CI/CD utilized an Authenticated curl request to a specific REST API endpoint to trigger the redeployment of an updated container to our service, if you use something similar for your Kubernetes based deployment this Question is for you.</p>
</blockquote>
<h2>More Background<... | <h2>Creating the integration</h2>
<p>I had the same problem of how to integrate the GitLab CI/CD with my Azure AKS Kubernetes cluster. I created this <a href="https://stackoverflow.com/questions/50775758/how-to-add-an-azure-aks-kubernetes-cluster-self-signed-ca-to-gitlab-ci-cd-kubern/50778120">question</a> because I w... |
<p>I have just started a new Kubernetes 1.8.0 environment using minikube (0.27) on Windows 10.</p>
<p>I followed this steps but it didn't work:
<a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/w... | <blockquote>
<p>"Error from server (NotFound): pods "kubernetes-dashboard-869db7f6b4-ddlmq" not found"</p>
</blockquote>
<p>You failed to delete the pod due to the lack of namespace (add <code>-n kube-system</code>). And it should be 1 dashboard pod if no modification's applied. If it still fails to run minikube das... |
<p>A few weeks ago the Windows Server 2019 was announced as Preview with native Kubernetes Support.</p>
<p>Is there any documentation how to activate or install Kubernetes?
I already set up a virtual server (with Desktop Feature) on my local Hyper-V, but I can not find <em>any</em> hint to test the preview features of... | <p>Kubernetes and its Windows cni plugins are <a href="https://kubernetes.io/blog/2018/01/kubernetes-v19-beta-windows-support/" rel="nofollow noreferrer">in beta at the time of writing</a> and insider build 1803 doesn't have any features/role for it (neither does <code>dockeree</code> though).</p>
<p>There are install... |
<p>I am starting exploring runnign docker containers with Kubernetes. I did the following</p>
<ol>
<li>Docker run etcd</li>
<li>docker run master</li>
<li>docker run service proxy</li>
<li>kubectl run web --image=nginx</li>
</ol>
<p>To cleanup the state, I first stopped all the containers and cleared the downloaded i... | <p>To delete the pod:</p>
<pre><code>kubectl delete pods web-3476088249-w66jr
</code></pre>
<p>If this pod is started via some replicaSet or deployment or anything that is creating replicas then find that and delete that first.</p>
<pre><code>kubectl get all
</code></pre>
<p>This will list all the resources that ha... |
<p>I want to clear cache in all the pods in my Kubernetes namespace. I want to send one request to the end-point which will then send a HTTP call to all the pods in the namespace to clear cache. Currently, I can hit only one pod using Kubernetes and I do not have control over which pod would get hit.</p>
<p>Even thoug... | <p>Provided you got kubectl in your pod and have access to the api-server, you can get all endpoint adressess and pass them to curl:</p>
<pre><code>kubectl get endpoints <servicename> \
-o jsonpath="{.subsets[*].addresses[*].ip}" | xargs curl
</code></pre>
<p><strong>Alternative without kubectl in pod:<... |
<p>In kubernetes I can currently limit the CPU and Memory of the containers, but what about the hard disk size of the containers.</p>
<p>For example, how could I avoid that someone runs a container in my k8s worker node that stores internally .jpg files making this container grow and grow with the time.</p>
<p>Not ta... | <p>There is some support for this; the tracking issues are <a href="https://github.com/kubernetes/features/issues/361" rel="nofollow noreferrer">#361</a>, <a href="https://github.com/kubernetes/features/issues/362" rel="nofollow noreferrer">#362</a> and <a href="https://github.com/kubernetes/features/issues/363" rel="n... |
<p>I have deployed a kubernetes HA cluster using the next config.yaml:</p>
<pre><code>etcd:
endpoints:
- "http://172.16.8.236:2379"
- "http://172.16.8.237:2379"
- "http://172.16.8.238:2379"
networking:
podSubnet: "192.168.0.0/16"
apiServerExtraArgs:
endpoint-reconciler-type: lease
</code></pre>
<p>When I ... | <p>I see multiple calico-etcd pods attempting to be ran, if you have used a calico.yaml that deploys etcd for you, that will not work in a multi-master environment.</p>
<p>That manifest is not intended for production deployment and will not work in a multi-master environment because the etcd it deploys is not configur... |
<p>Kubernetes question: I seem to not be able to access my service from my local machine (pods are running on minikube), when I run the command
kubectl <code>describe pod pod-id</code> I see these two lines but I don't know if they have anything to do with not being able to access the deployment:</p>
<pre><code>Port: ... | <p>What I was missing was the Service Type, if I want something accessible from the external world, I had to pick <code>LoadBalancer</code>.</p>
<p>So this simple change fixed it: </p>
<pre><code>spec:
type: LoadBalancer
ports:
- port: 8888
targetPort: 8888
</code></pre>
<p>Now I finally have:</p>
<pre><c... |
<p>I upgraded minikube on macOS and now I cannot get it to start (on two different machines). I've been reading a bunch of forums and this seems to be a common problem but there are no consistent solutions, and there is no guidance on how to go looking for the root cause.</p>
<p>There is an error on the first download... | <p>It is hard to determine what, in this issue, caused <a href="https://kubernetes.io/docs/getting-started-guides/minikube/" rel="noreferrer">minikube</a> not to run properly on this VM engine. You can search deeper in the logs with:</p>
<pre><code>minikube -v=9 start
</code></pre>
<p>option in the command line.</p>
... |
<p>On a Mac, Docker has a built in kubernetes mode that helps you set up a dev cluster in 1 click. Is there a way to do with with Docker-CE on my linux laptop? If not, what is the recommended approach (seems weird that this is actually easier on a mac or windows lol)</p>
| <p>To get the current OS version, try <code>kubectl get nodes -o wide</code></p>
<p>If you're looking to run a local Kubernetes cluster, you should use Minikube: <a href="https://kubernetes.io/docs/getting-started-guides/minikube/" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/minikube/</... |
<p>I am to trying to pass variables to kubernetes YAML file from Ansible but somehow values are not being populated.</p>
<p>Here is my playbook:</p>
<pre><code>- hosts: master
gather_facts: no
vars:
logstash_port: 5044
tasks:
- name: Creating kubernetes pod
command: kubectl create -f logstash.yml
</... | <p>What you are trying to do has no chance of working. Kubernetes (the <code>kubectl</code> command) has <strong>nothing</strong> to do with Jinja2 syntax, which you try to use in the <code>logstash.yml</code>, and it has no access to Ansible objects (for multiple reasons).</p>
<hr>
<p>Instead, use <a href="https://d... |
<p>I am following a simple Kuberentes Minikube tutorial on Linux Mint 18.3, trying to to create a volume from the following get started tutorial :</p>
<p><a href="https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-a... | <p>I could successfully try out the above example in minikube v0.23.0 with Kuberebtes version 1.8. But the reason for failing in v1.10 as I guess is the default Authentication and Authorization to Kubelet's API is not set properly. You should set legacy default values to the KubeletConfiguration to preserve the command... |
<p>I am unable to mount a configmap using multi-folder volume mount.</p>
<p>The structure of my <code>volume-mount.yaml</code> is below:</p>
<p><strong>DOESN'T WORK</strong></p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: test-web
spec:
containers:
- name: test-web
image: docker.io/hello-world ... | <p>In your case this should fit well:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: test-web
spec:
containers:
- name: test-web
image: docker.io/hello-world
volumeMounts:
- name: config-volume-1
mountPath: /usr/test1
- name: config-volume-2
mountPath: /usr/test... |
<p>I am using helm charts to deploy pods with a "ConfigMap" managing the configurations.</p>
<p>I edit ConfigMap directly to make changes to configuration files and then delete pods using kubectl delete, for the new configuration to take effect.</p>
<p>Is there any easy way using <strong>helm</strong> to replace a ru... | <p>We have found that using <code>--recreate-pods</code> will immediately terminate all running pods of that deployment, meaning some downtime for your service. In other words, there will be no rolling update of your pods.</p>
<p>The issue to address this in Helm is still open: <a href="https://github.com/kubernetes/h... |
<p>Reading the <a href="http://kubernetes.io/docs/user-guide/labels/#selecting-sets-of-nodes" rel="noreferrer">Kubernets documentation</a> it looks to be possible to select a certain range of pods based on labels. I want to select all the pods on one node but I don't want to label each pod on their corresponding node.<... | <p>As mentioned in the accepted answer the PR is now merged and you can get pods by node as follows:</p>
<pre><code>kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=<node>
</code></pre>
|
<p>I am trying alluxio 1.7.1 with docker 1.13.1, kubernetes 1.9.6, 1.10.1</p>
<p>I created the alluxio docker image as per the instructions on <a href="https://www.alluxio.org/docs/1.7/en/Running-Alluxio-On-Docker.html" rel="nofollow noreferrer">https://www.alluxio.org/docs/1.7/en/Running-Alluxio-On-Docker.html</a></p... | <p>The problem was short circuit unix domain socket path. I was using whatever was present by default in alluxio git. In the default integration/kubernetes/conf/alluxio.properties.template the address for ALLUXIO_WORKER_DATA_SERVER_DOMAIN_SOCKET_ADDRESS was not complete. This is properly explained in <a href="https://w... |
<p>While I explored yaml definitions of Kubernetes templates, I stumbled across different definitions of sizes. First I thought it's about the apiVersions but they are the same. So what is the difference there? Which are right when both are the same?</p>
<p><code>storage: 5G</code> and <code>storage: 5Gi</code></p>
<... | <p>From <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" rel="nofollow noreferrer">Kubernetes source</a>:</p>
<blockquote>
<p>Limits and requests for memory are measured in bytes. You can express
memory as a plain integer or as a fixed-point integer using one of
these suff... |
<p>I have an application with some endpoints that are quite CPU intensive. Because of that I have configured a Horizontal Pod Autoscaler like this:</p>
<pre><code>spec:
maxReplicas: 10
minReplicas: 1
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: DeploymentConfig
name: some-app
targetCPUUtili... | <p>For OpenShift, Please modify <code>/etc/origin/master/master-config.yaml</code></p>
<pre><code>kubernetesMasterConfig:
controllerArguments:
horizontal-pod-autoscaler-downscale-delay: 2m0s
horizontal-pod-autoscaler-upscale-delay: 2m0s
</code></pre>
<p>and restart openshift master.</p>
|
<p>I have deployed a kubernetes HA cluster using the next config.yaml:</p>
<pre><code>etcd:
endpoints:
- "http://172.16.8.236:2379"
- "http://172.16.8.237:2379"
- "http://172.16.8.238:2379"
networking:
podSubnet: "192.168.0.0/16"
apiServerExtraArgs:
endpoint-reconciler-type: lease
</code></pre>
<p>When I ... | <p>I have solved it:</p>
<ol>
<li><p>Adding all the masters IPs and LB IP to the apiServerCertSANs</p></li>
<li><p>Copying the kubernetes certificates from the first master to the other masters.</p></li>
</ol>
|
<p>I am trying to run apache ignite cluster using Google Kubernetes Engine.</p>
<p>After following the tutorial here are some <strong>yaml</strong> files.</p>
<p>First I create a service -
<strong>ignite-service.yaml</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
# Name of Ignite Service used by Ku... | <p>Step 1: <code>kubectl apply -f ignite-service.yaml</code> (with the file in your question)</p>
<p>Step 2: <code>kubectl apply -f ignite-rbac.yaml</code></p>
<p>ignite-rbac.yaml is like this:</p>
<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
name: ignite
namespace: default
---
apiVersion: rbac.autho... |
<p>I have a multi-tenant cluster, where multi-tenancy is achieved via namespaces. Every tenant has their own namespace. Pods from a tenant cannot talk to pods of other tenants. However, some pods in every tenant have to expose a service to the internet, using an Ingress.</p>
<p>This I how far I got (I am using Calico)... | <p><strong><a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">apiVersion: networking.k8s.io/v1</a></strong> </p>
<p>The namespaceSelector is designed to match namespaces by labels only. There is no way to select namespace by name.</p>
<p>The podSelector can o... |
<p>Cluster:
1 master
2 workers</p>
<p>I am deploying StatefulSet using the local-volume using the PV (kubernetes.io/no-provisioner storageClass) with 3 replicas.
Created 2 PV for Both worker nodes.</p>
<p>Expectation: pods will be scheduled on both workers and sharing the same volume.</p>
<p>result: 3 stateful pods... | <p>This happened because Kubernetes doesn't care about distribution. It has the mechanism for providing specific distribution called Pod Affinity.
For distributing pods on all workers, you may use <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity" rel="nofollow noref... |
<p><strong>Kubernetes version:</strong>
v1.10.3</p>
<p><strong>Docker version:</strong>
17.03.2-ce</p>
<p><strong>Operating system and kernel:</strong>
Centos 7</p>
<p><strong>Steps to Reproduce:</strong>
<a href="https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/" rel="n... | <p>If you are on any public cloud you are not supposed to get public ip address at <code>ip a</code> command. But even though the port will be exposed to <code>0.0.0.0:31105</code> </p>
<p>Here is the sample file you can verify for your configuration:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
labels:
... |
<p>I setup a 3 nodes kubernetes (<code>v1.9.3</code>) cluster on Ubuntu 16.04. </p>
<p>Prior setup I cleared the iptables rules and follow k8s documents for flannel with following command to initialize the cluster:</p>
<pre><code># kubeadm init --apiserver-advertise-address 192.168.56.20 --pod-network-cidr=10.244.0.0... | <p>I think I have found out the root cause for this. It is the previous <code>kubeadm reset</code> did not remove both <code>cni</code> and <code>flannel.1</code> interfaces. So the next <code>kubeadm init</code> makes <code>kube-dns</code> believes the Kubernetes network plugin is already in place before I apply the f... |
<p>I am trying to package a war file using a tomcat Docker image.
I'm trying to expose the tomcat port in the image for it to be accessed externally.</p>
<p>This is my docker file</p>
<pre><code> FROM tomcat8:3.0.0
COPY target/hello-world-war-1.0.0.war /usr/local/tomcat/webapps
EXPOSE 8080
</code></pre>
<p>Howev... | <blockquote>
<p>What have I missed?</p>
</blockquote>
<p>You need to publish port in some way:</p>
<ul>
<li><p>either by directly publishing it in <code>docker run</code> command remapping the <code>EXPOSE</code> Dockerfile directive to different host port using (note lowercase p):</p>
<pre><code>-p=[] : Publ... |
<p>I want to make a call to Kubernetes API from .NET Core app outside the cluster. </p>
<p>I have an HttpClient with an HttpClientHandler where I set this callback to ignore invalid (untrusted) certificates and it works:</p>
<pre><code>handler.ServerCertificateCustomValidationCallback +=
(message, certificate, ch... | <pre><code>private static byte[] s_issuingCABytes = { ... };
handler.ServerCertificateCustomValidationCallback +=
(message, certificate, chain, errors) =>
{
const SslPolicyErrors Mask =
#if CA_IS_TRUSTED
~SslPolicyErrors.None;
#else
~SslPolicyErrors.RemoteCertificateChainErro... |
<p>I have a Kubernetes cluster (v1.5.6) with 3 nodes etcd cluster (etcd version 3.1.5) on vmware.
This etcd nodes are running in three docker containers(on three hosts) on coreos on vmware.</p>
<p>I try to backup etcd with the following solution:</p>
<pre><code>docker run --rm --net=host -v /tmp:/etcd_backup -e ETCDC... | <p>according to the Etcd <a href="https://github.com/coreos/etcd/blob/master/Documentation/op-guide/recovery.md" rel="noreferrer">Disaster Recovery</a> document, you need restore all three etcd nodes from snapshot with commands like yours, then run three node with commands like this:</p>
<pre><code>etcd \
--name m1 ... |
<p>I created a service account and created a Pod associated to this service account.<br>
Inside the Pod I have the service account token: </p>
<pre><code>eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXR... | <p>It is not kubelet but kube-controller-manager which emits the service account tokens. You can find the key in the master node filesystem. Specifically, you can find the path in the value for the parameter <code>--service-account-signing-key-file</code> (private key) and <code>--service-account-key-file</code> (publi... |
<p>I created an InitializerConfiguration that adds my initializer for pods.</p>
<p>The documentation says to use a Deployment (<a href="https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#configure-initializers-on-the-fly" rel="nofollow noreferrer">https://kubernetes.io/docs/refer... | <blockquote>
<p>However, doing so results in my initializer Pod being stuck in "pending" because it's waiting for itself to initialize it</p>
</blockquote>
<p>But the docs say:</p>
<blockquote>
<p>You should first deploy the initializer controller and make sure that it is working properly before creating the <cod... |
<p>When I run exec command</p>
<pre><code> kubectl exec kubia-zgxn9 -- curl -s http://10.47.252.17
Error from server (BadRequest): pod kubia-zgxn9 does not have a host assigned
</code></pre>
<p>Describe pod shows host</p>
<pre><code>IP:
Controlled By: ReplicationController/kubia
Containers:
kubia:
... | <p>The Pod is probably not yet scheduled to a Node.</p>
<p>Maybe it just took a little longer than expected or perhaps it's asking for resources that no node can satisfy at the moment.</p>
<p>Check the output of <code>kubectl get pod kubia-zgxn9</code> and see if the state is <code>Running</code>. If so, retry now. I... |
<p>Is it possible, to pull private images from Docker Hub to a Google Cloud Kubernetes cluster?
Is this recommended, or do I need to push my private images also to Google Cloud?</p>
<p>I read the documentation, but I found nothing that could explain me this clearly. It seems that it is possible, but I don´t know if it... | <p>There is no restriction to use any registry you want. If you just use the image name, (e.g., image: nginx) in pod specification, the image will be pulled from public docker hub registry with tag assumed as :latest</p>
<p>As mentioned in the Kubernetes <a href="https://kubernetes.io/docs/concepts/containers/images/"... |
<p>I am running minikube on MacOS, and want to expose the ip address and port for running this example helm chart -
<a href="https://docs.bitnami.com/kubernetes/how-to/create-your-first-helm-chart/" rel="nofollow noreferrer">https://docs.bitnami.com/kubernetes/how-to/create-your-first-helm-chart/</a></p>
<p>I tried to... | <p>Because <code>minikube</code> is from the docker-machine family, running <code>minikube ip</code> will output the IP address of the virtual machine, and <strong>that</strong> is the IP upon which you should attempt to contact your cluster, not localhost.</p>
<p>Furthermore, <code>[debug] Created tunnel using local ... |
<p>I'm using GKE 1.10.2-gke.3 and would like to know how I can configure both IPv4 and IPv6 connectivity with my Google Load Balancer Ingress yaml.</p>
<p>I can configure IPv4 or IPv6 but not both. My yaml file is below. Assume I have reserved static IPv4 and IPv6 addresses called app-static-ipv4 and app-static-ipv6 r... | <p>You can attach a IPv6 Ip to a GCLB and have the same type of routing globally as you would with IPv4. </p>
<p>One strategy would be to configure the GCLB with an IPv6 address to handle all IPv6 traffic. Just create an additional forwarding rule with the IPv6 address.</p>
<p>Then you can associate both IPv6 and IPv... |
<p>Kubernetes has both <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a> (in front of a Service) and Service with type:
<a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">LoadBalan... | <p>Ingress can be used to expose many services depending on the path or even multiple applications depending on the host or domain in the request.</p>
<p>A load balancer always exposes one service only.</p>
|
<p>Is there any way to get statistics such as service / endpoint access for services defined in Kubernetes cluster?</p>
<p>I've read about Heapster, but it doesn't seem to provide these statistics. Plus, the whole setup is tremendously complicated and relies on a ton of third-party components. I'd really like someth... | <p>Heapster is the agent that collects data, but then you need a monitoring agent to interpret these data. On GCP, for example, that's fluentd who gets these metrics and sends to Stackdriver.</p>
<p><a href="https://prometheus.io/" rel="nofollow noreferrer">Prometheus</a> is an excellent monitoring tool. I would recom... |
<p>I'm using Kubernetes(K8) v1.7 and wondering if I can share a GPU among multiple pods. I have an MNIST machine learning program in TensorFlow where GPU Allocation is set to 30% and GPU Growth <code>allow_growth</code> is false. Two manifest files are being used to deploy two separate jobs under K8. When I run them to... | <p>GPU sharing on multiple containers is not supported at the moment, and it is unlikely to be supported anytime soon. You would need to have each virtual machine be a separate Kubernetes node, each with a separate GPU.</p>
|
<p>I have 2 services. One containing 2 pod replicas for a web application which is dependent on another backend service having pod (2 replicas) for MySQL containers.</p>
<p>The web application uses environment variables set by backend DB service. I've all the json inside the same directory.</p>
<p>Is there any way to... | <p>I can suggest two solutions:</p>
<p>First, to attach an init container to the web servers that waits until MySQL is up and running. The deployment would be something like this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
selector:
matchLabels:
app: web
replicas: 2
... |
<p>We are considering to use Polly as our failover lib.</p>
<p>We run our applications in a kubernetes environment. We can't guarantee that the pods that for example are running retry attempts against a certain service will live long enough for the request to be successful. And if the pod dies the retry chain disappear... | <p>Polly is an in-process library and doesn't currently offer any out-of-process retry co-ordination. There is no current option to persist Polly retry state anywhere out-of-process. </p>
|
<p>i am setting up a Kubernetes-Cluser and can't get the weave network up properly. </p>
<p>I have 3 nodes: rowlf (master), rizzo and fozzie. The pods are looking fine: </p>
<pre><code>NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/etcd-rowlf ... | <p>Finally I found the solution here: <a href="https://github.com/weaveworks/weave/issues/3314" rel="nofollow noreferrer">https://github.com/weaveworks/weave/issues/3314</a>
We have to disable fastDP!</p>
|
<p>I'm reading about Secrets but I'm not able to find the value of them to store user and password compared to Config Maps.</p>
<p>The content is not encrypted anyway and the way to handle or access a secret is exactly the same as using config maps.</p>
<p>And I think it is the same for storing certificates, I could ... | <blockquote>
<p>What is the value of Secrets compared to ConfigMaps?</p>
</blockquote>
<p>If you are sole user of your cluster and you issue commands as root/master/admin then, as you stated, probably minimal, but if your cluster is used by multiple users and you want to fine grain access rights using RBAC as stated... |
<p>DNS resolution looks fine, but I cannot ping my service. What could be the reason?</p>
<p>From another pod in the cluster:</p>
<pre><code>$ ping backend
PING backend.default.svc.cluster.local (10.233.14.157) 56(84) bytes of data.
^C
--- backend.default.svc.cluster.local ping statistics ---
36 packets transmitted... | <p>Ping doesn't work with service's cluster IPs like 10.233.14.157, as it is a virtual IP. You should be able to ping a specific pod, but no a service.</p>
|
<p>I create cluster on <code>Google Kubernetes Engine</code> with <code>Cluster Autoscaler</code> option enabled.<br>
I want to config the scaling behavior such as <code>--scale-down-delay-after-delete</code> according to <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md" rel="nor... | <p>It is not possible according to <a href="https://github.com/kubernetes/autoscaler/issues/966" rel="nofollow noreferrer">https://github.com/kubernetes/autoscaler/issues/966</a></p>
<p>Probably because there is no way to access the executable (which it seems to be) on GKE.</p>
<p>You can't even view the logs of the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.