prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I've been running an app on Kubernetes very smoothly for the past few weeks, until today I found that my Kubernetes master is no longer available.</p>
<p>But <strong>the application is still up</strong>, seemingly because the cluster's nodes are still available in Google Compute Engine: </p>
<p><a href="https://i.... | <p>I got in touch with Google Support to solve this problem. The cluster's master instance was erroneously marked as abusive, and the master was taken down. Google was able to bring it back up. After that, there was a process to return the cluster to its normal state.</p>
<p>I suppose the solution here is to contact s... |
<p>Currently, I'm updating the version of an image to be deployed using the <code>set image</code> command:</p>
<pre><code>$ kubectl set image deployments myapp myapp=caarlos0/myapp:v2
</code></pre>
<p>And then I watch the changes with <code>rollout status</code>:</p>
<pre><code>$ kubectl rollout status deployments ... | <p>You're doing the right thing. Within the <a href="https://kubernetes.io/docs/user-guide/deployments/#updating-a-deployment" rel="noreferrer">Updating a deployment</a> documentation you'll find this:</p>
<blockquote>
<p>Note: a Deployment’s rollout is triggered if and only if the Deployment’s pod template (i.e. <c... |
<p>I try to install ElasticSearch (latest) on a cluster nodes on Google Container Engine but ElasticSearch needs the variable : <code>vm.max_map_count</code> to be >= 262144.</p>
<p>If I ssh to every nodes and I manually run :</p>
<pre><code>sysctl -w vm.max_map_count=262144
</code></pre>
<p>All goes fine then, but ... | <p>I found another solution while looking at <a href="https://github.com/pires/kubernetes-elasticsearch-cluster/blob/master/es-client.yaml" rel="noreferrer" title="this repository">this repository</a>.</p>
<p>It relies on the use of <a href="https://kubernetes.io/docs/concepts/abstractions/init-containers/" rel="noref... |
<p>Is there any way to pass image version from a varibale/config when passing a manifest .yaml to kubectl command</p>
<p>Example : </p>
<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 1
selector:
app: nginx
template:
metadata:
name: nginx
labels:... | <p>k8s manifest files are static yaml/json.</p>
<p>If you would like to template the manifests (and manage multiple resources in a bundle-like fashion), I strongly recommend you to have a look at <a href="https://github.com/kubernetes/helm" rel="noreferrer">Helm</a></p>
<p>I've recently created <a href="https://githu... |
<p>I have a Kubernetes cluster running locally via Minikube.</p>
<p>I have a local folder on my Mac mounted via the hostPath volume config and accessible to the Docker container at the location: /code/bot</p>
<p>I can create a service and load the webpage just fine. But when I change the code and reload the page, it... | <p>A remark: (compiled) Code should be part of the container. You are not following the container design laid out for this, so you should expect side effects. </p>
<p>Having said that: You might have to restart your container when you change your code since your code is clearly not reloaded by your container.</p>
<p>... |
<p>I'm trying to deploy a Docker container that exposes a simple Docker server, a clone of the httpbin.org service in the Google Container Engine (Kubernetes).</p>
<p>This is the Service definition I'm using:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
app: httpbin
spec:
type... | <p>AFAIK GLB can not do correct forwarding for you. You will have to use a webserver in the service after the ingress to solve that scenario. </p>
<p>Your current behavior seems to be caused by </p>
<p><code>annotations:
kubernetes.io/ingress.global-static-ip-name: "http-bin-static-ip"</code></p>
<p>Remove that ... |
<p>In a container inside a pod, how can I run a command using kubectl? For example, if i need to do something like this inside a container: </p>
<blockquote>
<p>kubectl get pods</p>
</blockquote>
<p>I have tried this : In my dockerfile, I have these commands : </p>
<pre><code>RUN curl -LO https://storage.googleapi... | <p>I would use kubernetes api, you just need to install curl, instead of <code>kubectl</code> and the rest is restful.</p>
<pre><code>curl http://localhost:8080/api/v1/namespaces/default/pods
</code></pre>
<p>Im running above command on one of my apiservers. Change the <strong>localhost</strong> to <strong>apiserver ... |
<p>I'm trying to expose my Deployment to a port which I can access through my local computer via Minikube.</p>
<p>I have tried two YAML configurations (one a load balancer, one just a service exposing a port).
I: <a href="http://pastebin.com/gL5ZBZg7" rel="nofollow noreferrer">http://pastebin.com/gL5ZBZg7</a></p>
<pr... | <p>The <code>LoadBalancer</code> service is meant for Cloud providers and not really relevant for minikube.</p>
<p>From the <a href="https://kubernetes.io/docs/user-guide/services/#type-loadbalancer" rel="nofollow noreferrer">documentation</a>:</p>
<blockquote>
<p>On cloud providers which support external load bala... |
<p>My company uses it's own root CA and when I'm trying to pull images. Even from a private registry I'm getting error:</p>
<blockquote>
<p>1h 3m 22 {kubelet minikube} Warning FailedSync Error syncing
pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull:
"image pull faile... | <p>The only solution I've found so far is adding --insecure-registry gcr.io option to the minikube.</p>
|
<p>I'm working on setting up a kubernetes pod for a service.There is a need to use persistent volumes for logs,certs etc which should be available at some sub-path at host like service/log.Now i want to make this folder unique by changing to something like service/log_podID or log_podName.How can i get a pod name or po... | <p>Using something like this implies some kind of state which is contrary to the stateless nature of a <code>Deployment</code>. You could use the <code>hostname</code> within the container to have a unique ID, but that can't be used in the YAML.</p>
<p>If you need reliable IDs of your PODs you should use a <code>State... |
<p>Is it possible to have my development machine to be part of Minikube's network? </p>
<p>Ideally, it should work both ways:</p>
<ul>
<li>While developing an application in my IDE, I can access k8s resources inside Minikube using the same addressing that pods would use.</li>
<li>Pods running in Minikube can access m... | <p>There is an issue open upstream (<a href="https://github.com/kubernetes/minikube/issues/38" rel="noreferrer">kubernetes/minikube#38</a>) in order to discuss that particular use case. </p>
<p><code>kube-proxy</code> already adds the IPtables rules needed for IP forwarding inside the <code>minikube</code> VM (this is... |
<p>I have Container Linux by CoreOS alpha (1325.1.0) Installed on a pc at home. </p>
<p>I played with kubernetes for a couple of month, but now after reinstalling ContainerOS and trying to install kubernetes using my fork at <a href="https://github.com/kfirufk/coreos-kubernetes" rel="noreferrer">https://github.com/kfi... | <p>thanks to @AntoineCotten the problem was easily resolved. </p>
<p>first, I downgraded hyperkube from <code>v1.6.0-beta.0_coreos.0</code> to <code>v1.5.3_coreos.0</code>. then I noticed an error in the kubelet log that made me understand that I had a major typo in <code>/opt/bin/host-rkt</code>.</p>
<p>I had <code>... |
<p>I'm trying to set node affinity using nodeSelector as discussed here: <a href="https://kubernetes.io/docs/user-guide/node-selection/" rel="nofollow noreferrer">https://kubernetes.io/docs/user-guide/node-selection/</a></p>
<p>However, no matter if I use a Pod, a Replication Controller or a Deployment, I can't get th... | <p>In yaml, the token <code>yes</code> evaluates to a boolean <code>true</code> (<a href="http://yaml.org/type/bool.html" rel="nofollow noreferrer">http://yaml.org/type/bool.html</a>)</p>
<p>Internally, <code>kubectl</code> converts yaml to json as a preprocessing step. Your node selector is converting to <code>"nodeS... |
<p>I am trying to use the cinder plugin for kubernetes to create both statically defined PVs as well as StorageClasses, but I see no activity between my cluster and cinder for creating/mounting the devices.</p>
<p>Kubernetes Version:</p>
<pre><code>kubectl version
Client Version: version.Info{Major:"1", Minor:"4", Gi... | <p>The cinder volumes work for sure with Kubernetes 1.5.0 and 1.5.3 (I think they also worked on 1.4.6 on which I was first experimenting, I don't know about previous versions).</p>
<h2>Short answer</h2>
<p>In your Pod yaml file you were missing: <code>volumeMounts:</code> section.</p>
<h2>Longer answer</h2>
<h3>Fi... |
<p>I'm unable to delete the kubernetes pod, it keeps recreating it.<br>
There's no service or deployment associated with the pod. There's a label on the pod thou, is that the root cause?<br>
If I edit the label out with <code>kubectl edit pod podname</code> it removes the label from the pod, but creates a new pod with ... | <p>Pod can be created by ReplicationControllers or ReplicaSets. The latter one might be created by an Deployment. The described behavior strongly indicates, that the Pod is managed by either of these two.</p>
<p>You can check for these with this commands:</p>
<pre><code>kubectl get rs
kubectl get rc
</code></pre>
|
<p>I've the following ingress configuration but when I call <code>www.domain.com/api</code> it always open my UI service instead of API and the same thing happens if I call something else after <strong>api</strong>, for example <code>www.domain.com/api/v1/projects</code>.</p>
<p>How can I fix that?</p>
<pre><code>api... | <p>Here is the way I fixed this problem. I hope this can help others.</p>
<p>Thanks @aleks!!</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kronus
spec:
tls:
- secretName: tls
backend:
serviceName: ui
servicePort: 5003
rules:
- host: domain.com
http:
paths:
... |
<p>I'm trying to configure kubernetes and in my project I've separeted UI and API.
I created one Pod and I exposed both as services.</p>
<p>How can I set API_URL inside pod.yaml configuration in order to send requests from user's browser?</p>
<p>I can't use localhost because the communication isn't between containers... | <p>I created an Ingress to solve this issue and point to DNS instead of IP.</p>
<p>ingres.yaml</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: project
spec:
tls:
- secretName: tls
backend:
serviceName: ui
servicePort: 5003
rules:
- host: www.project.com
http:
... |
<p><a href="https://i.stack.imgur.com/TmNQ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmNQ8.png" alt="enter image description here"></a></p>
<p>I have installed kubernetes on my ubuntu machine when I tried to run the following command I see external-IP as "pending", where svc.yml is service ob... | <p>The yaml you specified for the Service has <code>type: LoadBalancer</code>. That will only work with a cloud provider - so not on your bare metal Ubuntu installation.</p>
<p>Modify the Service definition and specify a different type, for example <a href="https://kubernetes.io/docs/user-guide/services/#publishing-se... |
<p>Is it possible to map, the device port(USB port) of a worker node, to a POD?
Similar to <code>docker create --device=/dev/ttyACM0:/dev/ttyACM0</code></p>
<p>Is it possible? I checked the refence doc, but could not find anything.</p>
<p>In Docker service, is it possible to map <code>--device port</code> to service ... | <p>You can actually get this to work. You need to run the container privileged and use a hostPath like this:</p>
<pre><code> containers:
- name: acm
securityContext:
privileged: true
volumeMounts:
- mountPath: /dev/ttyACM0
name: ttyacm
volumes:
- name: ttyacm
hostPath:
path: /d... |
<p>When provisioning a kubernetes cluster with <code>kubeadmin init</code> it creates a cluster which keeps the <code>kube-apiserver</code>, <code>etcd</code>, <code>kube-controller-manager</code> and <code>kube-scheduler</code> processes within docker containers.</p>
<p>Whenever some configuration (e.g. access tokens... | <p>You can delete the kube-apiserver Pod. It's a <a href="https://kubernetes.io/docs/admin/static-pods/" rel="noreferrer">static Pod</a> (in case of a kubeadm installation) and will be recreated immediately.</p>
<p>If I recall correctly the manifest directory for that installation is /etc/kubernetes/manifest, but I wi... |
<p>What's the difference between OpenShift and Kubernetes and when should you use each? I understand that OpenShift is running Kubernetes under the hood but am looking to determine when running OpenShift would be better than Kubernetes and when OpenShift may be overkill.</p>
| <p>In addition to the additional API entities, as mentioned by @SteveS, Openshift also has advanced security concepts.</p>
<p>This can be very helpful when running in an Enterprise context with specific requirements regarding security.
As much as this can be a strength for real-world applications in production, it can... |
<p>What does DiskPressure really means and how it can be avoided in kubernetes during container creation?</p>
<p>Seemingly when I creating a new container on a node there is a high chance that it is crashing the whole node because of the pressure...</p>
| <p>From the <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#node-conditions" rel="nofollow noreferrer">documentation</a> you'll find that <code>DiskPressure</code> raises when:</p>
<blockquote>
<p>Available disk space and inodes on either the node’s root filesytem or image files... |
<p>I am on Suse 12.01 Enterprise and trying to get Minikube working. The VM works already and the minikube shell tool can communicate.</p>
<p>But the kubectl still can't talk to the kubernetes master. I'm trying to debug that, and the best way to get additional info seems to be running a random command with <code>-v 9... | <p>You said you tried <code>curl 127.0.0.1:8080/api</code>, but regarding to the logs it tries to connect via https. So you should try <code>curl https://127.0.0.1:8080/api</code>.</p>
<p>I searched the source code for the term <a href="https://github.com/kubernetes/kubernetes/search?utf8=%E2%9C%93&q=%22Service+Un... |
<p>We wanted podnames to be resolved to IP's to configure the seed nodes in an akka cluster. This was happenning by using the concept of a headless service and stateful sets in Kubernetes. But, how do I expose a headless service externally to hit an endpoint from outside?</p>
| <p>It is hard to expose a Kubernetes service to the outside, since this would require some complex TCP proxies. The reason for this is, that the headless services is only a DNS record with an IP for each pod. But these IPs are only reachable from within the cluster.</p>
<p>One solution is to expose this via Node ports... |
<p>I have 4 nodes kubernetes cluster. My application running with 2 replica instances. I am using deployment resource with replica set. As per the documentation , replica set always ensure that specified no. Of application instances will be running.If I delete the one pod instance, then it will be restarted on the same... | <p>AFAIS Kubernetes changed that behavior with version 1.5. If I interpret the <a href="https://github.com/kubernetes/kubernetes/blob/b0ce93f9be25c762fd4b746077fcda2aaa5b12bd/CHANGELOG.md#notable-changes-to-existing-behavior" rel="nofollow noreferrer">docs</a> correctly, the Pods of the failed node is still registered ... |
<p>I annotate my Kubernetes objects with things like version and whom to contact when there are failures. How would I relay this information to Prometheus, knowing that these annotation values will frequently change? I can't capture this information in Prometheus labels, as they serve as the primary key for a target (e... | <p>I just wrote a blog post about this exact topic! <a href="https://www.weave.works/aggregating-pod-resource-cpu-memory-usage-arbitrary-labels-prometheus/" rel="nofollow noreferrer">https://www.weave.works/aggregating-pod-resource-cpu-memory-usage-arbitrary-labels-prometheus/</a></p>
<p>The trick is Kubelet/cAdvisor ... |
<p>I have Kubernetes installed on Container Linux by CoreOS alpha (1353.1.0)
using hyperkube v1.5.5_coreos.0 using my fork of coreos-kubernetes install scripts at <a href="https://github.com/kfirufk/coreos-kubernetes" rel="noreferrer">https://github.com/kfirufk/coreos-kubernetes</a>.</p>
<p>I have two ContainerOS machi... | <p>kube-dns has a readiness probe that tries resolving trough the Service IP of kube-dns. Is it possible that there is a problem with your Service network?</p>
<p>Check out the answer and solution here:
<a href="https://stackoverflow.com/questions/42705432/kubernetes-service-ips-not-reachable">kubernetes service IPs n... |
<p>So I've got a Kubernetes cluster up and running using the <a href="https://coreos.com/kubernetes/docs/latest/getting-started.html" rel="nofollow noreferrer">Kubernetes on CoreOS Manual Installation Guide</a>.</p>
<pre><code>$ kubectl get no
NAME STATUS AGE
coreos-master-1 Ready,Sch... | <p>The Sevice network provides fixed IPs for Services. It is not a routeable network (so don't expect <code>ip ro</code> to show anything nor will ping work) but a collection iptables rules managed by kube-proxy on each node (see <code>iptables -L; iptables -t nat -L</code> on the nodes, not Pods). These <a href="https... |
<p>I have just started with Kubernetes and I have some queries about kubernetes Load balancing approaches and unable to find clear answers in the kubernetes documentation.</p>
<p>First, Lets say we have created a deployment "iis", and scaled it to 3 replicas. Now without creating a service how can we access these endp... | <blockquote>
<p>First, Lets say we have created a deployment "iis", and scaled it to 3 replicas. Now without creating a service how can we access these endpoints?</p>
</blockquote>
<p>Unless you have an out of band solution for this (like a standard load balancer which you register the POD ips in) <em>you can't.</em... |
<p>I deployed <code>kubernetes</code> 1.5 cluster on the aws, when I want to deploy a <code>LNMP</code> stack on the k8s cluster, but I find that it's difficult to wirte the <code>manifest</code> file, I can't find any examples on k8s official docs. so ,is there any detailed list of <code>manifest</code> parameters and... | <p>There is a full reference on their website:</p>
<ul>
<li>k8s.io -> Documentation -> Reference -> Select your "Kubernetes API Versions"</li>
<li>For 1.10: <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/" rel="noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.1... |
<p>Is there a way to specify a specific instance instead of a pool of instances using <code>nodeSelector</code> in Kubernetes?</p>
<p>If not, what would be the best way to provision a Redis Cluster with each node having at least 30GB of memory. Can this be accomplished using the <code>resources</code> attribute?</p>
... | <p>The kubelet should automatically add a label for the hostname, using <code>kubernetes.io/hostname</code>.</p>
<p>With that in mind, you can pin a pod to a specific host using:</p>
<pre><code>nodeSelector:
kubernetes.io/hostname: "<hostname>"
</code></pre>
<p>I would question if this is a good idea, howeve... |
<p>We have a docker image and a corresponding yaml file for the deployment using kubernetes. The application we have built is in scala with akka-http. We have used akka-cluster. We have a particular variable(seed-nodes in our case - akka cluster) in the configuration file which is used in our application code that uses... | <p>I have tried something very similar. What you can do is use stateful sets <a href="https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/" rel="nofollow noreferrer">Kubernetes-Stateful sets</a>. Stateful sets have a naming convention and the pods will be named accordingly - you can read more a... |
<p>What would be the best setup to run <code>sonatype\nexus3</code> in Kubernetes that allows using the Docker repositories? </p>
<p>Currently I have a basic setup:</p>
<ul>
<li>Deployment of <code>sonatype\nexus3</code></li>
<li>Internal service exposing port 80 and 5000</li>
<li>Ingress + kube-lego provides HTTPS a... | <h1>tl;dr</h1>
<p>Nexus needs to be served over SSL, otherwise docker won't connect to it. This can be achieved with a k8s ingress + <a href="https://github.com/jetstack/kube-lego/" rel="noreferrer">kube-lego</a> for a <a href="https://letsencrypt.org/" rel="noreferrer">Let's Encrypt</a> certificate. Any other real ce... |
<p>I have deployed my <a href="https://github.com/CrunchyData/crunchy-containers/tree/master/examples/kubehelm/crunchy-postgresql-cluster" rel="noreferrer">crunchy db</a> postgresq on my Kubernetes cluster. </p>
<p>However, I am not sure how to connect to the database remotely. </p>
<p>What command can I use to con... | <p>I was able to look at another forum and found what I needed. I executed with the pod name and gets me to a bash prompt.</p>
<pre><code>kubectl exec -it <POD_NAME> bash
</code></pre>
|
<p>I am working with windows + kubernetes cluster on ACS (Azure Container Service). I have few queries about the auto-scaling of agents/worker nodes in ACS. </p>
<p>Suppose I have a cluster of 1 master and 5 worker nodes. I have 200 running pods and these pods are distributed along the 5 worker nodes and the resources... | <blockquote>
<p>My question is not related to auto-scaling of pods as provided by
kubernetes, I am talking about auto-scaling of worker/agent nodes
which are managed by ACS</p>
</blockquote>
<p>Currently, autoscaling of agent nodes in a container service cluster is <strong>not</strong> supported.</p>
<p>For now... |
<p>Is it possible to use the python API to create a "custom object" in kubernetes?</p>
<p>Edit:</p>
<p>By custom objects I'm refering to <a href="https://kubernetes.io/docs/user-guide/thirdpartyresources/#creating-custom-objects" rel="nofollow noreferrer">this</a>.</p>
<p>Thank you.</p>
| <p>There isn't a ready-to-use API yet. Here is a rudimentary example using <a href="https://github.com/kubernetes-incubator/client-python" rel="nofollow noreferrer">https://github.com/kubernetes-incubator/client-python</a></p>
<pre><code>import json
from kubernetes import client, config
class ThingyApi(object):
d... |
<p>I have one pod running with name 'jenkins-app-2843651954-4zqdp'. I want to install few softwares temporarily on this pod. How can I do this?</p>
<p>I am trying this- <code>kubectl exec -it jenkins-app-2843651954-4zqdp -- /bin/bash</code>
and then running apt-get install commands but since the user I am accessing ... | <ul>
<li>Use <code>kubectl describe pod ...</code> to find the node running your Pod and the container ID (<code>docker://...</code>)</li>
<li>SSH into the node</li>
<li>Run <code>docker exec -it -u root CONTAINER_ID /bin/bash</code></li>
</ul>
|
<p>i setup a kubernetes cluster on azure with the azure-container-service cli (az acs create). The cluster is up and running and it seems to work fine. Now I want to sign client certificates with my kubernetes CA which was created on installation. In my understanding i need the ca certificate (which is hand over to the... | <p>Are these the one that you are looking for??</p>
<pre><code>azureuser@k8s-master-9XXXXX-0:~$ ls -la /etc/kubernetes/certs/
total 28
drwxr-xr-x 2 root root 4096 Mar 14 20:59 .
drwxr-xr-x 5 root root 4096 Mar 14 20:59 ..
-rw-r--r-- 1 root root 1600 Mar 14 20:58 apiserver.crt
-rw-r--r-- 1 root root 2048 Mar 14 20:59 a... |
<p>I set up the <code>kubernetes</code> cluster, and I found the <code>pause-amd64:3.0</code> container on master or minion like this:</p>
<pre><code>[root@k8s-minion1 kubernetes]# docker ps |grep pause
c3026adee957 gcr.io/google_containers/pause-amd64:3.0 "/pause" 22 minutes ago ... | <p>It's part of the infrastructure. This container is started first in all Pods to setup the network for the Pod.</p>
<p>It does nothing after the Pod has started.</p>
<p>Here is the <a href="https://github.com/kubernetes/kubernetes/tree/master/build/pause" rel="noreferrer">source code</a>.</p>
|
<p>I am in an environment where we are still using petsets. When I run the following command : </p>
<pre><code>kubectl delete petsets <petset-name>
</code></pre>
<p>The petset is deleted but the pods(pets) associated with it are not deleted. When I tried this locally on minikube using statefulsets, the stateful... | <p>You are using an old version of kubernetes that is affected by <a href="https://github.com/kubernetes/kubernetes/pull/27438" rel="nofollow noreferrer">issue 27438</a>. Upgrade to 1.5. (See <code>kubectl version</code>)</p>
|
<p>I'm setting up Jenkins on kubernetes. My current deployment looks like this:</p>
<pre><code> spec:
containers:
- name: jenkins-master
image: jenkins:1.0
ports:
- containerPort: 8080
name: http
volumeMounts:
... | <p>What you're looking for is <a href="https://kubernetes.io/docs/user-guide/persistent-volumes/" rel="nofollow noreferrer">Persistent Volumes</a> which essentially model an underlying persistent volume (<em>say, AWS EBS or OpenStack Cinder volume</em>) as resource.</p>
<p>This resource, named simply <a href="https://... |
<p>How can I generate ConfigMap from directory without create it?</p>
<p>If I use:</p>
<pre><code>$ kubectl create configmap my-config --from-file=configuration/ -o yaml
apiVersion: v1
data:
...
</code></pre>
<p>ConfigMap yaml output is displayed but <code>my-config</code> is created on current Kubernetes project... | <p>Just add <code>--dry-run</code> so:</p>
<pre><code>$ kubectl create configmap my-config --from-file=configuration/ -o yaml --dry-run
</code></pre>
<p>Source: <a href="https://kubernetes.io/docs/user-guide/kubectl/kubectl_create_configmap/" rel="noreferrer">https://kubernetes.io/docs/user-guide/kubectl/kubectl_crea... |
<p>I am new to Kubernetes. I have setup kubernetes with 1 master and 3 slave nodes. I have created mysql and nginx pods and it is running on different nodes successfully. Now I want to deploy my application. It has nginx,php-fpm, PHPmodule and MySQL combination. How can I achieve this in Kubernetes? </p>
<p>Here is wh... | <p>Your Pod fails to start because it can't find the image you specified on docker hub (<code>ErrImagePull</code>).</p>
<p>Change <code>php-fpm.yaml</code> like this:</p>
<pre><code>...
image: php:fpm
...
</code></pre>
<p>See the full list of <a href="https://hub.docker.com/_/php/" rel="nofollow noreferrer">official... |
<p>I have a running GCP Kubernetes cluster. I managed to deploy some services and exposed them successfully using kubectl expose ... type="LoadBalancer"... However, one particular new service is not working. I know there may be a thousand causes to check, but the Docker images I build are very compact so I can't find u... | <p>You need make sure if your service is responding in http port. Maybe you could do a port-forward from your pod to your desktop local. Please, replace the values pod_name, pod_port and local_port in command bellow.</p>
<p><code>kubectl port-forward <pod_name> <local_port>:<pod_port>
</code></p>
<p... |
<p>I have installed influxdb in docker container (Kubernetes) and I have mounted a persistent volume to that container. But influxdb is not writing data to that volume.
Can anyone please tell me steps, so that influxdb will write data in particular volume.
Thanks</p>
| <p><strong>Short Answer:</strong> </p>
<pre><code> $ docker run -p 8083:8083 -p 8086:8086 \
-v $PWD:/var/lib/influxdb \
influxdb
</code></pre>
<p>Modify $PWD with the path to external volume.</p>
<p><strong>Long answer:</strong></p>
<pre><code>docker run -p 8083:8083 -p 8086:8086 influxdb
</co... |
<p>I was wondering if someone could give me a brief overview of the differences/ advantages between all of the different Kubernetes network overlays. The getting started guide (<a href="http://kubernetes.io/docs/getting-started-guides/scratch/#network" rel="noreferrer">http://kubernetes.io/docs/getting-started-guides/s... | <p><a href="https://docs.google.com/spreadsheets/d/1polIS2pvjOxCZ7hpXbra68CluwOZybsP1IYfr-HrAXc" rel="nofollow noreferrer">This comparison matrix</a> was shared several times on Kubernetes' Slack and may be useful.</p>
<p>However, beware potentially out-of-date information, keep in mind the "devil is in the details" s... |
<p>All</p>
<p>have kubernetes on Google Computing Engine running, launching pods etc.</p>
<p>Recently learned that in Kubernetes Jobs were added as first class construct.</p>
<p>Could someone enlighten me why they were added? Looks like another level of indirection, but to solve exactly WHAT kind of problems which p... | <p>Jobs are for workloads designed for tasks that will run to completion, then exit.</p>
<p>It is technically still a pod, just another kind. Where a pod while start up and run continuously until it's terminated or it crashes, a job will run a workload, then it will exit with a "Completed" status.</p>
<p>There is als... |
<p>Here's the <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/storage/redis" rel="nofollow noreferrer">example</a> I have modeled after.</p>
<p>In the Readme's "Delete our manual pod" section:</p>
<blockquote>
<ol start="3">
<li>The redis sentinels themselves, realize that the master has di... | <blockquote>
<p>How will the 3 pods be distinguishable so that from Kubernetes I know
which one is the master?</p>
</blockquote>
<p>Kubernetes isnt aware of the master nodes. You can find the pod manually by connecting to it and using:</p>
<pre><code>redis-cli info
</code></pre>
<p>You will get lots of informat... |
<p>We have a Kubernetes cluster which spins up 4 instances of our application. We'd like to have it share a Hazelcast data grid and keep in synch between these nodes. According to <a href="https://github.com/hazelcast/hazelcast-kubernetes" rel="nofollow noreferrer">https://github.com/hazelcast/hazelcast-kubernetes</a... | <p>Could you try with service dns name as:</p>
<p>myapp.mynamespace.endpoints.cluster.local</p>
<p>Please reply it's work or not and also post your full log.</p>
|
<p>I'm using KOPs to launch a Kubernetes cluster in the AWS environment. </p>
<ol>
<li>Is there a way to set a predefined SSH key when calling <code>create cluster</code>?</li>
<li>If KOPs autogenerates the SSH key when running <code>create cluster</code>, is there a way to download this key to access the cluster node... | <p>Please read the Kops <a href="https://github.com/kubernetes/kops/blob/master/docs/security.md#ssh-access" rel="noreferrer">SSH docs</a>:</p>
<blockquote>
<p>When using the default images, the SSH username will be admin, and the SSH private key is be the private key corresponding to the public key in kops get secr... |
<p>So I was able to use <code>minikube mount /my-directory</code> to mount a volume in my minikube vm to reflect my local directory. However I found out that I wasn't able to make any changes to this directory inside minikube (called <code>/mount-9p</code>).</p>
<p>I'm attempting to create a container that would rsync... | <p>This is a known issue and there is currently a PR to fix it here:
<a href="https://github.com/kubernetes/minikube/pull/1293" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/pull/1293</a></p>
<p>If you build minikube from that PR you should be good to go. This patch should also be in minikube's nex... |
<p>I am following this tutorial at <a href="https://gettech1.wordpress.com/2016/05/26/setting-up-kubernetes-cluster-on-ubuntu-14-04-lts/" rel="nofollow noreferrer">https://gettech1.wordpress.com/2016/05/26/setting-up-kubernetes-cluster-on-ubuntu-14-04-lts/</a> to setup kubernet multi node with 2 minions and 1 master no... | <p>The command you should be executing is <code>KUBERNETES_PROVIDER=ubuntu ./kube-up.sh</code></p>
<p>Without setting that environment variable kube-up.sh tries to deploy VMs on Google Compute Engine and to do so it needs the gcloud binary that you don't have installed.</p>
|
<p>Although I reserved a static IP I got the following warning, while not having load balancer created :</p>
<pre><code>> kubectl describe svc --namespace=api-1dt-dc
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ... | <p>OK, it seems to work only with regional IPs...</p>
|
<p>GitLab's running in kubernetes cluster. Runner can't build docker image with build artifacts. I've already tried several approaches to fix this, but no luck. Here are some configs snippets:</p>
<p>.gitlab-ci.yml</p>
<pre><code>image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
sta... | <p>Don't need to use this: </p>
<pre><code>DOCKER_DRIVER: overlay
</code></pre>
<p>cause it seems like OVERLAY isn't supported, so svc-0 container is unable to start with it:</p>
<pre><code>$ kubectl logs -f `kubectl get pod |awk '/^runner/{print $1}'` -c svc-0
time="2017-03-20T11:19:01.954769661Z" level=warning msg... |
<p>I created an ACS (Azure Container Service) using Kubernetes by following this link : <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-windows-walkthrough" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-w... | <p>Outbound internet access works from an Azure Container Service (ACS) Kubernetes Windows cluster if you are connecting to IP Addresses other than the range 10.0.0.0/16 (that is you are not connecting to another service on your VNET). </p>
<p>Before Feb 22,2017 there was a bug where Internet access was not available... |
<p>I deployed a few VMs using Vagrant to test kubernetes:<br>
master: 4 CPUs, 4GB RAM<br>
node-1: 4 CPUs, 8GB RAM<br>
Base image: Centos/7.<br>
Networking: Bridged.<br>
Host OS: Centos 7.2 </p>
<p>Deployed kubernetes using kubeadm by following <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="n... | <p>Here is the recipe that worked for me (as of March 19th 2017 using Vagrant and VirtualBox). The cluster is made of 3 nodes, 1 Master and 2 Nodes.</p>
<p><strong>1)</strong> Make sure you explicitly set the IP of your master node on init</p>
<pre><code>kubeadm init --api-advertise-addresses=10.30.3.41
</code></pre>... |
<p>Say, the pod has one container which hosts a webserver serving static page on port 80.</p>
<p>When creating the pod, how to set a subdomain <code>x.example.com</code> to a pod? Is a service necessary here?</p>
<p>What role does kube-dns play here?</p>
<p>I don't want to do a use nodePort binding. The pod should b... | <p>Assuming you aren't deploying to a cloud environment, you would use an <a href="https://kubernetes.io/docs/user-guide/ingress/#ingress-controllers" rel="noreferrer">Ingress Controller</a>
Deploy an ingress controller as a standard pod, with a service that uses NodePort or HostPort.</p>
<p>Once you've deployed your ... |
<p>I'm trying to create redis cluster using kubernetes on centos. I have my kubernetes master running on one host and kubernetes slaves on 2 different hosts.</p>
<blockquote>
<p>etcdctl get /kube-centos/network/config</p>
</blockquote>
<pre><code>{ "Network": "172.30.0.0/16", "SubnetLen": ... | <p>Running <code>./redis-trib.rb create --replicas 1 172.30.79.2:6379 172.30.79.3:6379 172.30.79.4:6379 172.30.96.2:6379 172.30.96.3:6379 172.30.96.4:6379</code> doesn't make sense with this setup.</p>
<p>The port <code>6379</code> is only accessible through the service which you brough up, but never directly as you t... |
<p>I am fairly new to the Google Cloud platform and Docker and set-up a cluster of nodes, made a Dockerfile that copies a repo and runs a Clojure REPL on a public port. I can connect to it from my IDE and play around with my code, awesome!</p>
<p>That REPL should however probably tunneled through SSH, but here is wher... | <p>For more recent Kubernetes versions the shell command should be separated by the <code>--</code>:</p>
<pre><code>kubectl exec -it <POD NAME> -c <CONTAINER NAME> -- bash
</code></pre>
<p>Please note that <code>bash</code> needs to be availalble for execution inside of the container. For different OS flavo... |
<p>I run Jenkins and my app is dockerized, i.e. when I run the container it exposes port 3000 and I can point my browser there. On every Github PR I would like to deploy that git commit to a running container somewhere and have Jenkins post back to the PR the link where it can be accessed. On any PR updates it gets aut... | <p>There is a jenkins plugin <a href="https://plugins.jenkins.io/github-pullrequest" rel="nofollow noreferrer">github-pullrequest</a> can resolve your problem.</p>
<p><strong>Prerequisites:</strong></p>
<ol>
<li>You have a jenkins server can access by internet if you want trigger your build by a webhook.</li>
<li>You... |
<p>I have a load balancer service for a deployment having 3 pods. When I do a rolling udpate(changing the image) by the following command :</p>
<blockquote>
<p>kubectl set image deployment/< deployment name > contname=< image-name ></p>
</blockquote>
<p>and hit the service continuously, it gives a few connect... | <p>Have you <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">configured liveness and readiness probes</a> for you Pods? The service will not serve traffic to a Pod unless it thinks it is healthy, but without health checks it won't know for... |
<p>I'm deploying my test Kubernetes cluster on AWS using Rancher 1.5.1.</p>
<p>I first deploy Rancher and ensure that there are no errors after hosts registration.
I then install Kubernetes using "Kubernetes" entry in the Rancher's catalog.
That succeeds seemingly without any errors and I get access to my 1.5.0 Kubern... | <p>It appears I had to add a correct ingress to the system:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: monitoring-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: monitoring.kube-system.mykubernetes.host
http:
paths:
- path:
... |
<p>I'm trying to setup a continuous integration job that will deploy to kubernetes / google container engine from a Jenkins job. The jenkins server is relatively tightly controlled, so I'm not able to install plugins.</p>
<p>I have a JSON key file for a server account from Google Cloud IAM.</p>
<p>I'm currently tryin... | <p>There's a cryptic github issue around this behavior:</p>
<p><a href="https://github.com/kubernetes/kubernetes/issues/30617" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/30617</a></p>
<p>According to that issue, everything I've been doing should work:</p>
<blockquote>
<p>Previously, gclou... |
<p>I'm using a cluster setup with multiple apiservers with a loadbalancer in front of them for external access, with an installation on bare metal.</p>
<p>Like mentioned in the <a href="http://kubernetes.io/v1.0/docs/admin/high-availability.html" rel="noreferrer">High Availability Kubernetes Clusters</a> docs, I would... | <p>This is quite old question, but as the problem persists... here it goes.</p>
<p>There is a bug in the Kubernetes restclient, which does not allow to use more than one IP/URL, as it will pick up always the first IP/URL in the list. This affects to kube-proxy and also to kubelet, leaving a single point of failure in ... |
<p>Is there a way to specify <code>int</code> values in ConfigMap? When I try to specify a port number I get the following error.</p>
<pre><code>error: error validating "my-deployment.yml": error validating data: expected type int, for field spec.template.spec.containers[0].ports[0].containerPort, got string; if you c... | <p>You can't use configmap values in <code>spec.template.spec.containers[0].ports[0].containerPort</code> I'm afraid, it's for configuration values.</p>
<p>The options you can use it for (specified in <a href="https://kubernetes.io/docs/user-guide/configmap/" rel="nofollow noreferrer">this guide</a>) are</p>
<ul>
<li... |
<p>I create a <code>k8s</code> cluster by <code>kops</code> on <code>aws</code>, the node auto scaling group configuration like:</p>
<pre><code>metadata:
creationTimestamp: "2017-03-21T03:53:26Z"
name: nodes
spec:
associatePublicIp: true
image: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2016-10-21
machineType: ... | <p>finally I found the answer, my default <code>kops</code> configuration of <code>nodes</code> asg is <code>t2.medium</code>, while I deploy the pod which require a <code>5000M</code> for memory, as we all konw <code>t2.medium</code> memory is <code>4GB</code> which can't fit the requirement, so the <code>cluster-auto... |
<p>Is this possible to set up a config, which would include:</p>
<ol>
<li>GitLab project #1 java-container </li>
<li>GitLab project #2 java-container </li>
<li>Nginx container</li>
<li>Redis container</li>
<li>Cassandra container</li>
<li>Nginx exporter (Prometheus)</li>
<li>Redis exporter (Prometheus)</li>
<li>JMX ex... | <p>The first thing is to join all projects, that should be built with maven and(or) docker into the one common project at GitLab.</p>
<p>Next is to add dockerfiles and all files, needed for docker build, into the sub-projects folders.</p>
<p>Next in the root of the common project we should we should place .gitlab-ci.... |
<p>I have a Kubernetes cluster that takes jobs for processing. These jobs are defined as follows:</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: process-item-014
labels:
jobgroup: JOB_XXX
spec:
template:
metadata:
name: JOB_XXX
labels:
jobgroup: JOB_XXX
spec:
... | <p>The <code>/tmp</code> filesystem is often backed by <a href="https://en.wikipedia.org/wiki/Tmpfs" rel="nofollow noreferrer">tmpfs</a>, which stores files in memory rather than on disk. My guess is that is the case on your nodes, and the memory is being correctly charged to the container. Can you use an <a href="http... |
<p>I have a kubernetes cluster running on google container engine that defines a Pod running a NFS-Server, which I want to access in other Pods via various <code>PersistentVolume</code>s.</p>
<p>What is the best way to configure the NFS Service, if it is in the same cluster?</p>
<p>According to various documentation ... | <p>You are on the right track. To make sure that your Service is using a static IP just add <code>clusterIP: 1.2.3.3</code> under the <code>spec:</code> section of the Service.</p>
<p>From the canonical <a href="https://github.com/kubernetes/kubernetes/blob/master/examples/volumes/nfs/README.md" rel="nofollow noreferr... |
<p>I am trying to setup an Ingress in GCE Kubernetes. But when I visit the IP address and path combination defined in the Ingress, I keep getting the following 502 error:</p>
<p><a href="https://i.stack.imgur.com/HVlD1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HVlD1.png" alt="Ingress 502 error"></a></p... | <p>Your backend <code>k8s-be-32396--5fc40252fadea594</code> is showing as <code>"UNHEALTHY"</code>.</p>
<p>Ingress will not forward traffic if the backend is UNHEALTHY, this will result in the 502 error you are seeing.</p>
<p>It will be being marked as UNHEALTHY becuase it is not passing it's health check, you can ch... |
<p>Now we're using Kubernetes to run users' tasks. We need the features of Kubernetes Jobs to restart the tasks when failure occurs.</p>
<p>But our users may submit the problematic applications which always exit with non-zore code. Kubernetes will restart this task over and over again.</p>
<p>Is is possible to config... | <p>You can use the standard pod restart policy: <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy</a></p>
<p>Unfortunately, only a policy of "Never" or "OnFailure" is allo... |
<p>I have Kubernetes installed on Container Linux by CoreOS alpha (1353.1.0)
using hyperkube v1.5.5_coreos.0 using my fork of coreos-kubernetes install scripts at <a href="https://github.com/kfirufk/coreos-kubernetes" rel="noreferrer">https://github.com/kfirufk/coreos-kubernetes</a>.</p>
<p>I have two ContainerOS machi... | <p>Lots of great debugging info here, thanks!</p>
<p>This is the clincher:</p>
<pre><code># curl https://10.3.0.1 --insecure
Unauthorized
</code></pre>
<p>You got an unauthorized response because you didn't pass a client cert, but that's fine, it's not what we're after. This proves that kube-proxy is working as expe... |
<p>Can anyone suggest how can I setup NODE_ENV variable in dockerfile when running a node app.</p>
| <p>There a two ways, while building the image or when running the container.</p>
<p><strong>For builds:</strong></p>
<p>Add to your Dockerfile</p>
<pre><code>ENV NODE_ENV=whatEver
</code></pre>
<p>Or use build arguments if you don't want them to stick during runtime
Docker build --build-args NODE_ENV whatEver</... |
<p>I was trying to install newest Bluemix container service with Kubenetes plug-in; however, I got below message. Followed by <a href="https://console.ng.bluemix.net/docs/containers/cs_cli_install.html#cs_cli_install" rel="nofollow noreferrer">DOC - container service</a></p>
<pre><code>ocmbpro:~ ochen$ bx plugin insta... | <p>You can download the plugin binary directly here:</p>
<p><a href="https://clis.ng.bluemix.net/ui/repository.html#bluemix-plugins" rel="nofollow noreferrer">https://clis.ng.bluemix.net/ui/repository.html#bluemix-plugins</a></p>
<p>Then run <code>bx plugin install ~/Downloads/my-plugin</code>.</p>
<hr>
<p>You coul... |
<p>Is probe frequency customizable in liveness/readiness probe?</p>
<p>Also, how many times readiness probe fails before it removes the pod from service load-balancer? Is it customizable?</p>
| <p>You can easily customise the probes failure threshold and the frequency, all parameters are defined <a href="https://kubernetes.io/docs/api-reference/v1/definitions/#_v1_probe" rel="nofollow noreferrer">here</a>.
For example:</p>
<pre><code> livenessProbe:
failureThreshold: 3
httpGet:
... |
<p>Exposing a service with --type="LoadBalancer" in AWS currently creates a TCP-level AWS ELB with the default timeout of 60 sec. Is there a way to change that timeout other than manually looking up the load balancer and reconfiguring it using AWS tools? (I.e. the laborious kubectl describe service xyz | grep "LoadBala... | <p>It's possible to set connection idle timeout for ELB in the recent Kubernetes versions (1.4 or later?) using an annotation on the service. For example:</p>
<pre><code>kubectl annotate service my-service service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout=1200
</code></pre>
<p>Also, you can change th... |
<p>Is it possible to create a node-pool that the scheduler will ignore by default but that can be targeted by node-selector?</p>
| <p>If your node-pool has a static size or at least it's not auto-scaling then this is easy to accomplish.</p>
<p>First, <a href="https://kubernetes.io/docs/user-guide/kubectl/kubectl_taint/" rel="nofollow noreferrer">taint</a> the nodes in that pool:</p>
<pre><code>kubectl taint node \
`kubectl get node -l cloud.go... |
<p>I have a k8s cluster, among other things running an nginx.
when I do <code>curl -v <url></code> I get </p>
<pre><code> HTTP/1.1 200 OK
< Content-Type: text/html
< Date: Fri, 24 Mar 2017 15:25:27 GMT
< Server: nginx
< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload
< C... | <p>There are two things:</p>
<ul>
<li>Exposing your app</li>
<li>Making your app return json</li>
</ul>
<p>The ingess is only relevant to expose your app. And that is not the only option, you can use service (type Load balancer, for example) to achieve that too on most cloud providers. So, I'd keep it simple and not ... |
<p>I have a v6.10.0 Node server on my macOS that is automatically started from the <code>CMD</code> in the <code>Dockerfile</code>. Normally in my local development un-containerized environment I will use CTRL+C to kill the server. Not being able to (or not knowing how to) do this in the container, I resort to <code>ps... | <p>Every docker container has an <strong>ENTRYPOINT</strong> that will either be set in the <em>dockerfile</em>, using <code>ENTRYPOINT</code>or <code>CMD</code> declarations, or specified in the run command <code>docker run myimage:tag "entrypoint_command"</code>. When the <strong>ENTRYPOINT</strong> process is killed... |
<p>I have a k8s cluster, among other things running an nginx.
when I do <code>curl -v <url></code> I get </p>
<pre><code> HTTP/1.1 200 OK
< Content-Type: text/html
< Date: Fri, 24 Mar 2017 15:25:27 GMT
< Server: nginx
< Strict-Transport-Security: max-age=15724800; includeSubDomains; preload
< C... | <p>Remove the space after colon in <code>curl -v <url> -H 'Accept: application/json'</code></p>
<p>The error message <code>Could not resolve host: application</code> means that it's taking <code>application/json</code> as the URL, instead of a header.</p>
|
<p>I want to set Kubernetes for CI runners on Gitlab. I want to use Kuberntes for continuous integration and build running, not deployment. Does somebody try that and how I can do that?</p>
| <p>Yes, use the <a href="https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/executors/kubernetes.md" rel="nofollow noreferrer">kubernetes executor</a> for your gitlab runner</p>
|
<p>I'm using <a href="https://github.com/kubernetes/kubernetes/blob/7ef585be224dae4ec5deae0f135653116e21a6e0/cluster/addons/registry/README.md#expose-the-registry-on-each-node" rel="nofollow noreferrer">private Docker registry addon</a> in my kubernetes cluster, and I would like to expose port 5000 on each node to pull... | <p>I think there are a couple of things going on here.</p>
<p>Foremost, be aware that Kubernetes <code>Services</code> come in 3 flavors: <code>ClusterIP</code> (which is the default), <code>NodePort</code> (which sounds very much like what you were expecting to happen), and <code>LoadBalancer</code> (which I won't me... |
<p>I found that there is an object PodTemplate registered in apiserver which we can use as other kube objects.</p>
<p>From the struct definition, PodTemplate contains PodTemplateSpec just as other workload objects, such as rc. But I do not find any usage of PodTemplate object from either doc or code. And rc/ps/ss does... | <ul>
<li><a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/templates.md" rel="nofollow noreferrer">design proposal</a></li>
<li><a href="https://github.com/kubernetes/kubernetes/issues/170" rel="nofollow noreferrer">Separate the pod template from replicationController #170</a> (... |
<p>I am trying to evaluate <a href="https://gravitational.com/teleport/" rel="nofollow noreferrer">Gravitational Teleport</a> to be for maintaining our own architecture as we will expand soon looking into building clusters. It seems a containerized cluster using Kubernetes is where the bleeding edge is happening and SS... | <p>Teleport can be used to augment a Kubernetes cluster. Kubernetes gives you access into your pods/container, but does not handle the OS level access and control.</p>
<p>Teleport enterprise has extra features for Kubernetes via TeleKube- <a href="http://gravitational.com/teleport/docs/2.0/enterprise/" rel="nofollow ... |
<p>We have a kubernetes service running on three machines. Clients both inside and outside of our cluster talk to this service over http with the keep-alive option enabled. During a deploy of the service, the exiting pods have a readiness check that starts to fail when shutdown starts, and are removed from the service ... | <p>The issue happens if the proxying/load balancing happens in layer 4 instead of layer 7. For the internal services (Kubernetes service of type ClusterIP), since the Kube-proxy does the proxying using layer 4 proxying, the clients will keep the connection even after the pod isn't ready to serve anymore. Similarly, for... |
<p>I am using the ELK stack (elasticsearch, logsash, kibana) for log processing and analysis in a Kubernetes (minikube) environment. To capture logs I am using filebeat. Logs are propagated successfully from filebeat through to elasticsearch and are viewable in Kibana. </p>
<p>My problem is that I am unable to get ... | <p>disclaimer: I'm a beats developer</p>
<p>What you want to do is not yet supported by filebeat, but definitely, it's something we want to put some effort on, so you can expect future releases supporting this kind of mapping.</p>
<p>In the meantime, I think your approach is correct. You can append the info you need ... |
<p>I am struggling to find any answer to this in the Kubernetes documentation. The scenario is the following:</p>
<ul>
<li>Kubernetes version 1.4 over AWS</li>
<li>8 pods running a NodeJS API (Express) deployed as a Kubernetes Deployment</li>
<li>One of the pods gets restarted for no apparent reason late at night (no ... | <p>Check the version of docker you run, and whether the docker daemon was restarted during that time.</p>
<p>If the docker daemon was restarted, all the container would be terminated (unless you use the new "live restore" feature in 1.12). In <em>some</em> docker versions, docker may incorrectly reports "exit code 0" ... |
<p>I hope someone can enlighten me on Kubernetes network setup. I want to use flannel as the Kubernetes network layer.</p>
<p>I'm on Kubernetes: 1.5.5 btw.</p>
<p>The problem is, there are so many places you can(should?) define a cidr, I'm not seeing the woods for the trees anymore.</p>
<p>To give you some info abou... | <p>Actually, you have 2 different network layers there:</p>
<ul>
<li>Cluster-cidr: the pods layer (where you want to use 10.254.0.0/16):
Once you have your flannel network up and running, you will have to configure Docker to use it (via systemd drop-in or with something like:
<code>echo "DOCKER_OPTS="--bip=${FLANNEL_S... |
<p>I'm running a three node cluster on GCE. I want to drain one node and delete the underlying VM.</p>
<p>Documentation for kubectl <code>drain</code> command says:</p>
<p><code>Once it returns (without giving an error), you can power down the node (or equivalently, if on a cloud platform, delete the virtual machine ... | <p>You are on the right track with draining the node first.</p>
<p>The nodes (compute instances) are part of a <a href="https://cloud.google.com/compute/docs/instance-groups/#managed_instance_groups" rel="noreferrer">managed instance group</a>. If you delete just them with the <code>gcloud compute instances delete</co... |
<p>I am running a kubernetes cluster in my centos machine.
I donot want to create a pod for mysql. MySQL is installed in another machine in same network (Machine is not in kubernates private network).</p>
<p>How can I access the mysql service from the pods running in kubernetes cluster ?</p>
<p>I have tried with ser... | <p>You don't need a service for things outside the cluster. Depending on the networking model you're using, the docker container (ie kubernetes pod) should be able to connect to the MySQL container normally via the bridge that Docker sets up. Check the host has connectivity on port 3306, and it does, simply put in the ... |
<p>I am trying to build an application which in essence consists of two parts. </p>
<ol>
<li>Django based api</li>
<li>SQLite database.</li>
</ol>
<p>Api interacts with the SQLite database, but has only read only access. However, the SQLite database needs to be updated every N minutes. So my plan was to make two dock... | <p>Take into account that <code>emptyDir</code> is erased every time the pod is stopped/killed (you do a deployment, a node crash, etc.). See the doc for more details: <a href="https://kubernetes.io/docs/concepts/storage/volumes/#emptydir" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#e... |
<p>My current development environment allows for automatic code reload whenever changing a file (i.e <code>nodemon</code> / <code>webpack</code>). However I am setting up a <code>kubernetes</code> (<code>minikube</code>) environment so that I can quickly open 3-4 related services at once. </p>
<p>Everything is working... | <p>If you're running the rsync from the host (not inside the container), you could use <code>docker cp</code> instead:</p>
<p>e.g., <code>docker cp containerName:/workspace/app Users/terence/workspace/app</code></p>
<p>Could you clarify:<br>
1. are you running the rsync from the host or from inside the container?<br>... |
<p>I have create two secret docker-registrys using with these step:</p>
<pre><code>$ kubectl create secret docker-registry my-secret --docker-username=burak --docker-password=deniz --docker-email=burak@...
$ kubectl create secret docker-registry secret --docker-username=burak --docker-password=deniz --docker-email=bu... | <p>I recommend rebuilding your cluster and taking care to not disrupt the TLS tokens that you get for <code>kubectl</code> to function correctly.</p>
|
<p>I have a 6 minion cluster and would like to know how many of these minions are actually hosting pods at any given time. Is there a specific command for that ? Right now Im using a very generic command.</p>
<pre><code>kubectl get po | grep Running > RUNNING.txt
for i in `cat RUNNING.txt `; do kubectl describe po ... | <p>Just add <code>-o wide</code>:</p>
<pre><code>kubectl get pod -o wide
</code></pre>
|
<p>Is there a way to automatically remove completed Jobs besides making a CronJob to clean up completed Jobs?</p>
<p>The <a href="http://kubernetes.io/docs/user-guide/jobs/" rel="noreferrer">K8s Job Documentation</a> states that the intended behavior of completed Jobs is for them to remain in a completed state until m... | <p>You can now set history limits, or disable history altogether, so that failed or successful CronJobs are not kept around indefinitely. See my answer <a href="https://stackoverflow.com/a/43115763/379037">here</a>. Documentation is <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="no... |
<p>When having configmap update, how to automatically trigger the reload of parameters by the application? Application uses POSIX signals for that.</p>
| <p>Depending on how you are consuming the configmap values, there could be two ways in which you can reload the configmap updates into a running pod.</p>
<ul>
<li><p>If you are consuming the configs as environment variables, you can write a controller, which watches for the updates in configs and restarts your pods wi... |
<p>I have started recently getting familiar with Kubernetes, however while I do get the concept I have some questions I am unable to answer clearly through Kubernete's <a href="https://kubernetes.io/docs/concepts/" rel="noreferrer">Concept</a> and <a href="https://kubernetes.io/docs/home/" rel="noreferrer">Documentatio... | <p>your question is actually too broad for StackOverflow but I'll quickly answer before this one is closed.</p>
<p>Maybe it get's clearer when you look at the API documentation. Which you could read like this:</p>
<p><em>A <a href="https://kubernetes.io/docs/api-reference/v1.6/#deployment-v1beta1-extensions" rel="nof... |
<p>I've been trying to enabled token auth for HTTP REST API Server access from a remote client.</p>
<p>I installed my CoreOS/K8S cluster controller using this script: <a href="https://github.com/coreos/coreos-kubernetes/blob/master/multi-node/generic/controller-install.sh" rel="noreferrer">https://github.com/coreos/c... | <p>I think your kube-apiserver dies because it's can't find the <code>/etc/kubernetes/token</code>. That's because on your deployment the apiserver is a static pod therefore running in a container which in turn means it has a different root filesystem than that of the host.</p>
<p>Look into <code>/etc/kubernetes/manif... |
<p>I use the Jenkins kubernetes plugin to build a job, but when I start build I have to wait for about 15s before the slave is online. Why does this happen?</p>
| <p>You need to be aware that when you use the Kubernetes Plugin, your Jenkins-slave is created on demand when you build a job. Supposing you are using the jnlp-slave as your jenkins-slave image, 15s is the time need for k8s to schedule the pod and to start up the jnlp slave jar.</p>
<p>What you can do in order to opti... |
<p>I would like to get shell access to the Persistent Volume I created on the Google Cloud Platform. </p>
<p>I tried using Google Cloud Shell for this. But to be able to do that I need to attach the Persistent Volume through the gcloud commands, and the command requires the instance name. But I don't see the instance... | <p>Yes, all disks need to be attached to an instance to allow access to them - you will need to create a compute instance and mount the persistent disk with <code>gcloud compute instances attach-disk [INSTANCE_NAME] --disk [DISK_NAME]</code>. </p>
<p>Once you create the new instance the instance name will become visib... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.