prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I installed CentOS Atomic Host as operating system for kubernetes on AWS.</p> <p>Everything works fine, but it seems I missed something.</p> <p>I did not configure cloud provider and can not find any documentation on that.</p> <p>In this question I want to know: 1. What features cloud provider gives to kubernetes...
<p>I can't speak to the ProjectAtomic bits, nor to the <code>KUBERNETES_PROVIDER</code> env-var, since my experience has been with the CoreOS provisioner. I will talk about my experiences and see if that helps you dig a little more into your setup.</p> <p>Foremost, it is absolutely essential that the controller EC2 an...
<p>Is there a way to reload currently running <code>pods</code> created by <code>replicationcontroller</code> to reapply newly created <code>services</code>?</p> <p>Example:</p> <p>I have a running pods created by <code>ReplicationController</code> config file. I have deleted a service called <code>mongo-svc</code> a...
<p>You can <em>restart</em> pods by simply deleting them: if they are linked to a Replication controller, the RC will take care of restarting them</p> <p><code>kubectl delete pod &lt;your-pod-name&gt;</code></p> <p>if you have a couple pods, it's easy enougth to copy/paste the pod names, but if you have many pods it ...
<p>I am running my local kubernetes v1.1.4 cluster on Ubuntu 14.04 using vagrant 1.8.1 and virtualbox 4.3.28. Everything worked fine but since last friday 22.01.2016 i keep getting the same error when executing ./cluster/kube-up.sh </p> <pre><code>==&gt; master: * INFO: sh -- Version 2015.11.09 ==&gt; master: *...
<p>Here's a temporary fix:</p> <p>As pointed out in <a href="https://github.com/kubernetes/kubernetes/issues/20088#issuecomment-174930620" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/20088#issuecomment-174930620</a>, the root issue is a change in URL for an underlying dependency reference by <code>s...
<p>I am trying to create a "Hello Node" sample application in Google Container Engine, following this <a href="https://cloud.google.com/container-engine/docs/tutorials/hello-node" rel="nofollow">tutorial</a></p> <p>However even after running the command <code>kubectl expose rc hello-node --type="LoadBalancer"</code>, ...
<blockquote> <p>After a few moments, the external IP of the load balancer is listed in the IP(s) column of the service</p> </blockquote> <p>Usually it's 1-2 minutes. You was waiting only 23seconds. Try to wait a few moments more and it'll be OK.</p>
<p>I'm looking into writing a tool that generates Kubernetes definitions programatically for our project.</p> <p>I've found that the API types in Kubernetes can be found in <code>k8s.io/kubernetes/pkg/api</code>. I would like to output YAML based on these types.</p> <p>Given an object like this:</p> <pre><code>ns :=...
<p>Found it, for future reference, here's what you might want to do:</p> <pre><code>package main import ( "os" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/runtime/serializer/json" ) func main() { ns := &amp;v1.Namespace{ TypeMeta: unversi...
<p>Recently some alternatives for running docker containers or even the app container have developed.</p> <p>I know that there is rkt from coreos (<a href="https://coreos.com/blog/rocket/" rel="nofollow">https://coreos.com/blog/rocket/</a>) and triton from joyent (<a href="https://www.joyent.com/" rel="nofollow">https...
<p>So in a way, this is an apples to oranges to grapes comparison. CoreOS is an operating system, Kubernetes is open source container orchestration software, and Triton is a PaaS. </p> <p>So CoreOS, it's a minimal operating system with a focus on security. I've been using this in production for several months now a...
<p>So I have a service like as follow:</p> <pre><code>{ "kind": "Service", "apiVersion": "v1", "metadata": { "name": "monitoring-grafana", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/services/monitoring-grafana", "uid": "be0f72b2-c482-11e5-a22c-fa163ebc1085", "resou...
<p>Looking at the error you posted it seems like the traffic can not be routed from your <strong>master</strong> to the Docker subnet of your <strong>node</strong>. The easiest way to validate this is to open a shell on your master and perform a request on your <em>podIP:daemonPort</em>: <code>curl -I http://192.168.18...
<p>I am very new to Kubernetes and docker. Am trying to find the config equivalent of --device option in docker run. This option in docker is used to add a device on the host to the container. Is there a equivalent in kubernetes which can be added to the yaml file?</p> <p>Thanks </p>
<p>Currently we do not have a passthrough to this option in the API, though you may have some success with using a hostpath volume to mount a device file in.</p>
<p>I want to set multiple accounts to only have access only to owned namespace, we try with authorization mode ABAC but we get when use kubectl "error: couldn't read version from server: the server does not allow access to the requested ressource" and it seems to be a bug. Is theire other way to do it ?</p>
<p>Before attempting to access your resources, kubectl first makes requests to the server's <code>/version</code> and <code>/api</code> endpoints to confirm compatibility and negotiate API version. In ABAC, the <code>/version</code> and <code>/api</code> endpoints are considered "nonResourcePaths", but those also requi...
<p>I know that the Kubelet process on each Kubernetes node exposes a simple API server, but I cannot find any documentation for it.</p> <p>Does someone know of a resource that has it?</p>
<p>It isn't documented anywhere (that I know of). I always end up <a href="https://github.com/kubernetes/kubernetes/blob/4a6935b31fcc4d1498c977d90387e02b6b93288f/pkg/kubelet/server/server.go#L160-L174" rel="noreferrer">reading the code</a> to find out what endpoints exist. </p> <p>Also note that unlike the API in the ...
<p>Following the instructions on this page - <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html#setup" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html#setup</a>, I'm getting the following error when trying to get Kubernetes up on a Mac running El Capitan, using...
<p>Your problem with the vagrant setup is currently an open issue <a href="https://github.com/kubernetes/kubernetes/issues/20088#issuecomment-174528066" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/20088#issuecomment-174528066</a> . As a temporary fix you can do this to get it to work: <a ...
<p>I am trying to setup Kubernetes cluster using the instruction at <a href="https://coreos.com/kubernetes/docs/latest/getting-started.html" rel="nofollow">https://coreos.com/kubernetes/docs/latest/getting-started.html</a>.</p> <p>I am in the step 2 (Deploy master) where when I start the master service, the master ser...
<p>These are trying to talk to the insecure version of the API, which shouldn't work between machines. That will only work on the master. Additionally, the master isn't set up to accept work (register_node=false), so it is not expected to report back its status.</p> <p>The key piece of info we're missing, what machine...
<p>I'm setting up a Kubernetes cluster on AWS and as part of the configuration for say the API Server, I provide the <code>--cloud-provider=aws</code> setting.</p> <p>Once it starts up, however, I see in the logs that it complains about not having AWS credentials: <code>NoCredentialProviders: no valid providers in cha...
<p>It sounds like you don't have the appropriate IAM instance profile set on your master VM. The <code>kube-up</code> script for AWS creates a <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/aws/templates/iam/kubernetes-master-role.json">role</a> and associated <a href="https://github.com/kubernet...
<p>Is Kubernetes taking care of cleaning up failed/stopped containers at some point?</p> <p>It doesn't seem like it and it can pile up.</p> <p>I know how to clean them up manually but i wonder if there is a setting to automate it.</p>
<p>It's good practice to first check the <a href="http://kubernetes.io/v1.1/docs/admin/garbage-collection.html" rel="nofollow">docs site</a> before posting a question. Kubernetes does handle container GC, quoting from the docs page:</p> <p>We also allow users to customize garbage collection policy, basically via foll...
<p>I just want to know if any of you guys have ever followed this tutorial before and successed. I don't know why but whenever i restart and enable services on MINION side, it always failed with error "A Dependency job for kubelet.service failed" and of course it led to kubelet.service started failed. It didn't work no...
<p>Most probably docker service failed to start. It's the only dependency to kubelet service.</p>
<p>I am running <strong>kubernetes single node on coreos</strong>. </p> <p>I have created a pod running a python application and exposing an http endpoint.</p> <p>I have created a kubernetes service that exposes the HTTP endpoint. I have exposed this service using NodePort and can call it successfully from outside th...
<p>From the comments, it sounds like you got this to work.</p> <p>Traffic to service IPs is forwarded via kube-proxy, either through a user-space proxy or through iptables rules, depending on the Kubernetes release version and configuration. You may want to look at the iptables rules for the node corresponding to that...
<p>I just installed a kubernetes local cluster, but when I tried the command </p> <pre><code>cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80 </code></pre> <p>to create and run pods, here is what I got:</p> <pre><code>NAME READY STATUS RESTARTS AGE my-nginx-00t7f ...
<p>I assume that you figured out that it was the pause container that couldn't be pulled from the Kubelet logs.</p> <p>Kubernetes needs to create a container for the pod in order to hold shared resources, such as the network namespace. It uses the pause container for this, which is a very small container that just sle...
<p>What I want to do is run kubernetes within docker and expose the kubernetes services externally. I followed the <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/docker.html" rel="nofollow">docs</a> on getting kubernetes running within docker. As long as I connect from the <code>localhost</code>, I can...
<p>Ensure your nodes have externally reachable IP addresses.</p> <p>Then create a service of type NodePort: <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/services.md#type-nodeport" rel="nofollow">https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/services.md#type-nodep...
<p>I have been experimenting with kubernetes recently, and I have been trying to test the failover in pods, by having a replication controller, in which containers crash as soon as they are used (thus causing a restart).</p> <p>I have adapted the bashttpd project for this: <a href="https://github.com/Chronojam/bashttp...
<p>I filed an issue to document the recommended practice. I put a sketch of the approach in the issue:</p> <p><a href="https://github.com/kubernetes/kubernetes/issues/20473" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/20473</a></p> <ul> <li>ensure the pods have a non-zero terminationGracePeriodSe...
<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>To configure an HA master, you should follow the <a href="http://kubernetes.io/v1.1/docs/admin/high-availability.html" rel="nofollow">High Availability Kubernetes Cluster</a> document, in particular making sure you have replicated storage across failure domains and a load balancer in front of your replicated apiserv...
<p>I'm trying to install kubernetes on ubutnu (bare-metal installation). I install one master and one node and it looks fine. I installed the ui addon without a problem but when I tried to install the dns addon the pod restart itself continuously.</p> <p>in kube-apiserver logs I get:</p> <pre><code>E1218 12:56:15.298...
<p>I had this same problem after updating the certificate and key of the api-server. I fixed the DNS service after removing the secret:</p> <pre><code># Search the secret name kubectl get pod --namespace=kube-system -l k8s-app=kube-dns -o yaml | grep -A1 serviceaccount # Delete the current secret kubectl delete secre...
<p>Typically application developers, take J2EE for instance, don't prioritize infrastructure-related concerns when designing an application. It's hard to interface with the traditional non-programmable infrastructure. A traditional approach is to build a .war file that could then be run in an app server such as JBoss. ...
<p>No, the point of Kubernetes is that your app doesn't have to be 'aware' of it. (Mesos has more of a "apps need to know about us" philosophy.)</p> <p>In Kubernetes, each pod just starts up and listens on a port. The app doesn't register it's presence, or even tell what version it is. When it needs to talk to another...
<p>I'm one question about networking on Google Compute Engine.</p> <p>Is there any possibility to set default "Source tag / IP range" on your account to get this value automatically set when new rules is created?</p> <p>For example, if I create this rule:</p> <pre><code>gcloud beta compute firewall-rules create "tes...
<p>This isn't an option in Google Compute Engine at the moment, but the feature that you're looking for will at least <a href="https://github.com/kubernetes/kubernetes/issues/20392" rel="nofollow">be worked on in Kubernetes soon</a>.</p>
<p>I've included more detail below, but the question I'm trying to answer is in the title. I'm currently trying to figure this out, but thought I'd ask here first in case anyone knows the answer off-hand.</p> <p><strong>About my setup</strong></p> <p>I have a Kubernetes service running on a Google Compute Engine clus...
<p>Figured it out:</p> <ul> <li>It's not the number of GCE instances: I increased the number of GCE instances with no change in the number of streaming clients. </li> <li><strong>It's the number of pods</strong>: each pod apparently can handle 8 connections. I simply scaled my replication controller with <code>kuberne...
<p>Without using Heapster is there any way to collect like CPU or Disk metrics about a node within a Kubernetes cluster?</p> <p>How does Heapster even collect those metrics in the first place?</p>
<p>Kubernetes monitoring is detailed in the documentation <a href="http://kubernetes.io/v1.1/docs/user-guide/monitoring.html" rel="noreferrer">here</a>, but that mostly covers tools using heapster.</p> <p>Node-specific information is exposed through the cAdvisor UI which can be accessed on port 4194 (see the commands ...
<p>I'm playing with kubernetes and google container engine (GKE).</p> <p>I deployed a container from this image <a href="https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook" rel="noreferrer">jupyter/all-spark-notebook</a></p> <p>This is my replication controller :</p> <pre><code>{ &quot;apiVersion...
<p>You can use the FSGroup field of the pod's security context to make GCE PDs writable by non-root users. </p> <p>In this example, the gce volume will be owned by group 1234 and the container process will have 1234 in its list of supplemental groups:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: test-pd...
<p>Good day,</p> <p>I am using Kubernetes to run containers on the google container engine.</p> <p>The idea is to run two containers in a pod. One container uses the docker mysql image, the other runs php, laravel, nginx and composer.</p> <p>Locally, this works. The idea is that the php can connect to the database o...
<p>On Unix, MySQL programs treat the host name localhost specially, in a way that is likely different from what you expect compared to other network-based programs. For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file. This occurs even if a <code>--port</code> ...
<p>I have a rather small (1-2 node) kubernetes cluster running in GKE with ±40 Pods running. The problem at hand is that it's not logging to the GCE Console properly. I see lots of messages from the fluentd container(s) in the following format:</p> <pre><code>$ kubectl logs fluentd-cloud-logging-gke-xxxxxxxx-node-xxxx...
<p>It's definitely confusing that some of the logs are showing up. Given that error message, I'd expect none of your logs to be showing up in the viewer, since it sounds like the logging API hasn't been enabled for your project yet.</p> <p>You can do so from the Developers Console, <a href="https://console.developers....
<p>I'd like use a single <strong>google compute engine</strong> <em>disk</em> and mount it to multiple places a <em>Kubernetes</em> <strong>Google Container Engine</strong>.</p> <p>I'm wondering if using <code>persistentVolumeClaim</code> would work, but what I did expect to work is being able to mount two partitions ...
<p>Looks like it Google Container Engine requires <code>readOnly</code> on both:</p> <pre><code>containers: - volumeMounts: - readOnly: true volumes: - gcePersistentDisk: readOnly: true </code></pre>
<p>Is there any command I can run to easily see which pods are assigned to which node? As I mess around with resource requests and limits, it would be very helpful to visualize how pods have been assigned to cluster members. </p>
<p>What about the <code>-o wide</code> flag of <code>kubectl get</code>?</p>
<p>I am running a kubernetes cluster with 1 master (also a node) and 2 nodes on Azure. I am using Ubuntu with Flannel overlay network. So far everything is working well. The only problem I have is exposing the service to the internet.</p> <p>I am running the cluster on an azure subnet. The master has a NIC attached to...
<p>If you use the <code>kubectl expose</code> command:</p> <blockquote> <p>--external-ip="": External IP address to set for the service. The service can be accessed by this IP in addition to its generated service IP.</p> </blockquote> <p>Or if you create from a <code>json</code> or <code>yaml</code> file, use the <...
<p>I'm attempting to follow the instructions at <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/registry" rel="nofollow">https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/registry</a> to add a private docker registry to Kubernetes, but the pod created by the rc isn't able ...
<p>I think I was likely running into <a href="https://github.com/kubernetes/kubernetes/issues/15073" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/15073</a> . (If I create a new EBS volume, I first get a different failure, and then after the pod has been killed if I try to re-create the rc I get the f...
<p>I'd like to set-up a Mongo replica set on Kubernetes. I'd like to have three replicas. This means I'd need to start 3 instances.</p> <p>Should I start three pods, with Mongo in each one, and use the service the point to the primary? Or should I used a replication controller somehow?</p>
<p><strong>This answer is out of date. I wrote a detailed step-by-step tutorial <a href="http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html" rel="noreferrer">here</a> using more up to date methods. I highly recommend reading it all.</strong></p> <p>In a nutshell, you run a sidecar a...
<p>distributed CRON in Kubernetes is still a work in progress (<a href="https://github.com/kubernetes/kubernetes/issues/2156" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/2156</a>).</p> <p>What do you use for CRON jobs in Kubernetes today?</p> <p>Do you recommend any solution that works well with Sp...
<p>I think <a href="https://github.com/mesos/chronos" rel="nofollow">Mesos Chronos</a> is still ideal solution.</p>
<p>I'm trying to get the internal IP of a pod that is being killed. What I do now is to subscribe to events with reason "Killing" that have an "involvedObject" that is of type "Pod". If so I try to retrieve the pod to get its IP. The problem (I think) is that the Pod is already killed by the time I make the request to ...
<p>Johan-</p> <p>You can watch the pods resource to get add/update/remove events for them. <a href="http://kubernetes.io/v1.1/docs/api-reference/v1/operations.html" rel="nofollow">http://kubernetes.io/v1.1/docs/api-reference/v1/operations.html</a>, search for 'list or watch objects of kind Pod'. Hope that helps.</p> ...
<p>distributed CRON in Kubernetes is still a work in progress (<a href="https://github.com/kubernetes/kubernetes/issues/2156" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/2156</a>).</p> <p>What do you use for CRON jobs in Kubernetes today?</p> <p>Do you recommend any solution that works well with Sp...
<p>I wrote a small <a href="https://github.com/IanLewis/homepage/blob/master/deploy/gocron/main.go" rel="nofollow">Go app</a> that functions like cron but writes log info to stdout (no email!) and can be built into a static binary for easy containerization.</p> <p>I built kubectl from source as a static binary and inc...
<p>On CoreOS, Kuberenetes master processes (apiserver, kube-proxy, controller-manager and podmaster) run in Docker, while the kubelet process runs as a systemd process outside Docker. </p> <p>Would it be recommended to run the master processes V1.1+ and kubelet V1.0.3 together on the master host? </p> <p>The reason I...
<p>I'm an advocate of running all Kubernetes services directly on the OS so forgive me if my answer is very opinionionated.</p> <p>You have to ask yourself if running everything in a container makes sense at such a low level, considering that you have to mount so many libs from your host and can't benefit from systemd...
<p>i've a simple kubernetes cluster with a master and 3 minions. In this scenario, if i run a simple pod of a nginx or a mysql it works properly but, if i change type of KIND into yaml file and i try to run a replicated service, pods will start but i can't access to the service.</p> <p>this is my yaml file for nginx w...
<p>It looks to me like the selector for your service is wrong. It's looking for a label of <code>name: nginx</code>, but your pods actually have <code>app: nginx</code>.</p> <p>Try changing your service file to:</p> <pre><code>apiVersion: v1 kind: Service metadata: labels: name: nginx name: nginx spec: p...
<p>I have batch jobs that I want to run on Kubernetes. The way I understand Jobs:</p> <p>If I choose <code>restartPolicy: Never</code> it means that if the Job fails, it will destroy the Pod and reschedule onto (potentially) another node. If <code>restartPolicy: OnFailure</code>, it will restart the container in the e...
<p>Summary of slack discussion:</p> <p>No, there is no retry limit. However, you can set a deadline on the job as of v1.2 with <code>activeDeadlineSeconds</code>. The system should back off restarts and then terminate the job when it hits the deadline.</p>
<p>This may be a dumb question but I haven't found much online and want to clarify this. </p> <p>Given two deployments A and B, both with <em>different</em> container images:</p> <ul> <li>They're deployed in two different pods(different rc, svc etc.) in a K8/OpenShift cluster.</li> <li>They both need to access the sa...
<p>TL;DR You can share PV and PVC within the same project/namespace for shared volumes (nfs, gluster, etc...), you can also access your shared volume from multiple project/namespaces but it will require project dedicated PV and PVCs, as a PV is bound to single project/namespace and PVC is project/namespace scoped.</p> ...
<p>I'm having some issues with gcloud setting up a container and trying to use a loadbalancer</p> <p>The problem is that I need it by udp and not tcp</p> <p>I use this:</p> <pre><code>kubectl run mserver --image=gcr.io/${PROJECT_ID}/mserver:v1 --port=28000 kubectl expose rc mserver --protocol=UDP --type="LoadBalance...
<p>This limitation is fixed in the next (v1.2) release of Kubernetes, for those clouds that support UDP load-balancing.</p>
<p>I'm running a small node in gcloud with 2 pods running. Google cloud console shows all resources utilization </p> <p>&lt;40% cpu utilization</p> <p>about 8k n\w bytes</p> <p>about 64 disk bytes.</p> <p>When adding the next pod, it fails with below error.</p> <p><strong>FailedScheduling:Failed for reason PodExce...
<p>As kubernetes reserve some space if more cpu or memory is needed you should check the capacity allocated by the cluster instead of the utilization.</p> <p><code>kubectl describe nodes</code></p> <p>You can find a deeper description about the capacity of the nodes in: <a href="http://kubernetes.io/docs/user-guide/c...
<p>kubectl switches the context the moment we create a new cluster. since I'm trying to mimic a client server architecture, I need to view rolling logs (<code>kubectl logs pod-id</code>) from both sides (server cluster and agents cluster). Right now, I'm switching context using <code>kubectl config use-context</code> b...
<p>You can only have one active context at a time. But kubectl accepts a <code>--context</code> argument (see <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-app...
<p>I'm creating a container with a connection to a cloudsql database, when I run the image with kubernetes It does not have an external IP that I can use to allow the new image to connect to the database. But as this is part of the init configuration I can't wait to know what is the public IP to add to the whitelist da...
<p>There are two ways to solve that:</p> <p>The first option is to use a cloudsql proxy using the instructions available in: <a href="https://cloud.google.com/sql/docs/sql-proxy" rel="noreferrer">https://cloud.google.com/sql/docs/sql-proxy</a> </p> <p>In your docker image you need to ensure that fuse is available in ...
<p>I've successfully set up a password-protected redis cluster using the guide here: </p> <p><a href="http://kubernetes.io/v1.1/examples/redis/" rel="nofollow">http://kubernetes.io/v1.1/examples/redis/</a></p> <p>I can connect to the sentinel just fine using <code>redis-cli</code>, but I cannot connect to the redis m...
<p>I eventually settled on using helm (<a href="https://helm.sh/" rel="nofollow">https://helm.sh/</a>) and installed redis-cluster using <code>helm install redis-cluster</code>.</p> <p>I can connect to the redis cluster using the cluster_ip (not external ip) in kubernetes and this satisfies my security requirement. re...
<p>I have been trying to get my local cluster up with kubernetes. I have created the binaries and I am running the script by the name of ./hack/local-up-cluster.sh. When I run the script, I am getting this error:</p> <pre><code>root@ubuntu1604:~/kubernetes# ./hack/local-up-cluster.sh +++ [0215 00:22:00] Building go t...
<p>It seems like your api-server is not working for some reason. Check for api-server logs at /tmp/kube-apiserver.log </p>
<p>I'm trying to ssh into my pod with this command</p> <pre><code>kubectl --namespace=default exec -ti pod-name /bin/bash </code></pre> <p>I get this error: </p> <pre><code>Content-Type specified (plain/text) must be 'application/json' </code></pre> <p>The process gets stuck and I have to close the terminal.</p> <...
<p>You're not trying to "ssh", you're forwarding your standard input and receiving a standard output over HTTP through the Kubernetes API.</p> <p>That said, you're using Docker 1.10 whereas Kubernetes doesn't support it yet. Check this out <a href="https://github.com/kubernetes/kubernetes/issues/19720" rel="nofollow n...
<p>I successfully setup rabbitmq cluster using docker compose to understand the clustering concept. It worked fine below is docker compose file:</p> <pre><code>rabbit1: image: ipf-queue-node hostname: rabbit1 cap_add: - ALL - NET_ADMIN - SYS_ADMIN ports: - "5671:5671" - "5672:5672" - "1...
<p>You can't use Docker hostnames and links with Kubernetes. It works only when you have one machine, but Kubernetes is designated to be clustered solution.</p> <p>Enable <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns" rel="noreferrer">DNS</a> in your cluster. Create <code>Master serv...
<p>I have been trying Kubernetes, I have setup a master and minions in AWS. The documentation on docker + Kubernetes seems to be lacking, or maybe I was looking for it in the wrong place.</p> <p>Lets say I build my docker containers on a local box (not in AWS). I donot have a docker registry. </p> <p>Is it possible f...
<p>If the image was built on a host where Kubernetes is running, then yes, Kubernetes may use it on some conditions:</p> <ul> <li>your pod is scheduled on a host where <strong>your image exists</strong> (<a href="https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images" rel="nofollow noreferrer">pre-bu...
<p>In docker, I can expose a range of ports using "-p 65000-65050:65000-65050". How do I achieve this for kubernetes in a pod.yml or replication-controller.yml?</p>
<p>You can't. From the v1 API specs:</p> <pre><code> "ports": [ { "name": "string", "hostPort": 0, "containerPort": 0, "protocol": "string", "hostIP": "string" } ] </code></pre> <p>Each port is uniquely identified and exposing host ports wou...
<p>We need to made volume to be managed easily. We ned to use PV volume, but we want to be able to start volume on any node, and data not stored on node (if node crash no problems in this way) so we think about flocker with Ceph backend. What's the best solution for production ?</p>
<p>Flocker is not required. The functionality you are seeking is what Kubernetes Volume Plugins provide.</p> <p>The way to think about a Kubernetes Persistent Volume (PV) is that it is a configuration object that stores information about a specific network storage asset. When a user submits a claim, assuming it finds ...
<p>If I have 3 minions in my kubernetes cluster, is there a way I can tell replication controller to create 20% of pods on minion1, 50% on minion2 and 30% on minion 3?</p>
<p>Unfortunately right now the answer is no. The easiest thing to do is to create three replication controllers, each with the desired number of replicas, and each with a podTemplate that uses nodeSelector to pick one node. This has the downside that you are specifying an exact node name, so if that node fails, the pod...
<p>Yesterday I recreated a cluster so that it has version 1.1.7 for both master and nodes. After deploying a first service there it's no longer operational as it should be.</p> <p>I can't ssh into the nodes. Deployments fail with a FailedScheduling error. The Kube UI fails with the following response.</p> <pre><code>...
<p>For anyone wondering what was the cause of the issue, we added more VMs to the cluster and setup resource request/limit on each pod to prevent the whole cluster to run out of resources. This seems to solve it. Alex, thanks again for your help.</p>
<p>I am setting a couple of services running on Google Container Engine, with traffic coming in through a Google HTTP Load Balancer, using path mapping.</p> <p>There is a good Google tutorial on setting up content-based load-balancing <a href="https://cloud.google.com/compute/docs/load-balancing/http/content-based-exa...
<blockquote> <p>What is the relationship between the Kubernetes objects and the Google Compute resources? How do I map between the two programmatically?</p> </blockquote> <p><a href="https://github.com/kubernetes/contrib/tree/master/Ingress/controllers/gce#overview" rel="nofollow">https://github.com/kubernetes/contr...
<p>I simply do <code>CMD ["node", "/dist/app.js"]</code> from my dockerfile to run my master process inside the container. Container is hosted in Kubernetes. </p> <p>When something goes wrong with the pod, kubernetes rc will spin up another one. </p> <p>However, if my master process crashes inside the pod-->container...
<p><a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/production-pods.md#liveness-and-readiness-probes-aka-health-checks" rel="noreferrer">Liveness and readiness probes</a> are designated to be pod health checks in Kubernetes world.</p>
<p>I have the following setup: k8s cluster A, containing service SA k8s cluster B, containing service SB, and an HTTP ingress that routes traffic to SB</p> <p>Is it possible to add service SA as the backend service for one of the path of the ingress? If so, how do I refer to it in the ingress configuration file? (...
<p>Ingress objects help configure HTTP(S) load balancing for a single cluster. They don't have a concept of multiple clusters, so they aren't going to have a configuration language for what you are trying to accomplish (maybe they will with <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/fe...
<p>Went through to <a href="https://cloud.google.com/container-engine/docs/tutorials/hello-node" rel="nofollow">tutorial</a> without any issues but I'm confused on the best way to push updates to the application. The tutorial mentions a bit about <code>kubectl rolling-update</code> but not really following that. Any f...
<p>You should use the <a href="http://kubernetes.io/v1.1/docs/user-guide/kubectl/kubectl_rolling-update.html" rel="nofollow">kubectl rolling update</a> command. </p> <p>For a bit of background, imagine that you have an application that is running in 10 pods. Now you have a new version of your application. You don't wa...
<p>For some reason, the postgres instance isn't being locked down with a password using the following kubernetes script.</p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: postgres labels: name: postgres spec: replicas: 1 template: metadata: labels: ...
<p>According to the <a href="https://hub.docker.com/_/postgres/" rel="nofollow">docker hub documentation</a> for the postgres image you should be using the environment variable <code>POSTGRES_PASSWORD</code> instead of <code>DB_PASSWORD</code>. </p>
<p>I have a Google Container Engine cluster with 21 nodes, there is one pod in particular that I need to always be running on a node with a static IP address (for outbound purposes). </p> <p>Kubernetes supports <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/design/daemon.md" rel="nofollow">Dae...
<p>If you only want to run the pod on a single node, you actually don't want to use a DaemonSet. DaemonSets are designed for running a pod on <em>every</em> node, not a single specific node.</p> <p>To run a pod on a specific node, you can use a nodeSelector in the pod specification, as documented in the <a href="http:...
<p>I got errors in my kube-proxy: </p> <pre><code>E0107 21:48:57.738867 1 proxysocket.go:160] I/O error: read tcp 10.2.11.253:37568: connection reset by peer </code></pre> <p>How can I trace quickly which pod has IP <code>10.2.11.253</code>? And how can I know which request that was, from which pod to which pod...
<p>In my circumstance, it was because kube-proxy (v1.1.4) was missing the <code>--proxy-mode=iptables</code> flag. Evidently in 1.1.4, the default is something other than iptables, and specifying that flag made the logs immediately stop spewing those messages.</p>
<p>I am trying to run a load test on GKE, which means that I want to run a high number of tasks, most of which require very little resources. However, most of them fail to schedule saying "Failed for reason PodExceedsMaxPodNumber and possibly others". The number of pods per node is governed by the <code>max-pods</code>...
<p>Unfortunately not all of the various components' command line flags are modifiable when starting a GKE cluster. If you're just trying to run a one-off load test, you could manually modify the flags passed to the Kubelet on each node, but since that flag isn't even controllable by Kubernetes's Salt templates, there i...
<p>This question follows on from <a href="https://stackoverflow.com/q/35364367/2408961">this</a> one regarding PV, PVC's and shared volumes.</p> <p>I'm trying to get my head around what the best practices are regarding the provisioning of PV's for a NFS shared volume in a K8/OpenShift cluster.</p> <p>As an example, l...
<p>I've seen people use a mix of strategies, but the former (carving into tiers of sizes) is a good place to start. You can use an annotation to target a PV to a PVC if you are planning app and PV at the same time, but if you aren't using dynamic provisioning the tiered sizes will at least give you a chance to split t...
<p>How do I replace a downed master node? In particular, how do you replace a node on AWS if you are using the kubernetes tools?</p> <p>If I restart the node, it doesn't start correctly, if I clone the node, it definitely does not.</p>
<p>You'll have to connect the new master to the current etcd cluster, or create a new etcd cluster from a snapshot of the old one, in order to preserve state of the cluster. Aside from that, you have to ensure that the nodes point to the new master's IP address. I also suggest looking at HA masters if you are running...
<p>I have created a Kubernetes cluster in AWS platform and using DaemonSets to create the Pod.</p> <p>After an instance is terminated, the corresponding pod is still in <code>Terminating</code> states.</p> <p>Anyone have idea of cleaning up such <code>Terminating</code> pod in kubernetes master?</p>
<p>You can always force delete a pod by providing <code>kubectl delete pod NAME --grace-period=0</code>. You can also delete the node (if you don't plan on bringing it back) with <code>kubectl delete node NAME</code> and the pods should get cleaned up.</p>
<p>i've a kubernetes cluster with a master node and 3 minions, i've already a glusterfs cluster, every node of kubernetes cluster have glusterfs-client installed and working. i'm trying to run a pod ( a simple mysql ) mounting /var/lib/mysql on glusterfs but i see:</p> <pre><code>Image: mysql:5.6 is ready, container i...
<p>i've got and endpoint that is configured with glusterfs ip addresses.</p> <p>i know the posted link, i've followed it but the result is on my first post!</p>
<p>I was running a cluster in Kubernetes 1.0, and I had a few containers I wanted to run periodically as a sidecar container in a pod--usually things like pushing or pulling backups. I did this by building a pod with the container that had data I wanted to back up, and the sidecar container for backing it up. The sidec...
<blockquote> <p>Is there some way I can signal that a pod being regularly restarted is not a crash loop, but is happening by design?</p> </blockquote> <p>Not that I know of.</p> <blockquote> <p>Or is the only way to solve this to turn the sidecar container into a daemon that never exits?</p> </blockquote> <p>Thi...
<p>I created a Kube cluster using the kube-up script. If I ssh into the intances, kubectl is configured for the local cluster. My question, how is kubectl detecting the kubeconfig when a cluster is created using kube-up script?</p>
<p>I tried to do this using a cluster built from HEAD on GCE and didn't have the same experience. On the <em>master</em> instance, kubectl works. But on the <em>nodes</em>, it isn't configured to communicate with the master:</p> <pre><code>$ kubectl version Client Version: version.Info{Major:"1", Minor:"2+", GitVersio...
<p>I have created and deployed successfully one service in <code>kubernetes</code> named <em>rest_api_service</em>.</p> <p>I have another project which needs to call a resource from <em>rest_api_service</em>. So, in order to get out the IP of my service, I tried to inject:</p> <pre><code>@Inject @ServiceName("luz-per...
<p>Pods are automatically injected with environment variables containing information about services in their namespace. As an example, say your pod is in a namespace that also contains a service named 'foo'. The containers in your pod will be injected with:</p> <pre><code>FOO_SERVICE_HOST=&lt;host service foo is rea...
<p>I'm using Opscenter to manage my Cassandra cluster. Opscenter is started after my Cassandra cluster is already running. When opening Opscenter on my browser at port 8888 I have to manually give the Cassandra master's IP. </p> <p>Due to my deployment (Kubernetes and Docker) it's a schlep to get the IP of the Cassand...
<p>One thing you can try, is to provide OpsCenter with a configuration file for your cluster. If you installed OpsCenter in <code>/etc</code>, that file should be in the <code>/etc/opscenter/clusters</code> directory, and it's filename should match the name of your cluster (with underscores for special characters and ...
<p>In GKE, I have a pod with two containers. They use the same image, and the only difference is that I am passing them slightly different flags. One runs fine, the other goes in a crash loop. How can I debug the reason for the failure?</p> <p>My pod definition is</p> <pre><code>apiVersion: v1 kind: ReplicationContro...
<p>It's tough to say exactly without knowing more about your app, but the two containers definitely can't use the same port if they're part of the same pod. In kubernetes, each pod gets its own IP address, but each container in the pod shares that same IP address. That's why you can't have more than one of them using t...
<p>I need to deploy a web application in gke. The application consists of two pods and needs to scale to ~30 replicas. </p> <p>Rolling updates take ~30s/pod in our setup. </p> <p>Old title: How do I enable the deployments API on GKE cluster?</p> <p>I tried to use <a href="https://github.com/kubernetes/kubernetes/blo...
<p>GKE clusters actually <em>do</em> have beta features. But Deployments were an alpha feature in the 1.1 release (which is the current supported release) and are graduating to beta for the upcoming 1.2 release. Once they are a beta feature, you will be able to use them in GKE. </p> <p>The rolling update command is re...
<p>I am trying to implement something like the etcd services that uses the consensus algorithm (<a href="https://raft.github.io/" rel="noreferrer">https://raft.github.io/</a>). In this case, multiple instances of the etcd services need to be aware of each other. For this to happen, if we have 3 pods of etcd instance in...
<p>You can put a service in front of those pods by giving each pod some label (for example <code>etcd-service=true</code>), and making a kubernetes service with a selector that matches that label. Use the DNS add-on, and you will get a DNS A record for each endpoint in the service. You can read more in the docs <a hr...
<p>Hi I am setting up Kubernetes on top of Mesos by following <a href="http://kubernetes.io/v1.1/docs/getting-started-guides/mesos.html" rel="nofollow noreferrer">http://kubernetes.io/v1.1/docs/getting-started-guides/mesos.html</a> and this is how my current test lab looks like</p> <ol> <li>2 Numbers of mesos master wi...
<p>Regarding Mesos Masters and Zookeeper instances, to have an even number of nodes is not really a good idea, because of the quorum mechanisms involved. My suggestion would be running three nodes of both services.</p> <p>I assume you want to run this locally? If so, I guess it would make sense to use a preconfigured ...
<p>I know that Kubernetes does not support mounting GCS buckets inside a Pod. But If I use GoogleFuse to mount a GCS bucket on the Node and then expose it to a Pod as a host path will that work?</p>
<p>It should work. For Host Path volumes, kube doesn't enforce any policy. But if your FUSE daemon restarts, the mount will become inaccessible. AFAIK, kube does not support mount propagation for volumes.</p>
<p>i've a kubernetes cluster with a master node and 3 minions, i've already a glusterfs cluster, every node of kubernetes cluster have glusterfs-client installed and working. i'm trying to run a pod ( a simple mysql ) mounting /var/lib/mysql on glusterfs but i see:</p> <pre><code>Image: mysql:5.6 is ready, container i...
<p>On first: To use a GlusterFS you don't need to install glusterfs-client on kubernetes node. Kubernetes have the volume mounting option for glusterfs by default.</p> <p>To use a glusterfs with kubernetes you need to things.</p> <ol> <li><p>a working glusterfs server. a running volume in the glusterfs server. I assu...
<p>Found this example for Kubernetes EmptyDir volume</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: www spec: containers: - name: nginx image: nginx volumeMounts: - mountPath: /srv/www name: www-data readOnly: true - name: git-monitor image: kubernetes/git-monitor env: ...
<p>EmptyDir volumes are inherently bound to the lifecycle of a single pod and can't be shared amongst pods in replication controllers or otherwise. If you want to share volumes amongst pods, the best choices right now are NFS or gluster, in a persistent volume. See an example here: <a href="https://github.com/kuberne...
<p>We have been using AWS-ECS for scheduling our containers. The most pressing problem I see with ECS, is the 'resource fragmentation'.</p> <p>Say I have following task definitions/pods with respective resource requirements:</p> <pre><code> POD CPU Desired Total_CPU - task1 1024 2 2048 - task2 51...
<p>Kubernetes does not currently reschedule pods to rebalance them across nodes, but <a href="https://github.com/kubernetes/kubernetes/issues/12140" rel="nofollow">planning has begun to include a rescheduler</a> for this purpose in our 1.3 release in a few months.</p>
<p>I don't know if this is already answered in SO but I couldn't find a solution to my problem.</p> <p>I have an IPython notebook running in a docker container in Google Container Engine, the container is based on this image <a href="https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook" rel="norefer...
<p>Dataproc runs <a href="http://spark.apache.org/docs/latest/running-on-yarn.html" rel="noreferrer">Spark on YARN</a>, so you need to set master to 'yarn-client'. You also need to point Spark at your YARN ResourceManager, which requires a under-documented SparkConf -> Hadoop Configuration conversion. You also have to ...
<p>I've a new Docker image and I'd like ideally to perform a smooth upgrade to it and either forget the previous deployed version or keep only the previous version but not all previously deployed versions.</p> <p>Kubernetes Pods will retrieve upon being restarted the latest image if it's tagged <code>:latest</code> or...
<p>Dirty workaround (not tested): you can scale down rc to 0 and then up to original size => it'll be "pod" restart. Or you can use 2 active(non 0 size)/passive(size 0) rc, which will be included in the same service. And you will be scaling them up/down.</p> <blockquote> <p>Tagging it means a complicated script to a...
<p>Downloaded Kubernetes 1.1.8 from: </p> <p><a href="https://github.com/kubernetes/kubernetes/releases/download/v1.1.8/kubernetes.tar.gz" rel="nofollow">https://github.com/kubernetes/kubernetes/releases/download/v1.1.8/kubernetes.tar.gz</a></p> <p>Followed the instructions at:</p> <p><a href="https://github.com/kub...
<p>It's probably a region issue; I'm guessing that the bucket is created in another region than Kubernetes tries to access. Looks like the aws cmdline tool is confused about the region: <code>aws: error: argument --region: expected one argument</code></p> <p>When it can't determine the region, it defaults to one of ...
<p>I would like to enable the <a href="http://kubernetes.io/v1.1/docs/admin/authorization.html">ABAC mode</a> for the Kubernetes Cluster I'm using in Google's Container Engine. (more specifically, I would like to restrict access to the API service for the <em>default</em> service account which is automatically assigned...
<p>There is not a way to enable ABAC mode on Google Container Engine. If you need fine-grained control over the parameters passed to any of the master components you have to run Kubernetes on GCE instead. </p>
<p>I'm bringing up Spark on Kubernetes according to this example: <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/spark" rel="noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/spark</a></p> <p>For some reason, I'm having problems getting the master to listen on <code>:707...
<p>I'm sorry, the Spark example was broken, in multiple ways.</p> <p>The issue: <a href="https://github.com/kubernetes/kubernetes/issues/17463" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/17463</a></p> <p>It now works, as of 2/25/2016, and is passing our continuous testing, at least at HEAD (and th...
<p>I'm using a Chromebook Pixel 2, and it's easier to get Rocket working than Docker. I recently installed Rocket 1.1 into /usr/local/bin, and have a clone of the Kubernetes GitHub repo.</p> <p>When I try to use <code>./hack/local-up-cluster.sh</code> to start a cluster, it eventually fails with this message:</p> <pr...
<p>You need to set three environment variables before running <code>./hack/local-up-cluster.h</code>:</p> <pre><code>$ export CONTAINER_RUNTIME=rkt $ export RKT_PATH=$PATH_TO_RKT_BINARY $ export RKT_STAGE1_IMAGE=PATH=$PATH_TO_STAGE1_IMAGE </code></pre> <p>This is described in the <a href="https://github.com/kubernete...
<p>According to the <a href="http://kubernetes.io/v1.1/docs/user-guide/secrets.html#creating-a-secret-manually" rel="nofollow">Kubernetes secrets docs</a>, creating a secret is as easy as base64-encoding the data and placing it in a file.</p> <p>How then, if base64 can be decoded as easily as it's encoded, can we secu...
<p>It isn't base64 encoded for security, it is to allow binary content to be stored in secrets. You likely should not commit secret definitions to source control. </p>
<p>The resource limit of Pod has been set as:</p> <pre><code>resource limit cpu: 500m memory: 5Gi </code></pre> <p>and there's <code>10G</code> mem left on the node.</p> <p>I've created <code>5</code> pods in a short time successfully, and the node maybe still have some mem left, e.g. <code>8G</code>.</p> ...
<p>Kubernetes resource specifications have two fields, <code>request</code> and <code>limit</code>.</p> <p><code>limits</code> place a cap on how much of a resource a container can use. For memory, if a container goes above its limits, it will be OOM killed. For CPU, its usage may be throttled.</p> <p><code>requests<...
<p>below is docker run command:</p> <pre><code>docker run --log-driver=syslog </code></pre> <p>How to set <strong>log-driver</strong> in kubsernetes pods. Can you show examples to me? Thanks...</p>
<p>There is an open feature request for this, but it's not yet supported: <a href="https://github.com/kubernetes/kubernetes/issues/15478" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/15478</a></p>
<p>I am using a ReplicationController to create a pod running redis container.</p> <p>The redis container is monitored by Redis Sentinel. And there is a problem, if redis crashed and restart too fast, it may cause trouble to Redis Sentinel when the voting is in progress. </p> <pre><code>{ "apiVersion": "v1", "ki...
<p>Kubelet already backs off container restarts automatically. In that case, you'll see something like the following:</p> <p><code> $ cluster/kubectl.sh get pods NAME READY STATUS RESTARTS AGE ... mem-besteffort-zpnpm 0/1 CrashLoopBackOff 4 3m </code></p> <p>If y...
<p>I want to use gitlab-ci (or any other CI, whatever works) to deploy to google container engine using <code>kubectl run</code></p> <p>I have a working gitlab runner on google compute engine but can't figure out how to install <code>gcloud</code> and <code>kubectl</code> in so the runner has their executable and conf...
<p>You didn't mention what gitlab image you used. It might be useful to look at others', such as: <a href="https://github.com/sameersbn/docker-gitlab/" rel="nofollow">https://github.com/sameersbn/docker-gitlab/</a></p> <p>It looks like that configures several paths explicitly via environment variables.</p> <p>If you'...
<p>I tried to create a pod with a particular environment for uwsgi configuration , but it was this message : <br/> <em>failed to load "phptime.yml": JSON: I can not unpack the number in the value of the string type Go</em> when I tried to run this command : <br/> <strong>kubectl create -f phptime.yml</strong> <br/> I f...
<p>You must quote all of the values that you want to set as environment variables that the yaml parser might interpret as a non-string type. </p> <p>For example, in <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-contro...
<pre><code>apiVersion: v1 kind: Service metadata: name: nginx labels: name: nginx spec: ports: # the port that this service should serve on - port: 80 targetPort: 80 nodePort: 30000 selector: name: nginx type: NodePort </code></pre> <hr> <pre><code>apiVersion: v1 kind: Service metad...
<p><a href="http://kubernetes.io/v1.0/docs/user-guide/services.html#type-nodeport" rel="nofollow">http://kubernetes.io/v1.0/docs/user-guide/services.html#type-nodeport</a>:</p> <blockquote> <p>If you set the type field to "NodePort", the Kubernetes master will allocate a port from a flag-configured range (default:...
<p>I'm getting a weird bug: The pod is reported as running via k8s api-server. But the container that runnig the application was actually exited, only the pause container <code>gcr.io/google_containers/pause:0.8.0</code> is running, not the actual container.</p> <pre><code>$ docker ps -a | grep ms-issue 1754ddbbfbd8 ...
<p>This seems to be specific to that pod/image you are running. Can you check the logs and see why that pod exited ? Can you try any other image from docker hub ? </p>
<p>When I resize a replication controller using kubectl, if the cluster does not have enough resource, there will have one or more pods always in pending.</p> <p>Is there has any tool will auto resize GKE cluster when the resource is running out?</p>
<p>I had a similar requirement (for the Go build system): wanted to know when scheduled vs. available CPU or memory was > 1, and scale out nodes when that was true (or, more accurately, when it was ~.8). There's not a built-in metric, but as you suggest you can do it with a custom metric.</p> <p>This was all done in G...
<p>I am building an opinionated PaaS like service on top of Kubernetes ecosystem. </p> <p>I have a desire to model an SSHService and SSHUser, I'll either extend Kubernetes api server by registering new types/schemas (looks pretty simple) or using custom resources via ThirdPartyResource <a href="http://kubernetes.io/v1...
<p>First reaction is that if you already have your own API server, and it works, there is no need to rewrite the API in kubernetes style. I'd just try to reuse the thing that works.</p> <p>If you do want to rewrite, here are my thoughts:</p> <p>If you need lots of SSHServices, and you need lots of people to use your...
<p>I have a Kubernetes setup installed in my Ubuntu machine. I'm trying to setup a nfs volume and mount it to a container according to this <a href="http://kubernetes.io/v1.1/examples/nfs/" rel="noreferrer">http://kubernetes.io/v1.1/examples/nfs/</a> document. </p> <p>nfs service and pod configurations</p> <pre><code...
<p>I had the same problem, and I solved it by installing nfs-common in every Kubernetes nodes.</p> <pre><code>apt-get install -y nfs-common </code></pre> <p>My nodes were installed without nfs-common. Kubernetes will ask each node to mount the NFS into a specific directory to be available to the pod. As <em>mount.nfs...
<p>I have a Kubernetes service that expose two ports, one for the external interface (target port 8080) and one for the admin interface (target port 8081). I'd like to make both of these endpoints accessible over the internet using https so thus I think I want use an ingress resource. The ingress resource creates a sta...
<p>Via separate Ingress objects, you should be able to direct HTTP and HTTPS traffic to different ports and/or services, and hostnames can map to distinct ports and/or services.</p> <p>However, Ingress currently assumes port 80 for HTTP and 443 for HTTPS for ingress, so it's not currently possible to direct traffic to...
<p>I've used Docker Swarm - I can put the management and the agents in docker containers. Can I do the same with Kubernetes? I don't want to pollute my machine.</p>
<p>All of the master components in Kubernetes run inside of containers. </p> <p>Due to limitations of Docker, the kubelet agent has been difficult to get running in a container. The Kubernetes folks have been working on this for the last year (see <a href="https://github.com/kubernetes/kubernetes/issues/4869" rel="nof...
<p>I setup a kubernetes cluster with 2 powerful physical servers (32 cores + 64GB memory.) Everything runs very smooth except the bad network performance I observed.</p> <p>As comparison: I run my service on such physical machine directly (one instance). Have a client machine in the same network subset calling the ser...
<p>You can configure Kubernetes networking in a number of different ways when configuring the cluster, and a few different ways on a per-pod basis. If you want to try verifying whether the docker networking arrangement is the problem, set <code>hostNetwork</code> to true in your pod specification and give it another tr...
<p>I have to check if my application container in a replication controller runs on a certain port. Here is the command with the go template string that I'm using.</p> <pre><code>kubectl get rc my-rc --namespace=nightly --template='{{range .spec.template.spec.containers}}{{if .ports}}{{range .ports}}{{if .containerPort...
<p>Inspecting the .containerPort with <code>printf "%T" .containerPort</code> shows that it's a float64. if you compare your port with a trailing <code>5445.0</code> it should work.</p> <p>You also have some unnecessary if statements. </p> <pre><code>--template='{{range .spec.template.spec.containers}}{{range .ports}...
<p>With k8s version 1.1 I could copy the k8s launch config, change the instance type and then point my asg at the new lc to add other instance types to my cluster.</p> <p>With version 1.2a8 there are 4 storage devices that don’t copy over… eg "DeviceName": "/dev/sdc”, "VirtualName": “ephemeral0”. Anyone know the best ...
<p>It looks like because 1.2 is now gzip'ing the user-data there is a problem that the user data is changing when aws copies it to the new Launch Configuration. Even pasting the user-data in manually when copying the Launch Configuration still fails...</p> <p>Update: Copying it from the output of the aws cli (aws auto...
<p>I have set up a simple Kubernetes load balancer service in front of a Node.js container, which should be exposing port 80, but I can't get a response out of it. <em>How can I debug how the load balancer is handling requests to port 80</em>? Are there logs I can inspect?</p> <p>I have set up a load balancer service ...
<p>Here is the primary debugging document for Services:</p> <p><a href="http://kubernetes.io/docs/user-guide/debugging-services/" rel="noreferrer">http://kubernetes.io/docs/user-guide/debugging-services/</a></p> <p>LoadBalancer creates an external resource. What exactly that resource is depends on your Cloud Provider...