prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>How does the communication between two different pods happen in Kubernetes?</p> <p>In my case I have two pods: <em>frontend</em> and <em>backend</em>, both have different containers. I want my frontend pod to communicate with the backend pod but I don't want to use backend pod's IP( i.e. hard coded). </p> <p>Is i...
<blockquote> <p>Is it possible through services?</p> </blockquote> <p>Yes, <a href="https://kubernetes.io/docs/concepts/services-networking/" rel="noreferrer">services</a> are the recommended way to handle this. Once you have your services set up for each pod (or replication controller, as is recommended), you can f...
<p>Instead of <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/managing-deployments.md#organizing-resource-configurations" rel="nofollow">this</a> YAML file, I want to pass a JSON file. What is the equivalent JSON for it? I want to use it in the <code>kubectl create -f ...</code> comma...
<p>There are a lot of online <code>YAML</code> to <code>JSON</code> (and vice versa) converters covering 1.1 and 1.2 spec. </p> <p>I haven't used <code>Kubernetes</code> before, but I can see that you can pass multiple documents. Basically the <code>YAML</code> structure that you use is a short version of two document...
<p>I run the CoreOS k8s cluster on Mac OSX, which means it's running inside VirtualBox + Vagrant</p> <p>I have in my service.yaml file:</p> <pre><code>spec: type: NodePort </code></pre> <p>When I type:</p> <pre><code>kubectl get services </code></pre> <p>I see:</p> <pre><code>NAME CLUSTER_IP E...
<p>In addition to "NodePort" types of services there are some additional ways to be able to interact with kubernetes services from outside of cluster:</p> <ul> <li>Use service type "LoadBalancer". It works only for some cloud providers and will not work for virtualbox, but I think it will be good to know about that fe...
<p>Can I run multiple services on port 80 in Kubernetes on Google Container Engine? Each service has a dedicated external IP Address, so theoretically the router should be able to route to each service based off it's IP Address.</p> <p>So far I have created pods for "frontend-1" and "frontend-2" on Container Engine. ...
<p>Kubernetes 1.1 has an <code>Ingress</code> type, which allows you to route different dns names/ips to different services. From <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/ingress.md" rel="noreferrer">github</a></p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metada...
<p>What is detached mode in the docker world? I read this article <a href="https://docs.docker.com/engine/reference/run/#detached-vs-foreground" rel="noreferrer">Link</a>, but it does not explain exactly what detached mode mean.</p>
<p>You can start a docker container in detached mode with a <code>-d</code> option. So the container starts up and run in background. That means, you start up the container and could use the console after startup for other commands.</p> <p>The opposite of detached mode is foreground mode. That is the default mode, whe...
<p>Kubernetes is an orchestration tool for the management of containers. Kubernetes creates pods which are containing containers, instead of managing containers directly.</p> <p>I read this about <a href="http://kubernetes.io/v1.0/docs/user-guide/pods.html" rel="noreferrer">pods</a></p> <p>I'm working with OpenShift ...
<p>There are many cases where our users want to run pods with multiple containers within OpenShift. A common use-case for running multiple containers is where a pod has a 'primary' container that does some job, and a 'side-car' container that does something like write logs to a logging agent.</p> <p>The motivation for...
<p>When I build a Kubernetes service in two steps (1. replication controller; 2. expose the replication controller) my exposed service gets an external IP address:</p> <pre><code>initially: NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE app-1 10.67.241.95 80/TCP ...
<p>If you don't specify the type of a Service it defaults to ClusterIP. If you want the equivalent of <code>expose</code> you must:</p> <ol> <li>Make sure your Service selects pods from the RC via matching label selectors</li> <li>Make the Service <code>type=LoadBalancer</code></li> </ol>
<p>My OS is <code>ubuntu 14.04.3</code> Server, and I want to build <code>kubernetes</code>.</p> <p>Firstly, I use "<code>apt-get</code>" command install <code>Golang</code>, but the version is <code>1.2.1</code>, so I use <code>apt-get --purge autoremove</code> command to remove it.And install the newest <code>1.5.1...
<p>As explained in "<a href="https://askubuntu.com/a/151943/5470">How can you completely remove a package?</a>", a <code>sudo apt-get --purge autoremove</code> might have removed go completely.<br> But that doesn't mean it has cleaned what was compiled before</p> <p>Make sure that <code>/home/nan/kubernetes/Godeps/_wo...
<p>I have a replication controller that keeps starting a pod but it's never up. How do I get to the replication controller logs so I can debug this? <code>$ kubectl describe rc</code>:</p> <pre><code>Name: jenkins-leader-restored Namespace: default Image(s): gcr.io/cloud-solutions-images/jenkins-gcp-leader:ma...
<p>Prashanth B. identified the root cause of my issue which was that there were two replication controllers using the same selectors, with different replica values running at the same time.</p> <p>The log location for kubelets (which run the pod) on the Google Compute Instance is, <code>/var/log/kubelet.log</code>. Lo...
<p>I am testing Openshift Origin v3. I installed it as a docker container following the instructions. I also deployed all the streams in roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json.</p> <p>I am now testing the installation by deploying a dummy php application from Github. I am able...
<p>What OS and Docker version are you using? There are known issues with volume mounting on older versions of Docker - OpenShift/Kube mounts volumes into containers, but when Docker is running OpenShift the stock Docker version hides access to the root mounts. Red Hat OS's carry a patch that makes this works, suppose...
<p>Any idea to view the log files of a crashed pod in kubernetes? My pod is listing it's state as "CrashLoopBackOff" after started the replicationController. I search the available docs and couldn't find any.</p>
<p>Assuming that your pod <strong>still exists:</strong></p> <p><code>kubectl logs &lt;podname&gt; --previous</code></p> <blockquote> <p>$ kubectl logs -h<br /> -p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod <strong>if it exists</strong>.</p> </blockquote>
<p>Is there a way I can enable CORS on Kubernetes API so that I can send ajax requests to Kubernetes API with a different domain?</p>
<p>Fixed by adding --cors-allowed-origins=["http://*"] argument to /etc/default/kube-apiserver file. Then restarted to kube-apiserver.</p>
<p>Anyone has success or pointer on using the kubernetes to create a pod that mounts ceph rbd within the docker container? </p> <p>The following example from kubernetes uses Fedora 21 with installation of ceph binaries, which won't work in CoreOS.</p> <p><a href="http://kubernetes.io/v1.0/examples/rbd/" rel="nofollo...
<p>the project has evolved quite a bit. You can find the docker containers for CoreOS at </p> <p><a href="https://github.com/ceph/ceph-docker" rel="nofollow">https://github.com/ceph/ceph-docker</a></p>
<p>Is this a thing?</p> <p>I have some legacy services which will never run in Kubernetes that I currently make available to my cluster by defining a service and manually uploading an endpoints object.</p> <p>However, the service is horizontally sharded and we often need to restart one of the endpoints. My google-fu ...
<p>I think the design is for the thing managing the endpoint addresses to add/remove them based on liveness. For services backed by pods, the pod IPs are added to endpoints based on the pod's readiness check. If a pod's liveness check fails, it is deleted and its IP removed from the endpoint. </p> <p>If you are manual...
<p>How do I have a web app on HTTPS on google cloud container engine using HTTPS load balancing? I created SslCertificate resource. And, I created a kubernetes service that has port 443 externally open:</p> <pre><code>{ "kind":"Service", "apiVersion":"v1", "metadata":{ "name":"app", "labels...
<p>When you create a service externalized on Google's cloud with the "LoadBalancer" directive, it creates an <a href="https://cloud.google.com/compute/docs/load-balancing/network/" rel="nofollow">L3 load balancer</a>. You can also use the new ingress directive to create an <a href="https://cloud.google.com/compute/docs...
<p>After a quick search of the api docs I found out that in Kubernetes there is no rest api provided for kubectl rolling-update. Is there any other alternative for perform a rolling update by calling several apis or so? Thanks in advance. </p>
<p>I think the Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/deployments.md" rel="nofollow">Deployment</a> object is what you are looking for. It is an object in the Kubernetes REST API (as opposed to the client-side magic in <code>kubectl rolling-update</code>).</p> <p>You c...
<p>I'm currently trying to configure a highly available master cluster. I followed the <a href="http://kubernetes.io/v1.1/docs/admin/high-availability.html" rel="nofollow">proper documentation</a> but i'm facing the following issue. My kubectl version is v1.1.2</p> <pre><code>kubectl version Client Version: version.I...
<p>It seems like the documentation has an out-of-date kube-apiserver.yaml file. I ran into this issue with another deployment guide. You should file this as a bug on <a href="https://github.com/kubernetes/kubernetes/issues" rel="nofollow">their github page</a>. </p> <p>The image for the api server </p> <pre><code>gcr...
<p>I'm working on OpenShift Origin 1.1 (which is using kubernetes as its orchestration tool for docker containers). I'm creating pods, but I'm unable to see the build-logs.</p> <pre><code>[user@ip master]# oc get pods NAME READY STATUS RESTARTS AGE test-1-build 0/1 Completed 0 14...
<p>I forgot to open port 10250 (tcp) (in my aws security group). This was the only issue for me.</p>
<p>I have created a kubernetes service: </p> <pre><code>[root@Infra-1 kubernetes]# kubectl describe service gitlab Name: gitlab Namespace: default Labels: name=gitlab Selector: name=gitlab Type: NodePort IP: 10.254.101.207 Port: http 80/TCP NodePort: h...
<p>It's actually the Pod or Replication Controller that is having the issue because it is not forwarding to the service. Perhaps post that config or make sure it has port specified and its containers' processes are listening to the right port</p> <p><strong>Original</strong></p> <p>It's the <code>NodePort</code> that...
<p>Is it possible to somehow send alerts (to email / slack) based on events that occur within a Kubernetes cluster?</p> <p>In particular, it would be useful to get an alert if a pod has restarted unexpectedly or if a pod cannot start. Similarly it would be useful to know if a pod's CPU usage was over a certain thresho...
<p>Both <a href="http://thenewstack.io/sysdig-adds-kubernetes-container-monitoring-cloud/" rel="nofollow">sysdig</a> and <a href="http://docs.datadoghq.com/integrations/kubernetes/" rel="nofollow">Datadog</a> provide this functionality as well.</p>
<p>Whether prompt, What linked in kubernetes this message:</p> <pre><code>The Service "skudns" is invalid:spec.clusterIP: invalid value '': the provided range does not match the current range </code></pre> <p>At that that <code>DNS_SERVICE_IP = 10.3.0.10</code>, and <code>SERVICE_IP_RANGE = 10.3.0.0/16</code></p> <p...
<p><code>/16</code> <a href="http://doc.m0n0.ch/quickstartpc/intro-CIDR.html" rel="nofollow noreferrer">means a subnet mask</a> of 255.255.0.0 (instead of 255.255.255.0 with <code>/24</code>)</p> <p>The error message comes from <a href="https://github.com/kubernetes/kubernetes/blob/b9cfab87e33ea649bdd13a1bd243c502d76e...
<p>I want access container engine REST API's given here - <a href="http://kubernetes.io/third_party/swagger-ui/#/" rel="nofollow">http://kubernetes.io/third_party/swagger-ui/#/</a></p> <p>To access above given API's, I did following- </p> <p>1) I have created container cluster with project Id - virtual-cycling-11111...
<p>Google has developer documentation for using <a href="https://developers.google.com/identity/protocols/OAuth2" rel="nofollow">OAuth 2.0 to Access Google APIs</a> (and the Google Container Engine is one such API). It explains the various authentication flows and how to get access tokens. </p>
<p>We had a GKE cluster with 3 nodes.</p> <p>On those nodes one ReplicationController was set to run 3 pods of type A and another ReplicationController was set to run 4 pods of type B.</p> <p>We set up an instance group manager to autoscale the nodes on CPU.</p> <p>Since there was no load on the cluster it scaled do...
<p>The cluster autoscaler generally sets the number of nodes based on the <a href="https://cloud.google.com/compute/docs/autoscaler/#target_utilization_level" rel="nofollow">target utilization level of your VMs</a>. It doesn't know anything about what you are running on the VMs (pods or otherwise) and only looks at the...
<p>With the understanding that <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/federation.md" rel="nofollow">Ubernetes</a> is designed to fully solve this problem, is it <strong>currently</strong> possible (not necessarily recommended) to span a single K8/OpenShift cluster across multiple <...
<blockquote> <p>is it currently possible (not necessarily recommended) to span a single K8/OpenShift cluster across multiple internal corporate datacententers?</p> </blockquote> <p>Yes, it is currently possible. Nodes are given the address of an apiserver and client credentials and then register themselves into ...
<p>I'm currently building a Kubernetes cluster. I plan on using Nginx containers as a server for static content, and to act as a web socket proxy. If you restart Nginx, you lose your web socket connection, so I do not want to restart the containers. But I will want to update the content within the container.</p>
<p>I do that same exact thing in my Kubernetes cluster. Our solution is for application to handle the web socket disconnect with consistent state kept intact. </p> <p>However, other options you have are mount a volume to serve from the host; however, you cannot guarantee all nginx pods will have that volume on multi...
<p>i am trying to pass a configuration file(which is located on master) on nginx container at the time of replication controller creation through kubernetes.. ex. as we are using ADD command in Dockerfile...</p>
<p>There isn't a way to dynamically add file to a pod specification when instantiating it in Kubernetes.</p> <p>Here are a couple of alternatives (that may solve your problem):</p> <ol> <li><p>Build the configuration file into your container (using the docker ADD command). This has the advantage that it works in the ...
<p>I'm using preStop command to gracefully shutdown my server application when I delete a pod. What is the state of the pod/ container when it runs preStop command? For example, does it stop the network interfaces before running the preStop command? </p> <pre><code>lifecycle: preStop: exec: ...
<p>The state of the pod doesn't change while preStop hooks are run -- the preStop hook is run in the container, and then the container is stopped.</p>
<p>Trying to setup a pilot in GCE to try out GKE. I'm trying to create a new instance template from a copy of the one created with by the "gcloud container clusters create" with more space per instance and the create is just hanging??? Is there something obvious that I'm not doing?</p> <p><a href="http://i.stack.img...
<p>It looks like this bug has been fixed. I just copied an instance template for my Google Container Engine cluster in the UI, modified the only the startup script field, and created a new instance template. Please try this again, as I believe it will now work for you as you expect. </p>
<p>All of the nodes in our AWS kubernetes cluster (Server Version: version.Info{Major:"1", Minor:"0", GitVersion:"v1.0.6", GitCommit:"388061f00f0d9e4d641f9ed4971c775e1654579d", GitTreeState:"clean"}) are getting the following messages sent to /var/log/syslog which are filling the disk very quickly (32GB in about 24 hou...
<p>port 5000 is used by the local docker registry usually. It is an add-on though. Is your cluster pulling images from that local registry? If so, is it working? how is it setup?</p> <p>this link may help figure your config issues:</p> <p><a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/r...
<p>I have a Cassandra image that worked with a GKE cluster v1.0.7 but has occassional issues starting on a new GKE cluster at v1.1.1 (no changes to the image or how it is created with kubectl just pointing to a new cluster).</p> <p>I am using kubernetes-cassandra.jar from the kubernetes Cassandra example on github.</p...
<p>It happens when service endpoint is not ready. To verify that, please check output of <code>kubectl get endpoints</code> against Cassandra service. If it is blank, then it means <code>KubernetesSeedProvider</code> is not able to deserialize the output received from Kubernetes API server as the endpoint's address is ...
<p>I have created a kubernetes service: </p> <pre><code>[root@Infra-1 kubernetes]# kubectl describe service gitlab Name: gitlab Namespace: default Labels: name=gitlab Selector: name=gitlab Type: NodePort IP: 10.254.101.207 Port: http 80/TCP NodePort: h...
<p>In addition to "NodePort" types of services there are some additional ways to be able to interact with kubernetes services from outside of cluster. Maybe they will be more "natural" and easy:</p> <ul> <li>Use service type "LoadBalancer". It works only for some cloud providers and will not work for virtualbox for ex...
<p>Need to pass command line arguments for the docker containers appContainer1 &amp; appContainer2 in the pod.yaml.</p> <p>pod.yaml</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: microservices labels: app: apps spec: containers: - name: appContainer1 image: gcr.io/mybucket/appContainerIm...
<p>It sounds like you don't actually want command line arguments, but environment variables - and you can use <code>env</code> for that:</p> <pre><code>- name: appContainer1 image: gcr.io/mybucket/appContainerImage1 ports: - containerPort: 8080 env: - name: spring.profiles.dynamic value: local </...
<p>Uploading to GCE from a pod inside GKE takes really long. I hoped the upgrade to kubernetes 1.1 would help, but it didn't. It is faster, but not as fast as it should be. I made some benchmarks, uploading a single file with 100MiB:</p> <ul> <li><p>docker 1.7.2 local</p> <p>took {20m51s240ms}, that's about ~{0.07993...
<p>Solution is to enable "DirectUpload", so instead of writing</p> <pre><code>storage.objects().insert(bucket.getName(), so, content).execute(); </code></pre> <p>you have to write:</p> <pre><code> Storage.Objects.Insert insert = storage.objects().insert(bucket.getName(), so, content); insert.getMediaHttpUploa...
<p>I have a pod with the following config:</p> <pre><code>apiVersion: v1 kind: Pod metadata: labels: name: demo name: demo spec: containers: - name: demo image: ubuntu:14.04 command: - sleep - "3600" </code></pre> <p>When I try to stop it, the SIGTERM is ignored by the sleep ...
<p>Bash <a href="https://www.gnu.org/software/bash/manual/html_node/Signals.html" rel="noreferrer">ignores SIGTERM when there are no traps</a>. You can <a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html" rel="noreferrer">trap</a> SIGTERM to force an exit. For example, <code>trap 'exit 255' SIGTERM; ...
<p>I'm struggling to get Kubernetes to work with my private hub.docker.com registry image.</p> <p>I am using kubectl version: <code>Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.1588+e44c8e6661c931", GitCommit:"e44c8e6661c931f7fd434911b0d3bca140e1df3a", GitTreeState:"clean"} Server Ver...
<p>The documentation is out of date, in that it refers to <code>.dockercfg</code> instead of <code>.docker/config.json</code>. I will update it.</p> <p>When you use the new <code>.docker/config.json</code> format, you need to set <code>type: kubernetes.io/dockerconfigjson</code> instead of <code>type: kubernetes.io/....
<p>I need to migrate my kubernetes master to another server. How can we do that with all datas of the current running services, pod, rc ... What do we need to backup , because kubernetes doc don't talk about this. Thank you.</p>
<p>The two things that contain the master's identity are its IP address and a few different pieces of data from its local disk.</p> <p>To make upgrades work on Google Compute Engine, <a href="https://github.com/kubernetes/kubernetes/blob/e264db43499cb14a319f6a78185b018b0958d314/cluster/gce/configure-vm.sh#L239" rel="n...
<p>I'm struggling to get Kubernetes to work with my private hub.docker.com registry image.</p> <p>I am using kubectl version: <code>Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.1588+e44c8e6661c931", GitCommit:"e44c8e6661c931f7fd434911b0d3bca140e1df3a", GitTreeState:"clean"} Server Ver...
<p>So, I kept researching the web for an answer to my problem and eventually found this:</p> <p><a href="https://github.com/kubernetes/kubernetes/issues/7954#issuecomment-115241561" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/7954#issuecomment-115241561</a></p> <p>At the very end of the thread, jjw...
<p>I got some error when scheduling pod though ReplicationController:</p> <pre><code>failedSync {kubelet 10.9.8.21} Error syncing pod, skipping: API error (500): Cannot start container 20c2fe3a3e5b5204db4475d1ce6ea37b3aea6da0762a214b9fdb3d624fd5c32c: [8] System error: Activation of org.freedesktop.systemd1 timed o...
<p>The part that says <code>Error syncing pod, skipping: API error</code> means that kubelet got an error when trying to start a container for your Pod.</p> <p>Since you use CoreOS, I think you are using rkt, not docker.</p> <p>I think that rkt uses systemd to start containers.</p> <p>And I think systemd crashes wh...
<p>I run pods with replication controller, now i want to edit config like change value of environment and keep name of rc.</p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: backend spec: replicas: 3 template: spec: containers: - name: backend image: myproject/backe...
<p>You can use <code>kubectl edit</code> to edit a resource:</p> <pre><code>Usage: kubectl edit (RESOURCE/NAME | -f FILENAME) [flags] Examples: # Edit the service named 'docker-registry': $ kubectl edit svc/docker-registry # Use an alternative editor $ KUBE_EDITOR="nano" kubectl edit svc/docker-registry ...
<p>This was discussed by k8s maintainers in <a href="https://github.com/kubernetes/kubernetes/issues/7438#issuecomment-97148195" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/7438#issuecomment-97148195</a>:</p> <blockquote> <blockquote> <p>Allowing users to ask for a specific PV breaks the separation...
<p>There is a way to pre-bind PVs to PVCs today, here is an example showing how:</p> <ol> <li>Create a PV object with a ClaimRef field referencing a PVC that you will subsequently create: <pre><code> $ kubectl create -f pv.yaml persistentvolume &quot;pv0003&quot; created </code></pre> where <code>pv.yaml</code> contai...
<p>We're currently running a Kubernetes 1.0 cluster on AWS in production, and we'd like to spin up a second cluster to test out 1.1. Based on the <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/aws/util.sh#L91-L98" rel="nofollow">AWS helper functions</a>, it looks like multiple clusters aren't sup...
<p>You should be able to run a second cluster by setting <code>INSTANCE_PREFIX</code> before running <code>kube-up</code>. That variable in turn sets <code>CLUSTER_ID</code> which should parameterize everything in the <code>cluster/aws/*</code> scripts.</p>
<h1>Initial Post</h1> <p>I have the same docker image running on two different CoreOS servers. (They're in a Kubernetes cluster, but I think that is irrelevant to the current problem.)</p> <p>They both are running image hash <code>01e95e0a93af</code>. They both should have curl. One does not. This seems... impossible.<...
<p>I've seen lots of cases where Docker images on-disk get random bits of corruption (causing weird inconsistencies like the one you describe here), and deleting and re-pulling the image "fixes" the problem.</p> <p>To test this, you'll want to make sure you not only <code>docker rmi gcr.io/surveyadmin-001/wolfgang:com...
<p>I need to add a REST API for Kubernetes rolling update feature. Is there a way we can write extensions for Kubernetes API? If that so is there any documentation about writing them?</p>
<p>The <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/extending-api.md" rel="nofollow">Extending the API</a> doc describes how you can add resources to the Kubernetes API.</p> <p>If you just want a REST API for rolling update, you should check out the <a href="https://github.com/kubernetes/k...
<p>Kubernetes API request <code>curl https://192.168.0.139 --cacert /home/mongeo/ku-certs/ca.pem</code> return <code>Unauthorized</code></p> <p>Request <code>curl localhost:8080</code> worked good.</p> <p>My kube-proxy and kube-apiserver standart (<a href="https://coreos.com/kubernetes/docs/latest/deploy-master.html"...
<p>Did you specify <code>--token-auth-file=&lt;file&gt;</code> and/or <code>--basic-auth-file=&lt;otherfile&gt;</code> or one of the other authentication modes? I don't know that https endpoint will work without one of these (maybe it should, but it doesn't, apparently). Check out <a href="https://kubernetes.io/docs/...
<p>I want to run/build Kubernetes from source. I normally use Intelij idea to open sources but I can't see that there is a source support for 'Go' in my ide. My main concern is to write an extension for Kubernetes API. How can I easily setup source in idea to develop and test that extension? I also have a locally insta...
<p>Install Golang plugin for IDEA: <a href="https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/Documentation" rel="nofollow">https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/Documentation</a></p>
<p>I have installed K8S on OpenStack following <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/coreos/coreos_multinode_cluster.md" rel="nofollow">this guide</a>. </p> <p>The installation went fine and I was able to run pods but after some time my applications stops working. I ...
<p>What version of Kubernetes is this? A long time ago (~1.0.4) we had a bug in the kube-proxy where it leaked sockets/file-descriptors.</p> <p>If you aren't running a 1.1.3 binary, consider upgrading.</p> <p>Also, you should be able to use <code>lsof</code> to figure out who has all of the files open. </p>
<p>Currently kubernetes rolling update creates a new pod to a terminated pod and add it to the service. At the moment of rolling update there could be two types of pods registered (old ones and new ones) for a service. However I need to enforce the consistency. For example when a rolling update request comes to Kuberne...
<p>If the new pods have labels matching the service's label selector, they should be added to the service as soon as they come up.</p> <p>If you want to experiment with different logic for a rolling update, you can write a client-side controller using the <a href="https://github.com/kubernetes/kubernetes/blob/master/d...
<p>Kubernetes assigns an IP address for each container, but how can I acquire the IP address from a container in the Pod? I couldn't find the way from documentations.</p> <p>Edit: I'm going to run Aerospike cluster in Kubernetes. and the config files need its own IP address. And I'm attempting to use confd to set the ...
<p>The simplest answer is to ensure that your pod or replication controller yaml/json files add the pod IP as an environment variable by adding the config block defined below. (the block below additionally makes the name and namespace available to the pod)</p> <pre><code>env: - name: MY_POD_NAME valueFrom: fieldR...
<p>There are multiple admins who accesses k8s clusters. What is the recommended way to share the config file?</p> <p>I know,</p> <pre><code>kubectl config view --minify </code></pre> <p>but certification part is REDACTED by this command.</p>
<p>You can add the --flatten flag, which is described in the <a href="https://github.com/kubernetes/kubernetes/blob/25ddd24f9e3ac53a1944e02109db95787c7f1b4a/docs/user-guide/kubectl/kubectl_config_view.md" rel="noreferrer">document</a> to "flatten the resulting kubeconfig file into self contained output (useful for crea...
<p>I have just started with Kubernetes and I am confused about the difference between NodePort and LoadBalancer type of service.</p> <p>The difference I understand is that LoadBalancer does not support UDP but apart from that whenever we create a service either <code>Nodeport</code> or <code>Loadbalancer</code> we get ...
<p>Nothing prevents you from placing an external load balancer in front of your nodes and use the NodePort option.</p> <p>The LoadBalancer option is only used to additionally ask your cloud provider for a new software LB instance, automatically in the background.</p> <p>I'm not up to date which cloud providers are su...
<p>I am trying to deploy a web application using Kubernetes and google container engine. My application requires different types of machine. In my understanding, in GKE, I can only have single type (instance template) of machines in each cluster, and it reduces to wasting resource or money to mix different pods in sing...
<blockquote> <p>In my understanding, in GKE, I can only have single type (instance template) of machines in each cluster.... Do I need to run separate clusters for different requirement?</p> </blockquote> <p>Yes, this is currently true. We are working on relaxing this restriction, but in the mean time you can <a hre...
<p>I have a kubernetes setup running nicely, but I can't seem to expose services externally. I'm thinking my networking is not set up correctly:</p> <p>kubernetes services addresses: --service-cluster-ip-range=172.16.0.1/16</p> <p>flannel network config: etcdctl get /test.lan/network/config {"Network":"172.17.0.0/16"...
<p>So the issue here was that there's a missing piece of the puzzle when you use nodePort.</p> <p>I was also making a mistake with the commands.</p> <p>Firstly, you need to make sure you expose the right ports, in this case 80 for nginx:</p> <pre><code>kubectl expose rc nginx --port=80 --type=NodePort </code></pre> ...
<p>I have an application running in a Kubernetes pod that is replicated using a replication controller. However I need to some critical tasks that should be done by a single application (one replication) at a time. Previously I used zookeeper to get a cluster lock to do that task. Is there a way in Kubernetes to get a ...
<p>Kubernetes doesn't have a cluster lock object, but you can use an <a href="http://kubernetes.io/v1.1/docs/user-guide/annotations.html" rel="noreferrer">annotation</a> on the replication controller to specify the lock holder and TTL.</p> <p>For example, each pod could read the the annotation key <code>"lock"</code>,...
<p>I followed kubernetes documentation to manage secrets of my applications.</p> <p><a href="http://kubernetes.io/v1.1/docs/user-guide/secrets.html" rel="nofollow">http://kubernetes.io/v1.1/docs/user-guide/secrets.html</a></p> <p>When pod starts it kubernetes mounts secret at the right place, but application is unabl...
<p>There is a known issue with SELinux and Kubernetes Secrets as per the Atomic issue tracker, see <a href="https://github.com/projectatomic/adb-atomic-developer-bundle/issues/117" rel="nofollow">ISSUE-117</a>.</p>
<p>I'm trying to set up a kubernetes cluster on 2 nodes , centos 7.1 using this <a href="http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services" rel="nofollow noreferrer">guide</a>. However when I attempt to start the services on the minion like so:</p> <pre><code>for SERVICES ...
<p>Today's christmas but I spent the whole day trying to get this to work :) This is what I did:</p> <h2>#1 FLANNEL</h2> <p>As mentioned I'd set the flannel etcd key on the master with:</p> <p><code>etcdctl mk /coreos.com/network/config '{"Network":"172.17.0.0/16"}'</code></p> <p>but I got this error when trying to...
<p>Is it possible to create a Pod in the Google Container Engine where two ports are exposed: port 8080 is listening for incoming content and port 80 distributes this content to clients?</p> <p>The following command to create a Pod is given as example by Google:</p> <pre><code>kubectl run hello-node --image=gcr.io/${...
<p>No, you cannot specify multiple ports in <code>kubectl run</code>. But you can use <code>kubectl create</code> to create a replication controller, and specify multiple ports for the container.</p> <p><a href="https://github.com/kubernetes/examples/blob/master/cassandra/cassandra-statefulset.yaml" rel="noreferrer">ht...
<p>I have the following mysql.yaml file:</p> <pre><code>apiVersion: v1beta3 kind: Pod metadata: name: mysql labels: name: mysql spec: containers: - resources: limits : cpu: 1 image: mysql name: mysql env: - name: MYSQL_ROOT_PASSWORD # change this ...
<p>To get your setup working, you can do the same thing local-up-cluster.sh is doing:</p> <ol> <li>Generate a signing key: </li> </ol> <p><code>openssl genrsa -out /tmp/serviceaccount.key 2048</code></p> <ol start="2"> <li>Update <code>/etc/kubernetes/apiserver</code>:</li> </ol> <p><code>KUBE_API_ARGS="--service_a...
<p>I would like to use persistent disk in my replication controller but if i use a <code>gcePersistentDisk</code> the console returns me an error</p> <blockquote> <p>ReadOnly must be true for replicated pods > 1, as GCE PD can only be mounted on multiple machines if it is read-only.</p> </blockquote>
<p>From the error message and from the <a href="http://kubernetes.io/v1.1/docs/user-guide/volumes.html#gcepersistentdisk" rel="nofollow">docs</a>:</p> <blockquote> <p>A feature of PD is that they can be mounted as read-only by multiple consumers simultaneously. This means that you can pre-populate a PD with your dat...
<p>I have the following services hosted in my Kubernetes cluster on AWS.</p> <ul> <li>An nginx server, on ports 80 and 443.</li> <li>A Minecraft server, at port 25565.</li> </ul> <p>Both are working great. I currently have both of them set to <code>type: LoadBalancer</code>, so they both have Elastic Load Balancers t...
<p>The Ingress resource, which was added in version 1.1.0, was designed specifically for this use case. It allows you to put multiple services behind a single IP address, routing to them based on HTTP path. Check out <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/ingress.md" rel="nor...
<p>What is the difference between Amazon ECS and Kubernetes implementation architecture?</p> <p>I need to decide to pick a technology for container management in cloud. What is the deciding factor while picking any of these technology?</p> <p>I am using Docker for container creation and execution.</p>
<p>I had a huge experience working with containers and different container solutions, including Amazon ECS and Kubernetes, and I have found, that Kubernetes as one of the most useful solutions for managing containers in the different environments.</p> <p>The main benefit of Kubernetes - that it is a mature solution, o...
<p>I'm trying to execute command in a contianer (in a Kubernetes POD on GKE with kubernetes 1.1.2). </p> <p>Reading documentation I understood that I can use GET or POST query to open websocket connection on API endpoint to execute command. When I use GET, it does not work completly, returns error. When I try to use P...
<p>You'll probably have the best time using the <a href="https://github.com/kubernetes/kubernetes/tree/release-1.1/pkg/client/unversioned" rel="nofollow">Kubernetes client library</a>, which is the same code the Kubectl uses, but if for some reason that isn't an option, than my best suggestion is to look through <a hre...
<p>I want to host a website (simple nginx+php-fpm) on Google Container Engine. I built a replication controller that controls the nginx and php-fpm pod. I also built a service that can expose the site.</p> <p>How do I link my service to a public (and reserved) IP Address so that the webserver sees the client IP addres...
<p>As you are running in google-container-engine you could set up a <a href="https://cloud.google.com/compute/docs/load-balancing/http/" rel="nofollow">Compute Engine HTTP Load Balancer</a> for your static IP. The <a href="https://cloud.google.com/compute/docs/load-balancing/http/target-proxies" rel="nofollow">Target p...
<p>Hi I am running kubernetes cluster where I run Logstash container. </p> <p>But I need to run it with own docker run parameter. If I would run it in docker directly. I would use command:</p> <pre><code>docker run --log-driver=gelf logstash -f /config-dir/logstash.conf </code></pre> <p>But I need to run it via Kube...
<p>Kubernetes does not expose docker-specific options such as --log-driver. A higher abstraction of logging behavior might be added in the future, but it is not in the current API yet. This issue was discussed in <a href="https://github.com/kubernetes/kubernetes/issues/15478" rel="noreferrer">https://github.com/kuberne...
<p>We're using Kubernetes 1.1.3 with its default fluentd-elasticsearch logging.</p> <p>We also use LivenessProbes on our containers to make sure they operate as expected.</p> <p>Our problem is that lines we send out to the STDOUT from the LivenessProbe does not appear to reach Elastic Search.</p> <p>Is there a way t...
<p>The output from the probe is swallowed by the Kubelet component on the node, which is responsible for running the probes (<a href="https://github.com/kubernetes/kubernetes/blob/5828836e7c4abb4666a845adb607f1b2a65a1a76/pkg/kubelet/prober/prober.go#L89" rel="noreferrer">source code, if you're interested</a>). If a pro...
<p>I have provisioned kubernetes cluster in Azure Cloud(using CoreOS) using the guide <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/azure/README.html" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/azure/README.html</a></p> <p>Its working fine, now I want to run kub...
<p>The mechanism for copying the configuration file necessary to get remote access to your cluster is described in <a href="https://kubernetes.io/docs/user-guide/sharing-clusters/" rel="nofollow noreferrer">Sharing Cluster Access</a>. You may need to manually tweak <code>~/.kube/config</code> after copying if it contai...
<p>I have a few basic questions on scaling Docker containers:</p> <p>I have 5 different apps. They are not connected to each other. Before having containers I would run 1 app per VM and scale them up and down individually in the cloud.</p> <p>Now with containers I get the isolation on top of a VM, so now I can potent...
<p>There are several options, but none that I know that does it all: you will need 2 things: autoscaling hosts according to signals, then autoscale containers on the hosts.</p> <p>The following are the solutions to deploy and scale <em>containers</em> on the hosts (not necessarily <em>auto</em>-scale though):</p> <p>...
<p>There are applications and services in enterprises that do not need to run all the time and that have a limited user base (say a handful of people). </p> <p>These applications can be shut down and started either based on scheduling or even better user activity. So, we are talking about on-demand service (say wrappe...
<p>In the case of <a href="http://kubernetes.io" rel="nofollow">Kubernetes</a>, the <a href="http://kubernetes.io/v1.1/docs/design/horizontal-pod-autoscaler.html#autoscaling-algorithm" rel="nofollow">Horizontal Pod Autoscaling documentation</a> lists the exact use case described under <strong><em>Next steps</em></stron...
<p>I have the following services hosted in my Kubernetes cluster on AWS.</p> <ul> <li>An nginx server, on ports 80 and 443.</li> <li>A Minecraft server, at port 25565.</li> </ul> <p>Both are working great. I currently have both of them set to <code>type: LoadBalancer</code>, so they both have Elastic Load Balancers t...
<p>You could also simply use nginx as a proxy for your minecraft server, and forward traffic from ingress port 25565 to the minecraft server. That way all traffic goes through one Service</p>
<p>I used the node.yaml and master.yaml files here: <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/coreos_multinode_cluster.html" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/coreos_multinode_cluster.html</a> to create a multi-node cluster on 3 bare-metal machines r...
<p>The guide you use don't include instructions for bare-metal machines. You need networking (e.g., flannel, calico) that implements Kubernetes's <a href="https://github.com/kubernetes/kubernetes/blob/4ca66d2aefa20c27b670b2fa890052daadc05294/docs/admin/networking.md" rel="nofollow">networking model</a>. You can check t...
<p>I'm trying to read Images using the kubernetes API, but am not seeing an API for that. Is there an API to Read Images List from my google cloud account?</p>
<p>To list all images in your gcr.io private registry, you can use the <a href="https://docs.docker.com/engine/reference/commandline/search/">docker search</a> command, pointing at your registry, using your Google credentials:</p> <pre><code>gcloud docker search gcr.io/your-registry </code></pre> <p>Or in two steps, ...
<p>I followed docker instructions to install and verify the docker installation (from <a href="http://docs.docker.com/linux/step_one/">http://docs.docker.com/linux/step_one/</a>).</p> <p>I tried on 2 Ubuntu 14.04 machines and on both I got following error when starting docker daemon:</p> <pre><code>$ sudo docker daem...
<p>I resolved this issue by starting the docker deamon manually using:</p> <p><code>sudo service docker start</code></p>
<p>Is it possible to enable autoscaling of nodes (minions) in Kubernetes running on CoreOS in OpenStack?</p> <p>I only read about AWS and GCE.</p>
<p>You'd probably need to deploy Kubernetes with Heat and use autoscale in your template. Example:</p> <p><a href="http://superuser.openstack.org/articles/simple-auto-scaling-environment-with-heat" rel="nofollow">http://superuser.openstack.org/articles/simple-auto-scaling-environment-with-heat</a></p> <p>and a templa...
<p>Question: Is the Google Cloud network LoadBalancer that's created by Kubernetes (via Google Container Engine) sending traffic to hosts that aren't listening? "This target pool has no health check, so traffic will be sent to all instances regardless of their status."</p> <p>I have a service (NGINX reverse proxy) tha...
<blockquote> <p>Is the Google Cloud network LoadBalancer that's created by Kubernetes (via Google Container Engine) sending traffic to hosts that aren't listening?</p> </blockquote> <p>All hosts (that are currently running a functional kube-proxy process) are capable of receiving and handling incoming requests for t...
<p>I installed Kubernetes on linux using the steps <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="nofollow noreferrer">here</a>.</p> <p>Everything worked fine until I exited the terminal and opened a new terminal session.</p> <p>I got a permission denied error and after restarting my machine I...
<p>seems like a TCP problem. try to isolate the problem by checking if TCP/8080 is open by issue </p> <blockquote> <p>telnet 127.0.0.1 8080</p> </blockquote> <p>if you got a 'connection refused' - you should probably look at the firewall/security setting of your machine.</p>
<p>I have a python service running in kubernetes container and writing logs to stdout. I can see the logs in Cloud Logging Console, but they are not structured, meanining: 1. I can't filter log levels 2. Log record with multiple lines interpreted as multiple log records 3. Dates are not parse etc.</p> <p>How can I add...
<p>If you're running at least version 1.1.0 of Kubernetes (you most likely are), then if the logs you write are JSON formatted, they'll show up as structured logs in the Cloud Logging console.</p> <p>Then certain JSON keys are interpreted specially when imported into Cloud Logging, for example 'severity' will be used ...
<p>I am trying to set up a single node kubernetes cluster for demo and testing purposes, and I want it to behave like a 'full blown' k8s cluster (like google container engine). My client has their own k8s installation, which for this discussion we can assume acts pretty much like google container engine's k8s instal...
<p>Here is the solution we came up with. When we are running against single node Kubernetes we realized by trial and error that when you expose a service the external IP does not come back via IngressIP; rather, it comes back via the clusterIP, which as mentioned above is publicly viewable. So, we just modified our co...
<p>I start a kubernetes replication controller. When the corresponding container in the single pod in this replication controller has a <code>gcePersistentDisk</code> specified the pods will start very slow. After 5 minutes the pod is still in the <code>Pending</code> state.</p> <p><code>kubectl get po</code> will tel...
<p>We've seen the GCE PD attach calls take upwards of 10 minutes to complete, so this is more or less expected. For example see <a href="https://github.com/kubernetes/kubernetes/issues/15382#issuecomment-153268655">https://github.com/kubernetes/kubernetes/issues/15382#issuecomment-153268655</a>, where PD tests were tim...
<p>In GKE every cluster has a single master endpoint, which is managed by Google Container Engine. Is this master node high available?</p> <p>I deploy a beautiful cluster of redundant nodes with kubernetes but what happen if the master node goes down? How can i test this situation?</p>
<p>In Google Container Engine the master is managed for you and kept running by Google. According to the <a href="https://cloud.google.com/container-engine/sla" rel="nofollow">SLA for Google Container Engine</a> the master should be available at least 99.5% of the time. </p>
<p>I have a project with Appengine part and Google Containers cluster. Appengine app needs to make http calls to a Service deployed to Google Containers. </p> <p>I know that I can assign an external IP to the Service, hardcode it into my Appengine app, and then make UrlFetch requests agains such IP. That works. But I ...
<p>There isn't currently a way to inject packets from an App Engine application into the private GCP network where your Kubernetes cluster is running (e.g. coming from a 10.0.0.0/8 address). So the only way to connect your application to your Container Engine service is to use the external IPs (as you are currently doi...
<p>I have a health check with a 1-second check interval (<a href="http://s.drollette.com/0B2A3Z1w2X1G" rel="nofollow">http://s.drollette.com/0B2A3Z1w2X1G</a>). It was created by the GLBC Ingress controller in kubernetes. But looking at the logs it appears that it is generating 3 requests per second (<a href="http://s.d...
<p>Yes, this is the expected behavior. More than one health checker is used to check the service, and each health checker independently obeys the interval specified in your configuration.</p>
<p>tried to config one master node following the guide (<a href="http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html#master-node" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html#master-node</a>) script master.sh ran successfully, but the api server fai...
<p>First, I would upgrade to a newer Docker Version.</p> <p>But I think the Problem has something to do with your kubelet configuration.</p> <p>The parameter --hostname-override allows you to override the hostname. I'm not 100% sure, but I think your node has to be accessible via the hostname from the kube-api server...
<p>I recently had cause to restart a fluentd-elasticsearch pod for all my nodes. Out of 7 nodes where the pods were deleted only 1 of them deleted and came back as "Running". Is there a way to completely purge a pod in k8s?</p>
<p><code>fluentd-elasticsearch</code> pods are <a href="https://github.com/kubernetes/kubernetes/blob/4ca66d2aefa20c27b670b2fa890052daadc05294/docs/admin/static-pods.md" rel="nofollow">static pods</a> which are created via placing pod manifest files (<code>fluentd-es.yaml</code>) in a directory watched by Kubelet. The ...
<p>Most of the articles online regarding setting up Docker containers seem to be written around the idea of breaking an application into microservices and allocating them into various containers and deploying them into a cluster.</p> <p>I would like to find out the best way to handle databases (e.g. MySQL) for multiple...
<blockquote> <p>Containerising db for each app seems to be "the docker way" and provide better isolation and portability</p> </blockquote> <p>The docker way isn't a db per app but a service per container. MySQL is a service at soon as you don't run in the mysql container an another service (app/ssh/monitoring...) i...
<p>I'm composing yaml file for scripts running in docker and orchestrated by kubernetes. Is there a way to evaluate the resource utilization for a specicific command or docker, or what's the best practice to set the limit of cpu and mem for pods?</p> <p><strong>Edit</strong></p> <p>Most of these scripts will run in a s...
<p>You can view statistics for container(s) using the <code>docker stats</code> command.</p> <p>For example;</p> <pre><code>docker stats containera containerb CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O containera 0.00% 24.1...
<p>I've introduced a bunch of readiness and liveness checks in our Kubernetes pods. And apart from currently being fairly CPU-heavy. They appear to work as expected.</p> <p>But then we started to run some load-testing on our solution. And almost immediately pods gets killed and event like this show up:</p> <p><code>L...
<p>I have seen this error when the liveness probe is timing out. Try lengthening the timeoutSeconds on your livenessProbe and see if the problem goes away.</p>
<p>I have multiple volumes and one claim. How can I tell the claim to which volume to bind to?</p> <p>How does a <code>PersistentVolumeClaim</code> know to which volume to bind? Can I controls this using some other parameters or metadata?</p> <p>I have the following <code>PersistentVolumeClaim</code>:</p> <pre><code...
<p>The current implementation does not allow your PersistentVolumeClaim to target specific PersistentVolumes. Claims bind to volumes based on its capabilities (access modes) and capacity.</p> <p>In the works is the next iteration of PersistentVolumes, which includes a PersistentVolumeSelector on the claim. This woul...
<p>i met a problem by using requests.get() on kubernetes api</p> <pre><code>url = 'http://10.69.117.136:8080/api/v1/namespaces/"default"/pods/tas-core/' json = requests.get(url) print json.content </code></pre> <p>error code 404 will be returned as: {"kind": "Status","apiVersion": "v1","metadata": {},"status": "Failu...
<p>Making the request from <code>requests</code> and from command line sends it to different urls.</p> <p>The <code>requests</code> request from Python code really tries to use url including the quotes.</p> <p><code>curl</code> from command line does strip the quotes (in other cases it escapes the quotes).</p> <p>I ...
<p>I am currently experimenting with Kubernetes and have installed a small cluster on ESX infra I had running here locally. I installed two slave nodes with a master node using Project Atomic with Fedora. The cluster is all installed fine and seems to be running. However I first want to get a MySQL container up and run...
<p>Ok it seems I can answer my own question, the problem was lying in the NFS share that was being used as the persistent volume. I had it set to 'squash_all' in the export but it needs to have a 'no_root_squash' to allow root in case of docker container to chown on the nfs bound volume.</p>
<p>I have a kubernetes pod to which I attach a GCE persistent volume using a persistence volume claim. (For the even worse issue without a volume claim see: <a href="https://stackoverflow.com/q/34769946/454103">Mounting a gcePersistentDisk kubernetes volume is very slow</a>)</p> <p>When there is no volume attached, th...
<p>GCE (along with AWS and OpenStack) must first attach a disk/volume to the node before it can be mounted and exposed to your pod. The time required for attachment is dependent on the cloud provider.</p> <p>In the case of pods created by a ReplicationController, there is an additional detach operation that has to ha...
<p>We are having issues with our openshift aws deployment when trying to use persistent volumes. </p> <p>These are some of the there errors when trying to deploy the mysql-persistent instance.</p> <p>-Unable to mount volumes for pod "mysql-4-uizxn_persistent-test": Cloud provider does not support volumes -Error synci...
<p>The way the documentation states to export environment variables is a bit inaccurate. They need to be added to the environment that is referenced by the systemd unit file or the node needs to be granted appropriate IAM permissions.</p> <p>For configuring the credentials in the environment for the node, add the foll...
<p>I'm trying to build a Kubernetes cluster with following services inside:</p> <ul> <li>Docker-registry (which will contain my django Docker image)</li> <li>Nginx listenning both on port 80 and 443</li> <li>PostgreSQL</li> <li>Several django applications served with gunicorn</li> <li><a href="http://blog.ployst.com/d...
<p>Are you using Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/services.md" rel="nofollow">Services</a> for your applications? </p> <p>With a Service to each of your Pods, you have a proxy for the Pods. Even if the pod is not started, as long as the Service is started ng...
<p>I'm setting up a Kubernetes cluster and am testing a small container. This is my YAML file for the pod:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: example spec: restartPolicy: Never containers: - name: node image: 'node:5' command: ['node'] args: ['-e', 'console.log(1234)'] </code><...
<p><code>kubectl describe pod example</code> will give you more info on what's going on</p> <p>also</p> <p><code>kubectl get events</code> can get you more details too although not dedicated to the given pod.</p>
<p>When you create a Google Container Engine (GKE) cluster you specify what the number and what types of machines you want to use in the cluster. </p> <ol> <li>Is it possible to auto-scale the number of cluster machines based on (for example) CPU load?</li> <li>If this is not supported, is there a reason why or is Goo...
<p>Yes, it is. To attach an autoscaler to your existing GKE cluster:</p> <ol> <li><p>Find the name of your cluster's instance group:</p> <pre><code>$ gcloud compute instance-groups managed list NAME ZONE BASE_INSTANCE_NAME SIZE TARGET_SIZE INSTANCE_TEMPLATE AUTOSCA...
<p>I used the instructions in the official getting started guide (<a href="http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html</a>) to get started with kubernetes on vagrant with the vmware fusion provider on OS X.</p> <p...
<p>I was also getting the same error - <br> "Waiting for each minion to be registered with cloud provider error: couldn't read version from server: Get <a href="https://10.245.1.2/api" rel="nofollow">https://10.245.1.2/api</a>: net/http: TLS handshake timeout" I just tried <br>"./cluster/kube-push.sh" and this time clu...
<p>We are running a Jetty service on the Google container engine. This one service runs just fine in a pod with a rc. We can shut it down, rebuild it and do all manner of things to it and it will still work.</p> <p>Now we want to extend our infrastructure with a debian image that runs something else. Locally, the dock...
<p>Prashanth B was right! Having no commands causes the pod to restart in the crashloop.</p> <p>Thanks and good day.</p>
<p>I spinned a <a href="https://github.com/kylemanna/docker-openvpn"><code>docker-openvpn</code></a> container in my (local) <strong>Kubernetes</strong> cluster to access my Services securely and debug <em>dependent services</em> locally.</p> <p>I can connect to the cluster via the <strong>openVPN</strong> server. How...
<p>finally my config looks like this:</p> <pre><code>docker run -v /etc/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig \ -u udp://192.168.10.152:1194 \ -n 10.3.0.10 \ -n 192.168.10.1 \ -n 8.8.8.8 \ -n 75.75.75.75 \ -n 75.75.75.76 \ -s 10.8.0.0/24 \ -N \ -p "route 10.2.0.0 255.255.0.0" \ -p "route 10.3.0.0 ...
<p>I'm trying to create 3 instances of Kafka and deploy it a local Kubernetes setup. Because each instance needs some specific configuration, I'm creating one RC and one service for each - eagerly waiting for <a href="https://github.com/kubernetes/kubernetes/pull/18016" rel="noreferrer">#18016</a> ;)</p> <p>However, I...
<p>for what you want to do you should be using a <strong>Headless Service</strong> <a href="http://kubernetes.io/v1.0/docs/user-guide/services.html#headless-services" rel="noreferrer">http://kubernetes.io/v1.0/docs/user-guide/services.html#headless-services</a></p> <p>this means setting </p> <p><code>clusterIP: None<...
<p>There's two kinds of status code of one-shot pods, running from API or the command:</p> <p><code>kubectl run --restart=Never --image test:v0.1 ...</code>.</p> <p>The pods produce output files to a NFS server, and I've got files successfully. </p> <p><code>kubectl get pods -ao wide</code>:</p> <pre><code>NAME ...
<p><code>ExitCode 0</code> means it terminated normally</p> <p>Exit codes can be used if you pipe to another process, so the process knows what to do next (if previous process failed do this, else do something with the data passed...)</p>
<p>I am new to Kubernetes and been looking at it as an option for a specific solution. </p> <ul> <li>We have a scenario where we have 100+ physical machines running RHEL distributed across different locations.</li> <li>There is a plan to deploy and manage docker based containers on each of these machines. Let's group ...
<p>There is a resource named <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/daemon.md" rel="nofollow">daemonset</a> that spawn at least a pod per node, on a new node added the pod will be spawn on it automatically. </p> <p>About update, change the image in the resource daemonset and all pods...
<p>Whenever DNS gets ran on a kubelet other than the one that resides on the master node then the Liveness and Readiness probes for skydns keep failing. I am deploying the add ons as a service similar to what is used in the salt cluster. I have configured my system to use tokens and have verified that a token gets gene...
<p>It seems that there were two problems I had:</p> <h3>Cert Creation</h3> <p>My implementation is based off the ansible deployment found here: <a href="https://github.com/kubernetes/contrib/tree/master/ansible" rel="nofollow">https://github.com/kubernetes/contrib/tree/master/ansible</a></p> <p>This deployment seems...