prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I am using fabric8.io to orchestrate application containers in Kubernetes. I am looking to create a Service that manages a pod with a certain label on a certain port. Is there a specific example of the API that does this. I couldnt find it in the examples </p> <p><a href="https://github.com/fabric8io/kubernetes-cli...
<p>Fabric8's Kubernetes Client is using a generated model and DSL that has the <strong>exact</strong> same structure as as the JSON and YAML configuration.</p> <p>So in order to create a Service instance that looks like:</p> <pre><code> { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "m...
<p>I have known clearly about the usage of the docker option <code>--net=container:NAME_or_ID</code>, I also have read the source code of kubernetes about how to configure the container to use the network of <code>InfraContainer</code>, so I think the only work the process in container <code>gcr.io/google_containers/pa...
<p>In Kubernetes, each pod has an IP and within a pod there exists a so called infrastructure container, which is the first container that the Kubelet instantiates and it acquires the pod’s IP and sets up the network namespace. All the other containers in the pod then join the infra container’s network and IPC namespac...
<p>I have created a cluster of three nodes: one master, two minions. How to check the cluster IP in Kubernetes? Is it the IP of the master node?</p>
<p><strong>ClusterIP</strong> can mean 2 things: a type of service which is only accessible within a Kubernetes cluster, or the internal ("virtual") IP of components within a Kubernetes cluster. Assuming you're asking about finding the internal IP of a cluster, it can be accessed in 3 ways (using the <a href="http://ku...
<p>I am following the <a href="https://github.com/kubernetes/kubernetes/blob/v1.0.6/docs/getting-started-guides/docker.md" rel="nofollow">Running Kubernetes locally via Docker</a> guide and I am unable to get the master to start normally.</p> <p><strong>Step One: Run etcd</strong></p> <p><code>docker run --net=host -...
<p>Can you downgrade docker version to 1.7.2 first? I did the exact what you did above with docker 1.7.2, and everything works.</p> <pre><code>$ curl 127.0.0.1:8080/ { "paths": [ "/api", "/api/v1", "/api/v1beta3", "/healthz", "/healthz/ping", "/logs/", "/metrics", "/resetMetrics", ...
<p>I am trying to setup cluster logging following below link</p> <p><a href="http://kubernetes.io/v1.0/docs/getting-started-guides/logging-elasticsearch.html" rel="nofollow">http://kubernetes.io/v1.0/docs/getting-started-guides/logging-elasticsearch.html</a></p> <p>my config-default.sh</p> <pre><code># Optional: Ena...
<p>Where are you starting your cluster? I tried to reproduce this on GCE using both the 1.0.7 release and from HEAD and wasn't able to. </p> <p>Using the 1.0.7 release:</p> <pre><code>$ kubectl get pods --namespace=kube-system NAME READY STATUS RESTARTS AGE elasticse...
<p>TL;DR Kubernetes allows all containers to access all other containers on the entire cluster, this seems to greatly increase the security risks. How to mitigate?</p> <p>Unlike <a href="https://www.docker.com/" rel="nofollow">Docker</a>, where one would usually only allow network connection between containers that ne...
<p>As @tim-hockin says, we do plan to have a way to partition the network. </p> <p>But, IMO, for systems with more moving parts, (which is where Kubernetes should really shine), I think it will be better to focus on application security. </p> <p>Taking your three-layer example, the PHP pod should be authorized to t...
<p>I'm trying to get Kubernetes running on some local machines running CoreOS. I'm loosely following <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/coreos/coreos_multinode_cluster.html" rel="nofollow">this guide</a>. Everything seems to be up and running, and I'm able to connect to the api via kubectl. ...
<p>The default service account for each namespace is created by the service account controller, which is a loop that is part of the kube-controller-manager binary. So, verify that binary is running, and check its logs for anything that suggests it can't create a service account, make sure you set the "--service-accoun...
<p>Kubernetes UI dashboard shows (this matches the free -m on this minion)</p> <p>Memory: 7.29 GB / 7.84 GB</p> <p>This overall memory usage gradually increasing over time. I am trying to get a view into this memory growth using <em>Kubernetes/Grafana</em> default dashboard for this metric: memory/usage_bytes_gauge. ...
<p>Can you plot <code>memory/working_set_bytes_guage</code> instead of <code>memory/usage_bytes_guage</code>? The kube UI might be using working set which correlates with free. <code>memory/usage</code> includes pages that the kernel can reclaim on demand.</p>
<p>After 30-45 minutes, chunked HTTP connection to API server is dropped:</p> <pre><code>Transmission Control Protocol, Src Port: http-alt (8080), Dst Port: 55782 (55782), Seq: 751, Ack: 88, Len: 0 .... 0000 0001 0001 = Flags: 0x011 (FIN, ACK) </code></pre> <p>This happens regardless of the activity level, i.e. it ha...
<p>Once you're certain your client properly handles disconnections, you can use the following kube-apiserver flag to control how long apiserver lets the watches stay open:</p> <p><a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kube-apiserver.md" rel="nofollow">https://github.com/kubernete...
<p>I would like to expand/shrink the number of kubelets being used by kubernetes cluster based on resource usage. I have been looking at the code and have some idea of how to implement it at a high level.</p> <p>I am stuck on 2 things:</p> <ol> <li><p>What will be a good way for accessing the cluster metrics (via Hea...
<p>Part 1:</p> <p>What you said about using kubedns to find heapster and querying that REST API is fine.</p> <p>You could also write a client interface that abstracts the interface to heapster -- that would help with unit testing.</p> <p>Take a look at this metrics client: <a href="https://github.com/kubernetes/kube...
<p>Upon looking at the docs, there is an API call to delete a single pod, but is there a way to delete <em>all</em> pods in all namespaces?</p>
<p>There is no command to do exactly what you asked.</p> <p>Here are some close matches.</p> <p><strong>Be careful before running any of these commands. Make sure you are connected to the right cluster, if you use multiple clusters. Consider running. <code>kubectl config view</code> first.</strong></p> <p>You can del...
<p>I have a problem to understand the kubernetes workflow: So as I understand the flow:</p> <p>You have a master which contains etcd, api-server, controller manager and scheduler. You have nodes which contain pods (wich contain containers), kubelet and a proxy.</p> <p>The proxy is working as a basic proxy to make it ...
<p>So it's the kubelet that actually creates the pods and talks to the docker daemon. If you do a <code>docker ps -a</code> on your nodes (as in not master) in your cluster, you'll see the containers in your pod running. So the workflow is run a kubectl command, that goes to the API server, which passes it to the con...
<p>When Installing a Kubernetes Master Node via Docker, docker config bip and mtu for Run flannel.<br> --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU}<br> What's are FLANNEL_SUBNET and FLANNEL_MTU variables? How to set ${FLANNEL_SUBNET} and ${FLANNEL_MTU}?</p>
<p>I really don't understand your questions, but I can explain how flannel integrates with docker.</p> <p>Flannel is managing this file:</p> <pre><code># cat /usr/lib/systemd/system/docker.service.d/flannel.conf [Service] EnvironmentFile=-/run/flannel/docker </code></pre> <p>Which is setting the docker service to us...
<p>I am trying to setup a small Kubernetes cluster using a VM (master) and 3 bare metal servers (all running Ubuntu 14.04). I am following the Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/getting-started-guides/ubuntu.md" rel="nofollow">install tutorial for Ubuntu</a>. Everything w...
<p>To have the master node access the cluster network, you can run <code>flanneld</code> and <code>kube-proxy</code> on the master node. This should give you the access you need.</p> <p>However, adding these components in the context of using the <code>kube-up.sh</code> method may be a little involved. Seems like you ...
<p>I'm running my rethinkdb container in Kubernetes cluster. Below is what I notice:</p> <p>Running <code>top</code> in the host which is CoreOS, rethinkdb process takes about 3Gb: </p> <pre><code>$ top PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 981 root 20 0 53.9m 34.5m ...
<p>In <code>top</code> command, your are looking at physical memory amount. in stats command, this also include the disk cached ram, so it's always bigger than the physical amount of ram. When you really need more RAM, the disk cached will be released for the application to use.</p> <p>In deed, the memmory usage is pu...
<p>The quickstart mentions a few times that, "You should be able to ssh into any node in your cluster ..." (e.g., <a href="http://kubernetes.io/v1.0/docs/user-guide/connecting-applications.html#environment-variables" rel="nofollow">http://kubernetes.io/v1.0/docs/user-guide/connecting-applications.html#environment-varia...
<p>It looks like your problem is with making sure the corresponding security group is open to ssh from whichever nodes you'd like to connect from. Make sure it's open to the public IP or the private IP, depending on which you're connecting from. For the right ssh key to use: it'll be whichever one you setup when spinni...
<p>I am trying to prepare a dev environment for my team, so we can develop, stage and deploy with the same (or near same) environment.</p> <p>Getting a Kubernetes Cluster running locally via <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/docker.html" rel="nofollow">http://kubernetes.io/v1.0/docs/gettin...
<p>The problem was with the networking and kube2sky not accessing the API, so couldn't get the services.</p> <p>Changing the docker run for the master from,</p> <pre><code>--config=/etc/kubernetes/manifests </code></pre> <p>to</p> <pre><code>--config=/etc/kubernetes/manifests-multi </code></pre> <p>Then in the sky...
<p>Kubernetes automatically places a token and certificate in <code>/var/run/secrets/kubernetes.io/serviceaccount</code> of each running container in a pod. This token allows access to the the API Server from any container. </p> <p>Is it possible to either prevent this directory from being added to a container or spec...
<p>That token has no explicit permissions. If you run with any authorization mode other than AllowAll, you will find that account cannot do anything with the API. </p> <p>If you want to stop injecting API tokens, you can remove the service account admission controller from the list (in apiserver options). </p> <p>If ...
<p><strong>Background:</strong></p> <p>We're currently using a continuous delivery pipeline and at the end of the pipeline we deploy the generated Docker image to some server(s) together with the latest application configuration (set as environment variables when starting the Docker container). The continuous delivery...
<p>Rolling update just scales down one replicationController and scales up another one. Therefore, it deletes the old pods and make new pods, at a controlled rate. So, if the new replication controller json file has different env vars and the same image, then the new pods will have that too. </p> <p>In fact, even i...
<p>I'm trying to mount an external nfs share in a Replication Controller. When I create the replication controller, the pod is pending. Getting the details on the pod, I get these events:</p> <pre><code>Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Th...
<p>With @rwehner's help, I was finally able to figure it out. Checking the kubelet log revealed:</p> <p><code>Output: mount.nfs: rpc.statd is not running but is required for remote locking.</code></p> <p>As soon as I got rpcbind running, the mount worked.</p>
<p>Currently testing out Kubernetes 1.0.7 on AWS and it creates an external load balancer just fine but I want to know if its possible to create an internal load balancer that is only accessible within the internal subnet. </p>
<p>Not out of the box (at the time of this writing), but the Kubernetes Ingress api is evolving to support internal loadbalancers. Note the following: </p> <ol> <li>Kubernetes Services are round robin loadbalanced by default.</li> <li>You can deploy something like the service loadbalancer [1] and access your services ...
<p>What does it mean when the <code>creationTimestamp</code> for the template is <code>null</code>?</p> <pre><code>"template": { "metadata": { "creationTimestamp": null, "labels": { "name": "kube-template" } }, </code></pre>
<p>The template in the ReplicationControllerSpec defines the template for a Pod that the ReplicationController <em>will</em> create, but since it's an abstract <em>template</em>, it doesn't make sense for it to have a creation time. Once the ReplicationController creates a pod, the CreationTimestamp will be set to the ...
<p>Or to put it another way, what can I do in kubernetes so that the container is run with the equivalent of --device=/dev/tty10, as an example. Otherwise accessing a device like that gives an error.</p> <pre><code>[root@87eb47e75ed4 /]# echo foo &gt;&gt; /dev/tty10 bash: /dev/tty10: Operation not permitted </code></p...
<p>Passing the devices to the container is not currently supported in Kubernetes. This issue is tracked in <a href="https://github.com/kubernetes/kubernetes/issues/5607" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/5607</a></p>
<p>From the kubernetes docs I see that there is a <a href="http://kubernetes.io/v1.0/docs/user-guide/services.html#dns" rel="noreferrer">DNS based service discovery</a> mechanism. Does Google Container Engine support this. If so, what's the format of DNS name to discover a service running inside Container Engine. I cou...
<p>The DNS name for services is as follow: <code>{service-name}.{namespace}.svc.cluster.local</code>.</p> <p>Assuming you configured <code>kubectl</code> to work with your cluster you should be able to get your service and namespace details by the following the steps below.</p> <h2>Get your namespace</h2> <pre><code...
<p>I am attempting to pull private docker images from Docker Hub. </p> <pre><code>Error: image orgname/imagename:latest not found </code></pre> <p>The info I am seeing on the internet...</p> <ul> <li><a href="http://kubernetes.io/v1.0/docs/user-guide/images.html#using-a-private-registry" rel="nofollow">http://kuber...
<p>From: <a href="https://github.com/kubernetes/kubernetes/pull/12717/files" rel="nofollow">https://github.com/kubernetes/kubernetes/pull/12717/files</a></p> <blockquote> <p>This function func ReadDockerConfigFile() (cfg DockerConfig, err error) is used to parse config which is stored in:</p> <pre><code>GetPreferre...
<p><strong>Background:</strong></p> <p>I'm pretty new to the Google's Cloud platform so I want to make sure that I'm not is missing anything obvious. </p> <p>We're experimenting with GKE and Kubernetes and we'd like to expose some services over https. I've read the documentation for <a href="https://cloud.google.com/...
<p>Tl;Dr: Watch this space for Kubernetes 1.2</p> <p>Till now Kubernetes has only supported L4 loadbalancing. This means the GCE/GKE loadbalancer opens up a tcp connection and just sends traffic to your backend, which is responsible for terminating ssl. As of Kubernetes 1.1, Kubernetes has an "Ingress" resource, but i...
<p>I deployed kubernetes with flanneld.service enabled in coreos. And then I started hdfs namenode and datanode via kubernetes replication-controller. I also created kubernetes service for namenode. The namenode service ip is 10.100.220.223, while the pod ip of namenode is 10.20.96.4. In my case, one namenode and one d...
<p>use the latest kubernetes and pass the params <code>--proxy-mode=iptables</code> to kube-proxy start command, HDFS cluster works now</p>
<p>Kubernetes volume support flocker? If support flocker volume, give an example about using flocker volume? Thanks! </p>
<p>Flocker is supported in Kubernetes release 1.1. A Flocker dataset can be referenced from a PersistentVolume or directly from a Pod volume.</p> <p><a href="http://kubernetes.io/v1.1/examples/flocker/" rel="nofollow">http://kubernetes.io/v1.1/examples/flocker/</a> <a href="http://kubernetes.io/v1.1/docs/api-reference...
<p>I have a picture below of my mac.</p> <ul> <li>K8S Cluster(on VirtualBox, 1*master, 2*workers)</li> <li>OS Ubuntu 15.04</li> <li>K8S version 1.1.1</li> </ul> <p>When I try to create a pod "busybox.yaml" it goes to pending status. How can I resolve it?</p> <p>I pasted the online status below for understanding with...
<p>"kubectl describe pod busybox" or "kubectl get pod busybox -o yaml" output could be useful.</p> <p>Since you didn't specify, I assume that the busybox pod was created in the default namespace, and that no resource requirements nor nodeSelectors were specified. </p> <p>In many cluster setups, including vagrant, we ...
<p><strong>Update</strong>: Kubernetes supports adding secrets directly to environment variables now. See pod example on <a href="https://github.com/pmorie/kubernetes/blob/60cf252e8b8acfdc12f99e9b12ce0daa140b96f0/docs/user-guide/secrets/secret-env-pod.yaml" rel="nofollow">github</a></p> <hr> <p><strong>Original post<...
<p>I noted your use case in the feature request for exposing secrets as environment variables: <a href="https://github.com/kubernetes/kubernetes/issues/4710" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/4710</a></p> <p>It's mainly the quoting that makes this tricky in shell. The following worked for ...
<p>We are moving our ruby microservices to kubernetes and we used to hold environment specific configuration in the <code>config/application.yml</code>. With kubernetes, you can create environment specific files for each service, e.g. <code>config/kubernetes/production.yml</code> etc. </p> <p>While kubernetes pod conf...
<p>You can do this a few ways, one is keep doing what you're doing in a single file, another is to use labels to specify which environment's config to use, and the other is use namespaces. I personally recommend namespaces, this way you can have separate <code>.yml</code> files for each environment that potentially sp...
<p>I am setting up a small Kubernetes cluster using a VM (master) and 3 bare metal servers (all running Ubuntu 14.04). I followed the Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/getting-started-guides/ubuntu.md" rel="noreferrer">install tutorial for Ubuntu</a>. Each bare metal ser...
<p>I finally solved the problem. In the yaml files describing the Replication Controllers, I was using <code>keyring:</code> in the volume section:</p> <pre><code>keyring: "ceph.client.admin.keyring" </code></pre> <p>After I <a href="https://ceph.com/planet/bring-persistent-storage-for-your-containers-with-krbd-on-k...
<p><strong>Background</strong> I'd like to connect <a href="https://hub.docker.com/_/wordpress/" rel="nofollow noreferrer">Wordpress</a> docker container to a Google Could SQL instance. By default Google Cloud SQL only expose an IPv6 address and preferably I'd like to connect Wordpress to this address but I can't find ...
<p>Currently, Google Cloud Platform <a href="https://cloud.google.com/compute/docs/networking?hl=en#networks" rel="nofollow">Networks</a> only support IPv4, so connecting to IPv6 addresses from GKE is not possible.</p>
<p>I'd like to try out the new <a href="http://kubernetes.io/v1.1/docs/user-guide/ingress.html" rel="nofollow">Ingress</a> resource available in Kubernetes 1.1 in Google Container Engine (GKE). But when I try to create for example the following resource: </p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress met...
<p>The issue is that your client (kubectl) doesn't support the new ingress resource because it hasn't been updated to 1.1 yet. This is mentioned in the <a href="https://cloud.google.com/container-engine/release-notes#november_12_2015" rel="nofollow">Google Container Engine release notes</a>:</p> <blockquote> <p>The ...
<p>In <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/examples/elasticsearch/production_cluster/README.md" rel="nofollow">the Kubernetes example of Elasticsearch production deployment</a>, there is a warning about using <code>emptyDir</code>, and advises to "be adapted according to your storage needs...
<p>The warning is so that folks don't assume that using <code>emptyDir</code> provides a persistent storage layer. An <code>emptyDir</code> volume will persist as long as the pod is running on the same host. But if the host is replaced or it's disk becomes corrupted, then all data would be lost. Using network mounted s...
<p>I've read the <a href="http://kubernetes.io/v1.0/docs/user-guide/production-pods.html#lifecycle-hooks-and-termination-notice" rel="nofollow">docs</a> on graceful termination of a pod in Kubernetes but I'm not quite sure how to map my specific use case of shutting down a Java process gracefully.</p> <p>What I want t...
<p>I started a bash shell inside the container and executed my command instead and that turned out to work:</p> <pre><code>command: ["/bin/bash", "-c", "PID=`pidof java` &amp;&amp; kill -SIGTERM $PID &amp;&amp; while ps -p $PID &gt; /dev/null; do sleep 1; done;"] </code></pre> <p>Without <code>/bin/bash</code> I coul...
<p>I'm developing a Docker-based web service, where each subscriber has private access to their own Docker container running in the cloud, exposing port 443.</p> <p>I've used <a href="https://github.com/jwilder/nginx-proxy" rel="nofollow">nginx-proxy/docker-gen</a> successfully to serve multiple Docker containers from...
<p>As of Kubernetes v1.1, you can now implement a Horizontal Pod Autoscaler: <a href="http://kubernetes.io/v1.1/docs/user-guide/horizontal-pod-autoscaler.html" rel="nofollow">http://kubernetes.io/v1.1/docs/user-guide/horizontal-pod-autoscaler.html</a></p>
<p>I want to implement a rescheduler like functionality which basically kills pods if it decides that the pods could be rescheduled in a better way (based on requiring less number of nodes/fitting etc). Till now I have created a new kubectl command which I want to run whenever I want to reschedule. I have also looked a...
<p>Firstly, please see <a href="https://github.com/kubernetes/kubernetes/issues/11793#issuecomment-150410114" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/11793#issuecomment-150410114</a> if you haven't already.</p> <blockquote> <p>I guess I can kill and restart pod using a mechanism sim...
<p>How do I set ulimit for containers in Kubernetes? (specifically ulimit -u)</p>
<p>It appears that you can't currently set a ulimit but it is an open issue: <a href="https://github.com/kubernetes/kubernetes/issues/3595" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/3595</a></p>
<p>I create a kubernetes cluster to test. but cannot create rc. I got error<code>reason: 'failedScheduling' no nodes available to schedule pods</code>:</p> <pre><code>I1112 04:24:34.626614 6 factory.go:214] About to try and schedule pod my-nginx-63t4p I1112 04:24:34.626635 6 scheduler.go:127] Failed to sch...
<p>I found the Solution, the reason is the version of kube-apiserver,kube-controller-manager and kube-scheduler does not match with the kubelet.</p> <p>the detail: <a href="https://github.com/kubernetes/kubernetes/issues/17154" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/17154</a></p>
<p>Followed this guide to starting a local-machine kubernetes cluster: <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/docker.html" rel="nofollow">http://kubernetes.io/v1.0/docs/getting-started-guides/docker.html</a></p> <p>I've created various pods with .yaml files and everything works, I can access ng...
<p>Tim, I did run it again using your steps, no difference, didn't work, however today I switched to the version 1.1 docs here:</p> <p><a href="http://kubernetes.io/v1.1/docs/getting-started-guides/docker.html" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/docker.html</a></p> <p>and also switch...
<p>I'm trying to create a pod with Postgres. After initialize, the Pod has to execute the following command:</p> <pre><code> "lifecycle": { "postStart": { "exec": { "command": [ "export", "PGPASSWORD=password;", "psql", "-h", "myhost", "-U", "root", "-d", "AppPostgresDB", "&lt;",...
<p>Try passing this to the shell:</p> <pre><code>"command": [ "/bin/bash", "-c", "export PGPASSWORD=password; psql -h myhost -U root -d AppPostgresDB &lt; /db-backup/backup.sql" ] </code></pre>
<p>I hope everyone here is doing good. I am trying to find a way to add entries to the containers /etc/hosts file while spinning up a pod. I was just wondering to know if there is any option/parameter that I could mention in my "pod1.json" which adds the entries to the containers /etc/hosts when its being created. Some...
<p>Kubernetes uses the <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/design/networking.md" rel="nofollow">IP-per-pod model</a>. If I understand correctly, you want to create three mongo pods, and write IP addresses of the three pods in <code>/etc/hosts</code> of each container. Modifying the <code>...
<p>When watching a replication controller, it returns it’s most recent <code>replicas</code> count under <code>ReplicationControllerStatus</code>. I could not find anywhere in the documentation what the status of the pod needs to be, in order for it to be included there. Is it enough for the pod to be scheduled? I’ve n...
<p>Very interesting question! For that to answer I believe we need to walk the Star Wars walk and <em>Use The Source</em>:</p> <ul> <li>The <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L62" rel="nofollow">ReplicationManager</a> has some hints concer...
<p><strong>Background:</strong></p> <p>Let's say I have a replication controller with some pods. When these pods were first deployed they were configured to expose port 8080. A service (of type LoadBalancer) was also create to expose port 8080 publicly. Later we decide that we want to export an additional port from th...
<p>If you name the ports in the pods, you can specify the target ports by name in the service rather than by number, and then the same service can direct target to pods using different port numbers.</p> <p>Or, as Yu-Ju suggested, you can do a read-modify-write of the live state of the service, such as via kubectl edit...
<p>I've been tasked with evaluating container management solutions. I'm aware there is a large number or options, but we need production ready, on premises solution. What are the options?</p>
<p>In descending order, from most mature and battle-tested at scale to less so:</p> <ul> <li><a href="https://mesosphere.github.io/marathon/docs/native-docker.html" rel="nofollow">Marathon</a>, a Apache Mesos framework</li> <li><a href="http://kubernetes.io/v1.1/" rel="nofollow">Kubernetes</a></li> <li><a href="http:/...
<p>On my Kubernetes cluster on GKE, I have the following persistent volume claims (PVCs):</p> <pre><code>kind: PersistentVolumeClaim apiVersion: v1 metadata: name: registry spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Gi </code></pre> <p>and:</p> <pre><code>kind: Persistent...
<p>This is a bug and is fixed by <a href="https://github.com/kubernetes/kubernetes/pull/16432" rel="nofollow">https://github.com/kubernetes/kubernetes/pull/16432</a></p>
<p>Is there a way to discover all the endpoints of a headless service from outside the cluster? </p> <p>Preferably using DNS or Static IPs</p>
<p>By <a href="http://kubernetes.io/third_party/swagger-ui/#!/api%2Fv1/watchNamespacedEndpointsList" rel="noreferrer">watching changes</a> to a list of Endpoints:</p> <pre><code>GET /api/v1/watch/namespaces/{namespace}/endpoints </code></pre>
<p>I've been working with a 6 node cluster for the last few weeks without issue. Earlier today we ran into an open file issue (<a href="https://github.com/kubernetes/kubernetes/pull/12443/files" rel="nofollow">https://github.com/kubernetes/kubernetes/pull/12443/files</a>) and I patched and restarted kube-proxy. </p> <...
<p>The issue turned out to be an MTU issue between the node and the master. Once that was fixed the problem was resolved.</p>
<p>With docker, I can pass log-driver=syslog command line option to forward container logs to syslog. How do I pass these docker arguments via Kubernetes yaml/json descriptor?</p>
<p>Starting with the available documentation: in your case on <a href="http://kubernetes.io/v1.1/docs/user-guide/logging.html" rel="nofollow">logging</a> and <a href="http://kubernetes.io/v1.1/docs/user-guide/volumes.html" rel="nofollow">volumes</a>. Taking these two sources together we arrive at something like the fol...
<p>I follow the <a href="http://kubernetes.io/v1.0/examples/rbd/" rel="nofollow">example</a> to use rbd in kubernetes, but can not success. who can help me!! the error :</p> <pre><code>Nov 09 17:58:03 core-1-97 kubelet[1254]: E1109 17:58:03.289702 1254 volumes.go:114] Could not create volume builder for pod 5df3610...
<p>You'll get "no volume plugins matched" if the rbd command isn't installed and in the path. </p> <p>As the example specifies, you need to ensure that ceph is installed on your Kubernetes nodes. For instance, in Fedora: $ sudo yum -y install ceph-common</p> <p>I'll file an issue to clarify the error messages.</p>
<p>I'm following the container engine walkthrough and I see that my VM Instance has a min CPU usage of ~80%. However, if I ssh into this box and run 'top' I see a much lower utilization. Can someone explain this to me as I must be missing something simple. Thank you. <a href="https://i.stack.imgur.com/n2Ut2.png" rel="n...
<p>There is a known (benevolent) bug in the ingress controller that is automatically added to your cluster in Kubernetes 1.1.1. If you are not using the controller, you can scale the number of replicas to zero:</p> <pre><code>kubectl scale rc l7-lb-controller --namespace=kube-system --replicas=0 </code></pre> <p>whic...
<p>I have a noob question. If I'm using a docker image that uses a folder located in the host to do something, Where should be located the folder in the kubernetes cluster? I'm ok doing this with docker since I know where is my host filesystem but I get lost when I'm on a kubernetes cluster.</p> <p>Actually, I don't k...
<p>Not so hard, actually. Check my gists may give you some tips:</p> <p><a href="https://gist.github.com/resouer/378bcdaef1d9601ed6aa" rel="nofollow">https://gist.github.com/resouer/378bcdaef1d9601ed6aa</a></p> <p>See, do not try to consume files from outside, just package them in a docker image, and consume them by ...
<p>After I manually install nfs client package under each node, then it works. But in GKE, slave node can be scale in and out. After create a new slave node, I lose nfs client package again.</p> <p>Is there any way we can install software package when kubernetes spin up a new slave node?</p>
<p>Starting last week, new GKE clusters should be on created on 1.1.1 by default, and the <code>nfs-common</code> package is installed on all 1.1.1 clusters. (For existing clusters, you'll need to wait until the hosted master is upgraded, then initiate a node upgrade.)</p> <p>See <a href="https://github.com/kubernetes...
<p>I am now doing experiments on using Kubernetes and Docker to provisioning services such as WordPress, Spark and Storm on 10 physical machines</p> <p>But after lots times of launching and terminating Docker Containers, the used memory would increase even I kill all the Containers via Kubernetes delete or Docker kill...
<p>It is not recommended to use external container garbage collection scripts. Kubernetes relies on exited containers as tombstones to reconstruct the pod status and/or serve logs. Even if you don't care about container logs, if you remove the exited containers before kubernetes examines them and properly records the s...
<p>I have spun up a Kubernetes cluster in AWS using the official "kube-up" mechanism. By default, an addon that monitors the cluster and logs to InfluxDB is created. It has been <a href="https://stackoverflow.com/questions/33068639/kubernetes-pods-some-die-after-running-for-a-day">noted in this post</a> that InfluxDB...
<p>You probably need to remove the manifest files for influxdb from the <code>/etc/kubernetes/addons/</code> directory on your "master" host. Many of the <code>kube-up.sh</code> implementations use a service (usually at <code>/etc/kubernetes/kube-master-addons.sh</code>) that runs periodically and makes sure that all t...
<p>After I manually install nfs client package under each node, then it works. But in GKE, slave node can be scale in and out. After create a new slave node, I lose nfs client package again.</p> <p>Is there any way we can install software package when kubernetes spin up a new slave node?</p>
<p>Please also see <a href="https://github.com/kubernetes/kubernetes/issues/16741" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/16741</a> where we're discussing nfs and pretty much exactly this problem (amongst others)</p>
<p>I have a new Kubernetes cluster on AWS that was built using the <code>kube-up</code> script from v1.1.1. I can successfully access the Elasticsearch/Kibana/KubeUI/Grafana endpoints, but cannot access Heapster/KubeDNS/InfluxDB from my machine, through the API proxy. I have seen some ancillary issues related to this...
<p>Unfortunately those URLs are incomplete. Influx's ports are named, so you need to say which port you want.</p> <p><code>https://MASTER_IP/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:http</code> or <code>https://MASTER_IP/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb:api</cod...
<p>Using Kubernetes -- Gogle Container Enginer setup , Within the Same google cloud Cluster, I am having the Front end Service -> nginx + Angular JS and REST API service --> NodeJS API. I don't want to expose NodeJS API KubeCTL Service public domain. So, 'ServiceType' is set to only 'ClusterIP' . How do we infer this N...
<blockquote> <p>Then this will not work ( ReferenceError: process is not defined ) , as these angularjs code is executed at the client side.</p> </blockquote> <p>If the client is outside the cluster, the only way it will be able to access the NodeJS API is if you expose it to the client's network, which is probably ...
<p>I'd like to implement a sticky-session Ingress controller. Cookies or IP hashing would both be fine; I'm happy as long as the same client is <em>generally</em> routed to the same pod.</p> <p>What I'm stuck on: it seems like the Kubernetes service model means my connections are going to be proxied randomly no matter...
<p>An ingress controller can completely bypass kube-proxy. The haproxy controller for example, <a href="https://github.com/kubernetes/contrib/blob/master/service-loadbalancer/service_loadbalancer.go#L155" rel="nofollow">does this and goes straight to endpoints</a>. However it <a href="https://github.com/kubernetes/cont...
<p>I'm using Kubernetes and I'm trying to create an <a href="http://kubernetes.io/v1.1/docs/user-guide/ingress.html" rel="noreferrer">ingress resource</a>. I create it using:</p> <pre><code>$ kubectl create -f my-ingress.yaml </code></pre> <p>I wait a while and a load balancer doesn't seem to be created. Running:</p>...
<p>You need to increase the quota assigned for your project. Please see <a href="https://cloud.google.com/compute/docs/resource-quotas" rel="noreferrer">https://cloud.google.com/compute/docs/resource-quotas</a> for the explanation of resource quotas, and follow the link on that page to check and/or request a quota incr...
<p>I'm very new to kubernetes and trying to conceptualize it as well as set it up locally in order to try developing something on it.</p> <p>There's a confound though that I am running on a windows machine.</p> <p>Their "getting started" documentation in github says you have to run Linux to use kubernetes.</p> <p>As...
<p>With Windows, you need <strong><a href="https://docs.docker.com/machine/" rel="nofollow">docker-machine</a></strong> and boot2docker VMs to run anything docker related.<br> There is no (not yet) "docker for Windows".</p> <p>Note that <a href="https://github.com/kubernetes/kubernetes/issues/7428" rel="nofollow">issu...
<p>Still new to Containers and Kubernetes here but I am dabbling with deploying a cluster on Google Containers Engine and was wondering if you can use a docker hub hosted image to deploy containers, so in my .yaml configuration file I'd say:</p> <pre><code> ... image: hub.docker.com/r/my-team/my-image:latest ... ...
<p>Yes, it is possible. The Replication Controller template or Pod spec image isn't special. If you specify <code>image: redis</code> you will get the latest tag of the official Docker Hub library Redis image, just as if you did <code>docker pull redis</code>.</p>
<p>I have already googled on this subject and found few threads. Based on these threads I have followed the following steps. But I am facing a problem.</p> <p>Basically, I want to create a docker image for mysql and then connect to it from my host machine (Mac OS X).</p> <p>Based on <a href="https://stackoverflow.com...
<p>So you basically you need to expose the mysql port to your host:</p> <pre><code>docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server:latest </code></pre> <p>Then you can access from your host using the mysql command line:</p> <pre><code>mysql -h127.0.0.1 -ppassword -uroot </c...
<p>I sent up a 4 node cluster (1 master 3 workers) running Kubernetes on Ubuntu. I turned on --authorization-mode=ABAC and set up a policy file with an entry like the following</p> <blockquote> <p>{"user":"bob", "readonly": true, "namespace": "projectgino"}</p> </blockquote> <p>I want user bob to only be able to lo...
<p>This is missing functionality in the <a href="https://github.com/kubernetes/kubernetes/blob/e024e55e8e54628e76b74b16a74435dffa761d99/pkg/auth/authorizer/abac/abac_test.go#L113" rel="nofollow">ABAC authorizer</a>. The fix is in progress: <a href="https://github.com/kubernetes/kubernetes/pull/16148" rel="nofollow">#16...
<p>Is it in any way possible to configure a Kubernetes Cluster that utilizes ressources from multiple IaaS providers at the same time e.g. a cluster running partially on GCE and AWS? Or a Kubernetes Cluster running on your bare metal and an IaaS provider? Maybe in combination with some other tools like Mesos? Are there...
<p>There is currently no supported way to achieve what you're trying to do. But there is a Kubernetes project under way to address it, which goes under the name of Kubernetes Cluster Federation, alternatively known as "Ubernetes". Further details are available here:</p> <p><a href="http://www.slideshare.net/quintonh...
<p>Standard practice for a rolling update of hosts behind load balancer is to gracefully take the hosts out of rotation. This can be done by marking the host "un-healthy" and ensuring the host is no longer receiving requests from the load balancer. </p> <p>Does Kubernetes do something similar for pods managed by a Rep...
<p>Actually, once you delete the pod, it will be in "terminating" state until it is destroyed (after terminationGracePeriodSeconds) which means it is removed from the service load balancer, but still capable of serving existing requests.</p> <p>We also use "readiness" health checks, and preStop is synchronous, so you ...
<p>I am using <strong>Kubernetes</strong> to deploy a <strong>Rails application</strong> to <strong>Google Container Engine</strong>.</p> <p>The database is using <strong>Google Cloud SQL</strong>.</p> <p>I know the database's ip address and set it into my Kubernetes config file:</p> <pre><code># web-controller.yml ...
<p>You would need to create the SSL cert like Yu-Ju Hong said, then you would have to tell ruby to use the certificate when connecting something like </p> <p><a href="http://makandracards.com/makandra/1701-use-ssl-for-amazon-rds-mysql-and-your-rails-app" rel="nofollow">http://makandracards.com/makandra/1701-use-ssl-fo...
<p>We'd like to have a separate test and prod project on the Google Cloud Platform but we want to reuse the same docker images in both environments. Is it possible for the Kubernetes cluster running on the test project to use images pushed to the prod project? If so, how?</p>
<p>Looking at your question, I believe by account you mean project.</p> <p>The <a href="https://cloud.google.com/container-registry/docs/#pulling_from_the_registry" rel="nofollow">command</a> for pulling an image from the registry is:</p> <pre><code>$ gcloud docker pull gcr.io/your-project-id/example-image </code></...
<p>I have a Kubernetes cluster running on Google Compute Engine and I would like to assign static IP addresses to my external services (<code>type: LoadBalancer</code>). I am unsure about whether this is possible at the moment or not. I found the following sources on that topic:</p> <ul> <li><a href="https://github.co...
<p><strong>TL;DR</strong> Google Container Engine running Kubernetes <strong>v1.1</strong> supports <code>loadBalancerIP</code> just mark the auto-assigned IP as <strong>static</strong> first.</p> <p>Kubernetes v1.1 supports <a href="https://kubernetes.io/docs/api-reference/v1.7/#servicespec-v1-core" rel="noreferrer">...
<p>All</p> <p>running computation Monte Carlo jobs on Google Compute Engine. Last time I ran them was September, and things have changed a bit since then. I used to run a lot of jobs with <code>kubectl</code> from some pod.json file, no RC, no restart, fire-and-forget setup. After I started jobs I used to get pods (<c...
<p><a href="https://github.com/kubernetes/kubernetes/pull/12112" rel="nofollow">PR #12112</a> changed <code>kubectl get pods</code> to not show terminated pods by default. You can get the old behavior (show all pods) by using <code>kubectl get pods -a</code></p>
<p>I've been struggling with setting up the Jenkins Kubernetes Plugin on the Google Container Engine.</p> <p>I have the plugin installed but I think all my builds are still running on master.</p> <p>I haven't found any good documentation or guides on configuring this.</p> <p><strong>UPDATE</strong></p> <p>I removed...
<p>You'll need to tell Jenkins how and where to run your builds by adding your Kubernetes cluster as a 'cloud' in the Jenkins configuration. Go to <code>Manage Jenkins -&gt; Configure System -&gt; Cloud -&gt; Add new cloud</code> and select 'Kubernetes'. You'll find the server certificate key, user name and password in...
<p><br> <br> We need to know about <code>pods</code> network isolation. <br> Is there a possibility to access <code>one pod</code> from <code>another one</code> in cluster? Maybe by <code>namespace</code> dividing? <br> We also need <code>pod</code>'s membership in local networks, which are not accessible from outside....
<p>In a standard Kubernetes installation, all pods (even across namespaces) share a flat IP space and can all communicate with each other. </p> <p>To get isolation, you'll need to customize your install to prevent cross namespace communication. One way to do this is to use OpenContrail. They recently wrote a <a href="...
<p>A new GKE cluster created at v1.1.1 and using latest kubectl (from gcloud components update) when deleting resources (say a pod) sometimes kubectl get pods in a 'Terminating' state and other times they delete (are removed from kubectl get pods output) right away.</p> <pre><code>NAME READY ...
<p>Yes, it is new behavior in <a href="https://github.com/kubernetes/kubernetes/releases/tag/v1.1.1" rel="nofollow noreferrer">v1.1.1</a>. PR <a href="https://stackoverflow.com/questions/33836696/gke-1-1-1-and-kubectl-delete-resource-terminating">#9165</a> added graceful deletion of pods, which causes them to appear in...
<p>Hi all we are looking for practically and tested guide or reference for kubernetes master high availability or other solution for master node fail over. </p>
<p>There are definitely folks running Kubernetes HA masters in production following the instructions for <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/high-availability.md" rel="nofollow">High Availability Kubernetes Clusters</a>. As noted at the beginning of that page, it's an advanced ...
<p>I am using flocker volumes. Should I install Powerstrip? I have installed flocker, but not installed Powerstrip. I create flocker pod fail: </p> <blockquote> <p>Unable to mount volumes for pod "flocker-web-3gy69_default": Get <a href="https://localhost:4523/v1/configuration/datasets" rel="nofollow">https://...
<p>You do not need to install Powerstrip anymore. (it's been deprecated)</p> <p>Powerstrip was a useful tool early on to prototype docker extensions but we've moved on since Docker has added the docker api via the plugins model. (Powerstrip was essentially a Precurser to docker plugins) <code>docker --volume-driver=fl...
<p>In this official document, it can run command in a yaml config file:</p> <blockquote> <p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/" rel="noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/</a></p> </blockquote> <pre><code>apiVersion: v1 kind: Pod metadata: name: hello...
<pre><code>command: ["/bin/sh","-c"] args: ["command one; command two &amp;&amp; command three"] </code></pre> <p><strong>Explanation:</strong> The <code>command ["/bin/sh", "-c"]</code> says "run a shell, and execute the following instructions". The args are then passed as commands to the shell. In shell scripting a ...
<p>I have a setup of kubernetes on a coreos baremetal. For now I did the connection from outside world to service with a nginx reverse-proxy.</p> <p>I'm trying the new Ingress resource. for now I have added a simple ingress:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: kube-ui spec: ...
<p>POSTing this to the API server will have no effect if you have not configured an Ingress controller. You need to choose the ingress controller implementation that is the best fit for your cluster, or implement one. Examples and instructions can be found <a href="http://kubernetes.io/docs/user-guide/ingress/" rel="n...
<p>I am going through the Openshift V3 documentation and got confused by services and routes details.</p> <p>The description in <a href="https://docs.openshift.org/latest/architecture/infrastructure_components/kubernetes_infrastructure.html#service-proxy" rel="noreferrer">service</a> says that:</p> <blockquote> <p>...
<p>Routes are http, HTTPS, or TCP wrapped with TLS. You can use a service with a "node port", which load balances your app instances over TCP or udp at a high port exposed on each node. </p> <p>Routes point to services to get their source data, but since routes expect to be able to identify which backend service to ...
<p>I can add a container to a pod by editing the pod template, but I'm looking for something simpler. Is there any way to add a container to a deployed OpenShift pod without editing the pod template? CLI preferable.</p>
<p>You cannot add or remove containers in a running pod. If you are using replication controller, <code>kubectl rolling-update</code> is the easiest solution, but this will require editing the pod template. That said, are you sure you need to add your containers to the existing pod? Unless strictly necessary, it's bett...
<p>When we create a yml for the replication controller, we can give labels for the pod that is being created.</p> <pre><code>apiVersion: v1 kind: ReplicationController metadata: name: redis spec: template: metadata: labels: app: redis tier: backend </code></pre> <p>Can the containers tha...
<p>Check out the <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="nofollow noreferrer">Downward API</a>, which allows the container to know more about itself.</p>
<p>I feel very confused when use the kubernetes! Where can I find about the specify api about the components of kubernetes ? such as <code>pod</code>, <code>service</code>, <code>volumes</code>, and <code>Persistent Volumes</code> and so on, when I create the components use the configure files. </p> <p>Who can help me...
<p>Sorry about this question, I had find it.</p> <p><a href="http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html" rel="nofollow">http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html</a></p>
<p>I'm trying to use kubectl exec to enter one of my containers, but I'm getting stuck on this error.</p> <pre><code>$ kubectl exec -it ubuntu -- bash error: Unable to upgrade connection: { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "x509: cannot validate ...
<p>If you used this command to create your certificate:</p> <pre><code>openssl x509 -req -days 365 -in server.csr -CA ca.pem -CAkey ca-key.pem \ -CAcreateserial -out server-cert.pem </code></pre> <p>Then your issue can be resolved by doing the following as the 'client' cert uses an -extfile extfile.cnf:</p> <pre...
<blockquote> <p>Relates to <a href="https://stackoverflow.com/questions/31664060/how-to-call-a-service-exposed-by-a-kubernetes-cluster-from-another-kubernetes-cl?rq=1">How to call a service exposed by a Kubernetes cluster from another Kubernetes cluster in same project</a>.</p> <p>Asking again since Kubernetes...
<p>This is one of the large problems that Kubernetes is trying to solve with <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/federation.md#cross-cluster-service-discovery" rel="nofollow noreferrer">Cross-Cluster Service Discovery</a> as a part of the Cluster Federation plans. You can also c...
<p>I can add a container to a pod by editing the pod template, but I'm looking for something simpler. Is there any way to add a container to a deployed OpenShift pod without editing the pod template? CLI preferable.</p>
<p>There is no command today that makes it easy to add a container to the pod template for an RC or deployment. You can use oc new-app to quickly generate deployment configs that have multiple containers with</p> <pre><code>oc new-app php+apache+somethingelse </code></pre> <p>But this won't let you deeply customize ...
<p>I know how to mount git repo when I start pod. See: </p> <pre><code>apiVersion: v1 kind: Pod metadata: name: server spec: containers: - image: nginx name: nginx volumeMounts: - mountPath: /mypath name: git-volume volumes: - name: git-volume gitRepo: repository: "git@somewhere:m...
<p>You can't clone only one file. <code>gitRepo</code> executes <code>git clone</code> which only allows you to clone the entire repository. </p> <p><code>volumeMounts</code> doesn't support executing command in it.</p>
<p>I am setting up a small Kubernetes cluster using a VM (master) and 3 bare metal servers (all running Ubuntu 14.04). I followed the Kubernetes <a href="https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/getting-started-guides/ubuntu.md" rel="nofollow">install tutorial for Ubuntu</a>. Each bare metal serve...
<p>A few potential problems here: 1) Ceph needs its nodes to be up and running to be accessible: did you say the nodes were mounting disk from a different Ceph cluster, or is the Ceph cluster running on the same nodes? If the same nodes, then it makes sense that the drive not being accessible paralyzes K8s.</p> <p>2) ...
<p>I have two separate Kubernetes clusters that will be used for a staging and a production environment, respectively. I want to have YAML manifests for the Kubernetes API objects I will be submitting to each cluster, but some of the objects will have slightly different configurations between the two environments.</p> ...
<p>You can't really do this right now. The issue to follow if you're interested in templating is <a href="https://github.com/kubernetes/kubernetes/issues/11492" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/11492</a></p> <p>Also, this is currently a topic of discussion in the configuration SIG <a href...
<p>If kube-master or etcd service down in my kubernetes cluster, can my Pod/Service still work? Also, if the network is still work?</p>
<p>The containers in a pod continue to run, yes. If the master components are not available this means no new pods/services can be launched, but existing ones continue to operate. Note that this behaviour is also one of the good practices and lessons learned from <a href="http://research.google.com/pubs/pub43438.html" ...
<p>I have a proxy service that wraps 3 pods (say pod A, pod B, pod C). Some container inside pod A needs to get virtual IPs of other two pods. How can I do this?</p>
<p>Two options:</p> <ol> <li>Talk to the Kubernetes API to get the endpoints for the service. (either with <code>kubectl get endpoints SVCNAME</code> or by GETing the <code>/api/v1/namespaces/{namespace}/endpoints/{svcname}</code> path on the apiserver)</li> <li>Less likely to be of use, but if you <a href="https://gi...
<p>Both Kubernetes Pods and the results of Docker Compose scripts (henceforth: "Compositions") appear to result in clusters of virtual computers.</p> <p>The computers in the clusters can all be configured to talk to each other so you can write a single script that mirrors your entire end-to-end production config. A si...
<p><a href="https://github.com/docker/compose" rel="noreferrer"><code>docker compose</code></a> is just a way to declare the container you have to start: <del>it has no notion of node or cluster</del>, unless it launches swarm master and swarm nodes, but that is <a href="https://docs.docker.com/swarm/" rel="noreferrer"...
<p>I am trying to run a shell script at the start of a docker container running on Google Cloud Containers using Kubernetes. The structure of my app directory is something like this. I'd like to run prod_start.sh script at the start of the container (I don't want to put it as part of the Dockerfile though). The current...
<p>After a lot of experimentations I believe adding the script to the <code>Dockerfile</code>:</p> <pre><code>ADD prod_start.sh /backend/prod_start.sh </code></pre> <p>And then calling the command like this in the <code>yaml</code> controller file:</p> <pre><code>command: ['/bin/sh', './prod_start.sh'] </code></pre>...
<p>I want send multiple entrypoint commands to a Docker container in the <code>command</code> tag of kubernetes config file.</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: hello-world spec: # specification of the pod’s contents restartPolicy: Never containers: - name: hello image: "ubuntu:14.04" ...
<p>There can only be a single entrypoint in a container... if you want to run multiple commands like that, make bash be the entry point, and make all the other commands be an argument for bash to run:</p> <p><code>command: ["/bin/bash","-c","touch /foo &amp;&amp; echo 'here' &amp;&amp; ls /"]</code></p>
<p>From the <a href="http://blog.kubernetes.io/2015/09/kubernetes-performance-measurements-and.html" rel="nofollow">performance test report</a> we can find that the <code>kubernetes</code> can support 100 nodes.</p> <p>To do the same test, I have set up a 100 nodes <code>kubernetes</code> cluster, but the <code>kube-a...
<p>The doc you link to describes the methodology used (specifically the master VM size). The cluster is created in Google Compute Engine using the default cluster/kube-up.sh script from the repository, with all the default settings implied by that.</p> <p>How large is the master that you're using? If it's really small...
<p><strong>I have</strong></p> <ul> <li>Kubernetes: v.1.1.1</li> <li>iptables v1.4.21 </li> <li>kernel: 4.2.0-18-generic which come with Ubuntu wily</li> <li>Networking is done via L2 VLAN terminated on switch</li> <li>no cloud provider </li> </ul> <p><strong>what I do</strong></p> <p>I'm experimenting with iptables...
<p>For future, the results of <code>iptables-save</code> are much easier to read (to me anyway).</p> <p>I don't see anything missing here.</p> <p><code>KUBE-SERVICES</code> traps 10.116.0.2 port 53/UDP and passes it to <code>KUBE-SVC-TCOU7JCQXEZGVUNU</code></p> <p><code>KUBE-SVC-TCOU7JCQXEZGVUNU</code> has just one ...
<p>I have a kubernetes (0.15) cluster running on CoreOS instances on Amazon EC2</p> <p>When I create a service that I want to be publicly accessible, I currently add some private IP addresses of the EC2 instances to the service description like so:</p> <pre><code>{ "kind": "Service", "apiVersion": "v1beta3", "m...
<p>If someone will reach this question then I want to let you know that external load balancer support is available in latest kubernetes version.</p> <p><a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">Link to the documentation</a></p>
<p>I created a volume using the following command.</p> <pre><code>aws ec2 create-volume --size 10 --region us-east-1 --availability-zone us-east-1c --volume-type gp2 </code></pre> <p>Then I used the file below to create a pod that uses the volume. But when I login to the pod, I don't see the volume. Is there somethin...
<p>I just stumbled across the same thing and found out after some digging, that they actually changed the volume mount syntax. Based on that knowledge I created this PR for documentation update. See <a href="https://github.com/kubernetes/kubernetes/pull/17958" rel="nofollow noreferrer">https://github.com/kubernetes/kub...
<p>I am trying to setup kubernetes in aws and following the guides at <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker-multinode" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker-multinode</a></p> <p>I couldn't unde...
<p>Kubernetes is a set of daemons/binaries:</p> <ul> <li><code>kube-apiserver</code> (AKA the master), </li> <li><code>kubelet</code> (start/stop containers, sync conf.),</li> <li><code>kube-scheduler</code> (resources manager)</li> <li><code>kube-controller-manager</code> (monitor RC, and maintain the desired state)<...
<p>I was going through a Kubernetes tutorial on Youtube and found the following UI which demonstrates pod and service arrangements of Kubernetes cluster.How can I install this UI in my Kubernetes setup? </p> <p><a href="https://i.stack.imgur.com/UGa0Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/...
<p>In order to use this UI, go to the <a href="https://github.com/saturnism/gcp-live-k8s-visualizer" rel="nofollow">saturnism/gcp-live-k8s-visualizer</a> GitHub repo and follow the steps, there. </p>
<p><strong>Background</strong></p> <p>We're using Jenkins to deploy a new version of a Kubernetes (k8s) replication controller to our test or prod cluster. The test and prod (k8s) clusters are located under different (google cloud platform) projects. We have configured two profiles for our gcloud SDK on Jenkins, one f...
<p>You can pass the <code>--cluster=</code> or <code>--context=</code> flags to kubectl to set a single run. For example, if I have two clusters in my ~/.kube/config "foo" and "bar":</p> <pre><code>$ kubectl --cluster=foo get pods NAME READY STATUS RESTARTS AGE foo-ht1qh 1/1 Running 0 ...