prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I'm attempting to create an FTP service with Kubernetes via google cloud. I've created the docker image with and exposed the necessary ports with: <code>EXPOSE 20 21 50000-52000</code>.</p> <p>I've run into several problems so far: The biggest involving port ranges. ProFTPD needs a good amount of ports available to...
<p>Kubernetes does not currently support port ranges. It's difficult to implement with the legacy (but still supported) userspace proxy.</p> <p>I think there are a few GH issues open on this but <a href="https://github.com/kubernetes/kubernetes/issues/20420" rel="nofollow">https://github.com/kubernetes/kubernetes/iss...
<p>Everything in my Kubernetes configuration works great with a single TLS certificate. I define the cert as a <code>Secret</code> and reference it in my <code>Ingress</code> object configuration by name and my HTTPS traffic is served with the certificate. </p> <p>My problem comes in when I try to use my other certifi...
<p>Looks like, for now, GCP doesn't support the <a href="http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_ingresstls" rel="nofollow">Kubernetes spec</a> correctly according to the <a href="https://github.com/kubernetes/contrib/blob/master/ingress/controllers/gce/README.md#tls" rel="nofol...
<p>I have the following deployment in kubernetes:</p> <pre><code> apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: run: hello-node name: hello-node namespace: default spec: replicas: 2 selector: matchLabels: run: hello-node strategy: rollingUpdate: max...
<p>What you need is <code>readinessProbe</code>.</p> <p>The default state of <code>Liveness</code> before the initial delay is <code>Success</code>, whereas the default state of <code>Readiness</code> before the initial delay is <code>Failure</code>.</p> <p>If you’d like your container to be killed and restarted if a p...
<p>I have by mistake added a pod in the system namespace "kube-system". And then I am unable to remove this pod. It also seems to have created a replica set. Every time delete these items, they are recreated. </p> <p>Can't seem to find a way to delete pods or replica sets belonging to the system namespace "kube-system...
<p>If you created the pod using <code>kubectl run</code>, then you will need to delete the deployment (which created the replica set, which created the pod). Otherwise, the higher level controllers will continue to ensure that the objects they are responsible for keeping running stay around in the system, even if you t...
<p>Is there a way to use Fabric8 for PHP project?<br> All the sample I can find is for java and nodejs.<br> I am using Fabric8 on Google Container Engine with Kubernetes.</p>
<p>There's not at the moment but we can look to add one in for the next release. There's Java, nodejs, golang, swift and ruby already but we can add php and .net hopefully in the next few days. </p>
<p>Below is how I am using kunbernetes on google.</p> <p>I have one node application let's say <strong>Book-portal</strong>.</p> <p>node app is using <strong>environment variables for configurations</strong>.</p> <p><strong>Step1:</strong> I created docker file and pushed</p> <pre><code>gcr.io/&lt;project-id&gt;/bo...
<p>I think your best bet is to use configmaps in k8s and then change you pod template to get env variable values from the configmap see <a href="http://kubernetes.io/docs/user-guide/configmap/" rel="noreferrer">Consuming ConfigMap in pods</a></p> <p>edit: I appologize I put the wrong link here. I have updated but for ...
<p>I had some issues running some pods on a cluster, I want to know the way to detect which pod (and rc) is causing OOM on my nodes after the exception is thrown. I cannot access the node to check logs and <code>kubectl describe node</code> doesn't give me much information about this.</p> <p>Thanks :)</p>
<p>Have you try running <code>kubectl get events --watch</code> to monitor the events on k8s and monitor the pod as well with <code>kubectl logs -f podname</code></p>
<p>I am seeing a lot of errors in my logs relating to watches. Here's a snippet from my apiserver log on one machine:</p> <pre><code>W0517 07:54:02.106535 1 reflector.go:289] pkg/storage/cacher.go:161: watch of *api.Service ended with: client: etcd cluster is unavailable or misconfigured W0517 07:54:02.106553 ...
<p>I see that you are accessing the etcd through ELB proxy on AWS.</p> <p>I have similar solution, just the ETCD is decoupled from the kubmaster server to its own 3 node cluster, hidden behind a internal ELB.</p> <p>I can see the same errors from the kube-apiserver when configured to use the ELB. Without the ELB, con...
<p>I am trying to run a Kubernetes cluster on Google cloud. I am using the below link - <a href="http://kubernetes.io/docs/hellonode/" rel="nofollow">http://kubernetes.io/docs/hellonode/</a></p> <p>When I execute the below command - gcloud container clusters get-credentials hello-world</p> <p>I get an error Request h...
<p>The Container Engine API requires the <code>cloud-platform</code> <a href="https://cloud.google.com/storage/docs/authentication#oauth-scopes" rel="nofollow">OAuth2 Scope</a> for authentication. If you are running these commands from a Google Compute Engine instance, you'll need to create the instance with that authe...
<p>I'm running a kubernetes cluster in which I am deploying a &quot;cloud native hazelcast&quot; following the instructions on the <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/hazelcast" rel="nofollow noreferrer">kubernetes-hazelcast github page</a>. Once I have a number of hazelcast instances...
<p>Not sure about the official kubernetes support, however Hazelcast has a kubernetes discovery plugin (based on the new discovery spi) that works on both, client and nodes: <a href="https://github.com/noctarius/hazelcast-kubernetes-discovery" rel="nofollow noreferrer">https://github.com/noctarius/hazelcast-kubernetes-...
<p>I have installed Kubernetes in Ubuntu server using instructions <a href="https://github.com/kubernetes/minikube/blob/master/README.md" rel="noreferrer">here</a>. I am trying to create pods using <code>kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --hostport=8000 --port=8080</code> as lis...
<p>The <code>PodFitsHostPorts</code> predicate is failing because you have something else on your nodes using port 8000. You might be able to find what it is by running <code>kubectl describe svc</code>.</p> <p><code>kubectl run</code> creates a <code>deployment</code> object (you can see it with <code>kubectl describ...
<p>Today when I launch an app using kubernetes over aws it exposes a publicly visible LoadBalancer Ingress URL, however to link that to my domain to make the app accessible to the public, I need to manually go into the aws route53 console in a browser on every launch. Can I update the aws route53 Resource Type A to ma...
<p>Here is the logic needed to update aws route53 Resource Record Type A with value from freshly minted kubernetes LoadBalancer Ingress URL</p> <p>step 1 - identify your hostedzone Id by issuing</p> <pre><code>aws route53 list-hosted-zones </code></pre> <p>... from output here is clip for my domain</p> <pre><code>"...
<p>I was following along with the <a href="http://kubernetes.io/docs/hellonode/#create-your-cluster" rel="noreferrer">Hello, World example</a> in Kubernetes getting started guide.</p> <p>In that example, a cluster with 3 nodes/instances is created on Google Container Engine.</p> <p>The <code>container</code> to be de...
<p>Got some help in <code>#kubernetes-users</code> <a href="http://slack.k8s.io" rel="noreferrer">channel</a> on slack :</p> <ol> <li>The port specified in <code>kubectl run ...</code> is that of a <code>pod</code>. And each pod has its unique IP address. So, there are no port conflicts.</li> <li>The pods won’t serve ...
<p>Trying to start this pod</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: tinyproxy spec: containers: - name: master image: asdrepo.isus.emc.com:8091/francisbesset/tinyproxy env: - name: MASTER value: "true" ports: - containerPort: 6379 resources: ...
<p>Looks like the scheduler service did not start (this is in an openstack VM). All services were supposed to be configured and started automatically. This worked after I started the service manually.</p>
<p>what exactly is the link between these two? how can i specify that PersistentVolumeClaim must use specific PersistentVolume? it seems to be sharing files between all PersistentVolumeClaims</p>
<p>Yes, this sharing as you stated it, is the case and you could say that this is at least very troubling if you want specific volumes for a given purpose. It is beneficial if you have random usable volumes, which is often not the case.</p> <blockquote> <p>Scenario: Create a NFS volume for 1 database &amp; a second ...
<p>As per the official documentation <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="nofollow">here</a> on running Kubernetes locally within a Container -- I have followed all the steps carefully, and I am still getting the message <code>connection refused</code> when I type <code>kubectl get no...
<p>The easiest way to run Kubernetes locally now is <a href="http://kubernetes.io/docs/getting-started-guides/minikube/" rel="nofollow">Minikube</a>, though I'd expect the local docker method to still be functional.</p> <p>Does <code>docker ps -a</code> show any crashed kube-apiserver containers that might have any cl...
<p>Hi im trying to setup stackdriver to monitor my containers but the cpu metrics dont seem to work, im working with the following versions</p> <pre><code>Master Version 1.2.5 Node Version 1.2.4 heapster-v1.0.2-594732231-sil32 </code></pre> <p>this is a group a create for the databases (it also happens for the wi...
<p>Do your containers have CPU limits specified on them? The CPU Usage graph on that page is supposed to show utilization, which is defined as <code>cores used / cores reserved</code>. If a container hasn't specified a maximum number of cores, then it won't have a utilization either, as <a href="https://cloud.google.co...
<p>What's the suggested way to update the cluster version from 1.2 to 1.3?</p> <p>Is there a structured way to do it or I have to create a new cluster from scratch?</p> <p>Couldn't find any documentation regarding this.</p>
<p>The answer partially depends on how you set up your cluster in the first place. If you used the <code>kube-up.sh</code> script with the environment set to <code>AWS</code>, then they don't currently provide an upgrade mechanism. If you used <a href="https://github.com/kubernetes/kops" rel="nofollow">kops</a> then yo...
<p>From the kubernetes <a href="http://kubernetes.io/docs/user-guide/pods/" rel="noreferrer">docs</a>: </p> <blockquote> <p>The applications in a pod all use the same network namespace (same IP and port space), and can thus “<em>find</em>” each other and communicate using localhost.</p> </blockquote> <p><em>Is it p...
<p><code>localhost</code> is just a name for the network loopback device (usually <code>127.0.0.1</code> for IPv4 and <code>::1</code> for IPv6). This is usually specified in your <code>/etc/hosts</code> file.</p> <p>A pod has its own IP, so each container inside shares that IP. If these containers should be independe...
<p>Still experiencing a similar issues 1.3.0 and upto 1.4.0-alpha.0</p> <p>In my case (docker based set up), either trusty or kubedns would get unauthorized from api server. </p> <p>and strangely I see that the secrets are not there inside the instances, under the path /var/run/secrets/kubernetes.io/serviceaccount <...
<p>This one seems to be a bug still open</p> <p><a href="https://github.com/kubernetes/kubernetes/issues/26943">https://github.com/kubernetes/kubernetes/issues/26943</a></p> <p>The workaround that works is to add rslave option in the kubelet mount like <strong>--volume=/var/lib/kubelet:/var/lib/kubelet:rw,rslave</s...
<p>I have a kubernetes cluster setup in AWS. We are using the EC2 container registry to store our docker images on. We have the master/minions all setup and everything seems to be working with the cluster.</p> <p>My spec file is as followed:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: apim-mysql l...
<p>My experience using kubernetes on aws while getting unhelpful errors as</p> <pre><code>Error from server: dial unix /var/run/docker.sock: no such file or directory </code></pre> <p>was resolved by <a href="https://aws.amazon.com/ec2/instance-types/" rel="nofollow">choosing a more hefty aws cluster instance type</a...
<p>We're running a kubernetes cluster on the Google Cloud Platform, which creates a Deployment with 8 hazelcast-based replicas. We've had this running fine for over a month, but recently, we started receiving the below error message whenever we try to start our deployment (non-relevant stack frames omitted):</p> <pre...
<p>The initial google searches indicating this was a TLS version error (version 1.0 vs 1.2 incompatibility) turned out to be useful. <a href="https://stackoverflow.com/a/33494593/13140">This answer</a> to a question about a similar SSLException protocol_version error is what pointed me in the right direction.</p> <p>...
<p>New to kubernetes. What I was understood is each kubernetes uses docker pause image to store namespace information.My question in which pause image goes well with which which kubernetes version? How to find that out? If I am using kubernetes 1.3.2 which pause image version should I use?</p>
<p>kubelet has a default infra container image that it uses and it is hard-coded in each version. In normal circumstances, users should not need to manually set the image. In some cases, where people want to use their customized image, they can override this by passing a <code>--pod-infra-container-image</code> flag to...
<p>My kubernetes cluster is hosted on Google Cloud on <code>europe-west1-d</code> region</p> <p>My local setup have docker-engine@1.10 and kubectl@1.3.2</p> <p>I managed to deploy without any issue when my cluster was on version 1.2.5</p> <p>But since I upgraded to 1.3.0, I've got this: <code> $ kubectl version Clie...
<p>Did you set a custom user name (other than admin) when you created your cluster? Kubernetes 1.3.0 on GKE has a known issue (see the <a href="https://cloud.google.com/container-engine/release-notes#july_11_2016" rel="nofollow">July 11, 2016 release notes</a>) where authorization fails if you try to authenticate using...
<p>Heeey all, I need some help with getting the dashboard to work. My dashboard pod has status "Pending" and if I do a curl call to <a href="http://127.0.0.1:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard" rel="nofollow">http://127.0.0.1:8080/api/v1/proxy/namespaces/kube-system/services/kuberne...
<p>The other possibility is that you have no resources in the cluster and the scheduler fails to schedule the Dashboard UI. If this is true you can see this in cluster events (<code>kubectl get events --namespace=kube-system</code>).</p>
<p>According to the user guide it should be possible to <a href="http://kubernetes.io/docs/user-guide/deployments/#updating-a-deployment" rel="noreferrer">update a deployment's image</a> with <code>kubectl set/edit</code> and still get a meaningful <a href="http://kubernetes.io/docs/user-guide/deployments/#checking-rol...
<p>This is due to update conflict when we update the deployment's annotation (for recording its change history). This means that the deployment object is modified (most likely by server) when <code>kubectl</code> updates the deployment change history. <code>kubectl set image</code> currently won't retry change history ...
<p>I managed to have ribbon dynamically discover instances in a <code>k8s</code> cluster using <a href="https://github.com/fabric8io/kubeflix" rel="nofollow">kubeflix</a> and <a href="https://github.com/fabric8io/spring-cloud-kubernetes" rel="nofollow">spring-cloud-kubernetes</a></p> <p>This was when I manually used <...
<p>That was actually quite easy. You only need to specify the <code>NIWSServerListClassName</code>, the <code>k8s</code> namespace and the k8s port name in the <code>Ribbon</code> configuration:</p> <pre><code>service-name: ribbon: NIWSServerListClassName: io.fabric8.kubeflix.ribbon.KubernetesServerList ...
<p>In docker run command, we can specify host port range to bind to EXPOSEd container port. Same thing I want to do through Kubernetes. Does any one know, how to do that? My current pod definition is as-</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: nginx-testing spec: containers: - name:...
<p>Port ranges are not currently supported in any of the Kubernetes API objects. There is an open <a href="https://github.com/kubernetes/kubernetes/issues/23864" rel="noreferrer">issue</a> discussing port ranges in services. Please add your use case and your thoughts!</p>
<p>I have a kubernetes cluster setup where I am trying to publish a message to google cloud pub/sub from my pod. When the POST call (created by the API behind the scenes) is being made by the pod, it fails citing the issue below:</p> <p><code>2016/07/21 10:31:24 Publish failed, Post https://pubsub.googleapis.com/v1/pr...
<p>Self-signed certificates will not work. The certificate needs to be signed by a certificate authority.</p>
<p><a href="http://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/</a></p> <p>"This guide will only get ONE node working. Multiple nodes requires a functional networking configuration done outside of ku...
<ul> <li><strong>Host</strong>: some machine (physical or virtual)</li> <li><strong>Master</strong>: a host running Kubernetes API server and other master systems</li> <li><strong>Node</strong>: a host running <code>kubelet</code> + <code>kube-proxy</code> that pods can be scheduled onto</li> <li><strong>Cluster</stron...
<p>Is there an already built in j2 template processor in kubernetes or docker? I am doing the configuration below and wanted to plugin the values on the template.</p> <p>Note that using hostPath is not an option since this is using openshift and no pv/pvc can be used. </p> <pre><code>containers: - image: some-doc...
<p>There isn't any templating support built into Kubernetes. You can easily build a templating system on top of the yaml/json files that you pass into <code>kubectl -f create</code> though. I know some folks that are using <a href="http://jsonnet.org" rel="nofollow">jsonnet</a> to accomplish this. </p> <p>The discussi...
<p>enter image description hereI tried to used the instructions from this link <a href="https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md" rel="nofollow noreferrer">https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md</a> but I was not able to install it. specifically I dont know what t...
<p>We had the same issue deploying grafana/influxdb. So we dug into it:</p> <p>Per <a href="https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md" rel="nofollow">https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md</a> since we don’t have an external load balancer, we changed the port ty...
<p>Using Kubernetes' <code>kubectl</code> I can execute arbitrary commands on any pod such as <code>kubectl exec pod-id-here -c container-id -- malicious_command --steal=creditcards</code></p> <p>Should that ever happen, I would need to be able to pull up a log saying who executed the command and what command they exe...
<p>Audit logging is not currently offered, but the Kubernetes community <a href="https://github.com/kubernetes/features/issues/22" rel="nofollow">is working to get it available in the 1.4 release</a>, which should come around the end of September.</p>
<p>I'm using the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Kubernetes+Plugin" rel="nofollow">Kubernetes Jenkins</a> plugin to orchestrate jenkins slaves </p> <p>I want to run all the jobs in Docker (build docker images and execute tests/builds in docker).</p> <p>example jenkins job: </p> <pre><code>docke...
<p>You need to install docker client and mount the docker socket so you can access the Docker host. Then you can interact with that Docker host</p> <p><a href="https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/" rel="nofollow">https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for...
<p>I've looked over the documentation and browsed the source, but I can't seem to figure out how to do this. Is there any way to send query string parameters along with the path when implementing a Kubernetes liveness probe?</p> <p>The string I am sending, which looks something like this:</p> <pre><code>/api/v1?q=......
<p>EDIT: This should now be fixed in Kubernetes 1.3. Thanks to Rudi C for pointing that out.</p> <p>Liveness probes in Kubernetes v1.2 don't support passing query parameters.</p> <p><a href="https://github.com/deis/controller/issues/774" rel="nofollow">This Issue</a> in the Deis Controller repo has a good explanation...
<p>I have some containers that will be runnin users code in them. In order to strengthen security, I want to prevent them from having access to kubernetes api via the service account mechanism, but don't want to turn it off globally. The documentation says you can switch the service account name but only to another val...
<p>The easiest hack is to mount an emptyDir over the location that the serviceAccount secret would have been mounted. Something like:</p> <pre><code>containers: - name: running-user-code image: something-i-dont-trust volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: no-api-access...
<p>I am testing and learning kubernetes. I am using ubuntu 16.04 and have been looking for the simple and straightforward installation guide, but have failed to find one... Any suggestion? My aim is to be able to run kubernetes as master on one ubuntu 16.04 laptop and later set up a second ubuntu 16.04 laptop easily jo...
<p>You could check the way to bring up a single-node cluster which is via <a href="https://github.com/kubernetes/kubernetes/blob/ef0c9f0c5b8efbba948a0be2c98d9d2e32e0b68c/cluster/get-kube-local.sh" rel="nofollow">cluster/get-kube-local.sh</a>. It shows you how one could use hyperkube to bring up a cluster.</p> <p>If yo...
<p>I'm trying to start a new Kubernetes cluster on AWS with the following settings:</p> <pre><code>export KUBERNETES_PROVIDER=aws export KUBE_AWS_INSTANCE_PREFIX="k8-update-test" export KUBE_AWS_ZONE="eu-west-1a" export AWS_S3_REGION="eu-west-1" export ENABLE_NODE_AUTOSCALER=true export NON_MASQUERADE_CIDR="10.140....
<p>Your Cluster IP range is too small. You've allocated a /24 for your entire cluster (255 addresses), and Kubernetes by default will give a /24 to each node. This means that the first node will be allocated <code>10.140.3.0/24</code> and then you won't have any further /24 ranges to allocate to the other nodes in your...
<p>Following the docs to create a Deployment, I have a .yaml file like this:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment ... </code></pre> <p>I wasn't sure what to make of the "extensions/v1beta1", so I ended up <a href="http://kubernetes.io/docs/api/#v1beta1-v1beta2-and-v1beta3-are-deprecated-plea...
<p>The docs you linked to are from before the release of Kubernetes 1.0 (a year ago). At that time, we had beta versions of the API and were migrating to the v1 API. Since then, we have introduced multiple API groups, and each API group can have a different version. The version indicates the maturity of the API (alpha ...
<p>I'm following the <a href="http://kubernetes.io/docs/getting-started-guides/logging-elasticsearch/" rel="nofollow noreferrer">k8s logging instructions</a> on how to configure cluster level logging. I'm using <a href="https://github.com/coreos/coreos-kubernetes/releases" rel="nofollow noreferrer">kube-aws cli Tool</...
<p>I've managed to get the cluster-level logging running on a small testing cluster started through the CoreOS <code>kube-aws</code> tool using the following steps. Please be aware that although I've had this running, I haven't really played with it sufficiently to be able to guarantee that all works correctly!</p> <p...
<p>Anyone try to run vm for production on a Kubernetes cluster. Is their a way to run kvm instance inside a pod ? I know that google run all the vm inside container is it planned for kubernetes ? Thank you</p>
<p>Running VMs inside(!) Kubernetes can have legitimate use cases.</p> <p>The most native way as of recently to run VMs and manage them in Kubernetes is <a href="http://blog.kubernetes.io/2016/07/rktnetes-brings-rkt-container-engine-to-Kubernetes.html" rel="nofollow">sing rkt</a>. You can then use rkt's <a href="https...
<p>I am using google container engine and getting tons of dns errors in the logs. </p> <p>Like:</p> <pre><code>10:33:11.000 I0720 17:33:11.547023 1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false </code></pre> <p>And:</p> <pre><code>10:46:11.000 I0720 17:46:11.546237 1 dns.go:539...
<p>Thanks for the question, Aaron. Those error messages are actually just tracing/debugging output from the container and don't indicate that anything is wrong. The fact that they get written out as error messages has been fixed in Kubernetes at head and will be better in the next release of Kubernetes.</p>
<p>I'm running a kubernetes application on GKE, which serves HTTP requests on port 80 and websocket on port 8080.</p> <p>Now, HTTP part needs to know client's IP address, so I have to use HTTP load balancer as ingress service. Websocket part then has to use TCP load balancer, as it's clearly stated in docs that HTTP L...
<p>There's not a great answer to this right now. Ingress objects are really HTTP only right now, and we don't really support multiple grades of ingress in a single cluster (though we want to).</p> <p>GCE's HTTP LB doesn't do websockets yet.</p> <p>Services have a flaw in that they lose the client IP (we are working ...
<p>I am using an external database that requires you to whitelist IPs for use, and I want a particular service in my k8s cluster to have access to this database.</p> <p>I don't know which IP address to add to the whitelist. I tried whitelisting the <code>IP</code> field from <code>kubectl describe svc &lt;service_name...
<p>You cannot whitelist the service IP because there is a sorta of NAT that is connecting pods to pods and containers to containers etc (using etcd). But you can whitelist your global IP, which means you will have access to the database from every pod or service.</p> <p>Read more about the network <a href="https://co...
<p>I have a coreos kubernetes cluster, which I started by following this article: </p> <p><a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html" rel="nofollow">kubernetes coreos cluster on AWS</a></p> <p>TLDR; </p> <pre><code>&gt; kube-aws init &gt; kube-aws render &gt; kube-aws up </code></pre> ...
<p>An alternative solution that worked for me was to start a new cluster, and use custom certificates initially, without ever relying on the default temporary credentials.</p> <p>Following the same <a href="https://coreos.com/kubernetes/docs/latest/openssl.html" rel="nofollow">tutorial</a> that you used, I made the fo...
<p>Heeey all, I've been working on to get kubernetes working for days now and I learned a lot but I'm still keep on struggling with the dashboard. I dont get it working on my CoreOS machines.</p> <p>The message that I get is: while initializing connection to Kubernetes apiserver. This most likely means that the cluste...
<p>You can assign a kubeconfig with token/ssl configuration to the dashboard. </p> <p>Then depending on your installation you may need to mount the kubeconfig and the certificates. </p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: kubernetes-dashboard-v1.1.0-beta3 namespace: kube-system ...
<p>I'd like a multi-container pod with a couple of components:</p> <ul> <li>A "main" container which contains a build job</li> <li>A "sidecar" container which contains an HTTP proxy, used by the "main" container</li> </ul> <p>This seems to fit well with the pod design philosophy as <a href="http://kubernetes.io/docs/...
<p>A pod is running as long as one of the containers is running. If you need them to exit together, you have to arrange that the sidecar dies. We do not have a notion of "primary" vs "secondary" containers wrt lifecycle, though that's sort of interesting.</p> <p>One option would be to use an emptyDir volume and writ...
<p>How can I configure a specific pod to run on a multi-node kubernetes cluster so that it would restrict the containers of the POD to a subset of the nodes. </p> <p>E.g. let's say I have A, B, C three nodes running mu kubernetes cluster. </p> <p>How to limit a Pod to run its containers only on A &amp; B, and not on ...
<p>You can add label to nodes that you want to run pod on and add nodeSelector to pod configuration. The process is described here:</p> <p><a href="http://kubernetes.io/docs/user-guide/node-selection/" rel="noreferrer">http://kubernetes.io/docs/user-guide/node-selection/</a></p> <p>So basically you want to</p> <pre>...
<p>I'm following <a href="http://kubernetes.io/docs/hellonode/" rel="noreferrer">Kubernete's getting started guide</a>. Everything went smoothly until I ran </p> <p><code>$ gcloud docker push gcr.io/&lt;PROJECT ID&gt;/hello-node:v1</code></p> <p>(Where is, well, my project id). For some reason, Kubernetes is not abl...
<p>This solved it in my case:</p> <hr> <p><strong>Short version:</strong></p> <p>Press <code>Enable billing</code> in the <code>Container Engine</code> screen in the <code>https://console.cloud.google.com</code>.</p> <hr> <p><strong>Long version:</strong></p> <p>In my case I got the error because of an issue with...
<p>I came across this article <a href="http://www.networkworld.com/article/3100383/cloud-computing/the-worlds-of-openstack-and-containers-are-colliding.html" rel="nofollow">http://www.networkworld.com/article/3100383/cloud-computing/the-worlds-of-openstack-and-containers-are-colliding.html</a>. It talks about openstack...
<p>There are many ways containers and OpenStack are being mixed. The article you quoted refers to a new-ish approach of running OpenStack servers inside containers. The advantage is for maintainability and scalability. Basically, kubernetes is in charge of orchestrating the various pieces that make an OpenStack service...
<p>When listing resources such as POD running on a cluster, how to know which physical node are they on?</p> <p><code>kubectl get {resource-type}</code> command returns the following columns. </p> <p><code>NAMESPACE NAME READY STATUS RESTARTS AGE</code> </p> <p>Could not find a way to list the...
<p>The -o flag seems to work </p> <pre><code>[root@kubernetes1 temp]# kubectl get pod --namespace=kube-system -o wide NAME READY STATUS RESTARTS AGE IP NODE k8s-master-127.0.0.1 4/4 Running 0 33m 127.0.0.1 127.0.0.1 k8s-pro...
<p>I'm trying to create a new ThirdPartyResource as per Kelsey Hightowers <a href="https://github.com/kelseyhightower/kube-cert-manager/blob/master/docs/certificate-third-party-resource.md" rel="nofollow">kube-cert-manager guide</a> but I'm getting this error:</p> <pre><code>Error from server: error when creating "cer...
<p>ThirdPartyResources were namespace-scoped alpha objects in 1.2, and they are now cluster-scoped in 1.3 (see the <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#thirdpartyresource" rel="nofollow">1.3.0 Known Issues</a>). Unfortunately, that means that a 1.2.x client will not know the right ...
<p>I want to use volumes for deployments with more than one replica. How do I define an <code>PersistentVolumeClaim</code> so it will be generated for each replica? At the moment (see example below) I am able to generate a volume and assign it to the pods. The problem is, that only one volume gets generated which cause...
<p>ReplicaSets treat volumes as stateless. If your replicaset pod template specifies a volume that can only be attached read-write once, then the same volume is used by all pods in that replicaset. If that volume can only be attached read-write to one node at a time (like GCE PDs), then after the first pod is successfu...
<p>Using a Google Container Engine cluster running Kubernetes, what would the process be in order to point <a href="http://mydomain.co.uk" rel="nofollow">http://mydomain.co.uk</a> onto a LoadBalanced ReplicationController?</p> <p>I'm aware Kubernetes supports SkyDNS - how would I go about delegating Google Cloud DNS f...
<p>You will need to create a <a href="http://kubernetes.io/docs/user-guide/services/" rel="noreferrer">service</a> that maps onto the pods in your replication controller and then expose that service outside of your cluster. You have two options to expose your web service externally:</p> <ol> <li><a href="http://kubern...
<p>Playing a bit with Kubernetes (v1.3.2) I’m checking the ability to load balance calls inside the cluster (3 on-premise CentOS 7 VMs).<br> If I understand correctly the documentation in <a href="http://kubernetes.io/docs/user-guide/services/" rel="nofollow">http://kubernetes.io/docs/user-guide/services/</a> ‘Virtual ...
<p>No, the statement is not correct. The loadbalancing should be across nodes (VMs). This <a href="https://github.com/kubernetes/contrib/tree/master/micro-demos/services" rel="nofollow">demo</a> demonstrates it. I have run this demo on a k8s cluster with 3 nodes on gce. It first creates a service with 5 backend pods, t...
<p>I've two docker images, one is a webserver and the other is a backend Rest application. I deployed those images in an Openshift cluster. I want to configure my pods where the webserver is running to access the pods where the backend Rest application is running but I can't figure out how I can specify to my front-end...
<p>The best thing you can do is deploy those 2 pods in the same project so you can keep the communication internally:</p> <pre><code>$ oc new-project test $ oc new-app registry:5000/frontend-image $ oc new-app registry:5000/backend-image </code></pre> <p>This will automatically create a deploymentconfig and create yo...
<p>To clarify, this is not a question about running Jenkins in Kubernetes, this is about deploying to Kubernetess from Jenkins.</p> <p>I have recently settled on using Jenkins (and the workflow/pipeline plugin) to orchestrate our delivery process. Currently, I'm using the imperative style to deploy as per below:</p> ...
<p>In my yaml file (server.origin.yml), I set my image as <code>image-name:$BUILD_NUMBER</code></p> <p>Then I run: <code>envsubst &lt; ./server.origin.yml &gt; ./server.yml</code><br> This command will replace the string <code>$BUILD_NUMBER</code> by the value of the environment variable</p>
<p>UPDATE: I connected to the minikubevm and I see my host directory mounted but there is no files there. Also when I create a file there it will not in my host machine. Any link are between them</p> <p>I try to mount an host directory for developing my app with kubernetes.</p> <p>As the doc recommended, I am using m...
<p>EDIT: Looks like the solution is to either use a <a href="http://kubernetes.io/docs/user-guide/pods/#privileged-mode-for-pod-containers" rel="noreferrer">privilaged container</a>, or to manually mount your home folder to allow the MiniKube VM to read from your hostPath -- <a href="https://github.com/boot2docker/boot...
<p>I have to set resource limits for my kubernetes apps, and they use the "milicore" unity "m". </p> <p>When analyzing my apps in Datadog, I see a unity called M% for CPU usage.</p> <p>How do I convert 1.5M% to m?</p> <p>Kubernetes resources: <a href="http://kubernetes.io/docs/user-guide/compute-resources/" rel="nof...
<p>This is not correct graph to detect correct resource limit. You graph shows CPU usage of your app in the cluster, but resource limit is per pod (container). We (and you as well) don't know from the graph how many containers were up and running. You can determinate right CPU limit from the container CPU usage graph(s...
<p>i have configured kubernetes master on centos 7 and kubernetes node on another node centos 7 </p> <p><strong>services running on kube master:</strong></p> <ul> <li>kube-controller-manager</li> <li>kube-apiserver</li> <li>kube-scheduler </li> <li>etcd </li> <li>flanneld</li> </ul> <p><strong>service running ...
<p><code>kubelet</code> is the only component with a dependency on the container runtime (Docker in your case). If I were you I'd start investigating the <code>kubelet</code> logs and search for references to Docker. Maybe the user configured to run kubelet doesn't have the necessary permissions to interact with the Do...
<p>As per kubernetes docs: <a href="http://kubernetes.io/docs/user-guide/configmap/" rel="nofollow">http://kubernetes.io/docs/user-guide/configmap/</a></p> <blockquote> <p>Kubernetes has a ConfigMap API resource which holds key-value pairs of configuration data that can be consumed in pods.</p> </blockquote> <p>...
<p>Sadly, Docker (even in 1.12 with swarm mode) does not support the variety of use cases that you could solve with ConfigMaps (also no Secrets).</p> <p>The only things supported are external env files in both Docker ( <a href="https://docs.docker.com/engine/reference/commandline/run/#/set-environment-variables-e-env-...
<p>Having set up a kubernetes cluster with calico for the one-ip-per-pod networking, I'm wondering what the best practise is to expose services to the outside world.</p> <p>IMHO I got two options here, BGP'ing the internal pod IP's (172...) to an edge router/firewall (vyos in my case) and do an SNAT on the firewall / ...
<p>Calico doesn't provide any special way to expose services in Kubernetes. You should use standard Kubernetes services, node ports and the like to expose your services. In the future, there's a possibility that Calico will offer some of the features that kube-proxy currently does for Kubernetes (such as exposing ser...
<p>I have a disk image with mirrors of some protein databases (HHsearch, BLAST, PDB, etc.) That I build with some CI tooling, and write to a GCE disk to run against. I'd like to access this <code>ReadOnlyMany</code> PV in <code>Pods</code> created by <code>ReplicationControllers</code> in multiple namespaces via <code>...
<p>A single PV can only be bound to a single PVC at a given time, regardless of whether it is ReadOnlyMany or not (once a PV/PVC binds, the PV can't bind to any other PVC).</p> <p>Once a PV/PVC is bound, ReadOnlyMany PVCs may be referenced from multiple pods. In Peter's case, however, he can't use a single PVC object ...
<p>I have created a Kubernetes v1.3.3 cluster on CoreOS based on the <a href="https://github.com/kubernetes/contrib/tree/master/ansible" rel="nofollow">contrib repo</a>. My cluster appears healthy, and I would like to use the Dashboard but I am unable to access the UI, even when all authentication is disabled. Below ...
<p>Either you have to expose your service outside of the cluster using a service of type NodePort as mentioned in the previous answer, or if you enabled Basic Auth on your API Server you can reach your service using the following URL:</p> <p><code>http://kubernetes_master_address/api/v1/proxy/namespaces/namespace_name...
<p>I've set cpu limits on my Kubernetes pods, but they do not seem to cap cpu usage at all running on Google Container Engine version 1.3.3</p> <p>Reading <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/runtime-constraints" rel="nofollow">https://github.com/kubernetes/kubernetes/tree/master/exam...
<p>That flag's <a href="https://github.com/kubernetes/kubernetes/blob/release-1.3/cmd/kubelet/app/server.go#L570" rel="nofollow">default value is true</a> :)</p> <p>So yes, it is enabled in Container Engine.</p> <p>edit: I was wrong - the flag is enabled, but the default operating system used by GKE doesn't support i...
<p>I have a Kubernetes cluster (1.3.2) in the the GKE and I'd like to connect VMs and services from my google project which shares the same network as the cluster.</p> <p>Is there a way for a VM that's internal to the subnet but not internal to the cluster itself to connect to the service without hitting the external ...
<p>Check out my more thorough answer <a href="https://stackoverflow.com/questions/31664060/how-to-call-a-service-exposed-by-a-kubernetes-cluster-from-another-kubernetes-cl/31665248#31665248">here</a>, but the most common solution to this is to create bastion routes in your GCP project.</p> <p>In the simplest form, you...
<p>Can Kubernetes be deployed with Docker locally now?</p> <p>I see the tutorial of deploying Kubernetes with docker on the Kubernetes official website has been removed.In the <a href="http://kubernetes.io/docs/getting-started-guides/binary_release/" rel="nofollow">Kubernetes' download link</a>, Docker is no longer on...
<p>kubernetes is an orchestration(scheduling) system for docker container and don't run inside docker, because k8ts need docker daemon to schedule and orchestrate container.</p> <p>k8ts need physical(bare metal or other) or virtual machine to run. for run kubernetes locally you can use <a href="https://github.com/kube...
<p>I am using Minikube and I am trying to configure Heapster with Grafana and Influxdb. I followed the instructions <a href="https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md" rel="nofollow">here</a> and all the ReplicationControllers, Pods and Services created successfully except for the monitoring-g...
<p>Remove the <code>kubernetes.io/cluster-service: 'true'</code> label.</p> <p>See <a href="https://github.com/kubernetes/kops/issues/13" rel="nofollow">https://github.com/kubernetes/kops/issues/13</a></p>
<p>I'm looking for a simple application to be deployed on Kubernetes environment, that is divided to docker micro services, that some of the microservices talk to each other with REST API.</p> <p>Somebody?</p> <p>I'll be happy to get full details of how to install it on my environment (I have 3 hosts VMs)</p> <p>Tha...
<p>You can find a list of application examples in the kubernetes <a href="https://github.com/kubernetes/kubernetes/tree/e3fa83177c4d2d1331d41e7ce70b1f145475587a/examples" rel="nofollow">github repo</a>. The <a href="https://github.com/kubernetes/kubernetes/tree/e3fa83177c4d2d1331d41e7ce70b1f145475587a/examples/guestboo...
<p>I have created a Kubernetes v1.3.3 cluster on CoreOS based on the <a href="https://github.com/kubernetes/contrib/tree/master/ansible" rel="nofollow">contrib repo</a>. My cluster appears healthy, and I would like to use the Dashboard but I am unable to access the UI, even when all authentication is disabled. Below ...
<p>For anyone who finds their way to this question, I wanted to post the final resolution as it was not a Flannel, Kubernetes, or SkyDNS issue, it was an inadvertent firewall. As soon as I opened up the firewall on the API server, my Flannel routes were fully functional and I could access the Dashboard (assuming basic...
<p>May I ask if it is possible that I will use kubernetes in spring cloud instead of Eureka server? The reason I am asking is we already have Kubernetes in our environment, I know Kubernete also provide service discovery, so I don't want to start Eureka server for service discovery purpose. If I can replace Eureka with...
<p>How about spring-cloud-kubernetes by fabric8io? </p> <p>There is an implementation of the DiscoveryService interface to work with Kubernetes services.</p>
<p>We're expanding our microservice herd application and i was looking into Kubernetes for our needs. Before my dive into the modern orchestration i was thinking about service discovery in the following way:</p> <ul> <li>Cluster is bootstrapped with some kind of distributed service registry (Consul in our case)</li> <...
<p>The in-cluster load balancer in Kubernetes (kube-proxy) is distributed among all of your cluster's nodes. It syncs all service endpoints to iptables rules on the node. Kube-proxy is healthchecked by kubelet, and will be restarted if it is unhealthy for 30 seconds (that's configurable, I think). The actual traffic do...
<p>I'm trying via Jenkins to push an image to the container repository. It was working at first, but now, I got "access denied"</p> <pre><code>docker -- push gcr.io/xxxxxxx-yyyyy-138623/myApp:master.1 The push refers to a repository [gcr.io/xxxxxxx-yyyyy-138623/myApp] bdc3ba7fdb96: Preparing 5632c278a6dc: Waiting deni...
<p>That error means that the GKE node is not authorized to push to the GCS bucket that is backing your repository.</p> <p>This could be because:</p> <ol> <li>The cluster does not have the correct scopes to authenticate to GCS. Did you create the cluster w/ <code>--scopes storage-rw</code>?</li> <li>The service accoun...
<p>I've set cpu limits on my Kubernetes pods, but they do not seem to cap cpu usage at all running on Google Container Engine version 1.3.3</p> <p>Reading <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/runtime-constraints" rel="nofollow">https://github.com/kubernetes/kubernetes/tree/master/exam...
<p>Google Container Engine does not support CPU Quota by default. If you'd like to use CPU quota you can switch to using GCI Node image - <a href="https://cloud.google.com/container-engine/docs/gci" rel="nofollow">https://cloud.google.com/container-engine/docs/gci</a>. GCI has support for CPU quota and Container Engine...
<p>Sometimes pod creation fails with the 500 error on our GKE cluster:</p> <pre><code>1m 1m 1 installer-u57ab1f7707b03 Pod Normal Scheduled {default-scheduler } Successfully assigned installer-u57ab1f7707b03 to gke-oro-cloud-v1-1445426...
<p>This is probably due to the <a href="https://github.com/docker/docker/issues/14203" rel="nofollow">runc bug</a> in Docker 1.9 where the container reads its config, but closes the read pipe before the the parent is done writing.</p> <p>A fixed runc is included in Docker 1.10. Kubernetes 1.3 uses Docker 1.11.2, but u...
<p>What is the username/password/keys to ssh into the Minikube VM?</p>
<p>You can use the Minikube binary for this, <code>minikube ssh</code>.</p>
<p>After creating a new app using <code>oc new-app location/nameofapp</code>, many things are created: a deploymentConfig, an imagestream, a service, etc. I know you can run <code>oc delete &lt;label&gt;</code>. I would like to know how to delete all of these given the label.</p>
<p>When using <code>oc new-app</code>, it would normally add a label on each resource created call <code>app</code> with value being the name given to the application. That name would be based on the name of the git repository, or could have been supplied using the <code>--name</code> option. Knowing that to delete eve...
<p>I have a local Kubernetes cluster on a single machine, and a container that needs to receive a url (like <a href="https://www.wikipedia.org/" rel="noreferrer">https://www.wikipedia.org/</a>) and extract the text content from it. Essentially I need my pod to connect to the outside world. Since I am using v1.2.5, I ne...
<p>You can simply create your pods with "dnsPolicy: Default", this will give it a resolv.conf just like on the host and it will be able to resolve wikipedia.org. It will not be able to resolve cluster local services.If you're looking to actually deploy kube-dns so you can also resolve cluster local services this is pro...
<p>I'm querying the Kubernetes kubelet API (curl -s <a href="http://localhost:10255/stats/summary" rel="nofollow">http://localhost:10255/stats/summary</a>) for CPU/Memory statistics and the CPU info is showing up as follows.</p> <pre><code> "cpu": { "time": "2016-08-04T22:48:22Z", "usage...
<blockquote> <p>If a process were to run on one cpu continuously for a second, its usage will be 1e+9 nanoseconds. If it ran on <code>n</code> cores continuously its usage will n * 1e+9 nanoseconds. </p> <p>Percentage will be usage_in_nanoseconds / (capacity_in_absolute_cores * 1e+9).</p> </blockquote> <p...
<p>root@k8s:/opt/k8s/kubernetes/cluster/ubuntu/binaries# ./kubectl logs jnlp-slave-1c45182a61</p> <pre><code>Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main createEngine INFO: Setting up slave: jnlp-slave-1c45182a61 Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main$CuiListener &lt;init&gt; INFO: Jenkins agent is run...
<p>Please check <a href="http://jenkins_server_ip:8080/configureSecurity/" rel="noreferrer">http://jenkins_server_ip:8080/configureSecurity/</a></p> <p><strong>[TCP port for JNLP slave agents]</strong> should <strong>NOT</strong> be [Disable]</p>
<p>My understanding is that Docker creates an image layer at every stage of a dockerfile.</p> <p>If I have X containers running on the same machine (where X >=2) and every container has a common underlying image layer (ie. debian), will docker keep only one copy of the base image on that machine, or does it have multi...
<p>Dockers <a href="https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/" rel="noreferrer">Understand images, containers, and storage drivers</a> details most of this.</p> <p>From Docker 1.10 onwards, all the layers that make up an image have an SHA256 secure content hash associated with them at...
<p>Hi i tried the new annotation for ingress explained <a href="https://stackoverflow.com/questions/37001557/how-to-force-ssl-for-kubernetes-ingress-on-gke">here</a> </p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ssl-iagree-ingress annotations: kubernetes.io/ingress.allowHTTP: "fal...
<p>Well i was able to resolve the issue, thanks to Mr Danny, from this pull request <a href="https://github.com/kubernetes/contrib/pull/1462" rel="noreferrer">here</a>, there was a typo in</p> <pre><code>kubernetes.io/ingress.allowHTTP: "false" </code></pre> <p>change it to </p> <pre><code>kubernetes.io/ingress.allo...
<p>I have a Kubernetes PetSet with name == <code>elasticsearch</code> and serviceName == <code>es</code>. It does create pods and, as expected, they have names like <code>elasticsearch-0</code> and <code>elasticsearch-1</code>. However, DNS does not seem to be working. <code>elasticsearch-0.es</code> does not resolve (...
<p>This was an issue of me mis-reading the documentation. <a href="http://kubernetes.io/docs/user-guide/petset/#peer-discovery" rel="noreferrer">The docs</a> say:</p> <blockquote> <p>The network identity has 2 parts. First, we created a headless Service that controls the domain within which we create Pets. The domai...
<p>We are in the process of move all our services over to Docker hosted on Google Container Engine. In the mean time we have have some services in docker and some not.</p> <p>Within Kubernetes services discovery is easy via DNS, but how do I resolve services from outside my container cluster? ie, How do I connect from...
<p>The solution I have for now is to use the service clusterIP address.</p> <p>You can see this IP address by executing <code>kubectl get svc</code>. This ip address is by default not static, but you can assign it when defining you service.</p> <p>From the documentation:</p> <blockquote> <p>You can specify your own clu...
<p>I deployed heapster with influxdb and grafana by following <a href="https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fkubernetes%2Fheapster%2Fblob%2Fmaster%2Fdocs%2Finfluxdb.md&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNEoYG3zwdLq02lqnQanNidvqs9fww" rel="nofollow noreferrer">heapster-influxDB guide</a>. When accessing ...
<p>It happens to be the <strong>Heapster</strong> master branch version is not compatible with some <strong>Kubernetes</strong> clusters. I tried following latest beta version and it works.</p> <pre><code>https://github.com/kubernetes/heapster/releases/tag/v1.2.0-beta.0 </code></pre>
<p>I have configured one Ubuntu system (192.168.1.2) to be a master and minion.</p> <p>Another Ubuntu machine to be a minion (192.168.1.3). I performed upgrade on Ubuntu machine that was both master and minion and rebooted the system. </p> <p>Now when I perform:</p> <p><code>kubectl get nodes</code></p> <p>The node...
<p>I am not aware of any script, but here are a few basic things might help:</p> <ol> <li>Please ensure that <code>kubelet</code> and <code>docker</code> services are running on the node in question.</li> <li>Run <code>kubectl describe node &lt;nodename&gt;</code> to get additional details.</li> <li>Get the logs of <c...
<p>I have deployed a Service into a kubernetes cluster and it looks like so:</p> <pre><code>$ kubectl get svc my-service NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE my-service 192.168.202.23 &lt;none&gt; 8080/TCP name=my-service 38d </code></pre> ...
<p>The type of the service that you have created is <code>ClusterIP</code> which is not visible outside the cluster. If you edit the service and change the <code>type</code> field to either <code>NodePort</code>, or <code>LoadBalancer</code>, it would expose it.</p> <p>Documentation on what those service types are and...
<p>When deleting Openshift apps, I have noticed that deleting its resources (e.g. deploymentConfig) before scaling the app's replicas can cause some odd behavior. Is it advisable to always scale down first (and why)? </p>
<p>Yes. I'd say that it is advisable, especially if you're having odd behavior occur because of it. However, it isn't necessary. </p> <p>Openshift does a great job of managing an application and all of its resources. Unfortunately, it doesn't do a great 'clean up' job. For instance, deleting the deployment config befo...
<p>Following instructions in the book of "Kubernetes Cookbook", I create a docker cluster with one master and two nodes:</p> <pre><code>master: 198.11.175.18 etcd, flannel, kube-apiserver, kube-controller-manager, kube-scheduler minion: etcd, flannel, kubelet, kube-proxy minion1: 120.27.94.15 minion2: 114...
<p>Resolved the problem with following procedure:</p> <pre><code> openssl genrsa -out /tmp/service_account.key 2048 sudo cp /tmp/service_account.key /etc/kubernetes/service_account.key sudo vim /etc/kubernetes/apiserver KUBE_API_ARGS="--secure-port=0 --service-account-key-file=/etc/kubernetes/service_a...
<p>I would like to be able to see all of the various things that happened to a kube cluster on a timeline, including when nodes were found to be dead, when new nodes were added, when pods crashed and when they were restarted.</p> <p>So far the best that we have found is <code>kubectl get event</code> but that seems to...
<ul> <li><p>My understanding is that Kubernetes itself dedups events, documented here: <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/event_compression.md" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/master/docs/design/event_compression.md</a> Once that happens, there is n...
<p>I installed minikube as instructed here <a href="https://github.com/kubernetes/minikube/releases" rel="nofollow">https://github.com/kubernetes/minikube/releases</a> and started with with a simple <code>minikube start</code> command. </p> <p>But the next step, which is as simple as <code>kubectl get pods --all-names...
<p>I ran into the same issue using my Mac and basically I uninstalled both minikube and Kubectl and installed it as follows:</p> <ol> <li>Installed Minikube.</li> </ol> <p>curl -Lo minikube <a href="https://storage.googleapis.com/minikube/releases/v0.8.0/minikube-darwin-amd64" rel="nofollow">https://storage.googleapi...
<p>I am trying to mount an NFS volume to my pods but with no success.</p> <p>I have a server running the nfs mount point, when I try to connect to it from some other running server </p> <p><code>sudo mount -t nfs -o proto=tcp,port=2049 10.0.0.4:/export /mnt</code> works fine</p> <p>Another thing worth mentioning is ...
<p>I tested version 1.3.4 and 1.3.5 of Kubernetes and NFS mount didn't work for me. Later I switched to the 1.2.5 and that version gave me some more detailed info ( kubectl describe pod ...). It turned out that 'nfs-common' is missing in the hyperkube image. After I added nfs-common to all container instances based on ...
<p>I'm trying to learn Kubernetes so I've deploy a single-node-cluster of Kubernetes 1.3.5 on Ubuntu 14.04 server.</p> <p>When I try to run a docker image <code>nginx</code> I get the error message <code>Failed to start with docker id [id-removed] with error: API error (400): {"message":"starting container with HostCo...
<p>From your <code>kubectl version</code> output, you are running v0.19.3 kubernetes, which is not compatible with docker v1.12. You may want to re-build/re-deploy a newer version of kuberentes.</p> <p>The version you wanted to run, "v1.3.5" should be compatible with docker v1.12.</p>
<p>I have been digging through the Kubernetes documentation for hours. I understand the core design, and the notion of services, controllers, pods, etc. </p> <p>What I don't understand, however, is the process in which I can declaratively configure the cluster. That is, a way for me to write a config file (or a set...
<p>If you're still looking, maybe this tool can help: <a href="https://github.com/kelseyhightower/compose2kube" rel="noreferrer">https://github.com/kelseyhightower/compose2kube</a></p> <p>You can create a compose file:</p> <pre><code># sample compose file with 3 services web: image: nginx ports: - "80" - ...
<p>About 7 hours ago i was working with kubectl without problems. Now (after a few hours of sleep, and a reboot of my computer) all kubectl get commands gives me this error:</p> <pre><code>Unable to connect to the server: net/http: TLS handshake timeout </code></pre> <p>I did not do anything since it worked besides s...
<p>So i found the problem.</p> <p>kubernetes was set to use the wrong context and cluster (i had created a GC project and deleted it again, and the created a new project).</p> <p>I got the new credentials from GC:</p> <pre><code>gcloud container clusters get-credentials CLUSTER_NAME_FROM_GC </code></pre> <p>To get ...
<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>When a pod should be terminated, Kubernetes does the following:</p> <ol> <li>Switch the Pod to the <code>Terminating</code> state</li> <li>Invoke the <code>preStop</code> hook (if any)</li> <li>Once the <code>preStop</code> hook ends, it sends a <code>SIGTERM</code> to the main process in the container (PID 1)</li>...
<p>I am unable to add a label to my kubernetes pod. Why is this not working?</p> <pre><code>$ kubectl describe pods secure-monolith | grep Label Labels: app=monolith $ kubectl label pods secure-monolith "secure=enabled" pod "secure-monolith" labeled $ kubectl describe pods secure-monolith | grep Label Labels: ...
<p>You are grepping through the <code>describe</code> output, but only the first line of labels description contains <code>Label</code> string.</p> <p>Labels output for two labels looks as follows:</p> <pre><code>Labels: a=b c=d </code></pre> <p>So <code>secure=enabled</code> is there, you ju...
<p>I have a kubernetes cluster running on GCE.</p> <p>I created a setup in which I have 2 <em>pods</em> <code>glusterfs-server-1</code> and <code>glusterfs-server-2</code> that are my gluster server.</p> <p>The 2 <code>glusterfsd</code> daemon correctly communicate and I am able to create replicated volumes, write fi...
<p>You can modify <code>resolv.conf</code> and use the full service names to avoid collisions. Usually are like this: <code>service_name.default.svc.cluster.local</code> and <code>service_name.kube-system.svc.cluster.local</code> or whatever namespace is named.</p>
<p>I have a composite service S.c which consumes 2 atomic service S.a and S.b where all three services are running in Kubernetes cluster. What would be a better pattern</p> <p>1) Create Sa,Sb as a headless service and let Sc integrate with them via external Loadbalancer like NGINX+ (which uses DNS resolver to maintain...
<p>Using DNS + cluster IPs is the simpler approach, and doesn't require exposing your services to the public internet. Unless you want specific load-balancing features from nginx, I'd recommend going with #2.</p>
<p>I know that Kubernetes has 5 modules: <code>kube-apiserver, kube-controller-manager, kube-scheduler</code> in Master nodes and <code>kubelet, kube-proxy</code> in Minion nodes. How do they communicate with etcd? Will they all query or set data in etcd? or only some of them do?</p> <p><a href="http://kubernetes.io/d...
<p>The docs you linked to are correct -- only the apiserver communicates directly with etcd. The rest of the system components communicate with etcd <em>indirectly</em> through the apiserver. </p> <p>Also note that the blog post you linked to is just about 2 years old, and it may have been accurate at the time, but th...