prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am attempting to migrate my on premises cluster to GKE. In order to facilitate this transition I need to be able to resolve the names of legacy services.</p>
<p>Assume that the networking/VPN is a solved problem.</p>
<p>Is there are way to do this with GKE currently?</p>
<p>Effectively I am attempting to add a ... | <p>I want to add to what Eric said, and mutate it a bit.</p>
<p>One of the realizations we had during the kubernetes 1.1 "settling period" is that there are not really specs for things like resolv.conf and resolver behavior. Different resolver libraries do different things, and this was causing pain for our users.</p... |
<p>I don't want to setup another etcd cluster.</p>
<p>How can I access the built-in etcd from kubernetes pod?</p>
<p>I suppose first I need create a service account and use this account to launch the pod. </p>
<p>Then how can the container in this pod discover the URI of built-in etcd?</p>
<p>Thank you</p>
| <p>The etcd instance used by the Kubernetes apiserver is generally treated as an implementation detail of the apiserver and is not designed to be reused by user applications. By default it is installed to only listen for connections on localhost and run on a machine where no user applications are scheduled.</p>
<p>It ... |
<p>I have tried all the basics of Kubernetes and if you want to update your application all you can use <code>kubectl rolling-update</code> to update the pods one by one without downtime. Now, I have read the kubernetes documentation again and I have found a new feature called <code>Deployment</code> on version <code>v... | <p>Deployment is an Object that lets you define a declarative deploy.
It encapsulates </p>
<ul>
<li><p>DeploymentStatus object, that is in charge of managing the number of replicas and its state.</p></li>
<li><p>DeploymentSpec object, which holds number of replicas, templateSpec , Selectors, and some other data that d... |
<p>I have specified a certain <a href="http://kubernetes.io/v1.1/docs/user-guide/images.html#specifying-imagepullsecrets-on-a-pod" rel="nofollow">image pull secret</a> for my replication controller, but it doesn't appear to be applied when downloading the Docker image:</p>
<pre><code>$ ~/.local/bin/kubectl --kubeconfi... | <p><strong>Update</strong> (That is what I did to use a private image):</p>
<p>First log in quay.io:</p>
<pre><code>$ docker login quay.io
Username (username):
Password:
WARNING: login credentials saved in /Users/user/.docker/config.json
Login Succeeded
</code></pre>
<p>Then I created a new file (my-credentials.json... |
<p>I have the following replication controller in Kubernetes on GKE:</p>
<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
name: myapp
labels:
app: myapp
spec:
replicas: 2
selector:
app: myapp
deployment: initial
template:
metadata:
labels:
app: myapp
deplo... | <p>Kubernetes will pull upon Pod creation if either (see <a href="https://kubernetes.io/docs/concepts/containers/images/#updating-images" rel="noreferrer">updating-images doc</a>):</p>
<ul>
<li>Using images tagged <code>:latest</code></li>
<li><code>imagePullPolicy: Always</code> is specified</li>
</ul>
<p>This is grea... |
<p>I'm working through the sample tutorial on OpenShift 3. I created the example application nodejs-mongodb-example. But in the "edit parameters" step, I put the wrong URL to my forked repository, and I get a failed build.</p>
<p>I thought maybe I'd be able to extract the buildConfig file (is that a template?) on the ... | <p>You can use the <code>oc edit</code> command to edit an existing object. For example, <code>oc edit buildconfig/myapp</code> to edit the BuildConfig named myapp.</p>
|
<p>I have implemented basic authentication on my kubernetes api-server, now I am trying to configure my <code>./kube/config</code> file in a way I could simply run, <code>kubectl get pods</code></p>
<pre><code> kubectl config set-cluster digitalocean \
--server=https://SERVER:6443 \
... | <p>Can you provide the output of <code>kubectl config view</code>? I think the problem might be you need to do something like</p>
<p><code>kubectl config set-credentials cluster-admin --username=admin --password=PASSWORD</code></p>
<p>instead of </p>
<p><code>kubectl config set-credentials admin --password="PASSWORD... |
<p>I have set up DNS in my Kubernetes (v1.1.2+1abf20d) system, on CoreOS/AWS, but I cannot look up services via DNS. I have tried debugging, but cannot for the life of me find out why. This is what happens when I try to look up the kubernetes service, which should always be available:</p>
<pre><code>$ ~/.local/bin/kub... | <p>There were two things I needed to do:</p>
<ol>
<li>Configure kube2sky via kubeconfig, so that it's properly configured for TLS.</li>
<li>Configure kube-proxy via kubeconfig, so that it's properly configured for TLS and finds the master node.</li>
</ol>
<h2>/etc/kubernetes/kube.conf on master node</h2>
<pre><code>... |
<p>Imagine the common scenario of a memcache (e.g. Redis) running with multiple pods across several nodes. Another service, such as a PHP application, uses Redis, and is configured to use the cluster IP of the Redis service. From my understanding this is routed through to kube-proxy (or in newer Kubernetes versions, ha... | <p>As you mentioned, as of Kubernetes 1.1 the load balancing algorithm is a plain Round Robin so the location of the pods is not taken into account.</p>
|
<p>Could someone explain how to setup the external Ip on the 'frontend' service. I know that Vagrant don't support "type: LoadBalancer" and I don't know how to expose an Ip to my host. Thanks</p>
| <p>First of all you should change your service type in the guestbook service definition:</p>
<pre><code>diff --git a/guestbook-service.json b/guestbook-service.json
index cc7640e..fadef78 100644
--- a/guestbook-service.json
+++ b/guestbook-service.json
@@ -17,6 +17,6 @@
"selector":{
"app":"guestbook"
... |
<p>I am using WmWare Workstation running a Linux vm which runs the vagrant and kubernetes environment.</p>
<p>I have a problem using kubernetes with vagrant. Every time if I shutdown the kubernetes cluster with the kube-down.sh tool and restart with kube-up.sh, I cannot connect to the minions anymore! I think it has s... | <p>With a slow network it will take a while to set up everything behind the scenes; for me it took about 1h before I saw every pod in a running state:</p>
<pre><code>$ kubectl get pods
NAME READY STATUS RESTARTS AGE
guestbook-7ihd2 1/1 Running 0 2h
guestbook-8fjs3 1/... |
<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>You can actually do this in the way that you initially were expecting to.</p>
<p>Thanks to this answer for helping me get there - <a href="https://stackoverflow.com/a/33888424/370364">https://stackoverflow.com/a/33888424/370364</a></p>
<p>You can use the following approach to shove hosts into your container's /etc... |
<p>I have am using OpenShift 3, and have been trying to get Fabric8 setup.</p>
<p>Things havent been going to well, so I decided to remove all services and pods.</p>
<p>When I run</p>
<pre><code>oc delete all -l provider=fabric8
</code></pre>
<p>The cli output claims to have deleted a lot of pods, however, they are... | <p>Deletion is graceful by default, meaning the pods are given an opportunity to terminate themselves. You can force a graceless delete with <code>oc delete all --grace-period=0 ...</code></p>
|
<p>After playing with docker landscape for several months, I still found it is really counter intuitive to use Kubernetes Pod. I have not encountered any use case where pod is more natural a fit than container. When I am asked to use a Pod, I usually just use a single container Pod. I am trying to do a demo showcasing ... | <p>Jared pointed to some good examples in his comments above. As Brian Grant mentioned in the linked github issue, pushing log data and loading data are the most common uses inside of Google.</p>
<p>For a concrete example in the Kubernetes repository, you can look at the definition for the <a href="https://github.com/... |
<p>According to <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/custom-metrics.md" rel="nofollow" title="Kubernetes Custom Metrics">Kubernetes Custom Metrics Proposal</a> containers can expose its app-level metrics in Prometheus format to be collected by Heapster. </p>
<p>Could anyone elab... | <p>Not to speak for the original author's intent, but I believe that proposal is primarily focused on custom metrics that you want to use for things like scheduling and autoscaling within the cluster, not for general purpose monitoring (for which as you mention, pushing metrics is sometimes critical).</p>
<p>There isn... |
<p>After switching gcloud projects using ...</p>
<pre><code>gcloud init
</code></pre>
<p>... and then try to do some kubectl command, like this for instance:</p>
<pre><code>kubectl get rc
</code></pre>
<p>... I get this error:</p>
<pre><code>error: couldn't read version from server: Get
https://130.211.59.254/api:... | <p>This is because the keys to your old cluster is cached. I'm not sure why they are not updated by the gcloud init command (that's what one would intuitively expect, or at least some kinder error message from kubectl)</p>
<p>You solve it by simply getting the credentials of the cluster in the new configuration:</p>
... |
<p>What are the benefits of a Job with single Pod over just a single Pod with restart policy OnFailure to reliably execute once in kubernetes?</p>
<p>As discussed in <a href="https://github.com/kubernetes/kubernetes/issues/20255" rel="noreferrer">Job being constanly recreated despite RestartPolicy: Never</a>, in case ... | <p>The difference is that if a Job doesn't complete because the node that its pod was on went offline for some reason, then a new pod will be created to run on a different node. If a single pod doesn't complete because its node became unavailable, it won't be rescheduled onto a different node.</p>
|
<p>I am running a Kubernetes cluster hosted on GKE and would like to write an application (written in Go) that speaks to the Kubernetes API. My understanding is that I can either provide a client certificate, bearer token, or HTTP Basic Authentication in order to authenticate with the apiserver. I have already found th... | <p>If your application is running inside the cluster, you can use <a href="http://kubernetes.io/docs/user-guide/service-accounts/" rel="nofollow">Kubernetes Service Accounts</a> to authenticate to the API server.</p>
<p>If this is outside of the cluster, things aren't as easy, and I suppose your concerns are justified... |
<p>I have a kubernetes single-node setup (see <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-vagrant-single.html">https://coreos.com/kubernetes/docs/latest/kubernetes-on-vagrant-single.html</a> )</p>
<p>I have a service and an replication controller creating pods. Those pods need to connect to the o... | <p>Thanks to all those who helped on GitHub.<br>
The workaround turned out to be as follows: </p>
<blockquote>
<p>tanen01 commented on Feb 4 Seeing the same problem here on k8s v1.1.7
stable</p>
<p>Issue occurs with:</p>
</blockquote>
<pre><code>kube-proxy --proxy-mode=iptables
</code></pre>
<blockquote>
... |
<p>I am using Kubernetes on a coreOS cluster hosted on DigitalOcean.
And using <a href="https://github.com/cescoferraro/kubernetes-do" rel="nofollow noreferrer">this</a> repo to set it up. I started the apiserver with the following line:</p>
<pre><code> /opt/bin/kube-apiserver --runtime-config=api/v1 --allow-privile... | <p>If you want your users to authenticate using HTTP Basic Auth (user:password), you can add:</p>
<pre><code>--basic-auth-file=/basic_auth.csv
</code></pre>
<p>to your kube-apiserver command line, where each line of the file should be <code>password, user-name, user-id</code>. E.g.:</p>
<pre><code>@dm1nP@ss,admin,ad... |
<p>I've been able to successfully install Kubernetes in a CentOS 7 testing environment using the "virt7-testing" repo as described in the CentOS "<a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/centos/centos_manual_config.md" rel="nofollow">Getting Started Guide</a>" i... | <p>It's not the best solution to pull outside of OEL, but I couldn't find an OEL repository with these packages, so I used this:</p>
<pre><code>[]# cat /etc/yum.repos.d/virt7-common.repo
[virt7-common]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/$basearch/
en... |
<p>kube-proxy has an option called --proxy-mode,and according to the help message, this option can be <strong>userspace</strong> or <strong>iptables</strong>.(See below)</p>
<pre><code># kube-proxy -h
Usage of kube-proxy:
...
--proxy-mode="": Which proxy mode to use: 'userspace' (older, stable) or 'iptables' (ex... | <p>Userspace and iptables refer to what actually handles the connection forwarding. In both cases, local iptables rules are installed to intercept outbound TCP connections that have a destination IP address associated with a service. </p>
<p>In the userspace mode, the iptables rule forwards to a local port where a go ... |
<p>Is it possible to schedule upcoming Pods/Containers based on their priorities?
(if container1 is critical and needs resources, the google orchestrator can kill other low priority containers)
If yes, is there some specific priorities tags (like: critical, monitoring, production...)? </p>
| <p>This use case is described in both the <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf" rel="noreferrer">Borg paper</a> and the <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41684.pdf" rel="noreferrer">Omega paper</a>. Howe... |
<pre><code>docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged=true \
-d \
gcr.io/google_containers/hype... | <p>When you start kubernetes with docker, you choose between two models:</p>
<ul>
<li><a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/images/hyperkube/master.json" rel="nofollow">--config=/etc/kubernetes/manifests</a> </li>
<li><a href="https://github.com/kubernetes/kubernetes/blob/master/cluster... |
<p>I have 3 kubernetes services which are:</p>
<pre><code>service 1:
name: abc
service 2:
name: def
service 3:
name: hgk
</code></pre>
<p>In application running on service 1, I successfully use environment variables to get cluster IP of other services. </p>
<pre><code>System.getenv(DEF_SERVICE_HOST); --> suc... | <p>The only service environment variables that are populated in a pod are the services that existed before the pod created. Environment variables are not injected into running pods once they've already been started.</p>
<p>I'm guessing that you created the <code>abc</code> replication controller / pods before you crea... |
<p>It seems that the <a href="https://cloud.google.com/monitoring/agent/install-agent"><strong>Google Monitoring Agent</strong> (powered by <em>Stackdriver</em>)</a> should be installed on each <em>Node</em> (i.e. each compute instance, i.e. each machine) of a <em>Kubernetes</em> cluster.</p>
<p>However the new <em>pl... | <p>To monitor each machine (memory, CPU, disk...) it's possible to install the agent on each node (i.e. on each Compute Instance of your GKE cluster). Note that it'll not work with auto-scaling in the sense that re-created nodes won't have the agent installed.</p>
<p>To monitor services (number of requests/s, client c... |
<p>I'm running Kubernetes via <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="noreferrer">Docker</a>. Following the tutorial I launched an Nginx POD using <code>kubectl run nginx --image=nginx --port=80</code>. However this seems to create orphaned PODs (without a replication controller). <code>... | <p>With v1.2 Kubernetes we use <code>ReplicaSet</code> (a newer form of <code>ReplicationController</code>). Given that you have a <code>ReplicaSet</code>, you must have used a v1.2 client to create it. But it doesn't stop there. What 1.2 actually creates for you is a <code>Deployment</code> which itself manages <co... |
<p>We are using kubernetes 1.1.8 (with flannel) but with 1.2 about to drop any input on this topic that is specific to 1.2 is fine.</p>
<p>We run kubernetes in our own datacenters on bare metal which means that we need to do maintenance on worker nodes which take them in and out of production. </p>
<p>We have a pro... | <p>Checkout the '<a href="http://kubernetes.io/docs/user-guide/kubectl/kubectl_drain/" rel="nofollow">kubectl drain</a>' command:</p>
<pre><code># Drain node "foo", even if there are pods not managed by a ReplicationController, Job, or DaemonSet on it.
$ kubectl drain foo --force
# As above, but abort if there are po... |
<p>I tried creating a new kube cluster via googleapis with oAuth authentication. But I am getting an error that
<strong>"HTTP Load Balancing requires the '<a href="https://www.googleapis.com/auth/compute" rel="noreferrer">https://www.googleapis.com/auth/compute</a>' scope."</strong>.
I came to know that google has up... | <p>That error message was due to an error on our part while rolling out support for Kubernetes 1.2 in Google Container Engine. We've fixed the issues, and you can now create a container cluster using the api explorer. Sorry for the trouble. </p>
|
<p>I am creating an app in Origin 3.1 using my Docker image. </p>
<p>Whenever I create image new pod gets created but it restarts again and again and finally gives status as "CrashLoopBackOff". </p>
<p>I analysed logs for pod but it gives no error, all log data is as expected for a successfully running app. Hence, n... | <p>You are seeing this because whatever process your image is starting isn't a long running process and finds no TTY and the container just exits and gets restarted repeatedly, which is a "crash loop" as far as openshift is concerned.</p>
<p>Your dockerfile mentions below :</p>
<p>ENTRYPOINT ["container-entrypoint"]<... |
<p>What is the correct way to install <a href="https://github.com/kubernetes/kubernetes/tree/release-1.1/cluster/addons" rel="noreferrer">addons</a> with Kubernetes 1.1? The <a href="https://github.com/kubernetes/kubernetes/tree/release-1.1/cluster/addons" rel="noreferrer">docs</a> aren't as clear as I'd like on this s... | <blockquote>
<p>... they seem to imply that one should copy addons' yaml files to /etc/kubernetes/addons on master nodes, but I have tried this and nothing happens.</p>
</blockquote>
<p>This is only true if you are using one of the salt-based installation mechanisms. </p>
<blockquote>
<p>So, how should I really i... |
<p>We like to know if there is a way to get the service level monitoring parameters like ( how many request / sec, latency / request , etc...) from the Kubernetes Service?.
I understand that if Kubernetes service is created with type LoadBalancer, then we can leverage the cloud provider interfaces for those metrics; Ho... | <p>Not presently. This is being tracked in <a href="https://github.com/kubernetes/kubernetes/issues/9125" rel="nofollow">issue 9215</a>. As is pointed out in the issue, use of iptables makes this non-trivial.</p>
|
<p>With command, I can add label as below</p>
<pre><code>kubectl label pod POD_NAME KEY1=VALUE1
</code></pre>
<p>How could I do that from kubernetes API?</p>
<p>I guess it can be done by <code>PATCH /api/v1/namespaces/{namespace}/pods/{name}</code></p>
<p>Here is pod.json</p>
<pre><code>{
"apiVersion": "v1",
... | <p>Set content-type to <code>application/json-patch+json</code> and specify the patch in <a href="http://jsonpatch.org" rel="noreferrer">http://jsonpatch.org</a> format. </p>
<pre><code>$ cat > patch.json <<EOF
[
{
"op": "add", "path": "/metadata/labels/hello", "value": "world"
}
]
EOF
$ curl --request... |
<p>I am trailing Kubernetes on AWS, and I have a cluster set up, but having trouble creating an application by pulling a docker image from an insecure repo.</p>
<p>When I created the cluster, I ensured that the environment variable <code>KUBE_ENABLE_INSECURE_REGISTRY=true</code> was set to true. But I still don't seem ... | <p>According to this <a href="https://github.com/kubernetes/kubernetes/blob/release-1.2/cluster/gce/config-default.sh#L85" rel="nofollow">code</a>, it seams that, only registries on network 10.0.0.0/8 can be insecure, is your registry on this range? What about setting <code>EXTRA_DOCKER_OPTS="--insecure-registry YOUR_R... |
<p>I am attempting to setup Kubernetes locally using a docker instance. I am following <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="noreferrer">this documentation</a> but get stuck at the point of creating a new service and exposing the ports.</p>
<p>I have the docker container pulled and I h... | <p>Kubernetes documentation for docker is outdated for now. Some elements need to be added.</p>
<p>This <a href="https://github.com/kubernetes/kubernetes/issues/4869" rel="nofollow">kubernetes issue</a> is the one to follow.</p>
<p>You can find at <a href="https://github.com/kubernetes/kubernetes/issues/4869#issuecom... |
<p>We use Kubernetes <code>Job</code>s for a lot of batch computing here and I'd like to instrument each Job with a monitoring sidecar to update a centralized tracking system with the progress of a job.</p>
<p>The only problem is, I can't figure out what the semantics are (or are supposed to be) of multiple containers... | <p>You can use the <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="noreferrer">downward api</a> to figure out your own podname from within the sidecar, and then retrieving your own pod from the apiserver to lookup exist status. Let me know how this goe... |
<p>I've started running kubernetes on GCE.
I setup a 3x f1-micro cluster and Im running:
* influxdb x1
* Grafana x1
* nginx x1
* phpfpm7 x1
* golang x2
* redis x1</p>
<p>I keep having all my container restarting regularly, in 1h time, grafana restarted 4x, redis 3x, my golangs 2x, nginx 4x.
On my local, they nev... | <p>I actually played around with the resources and limits of each container, deactivated heapster on the kube-system namespace and everthing runs now fine!</p>
|
<p>I'm newbie of the Kubernetes while I'm using Google Cloud Container. I just follow the tutorials as belows:</p>
<p><a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow">https://cloud.google.com/container-engine/docs/tutorials/http-balancer</a>
<a href="http://kubernetes.io/... | <p>Now that kubectl run creates a deployment, you specify that the type being exposed in a deployment rather than a replication controller:</p>
<pre><code>kubectl expose deployment nginx --target-port=80 --type=NodePort
</code></pre>
|
<p>I would like to mount Google storage bucket in Google Container Engine using gcafuse or any other tool/other provision. The container runs under Google container engine So,we need to use yaml file to define few parameters in it.</p>
<p>If there is any kind of thing that can be used in .yaml file to build new replic... | <p>We can use gcsfuse or s3fuse to mount Google Storage bucket in Kubernetes pod/Container. Before starting installation of fuse on container run container with SYS_ADMIN privileges like below.</p>
<p>$ docker run -it --cap-add SYS_ADMIN --name dev --device /dev/fuse ContainerID/Name /bin/bash</p>
<ol>
<li>Install <a... |
<p>We have a product which is described in some docker files, which can create the necessary docker containers. Some docker containers will just run some basic apps, while other containers will run clusters (hadoop).</p>
<p>Now is the question which cluster manager I need to use.
Kubernetes or Apache mesos or both?</p... | <p>Both functionally do the same, orchestrate Docker containers, but obviously they will do it in different ways and what you can easily achieve with one, it might prove difficult in the other and vice versa.
Mesos has a higher complexity and learning curve in my opinion. Kubernetes is relatively simpler and easier to ... |
<p>im trying to setup a a high available kubernetes cluster with packer and terraform instead the kube-up.sh scripts. Reason: I want bigger machines, different setup etc. Most of my configuration comes from the coreos kubernetes deployment tutorial.</p>
<p>Something about my setup:</p>
<p>CoreOS</p>
<p>Everything ru... | <p>You need to register the master as a node if you want the master to actually host any pods with the <code>--register-node=true</code> flag to the kubelet runnning on master. The CoreOs tutorial does not register the master as a node because thats the ideal scenario.</p>
|
<p>In the kubectl tool there is the option:</p>
<pre><code>--cascade[=true]: If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
</code></pre>
<p>But when I'm doing the 'delete' using the API(1.2) by default the deleted resources doesn... | <p>No, cascading delete is client side only. There are plans to move that logic server side in future versions</p>
|
<p>I have mounted a emptyDir volume with memory medium to a pod. Then I logged into the pod and tried to create a file in that volume path but I got a permission denied error. </p>
<pre><code>touch a.txt
touch: cannot touch `a.txt': Permission denied
</code></pre>
<p>User I used is root. What could be the reason fo... | <p>Add :z or :Z as a workaround to your mount path to work properly with selinux:</p>
<pre><code>volumeMounts:
- name: etcd-storage
mountPath: /var/etcd/data:z
</code></pre>
|
<p>I have my kubernetes cluster setup and I want to check for the nodes from worker/minion node, can we run kubectl form worker/minion node? </p>
| <p>Yes, you just need to have the proper client credentials and you can run kubectl from anywhere that has network access to the apiserver. See <a href="http://kubernetes.io/docs/user-guide/sharing-clusters/" rel="noreferrer">Sharing Cluster Access with kubeconfig</a> for the instructions to get a <code>kubeconfig</cod... |
<p>When a Google Container Engine cluster is created, Container Engine creates a Compute Engine managed instance group to manage the created instances. These instances are from Google Compute engine, which means, they are Virtual machines.</p>
<p>But we read in the doc page: "VMs are heavyweight and non-portable. The ... | <p>It is definitely possible to launch containers on physical machines. In fact, according to the <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf" rel="nofollow">Borg paper</a> ( the design of which heavily influenced Container Engine/Kubernetes ), this is the norm wit... |
<p>I've created a kubenetes cluster on my Mac with docker-machine, following the documentation here:</p>
<p><a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/docker/</a></p>
<p>I can access the normal api from inside the instance on 127.... | <p>Likely, you will want to use Virtual Box's <a href="https://www.virtualbox.org/manual/ch06.html#natforward" rel="nofollow">port forwarding</a> capabilities. An example from the documentation:</p>
<pre><code>VBoxManage modifyvm "MyVM" --natpf1 "k8srule,tcp,,6443,,6443"
</code></pre>
<p>This forwards port 6443 on al... |
<p>I have a Replication Controller whose size is more than one, and I'd like to embed the application monitoring profiler in only a pod in the replication controller. So I want the index or something to determine the pod is chosen only one. Especially in the GKE environment, is there such information?</p>
| <p>Pods started by a replication controller are all treated identically; they don't have any sort of ordinality. </p>
<p>If you want to start a group of identical pods and enable an extra feature in just one of them, you should consider using a master election scheme and having just the elected master run the monitori... |
<p>I have a Replication Controller whose size is more than one, and I'd like to embed the application monitoring profiler in only a pod in the replication controller. So I want the index or something to determine the pod is chosen only one. Especially in the GKE environment, is there such information?</p>
| <p>You will be interested in the parametrized set/templating proposal that will allow you to define indices <a href="https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/proposals/templates.md" rel="nofollow">https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/proposals/templates.md</a>. This will... |
<p>How to parse the json to retrieve a field from output of </p>
<pre><code>kubectl get pods -o json
</code></pre>
<p>From the command line I need to obtain the system generated container name from a google cloud cluster ... Here are the salient bits of json output from above command :
<a href="https://i.stack.imgur... | <p>After much battling this one liner does retrieve the container name :</p>
<pre><code>kubectl get pods -o=jsonpath='{.items[?(@.metadata.labels.name=="web")].metadata.name}'
</code></pre>
<p>when this is the known search criteria :</p>
<pre><code>items[].metadata.labels.name == "web"
</code></pre>
<p>and this is... |
<p>We use a separate VPC per environment. Does or will spinnaker support targeting different Kubernetes clusters? Will adding environments ad-hoc be viable?</p>
| <p>Spinnaker supports multiple Kubernetes clusters, each is added as an 'account' in Spinnaker configuration. The configured accounts are presented as options at deployment time, and the Server Groups for each application are rolled up under the account they belong to.</p>
<p>It is possible to change that configuratio... |
<p>What I have is</p>
<ul>
<li>Kubernetes: v.1.1.2</li>
<li>iptables v1.4.21</li>
<li>kernel: 3.10.0-327.3.1.el7.x86_64 Centos</li>
<li>Networking is done via flannel udp</li>
<li>no cloud provider</li>
</ul>
<p>what I do</p>
<p>I have enabled it with <strong>--proxy_mode=iptables</strong> argument. And I checked th... | <p>I meet the same issue exactly, on Kubernetes 1.1.7 and 1.2.0. I start flannel without --ip-masq, and add parameter --masquerade-all=true for kube-proxy, it helps.</p>
|
<p>I tried creating a <strong>Replication Controller</strong> via an JSON file and I have mentioned <strong>restartPolicy</strong> as "Never" for <strong>pod restartPolicy</strong>.</p>
<p>but I am getting an error that,</p>
<p><strong>Error:
The ReplicationController "ngnix-rc" is invalid.
*spec.template.spec.restar... | <p>To expand on zhb's answer: while different restart policies make sense for single pods, or even for run-to-completion jobs, a replication controller's entire purpose is to keep N instances of a pod running, so saying that you don't want the pods restarted doesn't mesh great with the concept.</p>
<p>The part of the ... |
<p>I try to use the master api to update resources.</p>
<p>In 1.2 to update a deployment resource I'm doing <code>kubectl apply -f new updateddeployment.yaml</code></p>
<p>How to do the same action with the api? </p>
| <p>I checked the code in <code>pkg/kubectl/cmd/apply.go</code> and I think the following lines of code shows what's behind the scene when you run <code>kubectl apply -f</code>:</p>
<pre><code>// Compute a three way strategic merge patch to send to server.
patch, err := strategicpatch.CreateThreeWayMergePatch(original,... |
<p>I am working with Kubernetes tutorial and deploying the cluster locally with Vagrant.</p>
<p>After the vagrant machine finishes its loading, I get the following outout:</p>
<blockquote>
<pre><code>Kubernetes cluster is running.
The master is running at:
https://10.245.1.2
Administer and visualize its resources usi... | <p>The username and password in the kubeconfig file are used to authenticate to the Kubernetes apiserver running in your cluster. The authentication for Cockpit is entirely separate. </p>
<p>According to the <a href="https://github.com/kubernetes/kubernetes/blob/2e89f555c650c01ba577a015fd1b23dbb71707e3/cluster/vagrant... |
<p>I did an upgrade of GKE to v1.2 yesterday and started to try out the DaemonSet feature (beta), didn't work as expected and i wanted to delete it from the cluster. What happened is that the delete operation failed and now the DaemonSet is in a inconsistent state and restarts all my other pods every 5 min.</p>
<p>Wha... | <p>Because the state of the DaemonSet is inconsistent, you can try to delete it using <code>--cascade=false?</code> flag.</p>
|
<p>I'm trying to run Kubernetes on a local Centos server and have had some issues (for example, <a href="https://stackoverflow.com/questions/36228065/kubernetes-dns-fails-in-kubernetes-1-2">with DNS</a>). A version check shows that I'm running Kubernetes 1.2 Alpha 1. Since the full release is now available from the <... | <p>According to the <a href="http://kubernetes.io/docs/getting-started-guides/#table-of-solutions" rel="nofollow">Table of Solutions</a> for installing Kubernetes, the maintainer of the CentOS getting started guide is <a href="https://github.com/coolsvap" rel="nofollow">@coolsvap</a>. You should reach out to him to ask... |
<p>To create kubernetes cluster in AWS, I use the set up script "<a href="https://get.k8s.io" rel="noreferrer">https://get.k8s.io</a>". That script creates a new VPC automatically, but I want to create kubernetes cluster inside an existing VPC in AWS. Is there a way to do it?</p>
<p>I checked /kubernetes/cluster/aws/c... | <p>You can add this ENV variable (we are using ver 1.1.8)</p>
<p><code>export VPC_ID=vpc-YOURID</code></p>
<p>Also Kubernetes creates a VPC with 172.20.0.0/16 and I think it expects this.</p>
|
<p>I following the example exactly, [<a href="http://kubernetes.io/docs/hellonode/,]" rel="noreferrer">http://kubernetes.io/docs/hellonode/,]</a></p>
<p>after I run [kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080
deployment "hello-node" created] . the pod doesnot run ok, I get CrashLoopBack... | <blockquote>
<p>after I run [kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080 deployment "hello-node" created]</p>
</blockquote>
<p>Do you mean your run <code>kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080 deployment "hello-node" created</code>?</p>
<p>If this i... |
<p>I am having this <a href="https://stackoverflow.com/questions/36138636/how-do-i-delete-orphan-kubernetes-pods">issue</a> except I have not created a ReplicaSet as suggested by <a href="https://stackoverflow.com/users/3653449/tim-hockin">Tim Hockin</a>. </p>
<p>Somehow a ReplicaSet was created with the same properti... | <p>You've probably created a deployment that's recreating the replica set for you. Try running <code>kubectl get deployments</code> and deleting the deployment from the output of that command.</p>
|
<p>I'm trying to get Kubernetes to download images from a Google Container Registry from another project. According to the <a href="http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod">docs</a> you should create an image pull secret using: </p>
<pre><code>$ kubectl create secret docker-re... | <p>This is really tricky but after a lot of trail and error I think I've got it working.</p>
<ol>
<li><p>Go to the Google Developer Console > Api Manager > Credentials and click "Create credentials" and create a "service account key"</p>
</li>
<li><p>Under "service account" select ne... |
<p>I'm running some containers on Google Container Engine.
One day everything was fine, and the next day I can't <code>attach</code> to my containers anymore. Or <code>exec</code>, or any other docker command.</p>
<p>I deleted the pods and let new ones be instanced, didn't help.
Then I deleted the node and waited for ... | <p>Commands like attach rely on the cluster's master being able to talk to the nodes
in the cluster. However, because the master isn't in the same Compute
Engine network as your cluster's nodes, we rely on SSH tunnels to enable secure
communication.</p>
<p>Container Engine puts an SSH public key in your Compute Engine... |
<p>Trying to deploy <code>heapster-controller</code> to get Heapster + Graphana + InfluxDB working for Kubernetes. Getting error messages while trying ot deploy using heapster-controller.yaml file:</p>
<p><strong>heapster-controller.yaml</strong></p>
<p><code>
apiVersion: extensions/v1beta1
kind: Deployment
metadata:... | <p>The correct syntax is <code>kubectl logs <pod> <container></code>.</p>
<p>In your example, <code>kubectl logs heapster-v1.1.0-beta1-3082378092-t6inb heapster --namespace=kube-system</code> will show the logs of the "heapster" container within the named pod.</p>
|
<p>I'm running kubernetes with docker 1.10 and I want to run a container with <code>--security-opt seccomp=unconfined</code> . I understand from <a href="https://github.com/kubernetes/kubernetes/issues/20870" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/20870</a> that seccomp in general is not suppo... | <p><a href="https://github.com/kubernetes/kubernetes/pull/21790" rel="nofollow">Seccomp is disabled by default</a> in kubernetes v1.2 for docker v1.10+, so you should not have problems running container with unconfined policy.</p>
|
<p>I want to calculate and show node specific cpu usage in percent in my own web application using Kubernetes API. </p>
<p>I need the same information as Kube UI and Cadvisor displays but I want to use the Kubernetes API.</p>
<p>I have found some cpu metrics under node-ip:10255/stats which contains timestamp, cpu usa... | <p>If you use Kubernetes v1.2, there is a new, cleaner metrics summary API. From the release note:</p>
<blockquote>
<p>Kubelet exposes a new Alpha metrics API - /stats/summary in a user friendly format with reduced system overhead.</p>
</blockquote>
<p>You can access the endpoint through <code><node-ip>:10255/sta... |
<p>I'm attempting to set up DNS support in Kubernetes 1.2 on Centos 7. According to the <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns#how-do-i-configure-it" rel="noreferrer">documentation</a>, there's two ways to do this. The first applies to a "supported kubernetes cluster setup" a... | <p>I just commented out the lines that contain the <code>successThreshold</code> and <code>failureThreshold</code> values in <code>skydns-rc.yaml</code>, then re-run the kubectl commands.</p>
<pre><code>kubectl create -f skydns-rc.yaml
kubectl create -f skydns-svc.yaml
</code></pre>
|
<p>I have a kubernetes cluster running on azure. What is the way to access the cluster from local kubectl command. I referred to <a href="http://kubernetes.io/docs/user-guide/sharing-clusters/" rel="noreferrer">here</a> but on the kubernetes master node there is no kube config file. Also, kubectl config view results in... | <p>Found a way to access remote kubernetes cluster without ssh'ing to one of the nodes in cluster. You need to edit ~/.kube/config file as below :</p>
<pre><code>apiVersion: v1
clusters:
- cluster:
server: http://<master-ip>:<port>
name: test
contexts:
- context:
cluster: test
user: tes... |
<p>I'm trying to get going with Kubernetes DaemonSets and not having any luck at all. I've searched for a solution to no avail. I'm hoping someone here can help out.</p>
<p>First, I've seen <a href="https://stackoverflow.com/questions/34818198/daemonset-doesnt-create-any-pods-v1-1-2">this ticket</a>. Restarting the co... | <p>(I would have posted this as a comment, if I had enough reputation)</p>
<p>I am confused by your output.</p>
<p><code>kubectl api-versions</code> should print out <code>extensions/v1beta1</code> if it is enabled on the server. Since it does not, it looks like extensions/v1beta1 is not enabled.</p>
<p>But <code>ku... |
<p>To simplify <strong>deployment</strong> and short term roll-back, it's useful to use a new Docker image tag for each new version to deploy on <strong>Kubernetes</strong>. Without clean-up this means that old images:tags are kept forever.</p>
<p>How can I <strong>list all image:tag that are used by a Kubernetes cont... | <p>As an alternative approach, you might consider just letting Kubernetes handle reclamation of old images for you.</p>
<p>Presently, the ImageManager handles reclamation of candidate images. See: <a href="http://kubernetes.io/docs/admin/garbage-collection/" rel="noreferrer">Garbage Collection</a></p>
<blockquote>
... |
<p>Our current CI deployment phase works like this:</p>
<ol>
<li>Build the containers.</li>
<li>Tag the images as <code>"latest"</code> and <code>< commit hash ></code>.</li>
<li>Push images to repository.</li>
<li>Invoke rolling update on appropriate RC(s).</li>
</ol>
<p>This has been working great for RC base... | <p>The <code>Deployment</code> only monitors for pod template (<code>.spec.template</code>) changes. If the image name didn't change, the <code>Deployment</code> won't do the update. You can trigger the rolling update (with <code>Deployment</code>s) by changing the pod template, for example, label it with commit hash. ... |
<p><strong>Environment</strong></p>
<p><code>Mesos: 0.26
Kubernetes: 1.3.0
</code></p>
<p>Anyone out there using Kubernetes-Mesos framework?</p>
<p>Kubernetes-Mesos Question: Does current Kubernetes-Mesos support Kubernetes in HA configuration ? Having multiple Kubernetes masters talking to leader.mesos ? I tried to... | <p>It not supported; only one k8sm scheduler should talk to mesos master. One option is to use Marathon to manage k8sm-xxx daemons, it will re-start k8sm master for failover.</p>
|
<p>Maybe my question does not make sense, but this is what I'm trying to do:</p>
<ul>
<li>I have a running Kubernetes cluster running on CoreOS on bare metal. </li>
<li>I am trying to mount block storage from an OpenStack cloud provider with Cinder.</li>
</ul>
<p>From my readings, to be able to connect to the block s... | <p>There seem to be new ways to attach Cinder storage to bare metal, but it's apparently just PoC</p>
<p><a href="http://blog.e0ne.info/post/Attach-Cinder-Volume-to-the-Ironic-Instance-without-Nova.aspx" rel="nofollow">http://blog.e0ne.info/post/Attach-Cinder-Volume-to-the-Ironic-Instance-without-Nova.aspx</a></p>
|
<p>I've been trying to get help on <a href="https://stackoverflow.com/questions/36322006/kubernetes-using-openstack-cinder-from-one-cloud-provider-while-nodes-on-anothe">a Kubernetes question</a> and I don't get answers, and one suggestion was to ask on the Kubernetes slack channel, however it seems to be on invite onl... | <p><a href="http://slack.kubernetes.io" rel="noreferrer">http://slack.kubernetes.io</a> is indeed the way to get yourself invited.</p>
<p>It sounds like there were some issue this morning (perhaps with Slack?), but the invites seem to be working now. See <a href="https://github.com/kubernetes/kubernetes/issues/23823"... |
<p>I have a few applications that run on regular Compute Engine nodes. In addition I have a Container Cluster that I am migrating applications to. Sooner or later all apps should be in Container Engine so service discovery is straight forward.
But for now the apps on Compute Engine need to be able to talk to the Contai... | <p>Kubernetes expects anything within the cluster to be able to talk with everything else. GKE accomplishes this with <a href="http://kubernetes.io/docs/admin/networking/#google-compute-engine-gce" rel="nofollow">advanced routing</a>. By default, this lets GKE containers and GCE nodes on the same network communicate. T... |
<p>I'm a bit confused at how to setup error reporting in kubernetes, so errors are visible in Google Cloud Console / Stackdriver "Error Reporting"?</p>
<p>According to documentation
<a href="https://cloud.google.com/error-reporting/docs/setting-up-on-compute-engine" rel="noreferrer">https://cloud.google.com/error-repo... | <p>The basic idea is to start a separate pod that receives structured logs over TCP and forwards it to Cloud Logging, similar to a locally-running fluentd agent. See below for the steps I used.</p>
<p>(Unfortunately, the logging support that is built into Docker and Kubernetes cannot be used - it just forwards individ... |
<p>Situation: lots of heavy docker conainers that get hit periodically for a while, then stay unused for a longer period.</p>
<p>Wish: start the containers on demand (like systemd starts things through socket activation) and stop them after idling for given period. No <strong>visible</strong> downtime to end-user.</p>
... | <p>You could use Kubernetes' built-in <a href="http://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/" rel="noreferrer">Horizonal Pod Autoscaling (HPA)</a> to scale up from 1 instance of each container to as many are needed to handle the load, but there's no built-in functionality for 0-to-1 scaling on receiv... |
<p>If I am running a container in privileged mode, does it have all the Kernel capabilities or do I need to add them separately?</p>
| <p>Running in privileged mode indeed gives the container all capabilities.
But it is good practice to always give a container the minimum requirements it needs.</p>
<p>The <a href="https://github.com/docker/cli/blob/c780f7c4abaf67034ecfaa0611e03695cf9e4a3e/docs/reference/commandline/run.md" rel="noreferrer">Docker run ... |
<p>I've set up a Kubernetes cluster with three nodes, i get all my nodes status ready, but the scheduler seems not find one of them. How could this happen.</p>
<pre><code>[root@master1 app]# kubectl get nodes
NAME LABELS STATUS AGE
172.16.0.44 kubernetes.io/hostname... | <p>Thanks for your replay Robert. i got this resolve by doing below:</p>
<pre><code>kubectl delete rc
kubectl delete node 172.16.0.44
stop kubelet in 172.16.0.44
rm -rf /k8s/*
restart kubelet
</code></pre>
<p>Now the node is ready, and out of disk is gone.</p>
<pre><code>Name: 172.16.0.44
Labels: k... |
<p>The cassandra Filesystem is on a glusterFS, after scaling the number of pods to zero, and back up to 3, the data is not loading up into cassandra.</p>
<p>Is there a way to recover it?</p>
<pre><code>INFO 17:00:52 reading saved cache /cassandra_data/saved_caches/KeyCache-d.db
INFO 17:00:52 Harmless error reading ... | <p>The log you're showing is an <strong>harmless error</strong>. Basically it is just saying that the cache file is no longer in sync.</p>
<blockquote>
<p>INFO 17:00:52 <strong>Harmless error</strong> reading saved cache /cassandra_data/saved_caches/KeyCache-d.db</p>
</blockquote>
|
<p>So I have a Kubernetes cluster, and I am using Flannel for an overlay network. It has been working fine (for almost a year actually) then I modified a service to have 2 ports and all of a sudden I get this about a completely different service, one that was working previously and I did not edit:</p>
<pre><code><... | <p>Sometime flannel will change it's subnet configuration... you can tell this if the IP and MTU from <code>cat /run/flannel/subnet.env</code> doesn't match <code>ps aux | grep docker</code> (or <code>cat /etc/default/docker</code>)... in which case you will need to reconfigure docker to use the new flannel config.</p>... |
<p>I've done quite a bit of research and have yet to find an answer to this. Here's what I'm trying to accomplish:</p>
<ul>
<li>I have an ELK stack container running in a pod on a k8s cluster in GCE - the cluster also contains a PersistentVolume (format: ext4) and a PersistentVolumeClaim.</li>
<li>In order to scale th... | <p>Persistent Volumes have access semantics. on GCE I'm assuming you are using a Persistent Disk, which can either be mounted as writable to a single pod or to multiple pods as read-only. If you want multi writer semantics, you need to setup Nfs or some other storage that let's you write from multiple pods. </p>
<p>In... |
<p>Sorry for the noob question but from <a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/getting-started-guides/logging-elasticsearch.md" rel="noreferrer">https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/getting-started-guides/logging-elasticsearch.md</a>
it says: </p>
<blockquot... | <p>As already mentioned in Robert's answer the Elasticsearch/Kibana stack needs to be added manually if the cluster is supposed to run on Google Container Engine (GKE). Using the information given in this <a href="https://groups.google.com/forum/#!topic/google-containers/Q1nvl8IAbqc" rel="noreferrer">post</a>, I was ab... |
<p>I have tried all the basics of Kubernetes and if you want to update your application all you can use <code>kubectl rolling-update</code> to update the pods one by one without downtime. Now, I have read the kubernetes documentation again and I have found a new feature called <code>Deployment</code> on version <code>v... | <p>I have been testing rolling update of a service using both replication controller and declarative deployment objects. I found using rc there appears to be no downtime from a client perspective. But when the Deployment is doing a rolling update, the client gets some errors for a while until the update stabilizes.</p>... |
<p>I want to create MongoDB replica of the three machines, it needs to specify the IP-addresses of these machines? But they run into a pod's and have a dynamic IP. If you try to specify the DNS-name service MongoDB he says</p>
<blockquote>
<p>No host described in new configuration XXXXX for replica set
app_replica... | <p>You need to setup multiple deployments and services. Take a look at this zookeeper example - <a href="https://gist.github.com/bprashanth/8160d0cf1469b4b125af95f697433934" rel="nofollow">https://gist.github.com/bprashanth/8160d0cf1469b4b125af95f697433934</a></p>
<p>You do not rely on node/machine IPs. Instead you re... |
<p>(I have looked at some other threads, but apparently the privilege mode is now supported in the latest code, so am wondering if I have hit a bug.)</p>
<p>I have two physical servers: both running Linux (ubuntu), with the latest kubernetes code from github yesterday. </p>
<p>I am running <code>docs/getting-started-... | <p>From kubernetes v1.1, any container in a pod can enable privileged mode, using the privileged flag on the SecurityContext of the container spec. </p>
<p>To enable privileged mode nest <code>privileged:true</code> inside <code>securityContext</code> decleration of the container spec:</p>
<pre><code>"securityContext... |
<p>I am evaluating Kubernetes as a platform for our new application. For now, it looks all very exciting! However, I’m running into a problem: I’m hosting my cluster on GCE and I need some mechanism to share storage between two pods - the continous integration server and my application server. What’s the best way for ... | <h2>Firstly, do you <em>really</em> need multiple readers / writers?</h2>
<p>From my experience of Kubernetes / micro-service architecture (MSA), the issue is often more related to your design pattern. One of the fundamental design patterns with MSA is the proper encapsulation of services, and this includes the data ow... |
<p>I currently have a cluster running on GCloud which I created with 3 nodes.
This is what I get when I run <code>kubectl describe nodes</code></p>
<pre><code>Name: node1
Capacity:
cpu: 1
memory: 3800808Ki
pods: 40
Non-terminated Pods: (3 in total)
Namespace Name ... | <p>Killing them so that they'll be rescheduled on another node is perfectly fine. They can all be rescheduled other than the fluentd pods, which are bound one to each node. </p>
|
<p>We have a requirement that no requests receive 404's when doing a rolling deploy. Currently we achieve this by deploying the new assets container to all servers before continuing with a rolling deploy. With nginx's "try_files" this ensures that as the new code is being rolled out we can serve both the old and new ve... | <p>You can either use <a href="http://kubernetes.io/docs/user-guide/deployments/" rel="nofollow"><code>Deployment</code> API</a> (for Kubernetes >= v1.2) or <a href="http://kubernetes.io/docs/user-guide/rolling-updates/" rel="nofollow"><code>kubectl rolling-update</code></a> (for < v1.2) to manage the rolling deploy... |
<p>I am trying to add swap space on kubernetes node to prevent it from out of memory issue. Is it possible to add swap space on node (previously known as minion)? If possible what procedure should I follow and how it effects pods acceptance test? </p>
| <p>Kubernetes doesn't support container memory swap. Even if you add swap space, kubelet will create the container with --memory-swappiness=0 (when using Docker). There have been discussions about adding support, but the proposal was not approved. <a href="https://github.com/kubernetes/kubernetes/issues/7294" rel="nore... |
<p>The closest tutorial I can find in getting an SSL terminating Ingress and an nginx based controller running on bare metal (Digital Ocean, for example) is this:</p>
<p><a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx" rel="nofollow">https://github.com/kubernetes/contrib/tree/maste... | <p>boo my answers apply to <a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx">https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx</a></p>
<blockquote>
<ul>
<li>default backend at port 80 for all hosts that:
<ul>
<li>404 on <code>location /.well-know... |
<p>We are planning to build a small docker cluster for our application services. We considered to use 2 master vms for ha, 1 consul(if we choose Swarm) and 5-10 hosts for containers. We have not yet decided what to use - Docker Swarm or Kubernetes.</p>
<p>So the question is what "hardware" requirements (CPU cores, RAM... | <p>Just to clarify a bit on what Robert wrote about Kubernetes.
If you want to have up to 5 machines for running your applications even 1-core virtual machine (n1-standard-1 on GCE) should be enough.
You can handle 10-node cluster with 2-core virtual machine as Robert said. For official recommendations please take a lo... |
<p>EDITED:
I've an OpenShift cluster with one master and two nodes. I've installed NFS on the master and NFS client on the nodes.
I've followed the wordpress example with NFS: <a href="https://github.com/openshift/origin/tree/master/examples/wordpress" rel="nofollow">https://github.com/openshift/origin/tree/master/exam... | <p>Logs showed <code>Oct 21 10:44:52 ip-10-0-0-129 origin-node: Output: mount.nfs: access denied by server while mounting localhost:/home/data/pv0002</code></p>
<p>So it failed mounting on localhost.
to create my persistent volume I've executed this yaml:</p>
<pre><code>{
"apiVersion": "v1",
"kind": "PersistentV... |
<p>Tried installing kubernetes v1.2.0 on azure environment but after installation cannot access kube apis at port 8080.</p>
<p>Following services are running :</p>
<pre><code>root 1473 0.2 0.5 536192 42812 ? Ssl 09:22 0:00 /home/weave/weaver --port 6783 --name 22:95:7a:6e:30:ed --nickname kube-00 --d... | <p>The services you show running do not include the apiserver. For a quick breakdown I can explain what each service does that you show running.</p>
<ul>
<li><a href="https://www.weave.works/" rel="nofollow">Weave</a>: This is a software overlay network and assigns IP addresses to your pods.</li>
<li><a href="http://k... |
<p>Is it possible to set the working directory when launching a container with Kubernetes ?</p>
| <p>Yes, through the <code>workingDir</code> field of the <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container" rel="noreferrer">container spec</a>. Here's an example replication controller with an nginx container that has <code>workingDir</code> set to <code>/workdir</code>:... |
<p>k8s 1.2 deployed <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="noreferrer">locally, single-node docker</a></p>
<p>Am I doing something wrong? Is this working for everyone else or is something broken in my k8s deployment?</p>
<p>Following the example in the ConfigMaps guide, /etc/config/s... | <p>Thanks to @Paul Morie for helping me diagnose and fix this (from github <a href="https://github.com/kubernetes/kubernetes/issues/23392">issue</a>):</p>
<blockquote>
<p>bingo, the mount propagation mode of /var/lib/kubelet is private. try changing the mount flag for the kubelet dir to <code>-v /var/lib/kubelet:/va... |
<p>Is there something like:
kubectl get pods --project=PROJECT_ID</p>
<p>I would like not to modify my default gcloud configuration to switch between my staging and production environment. </p>
| <p><code>kubectl</code> saves clusters/contexts in its configuration. If you use the default scripts to bring up the cluster, these entries should've been set for your clutser.</p>
<p>A brief overview of <code>kubectl config</code>:</p>
<ul>
<li><a href="http://kubernetes.io/docs/user-guide/kubectl/kubectl_config_vie... |
<p>In coreos we can defined service as </p>
<pre><code>[X-Fleet]
Global=true
</code></pre>
<p>This will make sure that this particular service will run in all the nodes.</p>
<p>How do i achieve same thing for a pod in Kubernetes?</p>
| <p>Probably you want to use <a href="https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/design/daemon.md" rel="nofollow">Daemonset</a> - a way to run a daemon on every node in a Kubernetes cluster.</p>
|
<p>I followed <a href="http://kubernetes.io/docs/getting-started-guides/aws/" rel="nofollow">the tutorial</a> how to create a k8s cluster on aws using ubuntu. This works great, so I have one master and three nodes - minions. However I haven't found any working working recipe how to add a new node to the cluster.</p>
<... | <p>After some attempts it seemed that the auto-scaling group worked using debian images. Note that it needs aprox. 2 minutes once the instance is ready with all installed necessities and you can see the instance using <code>get nodes</code>.</p>
|
<p>I am looking to deploy services to a Kubernetes cluster running over multiple zones and would like to be able to inject the region/zone labels into my pods using environment variables.</p>
<p>I have looked into the downward API however this only seems to allow you to inject labels/metadata from the pod/service and ... | <blockquote>
<p>I thought about was having the container query the kubernetes/AWS API to fetch this information however that would mean adding quite a lot of complexity to my containers.</p>
</blockquote>
<p>This is currently the recommended approach for getting information not available in the downward API. To avoi... |
<p>I configured k8s(kubernetes) with 1 master and 2 slaves. I was able to access web UI provided by k8s but after rebooting of M/cs, not able to access UI with the same URL. May be I am missing with some of environment variables or something else, didn't able to figure it out correctly. Did any one know, what I am miss... | <p>Navigating to <code>https://<master-ip>:8080/ui</code> will redirect you to the <code>kubernetes-dashboard</code> service in the <code>kube-system</code> namespace. When you first set up your cluster this service was working properly but after rebooting the set of endpoints became stale. You can diagnose this ... |
<p>We are interested in running certain commands as pods and services, as they start or stop. Using the life-cycle hooks in the yml files does not work for us, since these commands are not optional. We have considered running a watcher pod that uses the watch api to run these commands. But we can't figure out how to us... | <p>I have found the answer. In case anyone else is watching.</p>
<p>There is a much better system to watch resource and handle events with custom tasks with <code>pkg/controller/framework</code> <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/framework/controller.go" rel="noreferrer">packa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.