prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I'm running a service written in go in a pod in Kubernetes. The service doesn't expose an HTTP interface; it's processing work from a queue.</p> <p>I could:</p> <ul> <li>Use an executable liveness check to see if the process is running</li> <li>Expose an HTTP health check endpoint</li> <li>Use expvars to expose ba...
<p>I won't get into reasoning about the convenience of instrumenting the process running into the pod to focus on the question.</p> <p>I'd avoid creating another process inside the container to expose data, or modify the current process just to expose health endpoint, so I'd choose the liveness check exec way. It does...
<p>I wanted to know what is the difference between a Replication Controller and a Deployment within Kubernetes (1.2). Going through the getting started document (<a href="http://kubernetes.io/docs/hellonode/">http://kubernetes.io/docs/hellonode/</a>) I have created a deployment - but it doesn't show up on the web UI.</...
<p>Deployments are a newer and higher level concept than Replication Controllers. They manage the deployment of Replica Sets (also a newer concept, but pretty much equivalent to Replication Controllers), and allow for easy updating of a Replica Set as well as the ability to roll back to a previous deployment.</p> <p>P...
<p>I have a Kubernetes cluster running on Google Cloud Platform. I have 3 nodes and several pods running on these nodes.</p> <p>One of the pods runs Ghost blog platform and has mounted a <code>gcePersistentDisk</code> volume. The <code>manifest</code> file to create the pod:</p> <pre><code>apiVersion: extensions/v1be...
<p>If your development machine is not part of the GCE cluster (i.e. a GCE VM), then you will not be able to directly mount it. Your best bet in that case would be to SSH to it via a machine it is mounted it (i.e the node your pod is scheduled to).</p>
<p>I'm working on an application deployment environment using Kubernetes where I want to be able to spin up copies of my entire application stack based on a Git reference for the primarily web application, e.g. "master" and "my-topic-branch". I want these copies of the app stack to coexist in the same cluster. I can cr...
<p>The documentation on putting different versions in different namespaces is a bit incorrect I think. It is actually the point of namespaces to separate things completely like this. You should put a complete version of each "track" or deployment stage of your app into its own namespace.</p> <p>You can then use hardco...
<p>I am hoping to find a good way to automate the process of going from code to a deployed application on my kubernetes cluster.</p> <p>In order to build and deploy my app I need to first build the docker image, tag it, and then push it to ECR. I then need to update my deployment.yaml with the new tag for the docker i...
<p>My colleague has a good blog post about this topic:</p> <p><a href="http://blog.jonparrott.com/building-a-paas-on-kubernetes/">http://blog.jonparrott.com/building-a-paas-on-kubernetes/</a></p> <p>Basically, Kubernetes is not a Platform-as-a-Service, it's a toolkit on which you can build your own Platform-a-as-Serv...
<p>I was playing around with this: <a href="http://kubernetes.io/docs/user-guide/deployments/" rel="noreferrer">http://kubernetes.io/docs/user-guide/deployments/</a> in my infrastructure. I have a few deployments where I need replicas - but I have a couple where i only want one replica inside the deployment - however h...
<p>I believe you want to set <a href="http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_rollingupdatedeployment" rel="noreferrer">maxUnavailable</a> (which defaults to 1) to 0. This should prevent Kubernetes from taking down any existing pods prior bringing a healthy one up. <code>maxSurg...
<p><code>kubectl get</code> command has this flag <code>-o</code> to format the output.</p> <p>Is there a similar way to format the output of the <code>kubectl describe</code> command?</p> <p>For example:</p> <pre><code>kubectl describe -o="jsonpath={...}" pods my-rc </code></pre> <p>would print a JSON format for t...
<p><code>kubectl describe</code> doesn't support <code>-o</code> or equivalent. It's meant to be human-readable rather than script-friendly. You can achieve what you described with <code>kubectl get pods -l &lt;selector_of_your_rc&gt; -o &lt;output_format&gt;</code>, for example:</p> <pre><code>$ kubectl get pods -l a...
<p><a href="http://kubernetes.io/docs/user-guide/deployments/#the-status-of-a-deployment" rel="noreferrer">The status of a deployment</a> indicates that you can look at a deployments <code>observedGeneration</code> vs <code>generation</code> and when <code>observedGeneration &gt;= generation</code> then the deployment ...
<p><strong>Update #2:</strong> Kubernetes 1.5 will ship with a much better version of <code>kubectl rollout status</code> and improve even further in 1.6, possibly replacing my custom solution/script laid out below.</p> <p><strong>Update #1:</strong> I have turned my answer into a <a href="https://github.com/timoreima...
<p>I have a ruby on rails app on kubernetes.</p> <p>Here's what I do</p> <ol> <li><p>kubernetes rolling-update <code>new_file</code></p></li> <li><p>Kubernetes began to create new pods </p></li> <li><p>When the new pods are ready, Kubernetes kills the old pod.</p></li> </ol> <p>However, although my new pod are in re...
<p>This sounds like a prime example for a readiness probe: It tells Kubernetes to not take a pod into load balancing until a certain condition holds, often an HTTP endpoint that returns positively. Here's an example probe defined along a Deployment specification:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Dep...
<p>I am trying to implement logging on my AWS/CoreOS/Kubernetes (1.1) setup, which I've set up without kube-up. So far I've installed fluentd as a static <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/cluster/saltbase/salt/fluentd-es/fluentd-es.yaml" rel="nofollow">pod</a> on all nodes and the <a hr...
<p>The 503 from Elasticsearch is likely the issue. It should be returning a 200 if all is well. Your first step should be to look at the Elasticsearch logs. You can do this with the <code>kubectl logs POD</code> command. Your es-controller and es-service YAML appears to be correct.</p> <p>One thing to note is that ...
<p>I'm trying to expose the "kube-dns" service to be available to be queried outside of the Kubernetes cluster. In order to do this I edited the "Service" definition to change "type" from "ClusterIP" to "NodePort" which seemed to work fine.</p> <p>However, when I attempt to query on the node port, I'm able to get a TC...
<p>Are you querying on the tcp port or the udp port?</p> <p>I changed my kube-dns to be a NodePort service:</p> <pre><code>$ kubectl describe services kube-dns --namespace kube-system Name: kube-dns Namespace: kube-system Labels: k8s-app=kube-dns kubernetes.io/cluster-service=true ...
<p>In kubernetes we got this replication controller which takes care of maintaining specified number of pods running in a given cluster. What is equivalent in docker-swarm world, do we have any? There is container restart option, does it work if one machine in the cluster goes down. </p>
<p>In Swarm the rescheduling of containers is supported as a stable feature since <a href="https://github.com/docker/swarm/releases" rel="nofollow">v1.2.0</a>, before that containers would only restart on the same host, and disappear if the host was terminated.</p> <p>There is no building block similar to replication ...
<p>I am trying create a bunch of pods, services and deployment using Kubernetes, but keep hitting the following errors when I run the <code>kubectl describe</code> command.</p> <p><code>for "POD" with RunContainerError: "runContainer: API error (500): Cannot start container bbdb58770a848733bf7130b1b230d809fcec3062b2b1...
<p>You can confirm which process is hogging file descriptors by running:</p> <pre><code>lsof | awk '{print $2}' | sort | uniq -c | sort -n </code></pre> <p>That will give you a sorted list of open FD counts with the pid of the process. Then you can look up each process w/</p> <pre><code>ps -p &lt;pid&gt; </code></pr...
<p>I've setup some services and ingresses to try out the SSL termination. I had no problem at all with <code>LoadBalancer</code> and <code>NodePort</code> services as backend but it's not working at all with <code>ClusterIP</code> service.</p> <p>Although the Ingress' backend is described as healthy, I get an HTTP err...
<p><a href="https://github.com/kubernetes/kubernetes/issues/26508#issuecomment-222376886">The native GKE Ingress controller do not support <code>ClusterIP</code>, only <code>NodePort</code> is working.</a></p> <p>Non-native Ingress controllers such as the nginx one do work with <code>ClusterIP</code> services.</p>
<p>I have a Kubernetes cluster on GKE. I know Kubernetes will spread pods with the same labels, but this isn't happening for me. Here is my node description.</p> <pre><code>Name: gke-pubnation-cluster-prod-high-cpu-14a766ad-node-dpob Conditions: Type Status LastHeartbeatTime ...
<p>By default, pods run with unbounded CPU and memory limits. This means that any pod in the system will be able to consume as much CPU and memory on the node that executes the pod. <a href="http://kubernetes.io/docs/admin/limitrange/" rel="nofollow">http://kubernetes.io/docs/admin/limitrange/</a></p> <p>When you don'...
<p>I have a hard time trying to set up my (test) Kubernetes cluster so that it have a few users and a few namespaces, and a user can only see specific namespaces. Is there a way to do that? If yes, what is needed to</p> <ol> <li>Create a user</li> <li>Limit a user to a specific namespace or namespaces</li> <li>Use Kub...
<p>You could setup ABAC (<a href="http://kubernetes.io/docs/admin/authorization/" rel="nofollow noreferrer">http://kubernetes.io/docs/admin/authorization/</a>) and limit users to namespaces:</p> <p>In the policy file you would have something like this if your user was <code>bob</code> and you wanted to limit him to th...
<p>I've been using Kubernete's <code>LoadBalancer</code> type service for incoming traffic on AWS. However, it is hard to terminate SSL at a service level, thus the idea of using an Ingress.</p> <p>However, a <code>LoadBalancer</code> service allows us to make as many rolling changes as we like to our deployments with...
<blockquote> <p>Is there a way to point a Kubernetes to point to an Ingress controller or use a service type LoadBalancer with an Ingress controller to terminate SSL.</p> </blockquote> <p>You can simply deploy the on metal (nginx, haproxy, traefic...) ingress controllers as a pod/daemonset/rc in your cluster, and fr...
<p>I'm trying to create a Cassandra cluster in Kubernetes. I want to use <code>awsElasticBlockStore</code> to make the data persistent. As a result, I've written a YAML file like following for the corresponding Replication Controller:</p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: cassandr...
<p>You are correct, one EBS volume can only be mounted on a single EC2 at a given time. To solve you have the following options:</p> <ul> <li>Use multiple EBS volumes with multiple Replication Controllers</li> <li>Use a distributed file system (e.g. Gluster) and avoid EBS issue</li> <li>Follow along with PetSet (<a hr...
<p>I'm trying to create an nginx proxy that forwards requests to <code>/&lt;service&gt;</code> to <code>http://&lt;service&gt;</code>. I first tried the following:</p> <pre><code>location ~ ^/(.+)$ { set $backend "http://$1:80"; proxy_pass $backend; } </code></pre> <p>But it fails saying something like (when ...
<p>After much research and trial and error I managed to solve this. First I changed the pod specification to:</p> <pre><code>spec: containers: - name: nginx image: "nginx:1.10.0" ports: - containerPort: 8080 name: "external" protocol: "TCP" - name: dnsmasq image:...
<p>Are there any third party tools for Kubernetes UI? Such as to view pods on the main page or to edit the config of an object?</p>
<p>We are using <a href="https://github.com/ElasticBox/elastickube" rel="nofollow">https://github.com/ElasticBox/elastickube</a> to manage users and permissions to deploy services and pods.</p>
<p>I've setup Kubernetes with the steps below. Everything looks fine - but it's running on a single node/server. </p> <p>Now I want to take the next step for running on multiple nodes. I wonder where should I configure my physical servers ip's so I could create the pod in more than one physical server.</p> <p>I run:<...
<p>Sounds like you want to setup a multi-node cluster, there are numerous ways to do that (<a href="http://kubernetes.io/docs/getting-started-guides/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/</a>). </p> <p>If you want a local solution on your machine, the vagrant way or the docker way is pretty...
<p>Are there any third party tools for Kubernetes UI? Such as to view pods on the main page or to edit the config of an object?</p>
<p>There is the dashboard (<a href="https://github.com/kubernetes/dashboard" rel="nofollow">https://github.com/kubernetes/dashboard</a>) or the now deprecated kube-ui (<a href="https://github.com/kubernetes/kube-ui" rel="nofollow">https://github.com/kubernetes/kube-ui</a>). </p> <p>Also I've played with Weave Scope wh...
<p>Are there any third party tools for Kubernetes UI? Such as to view pods on the main page or to edit the config of an object?</p>
<p>The <a href="http://fabric8.io" rel="nofollow">fabric8 console</a> provides a console to manage resources as well as full continuous delivery pipelines built on top of Kubernetes. Some great articles &amp; blog posts about it <a href="https://blog.fabric8.io/" rel="nofollow">here</a>.</p>
<p>I want to use websocket to access Kubernetes API, and so it is more convenient to send token like <code>wss://example.com" + url + "&amp;access_token=blahblahblah</code>. The official API doc sends token in header. Where can I find such a token and send it with url?</p> <p>What I want to do is to exec pods via a we...
<p>Bearer token authentication in the URL is not supported in Kubernetes currently, only as an <code>Authorization</code> header.</p>
<p>I've been using "kubectl run" with assorted flags to run Jobs interactively, but have recently outgrown what I can do with those flags, and have graduated to using YAML config files to describe my jobs.</p> <p>However, I can't find an equivalent to the "-i" and "--tty" flags, to attach to the Job I'm creating. </p...
<p>I think you are mentioning these fields. <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/types.go#L2081-L2088" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/types.go#L2081-L2088</a></p> <p>You can define <code>stdin</code> and <code>tty</code> in yam...
<p>I have a replication controller running with the following spec:</p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: owncloud-controller spec: replicas: 1 selector: app: owncloud template: metadata: labels: app: owncloud spec: containers: - name: o...
<p>Most probably heapster is running in a wrong namespace ("default"). HPA expects heapster to be in "kube-system" namespace. Please, add --namespace=kube-system to kubectl run heapster command.</p>
<p>I'm running a kubernetes cluster on GKE and I would like to discover and access the etcd API from a service pod. The reason I want to do this is to add keys to the SkyDNS hierarchy.</p> <p>Is there a way to discover (or create/expose) and interact with the etcd service API endpoint on a GKE cluster from application...
<blockquote> <p>I'm running a kubernetes cluster on GKE and I would like to discover and access the etcd API from a service pod. The reason I want to do this is to add keys to the SkyDNS hierarchy.</p> </blockquote> <p>It sounds like you want direct access to the etcd instance that is backing the DNS service (not th...
<p>I have linked a Persistent Volume to my Kubernetes Neo4j Replication Controller to store the DB data. Now I would like to download that data locally to run the production DB on my system. I can't find the way to download the Disk content. Can someone point me in the right direction?</p> <p>Updates (Persistent Volum...
<p>GCE's admin panel doesn't have a "download" button for persistent disks, but <code>gcloud</code> makes it easy to copy files from an instance to your local machine:</p> <p><code>gcloud compute copy-files example-instance:~/REMOTE-DIR ~/LOCAL-DIR --zone us-central1-a</code></p> <p>This will copy <code>~/REMOTE-DIR<...
<p>I've used <code>curl -sS https://get.k8s.io | bash</code> to create a cluster on Google Compute Engine using Kubernetes 1.2.4. This worked great. I wanted to enable ABAC authorization mode by adding a few flags to the <code>kube-apiserver</code> command specified in kube-apiserver pod spec.</p> <p>I'm unclear if I ...
<p>The customization that is built into the install script is in the environment variables that you can set to change behavior (see <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/config-default.sh" rel="nofollow">cluster/gce/config-default.sh</a>). If overriding one of these variables doesn't...
<p>I want to deploy spinnaker into our company kubernetes cluster. I've cloned the master branch of spinnaker and modified the spinnaker-local files accordingly. We use an internal docker registry so I copied the required images from dockerhub into our own one.</p> <p>When I start the "startup-all.sh" script it seems ...
<p>The "data-cassandra-keys" pod gets recreated by the Kubernetes Job controller, but should probably have its restart policy changed to avoid creating too many dead pods. It retries for some time because Cassandra can take a while to startup, and therefore shouldn't fail after the first attempt to create the keyspaces...
<p>We had a pod working great for about a month, and suddenly it cannot be scheduled anymore. Describing the pod seems to indicate that a disk is full or otherwise unavailable, but it's not very specific (see full output of describing the pod below).</p> <p>I have confirmed that the disk on this node has plenty of spa...
<p>NoDiskConflict is returned by the scheduler if you try to schedule a pod that is referencing a volume that is already referenced by another (already scheduled) pod and the volume does not support multiple mounts. GCE PD allow multiple mounts only if they're all read-only.</p> <p>So, make sure you have no more than ...
<p>I am using Kubernetes v1.2.4 @ <a href="https://github.com/kubernetes/kubernetes/releases/download/v1.2.4/kubernetes.tar.gz" rel="nofollow">https://github.com/kubernetes/kubernetes/releases/download/v1.2.4/kubernetes.tar.gz</a> It comes with Grafana v2.6.0. I tried to change /cluster/addons/cluster-monitoring/influx...
<p>I edited cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml</p> <pre><code>- image: privaterepo.net/grafana304 name: grafana env: resources: # keep request = limit to keep this container in guaranteed class limits: </code></pre> <p>And successfully ran gra...
<p>I understand that you can create a pod with Deployment/Job using kubectl run. But is it possible to create one with a volume attached to it? I tried running this command:</p> <pre><code>kubectl run -i --rm --tty ubuntu --overrides='{ "apiVersion":"batch/v1", "spec": {"containers": {"image": "ubuntu:14.04", "volum...
<p>Your JSON override is specified incorrectly. Unfortunately kubectl run just ignores fields it doesn't understand.</p> <pre><code>kubectl run -i --rm --tty ubuntu --overrides=' { "apiVersion": "batch/v1", "spec": { "template": { "spec": { "containers": [ { "name": "ubuntu"...
<p>I'm following <a href="http://kubernetes.io/docs/getting-started-guides/aws/" rel="nofollow noreferrer">this guide</a> to set up Kubernetes on an Ubuntu 14.04 image on AWS.</p> <pre><code>sudo apt-get update sudo apt-get install curl sudo apt-get install awscli aws configure # enter credentials, etc. # fix `locale...
<p>Looks to me like you are getting region and zone confused.</p> <p>Use the ec2-describe-regions command as follows to describe your regions.</p> <pre><code>PROMPT&gt; ec2-describe-regions REGION us-east-1 ec2.us-east-1.amazonaws.com REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com REGION ap-southeast-1 e...
<p>I have linked a Persistent Volume to my Kubernetes Neo4j Replication Controller to store the DB data. Now I would like to access this Drive to copy its content. The gcould api offers:<br> <code>gcloud compute ssh instance-name</code><br> but its not an instance its a drive, so how can you connect to it ?</p>
<p>You can't. You should think your disc as a physical disk. If your physical disk is unmounted then you can't access it. If you want to access to Neo4j data then the best way is through your Ne4j instance. Also you can mount this persistent disk in another instance and through it access to your data. Check <a href="h...
<p>as We know we can autoscale on pods so here actually I have 2 question:<br> 1. How to autoscaling nodes on kubernetes ?<br> 2. How to trigger autoscaling group with AWS ?</p>
<p>If you go to the AWS ASG in the web console and select the minion ASG</p> <p>example: <a href="https://us-west-2.console.aws.amazon.com/ec2/autoscaling/home?region=us-west-2#AutoScalingGroups:id=kubernetes-dev-minion-group-us-west-2a;view=details" rel="nofollow">https://us-west-2.console.aws.amazon.com/ec2/autoscal...
<p>I currently try to switch from the "Container-Optimized Google Compute Engine Images" (<a href="https://cloud.google.com/compute/docs/containers/container_vms" rel="nofollow">https://cloud.google.com/compute/docs/containers/container_vms</a>) to the "Container-VM" Image (<a href="https://cloud.google.com/compute/doc...
<p>This happens only when <code>kubelet</code> is run without the <code>--cloud-provider=gce</code> flag. The problem, unless is something different, is dependant on how GCP is launching Container-VMs.</p> <p>Please contact with google cloud platform guys.</p> <p><em>Note if this happens to you when using GCE:</em> A...
<p>As of Kubernetes 1.2, kube-proxy is now a pod running in the kube-system namespace.</p> <p>The old init script <strong>/etc/init.d/kube-proxy</strong> has been removed.</p> <p>Aside from simply resetting the GCE instance, is there a good way to restart kube-proxy?</p> <p>I just added an annotation to change the p...
<p>The kube-proxy is run as an addon pod, meaning the Kubelet will automatically restart it if it goes away. This means you can restart the kube-proxy pod by simply deleting it:</p> <pre><code>$ kubectl delete pod --namespace=kube-system kube-proxy-${NODE_NAME} </code></pre> <p>Where <code>$NODE_NAME</code> is the no...
<p>What is the recommended way to execute a container or pod based on a time-based schedule? For example, a task to run at 2am for 10 minutes every day. </p> <p>On a traditional linux server, crontab would easily work, and that obviously still is possible inside the container. However, since this task only executes...
<p>This is expected to be supported in 1.3: <a href="https://github.com/kubernetes/kubernetes/pull/11980" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/11980</a> </p> <p>UPDATE: </p> <blockquote> <p>didn't meet the 1.3 deadline so it'll sleep into 1.4</p> </blockquote> <p><a href="https://github.c...
<p>I have to create a huge number of Docker container on different hosts (e.g. 50 container each on 3 hosts). These container all have the same image, configuration etc. and only the network address and ID of each container should be different (so basically I want to create a huge virtual container network). Is there a...
<p>This is exactly the type of use case that Kubernetes is well suited for. </p> <p>You should use a <a href="http://kubernetes.io/docs/user-guide/replicasets/" rel="nofollow">Replica Set</a>. When creating your Replica Set, you specify a template that tells the system how to create each container instance along with ...
<p>The kube-proxy gets the Services and Endpoints information from the master api, but how?</p> <p>According to these links:</p> <p><a href="http://kubernetes.io/docs/user-guide/services/#proxy-mode-iptables" rel="nofollow">http://kubernetes.io/docs/user-guide/services/#proxy-mode-iptables</a> </p> <p><a href="https...
<p>The sync period is how often we force-refresh the whole state, rather than just doing incremental deltas. This is a safegauard against potential bugs that might cause syncronized state to drift.</p>
<p>I'm trying to figure out how to create multiple ingress resources that share an IP. Or, if that isn't possible, I'd like to know if there's some sort of forwarding rule I can use in conjunction with a Cloud DNS entry that ensures all traffic to an IP (which I can make static) goes to one kubernetes cluster.</p> ...
<p>Each ingress resource will have a separate IP. If you need to share a single IP between domains, then you will need to configure both domains in the same ingress resource. Try <code>kubectl edit</code> if you don't want to patch directly on the command line. </p>
<p>I have a Replication Controller with one replica using a secret. How can I update or recreate its (lone) pod—without downtime—with latest secret value when the secret value is changed?</p> <p>My current workaround is increasing number of replicas in the Replication Controller, deleting the old pods, and changing th...
<p>A couple of issues <a href="https://github.com/kubernetes/kubernetes/issues/9043" rel="nofollow">#9043</a> and <a href="https://github.com/kubernetes/kubernetes/issues/13488" rel="nofollow">#13488</a> describe the problem reasonably well, and I suspect a rolling update approach will eventuate shortly (like most thin...
<p>I have followed the instructions (<a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow">https://cloud.google.com/container-engine/docs/tutorials/http-balancer</a>, and <a href="http://kubernetes.io/docs/user-guide/ingress/" rel="nofollow">http://kubernetes.io/docs/user-guide...
<blockquote> <p>I understand that the Ingress controller will automatically allocate an external/public IP for me, but this is not exactly what I need. Am I able to decide what IP I want?</p> </blockquote> <p>You can ask Google for a static global IP address, which can then be used for your L7 load balancing (you wo...
<p>I am trying to configure kubernetes horizontal pod autoscaling. The definition of my deployment is <a href="http://pastebin.com/bPG1hF2a" rel="nofollow">here</a>. </p> <p>I start heapster deployment and heapster service like below:</p> <pre><code># kubectl run heapster --namespace=kube-system --image=gcr.io/google...
<p>Most likely the problem is that you're not running DNS in your cluster.</p> <p>HPA currently uses heapster service name to read metrics. You have properly created it, but HPA controller cannot resolve service name to IP address as there's not DNS in your cluster.</p> <p>I have create issue <a href="https://github....
<p>I have followed the <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow">GKE tutorial</a> for creating an HTTP Load Balancer using the beta Ingress type and it works fine when using the nginx image. My question is about why Ingress is even necessary. </p> <p>I can create a...
<p>While you can create "unmanaged" HTTP Load Balancer by yourself, what happens when you add new deployments (pods with services) and want traffic to be routed to them as well (perhaps using URL Maps)?</p> <p>What happens when one of your services goes down for some reason and the new service allocates another node p...
<p>I have the following <code>pvc</code> (Persistent Volume Claim):</p> <pre><code>piVersion: v1 kind: PersistentVolumeClaim metadata: name: test-claim-web spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi </code></pre> <p>and the Google Cloud-backed <code>pv</code> (Persistent...
<blockquote> <p>if I delete and recreate the pv, kubectl get pvc,pv will show [bound]. Why is the pvc still Bound?</p> </blockquote> <p>That's bug in Kubernetes 1.2, it will be fixed in 1.3. Both PV and PVC should get Bound eventually.</p> <p>However, deleting a bound PV is very bad idea, as the PVC may be used i...
<p>I'm newbie at kubernetes and I'm having problem to understand how I can run persistent pods (Cassandras ones or mysql ones) in ubuntu servers. </p> <p>Correct me if I'm wrong, kubernetes can scale up or down the pods when it sees that we need more CPU but we are not talking about static code but data that are prese...
<p>You should use <a href="http://kubernetes.io/docs/user-guide/volumes/" rel="nofollow">volumes</a> to map a directory in the container to persistent disks on the host or other storage</p>
<p><a href="https://stackoverflow.com/questions/26705201/whats-the-difference-between-apaches-mesos-and-googles-kubernetes">What&#39;s the difference between Apache&#39;s Mesos and Google&#39;s Kubernetes</a></p> <p>I read the accepted answers but I'm still confused what the differences are.</p> <p>If Kubernetes is a...
<p>Mesos is another abstraction layer. It simply abstracts underlying hardware so the software that want to run on the top of it could only define required resources without having to know any other information. </p> <p>Kubernetes could do similar thing but without abstraction provided by Mesos you can't run other fra...
<p>Can any one help me understanding this error I am getting while trying to set-up kubernetes. I am trying to follow this <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/gce.html" rel="noreferrer">url</a> and run the command </p> <pre><code>$ curl -sS https://get.k8s.io | bash ERROR: (gcloud.components...
<p>The problem is that some ubuntu (and others) distro come with the google cloud SDK installed through the local package manager, but it doesn't contain everything. kubectl for example is missing as seen with this command:</p> <pre><code>gcloud components list </code></pre> <p>when you try to add the needed componen...
<p>So I've been trying to implement ABAC authorization in the kubernetes API, with the following arguments in my kube-api manifest file.</p> <pre><code> - --authorization-mode=ABAC - --authorization-policy-file=/etc/kubernetes/auth/abac-rules.json </code></pre> <p>And the following content in the abac-rulse.json f...
<p>Figured out the answer, documenting here for anyone else having the same issue with ABAC.</p> <p>The kubelet user is define in the worker configuration, which in my case is a yaml file which i store here - <code>/etc/kubernetes/worker-kubeconfig.yaml</code>, the content of which is shown below:</p> <pre><code>apiV...
<p>I would like to avoid using <code>type: "LoadBalancer"</code> for a certain Kubernetes Service, but still to be able to publish it on the Internet. I am using Google Cloud Platform (GCP) to run a Kubernetes cluster currently running on a single node.</p> <p>I tried to us the <code>externalIPs</code> Service configu...
<p>If you don't want to use a <code>LoadBalancer</code> service, other options for exposing your service publicly are:</p> <h2>Type <code>NodePort</code></h2> <p>Create your service with <code>type</code> set to <code>NodePort</code>, and Kubernetes will allocate a port on all of your node VMs on which your service w...
<p>When moving file to <code>/usr/local/bin</code> it says:</p> <pre><code>mv: inter-device move failed: 'kubectl' to '/usr/local/bin/kubectl'; unable to remove target: Read-only file system </code></pre> <p>I already try <code>chmod</code></p> <p>How can the CoreOS directory be made writable?</p>
<p>In CoreOS the <code>/usr</code> partition is read-only by design, so <code>/usr/local/bin/</code> will be read-only too (unless you mount another disk there). This allows for the auto-updating CoreOS uses to keep the OS current. You can see the partition layout <a href="https://coreos.com/os/docs/latest/sdk-disk-par...
<p>My GKE clusters are not monitored by Stackdriver, despite having Cloud Monitoring enabled. In particular <a href="https://app.google.stackdriver.com/gke" rel="nofollow noreferrer">https://app.google.stackdriver.com/gke</a> simply reports &quot;You do not have any resources of this type being monitored by Stackdriver...
<p>it turns out that Stackdriver had a problem of not properly displaying new-ish clusters in its UI. Metrics were being properly collected and were available via <a href="https://cloud.google.com/monitoring/api/v3/" rel="nofollow">their API</a> the entire time. The problem should now be resolved, but the team is very ...
<p>I run 1 kafka and 3 zookeeper-server in docker on kubernetes following this <a href="http://www.defuze.org/archives/351-running-a-zookeeper-and-kafka-cluster-with-kubernetes-on-aws.html" rel="noreferrer">instruction</a>. I cannot produce/consume topics outside pod(docker container).</p> <pre><code>bin/kafka-console...
<p>Kafka register to zookeeper with its service's name. And consuming/producing messages need access to the service names(here is dns records on zookeeper-1, zookeeper-2, zookeeper-3), which are only accessible through kubernetes' dns. So only application running on kubernetes can access my kafka. Therefore I cannot us...
<p>I've tried running 2 Kubernetes pods on a single-node GKE cluster, sharing a read-only GCE persistent disk, but while one pod successfully runs, the other is stuck in the <code>ContainerCreating</code> state.</p> <p>The container is very simple:</p> <pre><code>FROM debian:jessie CMD ["/bin/sh", "-c", "while true; ...
<p>Glen, you're hitting <a href="https://github.com/kubernetes/kubernetes/issues/19953" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/19953</a></p> <p>There's no good workaround for this.</p> <p>It's fixed by <a href="https://github.com/kubernetes/kubernetes/pull/26351" rel="nofollow">https://github....
<p>We are using Kubernetes and we have multiple tomcat/jws containers running on multiple pods. What would be best approach for centralized logging using <strong>fluentd, Elasticsearch and Kibana.</strong> The <strong>main purpose is to get the tomcat logs which are running in pods</strong> (example: access.log and ca...
<p>have a look at this example:</p> <p><a href="https://github.com/kubernetes/contrib/tree/master/logging/fluentd-sidecar-es" rel="nofollow">https://github.com/kubernetes/contrib/tree/master/logging/fluentd-sidecar-es</a></p> <p>The basic idea is to deploy an additional fluentd container in your pod and share a volum...
<p>In order to run a load test of an application I’m developing, I’m creating a Google Container Engine (GKE) cluster, create a couple of persistent disks, run a whole bunch of kubectl commands, run my benchmark, save the results, then delete the GKE cluster again.</p> <p>The kubectl commands are responsible for label...
<p>Check out <a href="https://cloud.google.com/deployment-manager/docs/" rel="nofollow">Cloud Deployment Manager</a>. It allows you to declaratively create a GKE cluster and then adding resources to the cluster. I'm not sure if it will label the nodes for you. To accomplish that, one option is to create multiple <a hre...
<p>I think this may be an XY problem, so I'll include the context of the question since I don't know the best way to solve this problem.</p> <p>I have a kubernetes environment set up on AWS such that I have two parts, an nginx container, and a backend service (which I'll call SvcA). Since the backend service can come ...
<p>i am not sure if you need a dns.</p> <p>you can do something like this, even if the URL is hardcoded eg docker-compose.yml</p> <pre><code>version: '2' services: service1: ... networks: back-tier: ipv4_address: "172.16.238.10" service2: ... networks: back-tier: ipv4_adre...
<p>I am following the tutorial from <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html" rel="nofollow noreferrer">Kubernetes on AWS</a> by Coreos (I need a Cloudformation template) to create a Kubernetes inside my already existing VPC.</p> <p>Everything is configured properly and the cluster was...
<p>The CoreOS-kubernetes tooling is meant to deploy a fully functioning Kubernetes cluster, but leave optional/ addon applications as a decision for the cluster admin. In this case kibana &amp; grafana are not strictly required for a fully functioning cluster -- so they are not deployed by default.</p> <p>Similarly wi...
<p>Many of the run-throughs for deploying Kubernetes master nodes suggest you use <code>--register-schedulable=false</code> to prevent user pods being scheduled to the master node (e.g. <a href="https://coreos.com/kubernetes/docs/latest/deploy-master.html" rel="noreferrer">https://coreos.com/kubernetes/docs/latest/depl...
<p>Running pods on the master node is definitely possible. </p> <p>The security risk you mention is one issue, but if you configure service accounts, it isn't actually much different for all deployed pods to have secure remote access to the apiserver vs. insecure local access. </p> <p>Another issue is resource conten...
<p>I'm also trying to expose a mysql server instance on a local kubernetes installation(1 master and one node, both on oracle linux) but I not being able to access to the pod.</p> <p>The pod configuration is this:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: mysql labels: name: mysql spec: contai...
<p>The NodePort is exposed on each Node in your cluster via the kube-proxy service. To connect, use the IP of that host (Node01) to connect to:</p> <p><code>telnet [IpOfNode] 30306 </code></p>
<p>We're running a lot of applications in Kubernetes and handle TLS termination inside a pod with HAProxy and a certificate generated with LetsEncrypt.</p> <p>This works really well for traffic coming from outside the Kubernetes cluster because the requests use the domain name as specified in the certificate.</p> <p>...
<p>I can think of a couple of options that you could pursue:</p> <ol> <li><p>You could have the requests that transit just the cluster run over http instead of https if you trust the security of your cluster network.</p></li> <li><p>You could have your HAProxy instance serve a different certificate to internal request...
<p>I am trying to model stateful component/services (e.g. CouchBase, Postgres, etc) in Kubernetes. In Kubernetes, replication controller object requires a template for pod to cookie cut (replicate) pods. If the pod is for a stateful component, then the template will be required to include the persistent volume claim. I...
<p>Today you would probably need to create a ReplicationController for each replica or component in your app. So if you have a 3 node replica of say Postgres, you would create 3 controllers for that. </p> <p>You could look at helm (<a href="https://helm.sh/" rel="nofollow">https://helm.sh/</a>) to help out here as wel...
<p>The only way to create a new namespace according to <a href="https://coreos.com/kubernetes/docs/latest/deploy-master.html" rel="nofollow">documentation</a> here is to make an API request</p> <pre><code>curl -v -X POST -d'{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"kube-system"}}' -H "Content-Type: app...
<p>As Timo mentioned, you can use <code>kubectl create namespace NAME</code> to create a namespace using the command line client. You can also put the following into a yaml file and use <code>kubectl create -f namespace.yaml</code> to create a namespace:</p> <pre><code>apiVersion: v1 kind: Namespace metadata: name: ...
<p>My /etc/kubernetes/config as below:</p> <pre><code>KUBE_LOGTOSTDERR="--logtostderr=false" KUBE_LOG_LEVEL="--v=5" KUBE_ALLOW_PRIV="--allow-privileged=false" KUBE_MASTER="--master=http://127.0.0.1:8080 --log-dir=/var/log/kubernetes --stderrthreshold=1" </code></pre> <p>/etc/kubernetes/controller-manager like this:"<...
<p>It's not <code>--node-monitor-grace-period=10s --pod-eviction-timeout=10s</code> useless, the point is "controller-manager" didn't load those parameters! I use command <code>/bin/systemctl restart kube-controller-manager.service</code> to start kube-controller-manager, cat "/usr/lib/systemd/system/kube-controller-...
<p>Reading the documentation from <a href="http://kubernetes.io/docs/admin/kube-proxy/" rel="nofollow">http://kubernetes.io/docs/admin/kube-proxy/</a> it doesn't look like I can connect to the apiserver via https.</p> <p>The same goes for scheduler and controller-manager, but those two maybe are supposed to run on the...
<p>This is embarrassing. Looks like all daemons support a "--kubeconfig" flag that gives access to public and private key for authorization.</p>
<p>I installed kubernetes 1.2.4 on 3 REHEL7 servers (no internet access, everything is pushed by ansible).</p> <p>EDIT: See the end of the question</p> <p>I've got everything working great excepting the kube-dns example given in documentation. I made several tests, several configuraiton, recreate the entire pods... A...
<p>One of your DNS containers isn't ready. That's what "Ready 3/4" means.</p> <p>The best bet is to use the <code>kubectl logs &lt;pod&gt; &lt;container&gt;</code> command to get the logs of the container that is failing. You can add <code>kubectl logs --previous ...</code> if you need to get the logs from a contain...
<p>I know that GKE is driven by kubernetes underneath. But I don't seem to still get is that what part is taken care by GKE and what by k8s in the layering? The main purpose of both, as it appears to me is to manage containers in a cluster. Basically, I am looking for a simpler explanation with an example. </p>
<p>GKE is a managed/hosted Kubernetes (i.e. it is managed for you so you can concentrate on running your pods/containers applications)</p> <p>Kubernetes does handle:</p> <ul> <li>Running pods, scheduling them on nodes, guarantee no of replicas per Replication Controller settings (i.e. relaunch pods if they fail, relo...
<p>I'm also trying to expose a mysql server instance on a local kubernetes installation(1 master and one node, both on oracle linux) but I not being able to access to the pod.</p> <p>The pod configuration is this:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: mysql labels: name: mysql spec: contai...
<blockquote> <p>I'm still not sure how to make clients connect to a single server that transparently routes all connections to the minions. </p> </blockquote> <p>-> To do this you need a load balancer, which unfortunately is not a default Kubernetes building bloc.</p> <p>You need to set up a reverse proxy that will...
<p>Are Kubernetes CPU limits "hard" limits?</p> <p>Say I have a node with 1 CPU with two pods scheduled and running/ready/active, each with <code>requests.limits.cpu</code> of 500m. Pod A uses up 1 CPU for a while--this is normal/allowed. Eventually, pod B wants some CPU. Will Kubernetes (or Linux) make sure that pod ...
<p>Kubernetes just manages the containers. As far as I know, it is actually the container engine (Docker, rkt) which implements the CPU limitation. That limitation is not a hard limit, as you already observed. but rather a percentage of the available resources. </p> <p>Kubernetes (if set up with monitoring for this pu...
<p>Are Kubernetes CPU limits "hard" limits?</p> <p>Say I have a node with 1 CPU with two pods scheduled and running/ready/active, each with <code>requests.limits.cpu</code> of 500m. Pod A uses up 1 CPU for a while--this is normal/allowed. Eventually, pod B wants some CPU. Will Kubernetes (or Linux) make sure that pod ...
<p>For kubernetes v1.2+, CPU resource limits are enforced using hardcapping, and requests are enforced using shares.</p> <p>The change was noted in the <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md/#v120" rel="nofollow">release note</a> and there is an <a href="https://github.com/kubernete...
<p>I've install a Kubernetes 1.2.4 on 3 minons/master (1 master/minion, 2 minions) and installed the SkyDNS addons. After fixing SSL cert problems, I know have SkyDNS working. But kubeletes still says that I didn't set cluster-dns and cluster-domain.</p> <p>(see edits at the bottom)</p> <p>But you can see <code>--clu...
<p>I finally managed my problem... Shame on me (or not).</p> <p>I've taken kubelet sources to understand what happends and now I found. </p> <p>In the "kubelet" file, I set:</p> <pre><code>KUBE_ARGS="--cluster-dns=10.10.0.10 --cluster-domain=cluster.local" </code></pre> <p>And the log I added in source says that "c...
<p>In trying to achieve a highly available web server set up, I ran a load test against an extremely simple NGINX docker container serving a single static file.</p> <p>At first, I tried with a single node (n1-standard-4) &amp; single pod cluster, to benchmark how much one "unit" could do. This single node/pod setup co...
<p>If you want to run a preconfigured load test, you can check out the instructions for the <a href="https://github.com/kubernetes/contrib/tree/master/scale-demo" rel="nofollow">kubernetes scale-demo</a> that shows how to serve 1 million QPS of static files using nginx, which is very similar to your test setup. </p> <...
<p>My <code>kubectl version</code></p> <pre><code>Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"} Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a...
<p>Ah...your django container exited voluntarily without any error message, right after it was started, and that's <em>expected</em>. </p> <p>The django image comes with a default command of <code>python3</code>. Without overriding the command/args in the pod yaml file, the container will exit immediately.</p> <p>The...
<p>Is it possible to get the external IP address for a POD? It doesn't appear to be populating in the environmental variables for a service, so I was wondering if there was another way to get that information.</p> <p>Basically: I'm setting up a proftpd service, and it needs to send out its external ip as well as a por...
<p>The kubernetes service discovery mechanism (DNS or environment variable) doesn't populate the external IP.</p> <p>One way to work around is to create a static IP first, then assign it to your <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L2093-L2098" rel="nofollow">service</a>.</...
<p>I've created a 3 nodes GKE cluster which is running fine but I noticed a few times that my components are not able to reach the API Server during 3 or 4 minutes.</p> <p>I recently had the same problem again on a fresh new cluster so I decided to look a bit closer. In the Compute Engine Operations section I noticed ...
<p>The apiserver may become unreachable if it gets temporarily overloaded or if it is upgraded or repaired. This should be unrelated to routes being removed and recreated, although it's possible that the node manager does not behave correctly when it is restarted. </p>
<p>Using Replication controller when I schedule 2 (two) replicas of a pod I expect 1 (one) replica each in each Nodes (VMs). Instead I find both replicas are created in same pod. This will make 1 Node a single point of failure which I need to avoid.</p> <p>For 2 Pods: 1 pod in Node A, 1 pod in Node B</p> <p>For 3 Pod...
<p>Is it feasible that you have not labeled all your nodes with same key-value pairs?</p> <p>You need to ensure that each node in which you want Kubernetes to schedule your pod is having same key-value pair label and configuration are similar, as Kubernetes will schedule only on those nodes labeled with <code>kubernet...
<p>I got this errors when restarting or reinstalling Kubernetes, any clue how to solve them:</p> <p>... calling verify-prereqs Can't find the necessary components for the parallels vagrant provider. Possible reasons could be: - vmrun utility is not in your path - Vagrant plugin was not found. - VAGRANT_DE...
<p>If you take a look at <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/vagrant/util.sh#L46-L56" rel="nofollow">cluster/vagrant/util.sh</a>, the possible providers are: vmware_fusion, vmware_workstation, parallels, virtualbox, libvirt, vsphere.</p>
<p>What I am trying to do:</p> <p>I have setup kubernete cluster using documentation available on Kubernetes website (http_kubernetes.io/v1.1/docs/getting-started-guides/aws.html). Using kube-up.sh, i was able to bring kubernete cluster up with 1 master and 3 minions (as highlighted in blue rectangle in the diagram be...
<p>Setting up HA controllers for kubernetes is not trivial and I can't provide all the details here but I'll outline what was successful for me.</p> <ol> <li>Use kube-aws to set up a single-controller cluster: <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html" rel="nofollow">https://coreos.com/...
<p>I'm trying to isolate services from one another.</p> <p>Suppose <em>ops-human</em> has a bunch of mysql stores running on Google Container Engine, and <em>dev-human</em> has a bunch of node apps running on the same cluster. I do NOT want <em>dev-human</em> to be able to access any of <em>ops-human's</em> mysql inst...
<p>The Kubernetes Network-SIG team has been working on the network isolation issue for a while, and there is an experimental API in kubernetes 1.2 to support this. The basic idea is to provide network policy on a per-namespace basis. A third party network controller can then react to changes to resources and enforces t...
<p>I have installed minikube on my ubuntu 16.04 machine and have started a cluster, with a message </p> <p><code>"Kubernetes is available at https://192.168.99.100:443"</code></p> <p>Next, I deployed nginx service with the following command </p> <p><code>&gt; kubectl.sh run my-nginx --image=nginx --replicas=2 --por...
<blockquote> <p>1) Is node 127.0.0.1 my local development machine? This has got me confused me the most.</p> </blockquote> <p>When a node registers, you provide the IP or name to register with. By default, the node is just registering <code>127.0.0.1</code>. This is referencing your VM running linux, not your host...
<p>I need for each of my users to access a service at a custom url eg. abccompany.mycloudapp.com , each service being a kubernetes service I'm looking at ingress controllers but I need a way to use a wildcard host field and somehow read the value into the path: and service: fields ; here's a sample ingress controller o...
<p>If you use the stock controllers you will be able to switch on hostname and go to different backends services. It sounds like you don't want to enumerate all the subdomains -> service mappings, in which case you probably need to write your own controller that writes out an nginx config that uses $http_host in the ap...
<p>How can I publish a service in an AWS kubernetes cluster at a permanent IP address, so that I can add a DNS record? I define service <code>xxx</code> of type <code>LoadBalancer</code> in kubernetes, and <code>kubectl describe service xxx</code> gives me something like: </p> <pre><code>LoadBalancer Ingress: aae55c...
<p>For AWS ELB you cannot make a permanent IP address as the IP address for AWS ELB is dynamic and changes frequently. So you have to use "aae55ce563ca611e692c10a83aef9ddc-467886677.eu-west-1.elb.amazonaws.com" as the Canonical name for your application. Also refer this question <a href="https://stackoverflow.com/quest...
<p>I have a kubernetes container running on GCE.<br> One of the service is nginx that working as proxy, and with replication controller it hass 10 replicas.<br> Now i need to change the nginx.conf for some tweaking.<br> Is there a way for me to reload all the nginx pods? </p> <p>Right now the only way for me is scale...
<p>You can use <a href="http://kubernetes.io/docs/user-guide/rolling-updates/" rel="nofollow">rolling update</a> which creates a temporarpy replication controller to scale the new version of the pods up, and then scales down the old version afterwards.</p> <p>In the future, you might want to swtich to using <a href="h...
<p>I have a set of http server instances. We can assume a simple apache or nginx instances. However, the set of instances comprises of two sub-sets, (1) instances that runs in an infrastructure that fed by green energy (2) infra. that runs on regular grid energy. The two runs the SAME software stack, say kubernetes. A...
<p>You need a rediness probe on your Green pods. Cluster DNS will only work within a single cluster, so you will have to put both your nginx pods (green and grid) behind a single service, and use the DNS name of that service to talk to it. Then if one of the pods fails a readiness probe, all traffic directed to the clu...
<p>I have started playing with kubernetes. I followed the guide to set it up locally via minikube. I have perfectly managed to configure I am facing a weird issue. Whenever I try running some command using kubectl I get <strong>segmentation fault (core dumped)</strong>. Even when I tried accessing the directory 'kubect...
<p>I managed to solve this issue by removing all kubectl configurations and reinstalling it. Make sure after downloading, the binary is executable and move it into your PATH:</p> <pre><code>$ chmod +x kubectl $ mv kubectl /usr/local/bin/kubectl </code></pre>
<p>I have a local Kubernetes cluster on a single machine, and I successfully deployed a flask web app using apache server, so there shouldn't be any problem with the cluster setup. However, I need to upgrade the website to https, so I used <code>letsencrypt</code> to generate ssl certificates and volume mapped them int...
<p>I found the answer myself. 2 causes: (1) There is an environment variable specific to my web app that I forgot to set in <code>apache.wsgi</code>; (2) There are several small errors in the original apache configuration file. I post the working <code>/etc/apache2/sites-available/000-default.conf</code> here:</p> <pr...
<p>How can I publish a service in an AWS kubernetes cluster at a permanent IP address, so that I can add a DNS record? I define service <code>xxx</code> of type <code>LoadBalancer</code> in kubernetes, and <code>kubectl describe service xxx</code> gives me something like: </p> <pre><code>LoadBalancer Ingress: aae55c...
<p>As @error2007s said, you can't get a static IP for ELB. But if all you want is to assign a domain name to your ELB, then you can use a CNAME record pointing to <code>aae55ce563ca611e692c10a83aef9ddc-467886677.eu-west-1.elb.amazonaws.com</code>. If you're using Route53 you can also define an alias for better performa...
<p>facing some problem while using docker stats command in kubernetes.. While i using docker stats in my kube-node its not displaying the NET I/O.. My kube version is 1.2.4 and my docker version is 1.9.1.</p> <p>CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BL...
<p>There's a separate container that'll have the network stats for your entire pod, since all the containers in a pod share the same network namespace. If your container is named skydns and its pod is named kube-dns in the kube-system namespace (and thus the name of your skydns container looks something like <code>k8s_...
<p>I'm new to Kubernetes and I'm trying to do HTTP Load Balancing on Google Container Engine with TLS (using the included GCE Ingress Controller). The error I have is repeatable even following <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">Google's official tu...
<p>I left the cluster overnight and it is now working. It either seems it takes quite some to bootstrap or something was fixed on the Google Cloud side.</p>
<p>The kubernetes master in one of my GKE clusters became unresponsive last night following the infrastructure issue in us-central1-a. </p> <p>Whenever I run "kubectl get pods" in the default namespace I get the following error message: <strong>Error from server: an error on the server has prevented the request from ...
<p>There is not a command that will allow you to restart the Kubernetes master in GKE (since the master is considered a part of the managed service). There is automated infrastructure (and then an oncall engineer from Google) that is responsible for restarting the master if it is unhealthy. </p> <p>In this particular ...
<p>this is getting out of hand... have good specs of GKE, yet, I'm getting timeout for mount paths, I have posted this issue in github, but they said, it would be better if posted in SO. please fix this..</p> <pre><code>2m 2m 1 {scheduler } Scheduled Successfully as...
<p>This problem has been documented several times, for example here <a href="https://github.com/kubernetes/kubernetes/issues/14642" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/14642</a>. Kubernetes v1.3.0 should have a fix. </p> <p>As a workaround (in GCP) you can restart your VMs.</p> <p>Hope this...
<p>I'm trying to launch a GKE cluster with a "custom" type network, vs. a "auto" type network.</p> <p>I use the following command to launch my cluster:</p> <pre><code>$ gcloud container clusters create --cluster-ipv4-cidr=10.0.0.0/14 --network=ttest --subnetwork=ttest --num-nodes=1 jt </code></pre> <p>I get the foll...
<p>GKE does support custom subnet networks. The problem you're having is that GKE enforces that the <code>cluster-ipv4-cidr</code> range is disjoint from all subnetworks in which VMs may have their IPs allocated from, because that would lead to ambiguity in where packets should be routed on the internal network.</p> <...
<p>im successfully running kubernetes, gcloud and postgres but i wanna make some modifications after pod startup , im trying to move some files so i tried these 3 options</p> <p>1</p> <pre><code> image: paunin/postgresql-cluster-pgsql lifecycle: postStart: exec: command: [/bin/cp /...
<p>Here's the <a href="https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/" rel="nofollow noreferrer">document about lifecycle hooks</a> you might find useful.</p> <p>Your option 1 won't work and should give you the error you saw, it should be <code>[&quot;/bin/cp&quot;,&quot;/var/lib/postgres/dat...
<p>I tried to delete a <code>ReplicationController</code> with 12 pods and I could see that some of the pods are stuck in <code>Terminating</code> status. </p> <p>My Kubernetes cluster consists of one control plane node and three worker nodes installed on Ubuntu virtual machines. </p> <p>What could be the reason for ...
<p>You can use following command to delete the POD forcefully.</p> <pre><code>kubectl delete pod &lt;PODNAME&gt; --grace-period=0 --force --namespace &lt;NAMESPACE&gt; </code></pre>
<p>We currently have a 2-node Kubernetes environment running on bare-metal machines (no GCE) and now we wish to set up a PostgreSQL instance on top of this.</p> <p>Our plan was to map a data volume for the PostgreSQL Data Directory to the node using the <code>volumeMounts</code> option in Kubernetes. However this wou...
<ul> <li><p>one solution is to deploy HA postgresql, for example <a href="https://github.com/sorintlab/stolon" rel="nofollow">https://github.com/sorintlab/stolon</a></p></li> <li><p>another is to have some network storage attached to all nodes(NFS, glusterFS) and use volumeMounts in the pods</p></li> </ul>
<p>I've been using K8S ConfigMap and Secret to manage our properties. My design is pretty simple, that keeps properties files in a git repo and use build server such as Thoughtworks GO to automatically deploy them to be ConfigMaps or Secrets (on choice condition) to my k8s cluster.</p> <p>Currently, I found it's not re...
<p>You can get YAML from the <code>kubectl create configmap</code> command and pipe it to <code>kubectl apply</code>, like this:</p> <pre><code>kubectl create configmap foo --from-file foo.properties -o yaml --dry-run=client | kubectl apply -f - </code></pre>
<p>I am wondering if Mesos or K8s can offer resources from multiple network interfaces? I would like to attach multiple Network Interfaces (public eth0, private eth1) on mesos (or K8s) slave nodes and would like to bind specific applications that I run on Mesos's slave nodes on specific interfaces? does not mesos Or K8...
<p>On Kubernetes, there is not a fully supported way to do this. I think this is not supported by docker either (<a href="https://github.com/docker/docker/issues/1824" rel="nofollow">https://github.com/docker/docker/issues/1824</a>) </p> <p>As a work around, you could sort of do it this way:</p> <ul> <li><p>have o...
<p>Let say I want to find the kubelet and apiserver version of my k8s master(s), what's the best way to do it?</p> <p>I am aware of the following commands:</p> <pre><code>kubectl cluster-info </code></pre> <p>which only shows the endpoints.</p> <pre><code>kubectl get nodes; kubectl describe node &lt;node&gt;; </cod...
<p><code>kubectl version</code> also shows the apiserver version. For example, this is the output when I run it:</p> <pre><code>$ kubectl version Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"} Server Version: version.I...