prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I successfully deployed a kubernetes cluster of 3 nodes in Azure. I saw in the resource group that there were only 1 master created (same as with kubeadm).</p>
<p><a href="https://i.stack.imgur.com/vhktg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vhktg.png" alt="enter image description here"... | <p>I don't believe that the ACS engine currently supports HA for the kubernetes master. <a href="https://github.com/Azure/acs-engine" rel="nofollow noreferrer">https://github.com/Azure/acs-engine</a></p>
<p>At this time, you will need to create a cluster manually using the HA documentation on the kubernetes website</p... |
<p>The fabric8 kubernetes Java & Scala client API is great for talking to kubernetes (or OpenShift), but its documentation is very sparse. What is a code example for adding resource requirements to containers running in a kubernetes pod?</p>
| <p>If you are using the fabric8 kubernetes-client API for Java and Scala, here is a snippet of code that demonstrates how to add resource requirements to a container running in a pod. This code was copied from Scala, but Java code would be very similar:</p>
<pre><code>// other fabric8 imports not included; just focus... |
<p>I'm seeing a weird issue on kubernetes and I'm not sure how to debug it. The k8s environment was installed by kube-up for vsphere using the 2016-01-08 kube.vmdk</p>
<p>The symptom is that the dns for a container in a pod is not working correctly. When I logon to the kube-dns service to check the settings everythi... | <p>Turns out this is an issue with the default nat routing rules on the minions</p>
<pre><code>$ iptables –t nat –vnxL
...
...
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
...
80 4896 MASQUERADE all -- * ... |
<p>I have a Kubernetes cluster that I setup with <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html" rel="noreferrer">kube-aws</a>. I'm trying to run a custom NGINX configuration which uses DNS resolutions to proxy_pass. Here is the NGINX block of code</p>
<pre><code>location /api/v1/lead {
re... | <p>Resolving the name fails because you need to use the Full Qualified Domain name. That is, you should use:</p>
<p><code>lead-api.<namespace>.svc.cluster.local</code></p>
<p>not just </p>
<p><code>lead-api</code></p>
<p>Using just the hostname will usually work because in kubernetes the <code>resolv.conf</co... |
<p>In short I have two containers in a pod, named <code>a</code> and <code>b</code>, on ports 80 and 9000 respectively. They can reach each other through <code>127.0.0.1:80</code> and <code>127.0.0.1:9000</code>. Can they also reach each other by name?</p>
<p>I've tried <code>a.podname:90</code>, <code>b.podname:9000<... | <p>If you're always going to run the two containers in a pod, you <em>can</em> rely on <code>localhost:xyz</code> to be accessible, no matter where that pod gets scheduled. </p>
<p>If you want to use DNS names, you can create <a href="http://kubernetes.io/docs/user-guide/services/#headless-services" rel="nofollow nore... |
<p>I'm using GCE with Kubernetes to host my rails app but the ingress reports the pod as UNHEALTHY. Below is my setup</p>
<p><strong>Ingress:</strong></p>
<pre><code>spec:
backend:
serviceName: my-service
servicePort: 80
</code></pre>
<p><strong>Service:</strong></p>
<pre><code>spec:
type: NodePort
se... | <p>It turned out the ingress didn't pick up the new path of the readiness probe that I changed earlier. The problem was solved after I recreated the ingress (which was definitely not an optimal solution). </p>
|
<p>This question is discussed many times but I'd like to hear some best practices and real-world examples of using each of the approaches below:</p>
<ol>
<li><p>Designing containers which are able to check the health of dependent services. Simple script <a href="https://github.com/vishnubob/wait-for-it" rel="nofollow ... | <p>I can take a stab at the kubernetes perspective on those.</p>
<blockquote>
<p>Designing containers which are able to check the health of dependent services. Simple script whait-for-it can be useful for this kind of developing containers, but aren't suitable for more complex deployments. For instance, database cou... |
<p>I have a ruby on rails application running on AWS. As usual each application server have an nginx and multiple unicorn workers of the application instance. </p>
<p>I am going to move the workload to Kubernetes. I have couple of question regarding this, please help if anyone out there who have kubernetised there ror... | <p><strong>How will you use nginx?</strong></p>
<p>A kubernetes service can be backed by several kubernetes pods. Whenever anyone makes a request to the kubernetes service, the request is sent to one of the upstream pods in a round robin fashion.</p>
<p>If you were planning to use nginx as a 'load-balancer' or revers... |
<p>Does anyone know if Google’s HTTPS loadbalancer is working?
I was working on setting up a NGINX ingress service but I noticed the Google Loadbalancer was automatically being setup by Kubernetes. I was getting two external IPs instead of one. So instead of setting up the NGINX load balancer I decided to use the Googl... | <p>Probably you have one or more hanging backend services. Run <code>gcloud compute backend-services list</code> to find them and then <code>gcloud compute backend-services delete [SERVICE-NAME]</code> for each service to remove it.</p>
<pre><code>$ gcloud compute backend-services list
NAME ... |
<p>I am using GCP Container Engine in my project and now I am facing some issue that I don't know if it can be solved via secrets.</p>
<p>One of my deployments is node-js app server, there I use some npm modules which require my GCP service account key (.json file) as an input.</p>
<p>The input is the path where this j... | <p>You can make your json file a secret and consume in your pod. See the following link for secrets (<a href="http://kubernetes.io/docs/user-guide/secrets/" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/secrets/</a>), but I'll summarize next:</p>
<p>First create a secret from your json file:</p>
<pre... |
<p>I have a setup with a webserver (NGINX) and a react-based frontend that uses webpack to build the final static sources.</p>
<p>The webserver has its own kubernetes <code>deployment</code> + <code>service</code>.</p>
<p>The frontend needs to be build before the webserver can serve the static html/js/css files - but... | <p>There are multiple ways to do this. Here's how I think about this:</p>
<p><strong>Option 1: The static files represent built source code</strong></p>
<p>In this case, the static files that you want to serve should actually be packaged and built into the docker image of your nginx webserver (in the html directory s... |
<p>We are splitting our monolith API into micro services.</p>
<p>We do not need rate-limiting, auth, caching or any other gateway like abilities. </p>
<p>Would it be a valid approach to use very simple stateless Nginx containers that route to the underlying services?</p>
| <p>Yes, Nginx can be a deployment and a service (of loadbalancer or externalIP type) and can forward to upstream services. </p>
<p>You might have to frequently change the nginx.conf though (when you add/remove services), so I would recommend using a ConfigMap to keep your nginx.conf and mounting that as a volume in yo... |
<p>I have a setup with a webserver (NGINX) and a react-based frontend that uses webpack to build the final static sources.</p>
<p>The webserver has its own kubernetes <code>deployment</code> + <code>service</code>.</p>
<p>The frontend needs to be build before the webserver can serve the static html/js/css files - but... | <p><strong>Jobs</strong>, <strong>Init</strong> containers, or alternatively a <strong>gitRepo</strong> type of <strong>Volume</strong> would work for you.</p>
<p><a href="http://kubernetes.io/docs/user-guide/volumes/#gitrepo" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/volumes/#gitrepo</a></p>
<p>... |
<p>With Kubernetes configured to point to an external OpendID provider, it seems through browsing through the code that Kubernetes makes a call to the OpendID provider to get a refresh token. It expects an <code>id_token</code> to come back. It seems that Kubernetes respects the expire time for the bearer token and n... | <p>Kubernetes doesn't have any concept of refresh tokens because the Kubernetes API server isn't a client of the OpenID provider, it simply validates <code>id_token</code>s issues for a specific client.</p>
<p>Clients of the OpenID provider which wish to talk to the API server on the end user's behalf must manage the ... |
<p>this question is similar to <a href="https://stackoverflow.com/questions/38901877/kubernetes-petset-dns-not-working">Kubernetes PetSet DNS not working</a> but (I believe) distinct. My problem is: I want to use a Kubernetes PetSet to run a sharded database (RethinkDB). I need to pass each shard the dns address of ano... | <p>You can also use a headless Service for the DB access between nodes, and a regular Service for external access. </p>
<p>There is no issue having 2 Services pointing to the same nodes for different purposes</p>
|
<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>I evaluated the haproxy controller but could not get it running reliably with session affinity. After some research I discovered <a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx" rel="nofollow noreferrer" title="Nginx Ingress Controller">Nginx Ingress Controller</a> which since ve... |
<p>I want to know the high level benefit of Kubernetes running in bare metal machines.</p>
<p>So let's say we have 100 bare metal machines ready with <code>kubelet</code> being deployed in each. Doesn't it mean that when the application only runs on 10 machines, we are wasting the rest 90 machines, just standing by and... | <p>Yes, if you have 100 bare metal machines and use only 10, you are wasting money. You should only deploy the machines you need.</p>
<p>The Node Autoscaler works at certain Cloud Providers like AWS, GKE, or Open Stack based infrastructures.</p>
<p>Now, Node Autoscaler is useful if your load is not very predictable a... |
<p>In minikube, how to expose a service using nodeport ?</p>
<p>For example, I start a kubernetes cluster using the following command and create and expose a port like this:</p>
<pre><code>$ minikube start
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
$ kubectl expose deploy... | <p>I am not exactly sure what you are asking as it seems you already know about the <code>minikube service <SERVICE_NAME> --url</code> command which will give you a url where you can access the service. In order to open the exposed service, the <code>minikube service <SERVICE_NAME></code> command can be use... |
<p>I have a simple Kubernetes job (based on the <a href="http://kubernetes.io/docs/user-guide/jobs/work-queue-2/" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/jobs/work-queue-2/</a> example) which uses a Docker image that I have placed as a public image on my dockerhub account. It all loks like this:<... | <p>You need to use <a href="http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod" rel="noreferrer">ImagePullSecrets</a>.</p>
<p>Once you create a secret object, you can refer to it in your pod spec (the <code>spec</code> value that is the parent of <code>containers</code>:</p>
<pre><code>... |
<p>I have 6 HTTP micro-services. Currently they run in a crazy bash/custom deploy tools setup (dokku, mup). </p>
<p>I dockerized them and moved to kubernetes on AWS (setup with kop). The last piece is converting my nginx config.</p>
<p>I'd like </p>
<ol>
<li>All 6 to have SSL termination (not in the docker image)... | <p>You should be able to use the <a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx" rel="noreferrer">nginx ingress controller</a> to accomplish this.</p>
<ol>
<li><a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx#https" rel="noreferrer">SSL terminat... |
<p>I've checked out helm.sh of course, but at first glance the entire setup seems a little complicated (helm-client & tiller-server). It seems to me like I can get away by just having a helm-client in most cases.</p>
<p><strong>This is what I currently do</strong></p>
<p>Let's say I have a project composed of 3 s... | <p>Seems that <a href="https://redspread.com/" rel="nofollow noreferrer">https://redspread.com/</a> (open source) addresses this particular issue, but needs more development before it'll be production ready - at least from my team quick glance at it.</p>
<p>We'll stick with keeping yaml files in git together with the ... |
<p>How I can call via rest api this commands:</p>
<pre><code>$ kubectl describe po xyz
$ kubectl describe svc xyz
$ kubectl describe node zyx
</code></pre>
<p>I need get service endpoints and node capacity usage. But I can't find in docs how I can do this. GET command not provides this information.</p>
| <p>Use <code>kubectl --v=8 ...</code> for fun and profit!</p>
<p>For eg: a describe pod is actually a combination of results from the pod and the events APIs:</p>
<pre><code>GET /api/v1/namespaces/default/pods/xyz
GET /api/v1/namespaces/default/events?fieldSelector=involvedObject.name%3Dxyz%2CinvolvedObject.namespace... |
<p>I have an Openshift Origin installation (v. 1.2.1, but also reproduced this issue on 1.3.0), and I'm trying to get pods' IPs from DNS by service name. Assume my node has IP 192.168.58.6, and I look for pods of headless service 'hz' in project 'hz-test'. When I try to send DNS request to dnsmasq (which is installed o... | <p>Finally, the reason was that dnsmasq was configured to listen node's IP (listen-adress=192.168.58.6). With such configuration dnsmasq binds to <em>all</em> node's network interfaces, but tries to reject "wrong" connections in userspace (i.e. on its own).</p>
<p>I don't really understand, why dnsmasq decided that re... |
<p>I deployed my java web application in kubernetes using DEPLOYMENTS and was able to scale it and connect it to a database POD, but then I wanted to scale the database too but as you know is not possible in kubernetes and the MYSQL REPLICA not recommended for production. So I tried vitess and was able to scale my data... | <p>It's important to note that Vitess is not a transparent proxy that you can just insert between the app and MySQL at the connection level. Vitess turns a set of MySQL servers into a clustered database, and it requires you to build your app against a Vitess driver instead of the plain MySQL driver.</p>
<p>If you're a... |
<p>The example on the documentation (<a href="http://kubernetes.io/docs/user-guide/configmap/" rel="noreferrer">http://kubernetes.io/docs/user-guide/configmap/</a>) for consuming values is based on a ConfigMap where each data entry is a single pair/value. Example:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata... | <p>You can't consume a single entry since it is just one big blob of text. You have two options that I see:</p>
<ol>
<li><p>Don't create the config map from a file. Instead create each entry in the ConfigMap manually. You'll have to consume each key separately though, at least until <a href="https://github.com/kuberne... |
<p>I am using kubernetes on a single machine for testing, I have built a custom image from the nginx docker image, but when I try to use the image in kubernetes I get an image pull error?????</p>
<p><strong>MY POD YAML</strong></p>
<pre class="lang-none prettyprint-override"><code>kind: Pod
apiVersion: v1
metadata:
... | <blockquote>
<p>So you have the image on your machine aready. It still tries to pull the image from Docker Hub, however, which is likely not what you want on your single-machine setup. This is happening because the latest tag sets the imagePullPolicy to Always implicitly. You can try setting it to IfNotPresent explic... |
<p>Let's say I set up a fresh Kubernetes cluster. I assume the both <code>kube-system</code> and <code>default</code> namespaces will get a service account named <code>default</code>? Which permissions does that service account have? Full read/write permissions?</p>
<p>I'm essentially asking this to understand best pr... | <p>Service accounts have no inherent permissions. The permissions they have depend entirely on the authorization mode configured (<code>--authorization-mode</code> flag passed to the apiserver)</p>
<p>Defining RBAC roles is a good method for specifying the permissions required for a controller.</p>
<p>There are exist... |
<p>I am trying to install <strong>kubernetes on Bare Metal with IPv6 only networks</strong>. I have stuck saying that <strong>Invalid Arguments</strong> whenever I put IPv6 address instead of IPv4 address. </p>
<hr>
<p>Can anyone suggest any guidelines how to install Kubernetes on IPv6 only networks.
I know, it's not... | <p>IPv6 is not supported at this time, and it's very clearly state in the docs that it's a work in progress: <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/networking.md" rel="nofollow noreferrer">https://github.com/kubernetes/community/blob/master/contributors/design-proposa... |
<p>I am finding docker swarm, kubernetes quite similar and then there is docker which is a company and the above two are docker clustering tool. So what exactly all these tools are and differences between them?</p>
| <p>There are lots of articles out there which will explain the differences. In a nutshell:</p>
<ul>
<li>Both are trying to solve the same problem - container orchestration over a large number of hosts. Essentially these problems can be broken down like so:
<ul>
<li>Scheduling containers across multiple hosts (taking... |
<p>Kubernetes scheduler includes two parts: <strong>predicate</strong> and <strong>priority</strong>. The source code is in <em>kubernetes/plugin/pkg/scheduler</em>. I want to add a new priority algorithm to the default priorities. Can anyone guide me the detailed steps? Thanks a lot!</p>
<p>Maybe I should do the foll... | <p>You can run your scheduler as a kubernetes deployment.</p>
<p>Kelsey Hightower has an example scheduler coded up on <a href="https://github.com/kelseyhightower/scheduler" rel="nofollow noreferrer">Github</a></p>
<p>The meat and bones of this is here: <a href="https://github.com/kelseyhightower/scheduler/blob/maste... |
<p>I'm trying to make use of the new <code>subPath</code> feature implemented in <a href="https://github.com/kubernetes/kubernetes/pull/22575" rel="noreferrer">this</a> pull request (recently released in v1.3).</p>
<p>However, the output of <code>mount</code> shows it ignoring the <code>subPath</code>, mounting the sa... | <p>I'm not 100% sure about this, as I'm using a <code>configMap</code> volume rather than NFS, but I had to make the <code>mountPath</code> match the <code>subPath</code> as seen below before it worked for me.</p>
<p>FYI, I'm using Kubernetes v1.4.5.</p>
<p>If I'm reading this correctly, you are wanting to:</p>
<ul>... |
<p>What I am trying to do:</p>
<p>I have setup kubernete cluster using documentation available on Kubernetes website (http_kubernetes.io/v1.1/docs/getting-started-guides/aws.html). Using kube-up.sh, i was able to bring kubernete cluster up with 1 master and 3 minions (as highlighted in blue rectangle in the diagram be... | <p>There is also <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">kops</a> project</p>
<p>From the project README:</p>
<blockquote>
<p>Operate HA Kubernetes the Kubernetes Way</p>
</blockquote>
<p>also:</p>
<blockquote>
<p>We like to think of it as <code>kubectl</code> for clusters</p>
</b... |
<p>I have installed Kubernetes using <a href="https://github.com/kubernetes/contrib" rel="noreferrer">contrib/ansible</a> scripts.
When I run cluster-info:</p>
<pre><code>[osboxes@kube-master-def ~]$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080
Elasticsearch is running at http://localhost... | <p>You can use kubectl proxy.</p>
<p>Depending if you are using a config file, via command-line run</p>
<pre><code>kubectl proxy
</code></pre>
<p>or</p>
<pre><code>kubectl --kubeconfig=kubeconfig proxy
</code></pre>
<p>You should get a similar response</p>
<blockquote>
<p>Starting to serve on 127.0.0.1:8001</p>... |
<p>I want to expose a HTTP service running in Google Container Engine over <strong>HTTPS only</strong> load balancer.</p>
<p>How to define in ingress object that I want <code>HTTPS</code> only load balancer instead of default HTTP?</p>
<p>Or is there a way to permanently drop <code>HTTP</code> protocol from created l... | <p>In order to have HTTPs service exposed only, you can block traffic on port 80 as mentioned on this <a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/gce#blocking-http" rel="nofollow noreferrer">link</a>:</p>
<blockquote>
<p>You can block traffic on :80 through an annotation. You might... |
<p>I need to install a Kubernetes cluster in complete offline mode. I can follow all the instructions at <a href="http://kubernetes.io/docs/getting-started-guides/scratch/" rel="noreferrer">http://kubernetes.io/docs/getting-started-guides/scratch/</a> and install from binaries but that seems like an involved setup. The... | <p>I don't think that anyone has documented this yet. The biggest thing needed is to get the right images pre-loaded on every machine in the cluster. After that things should just work.</p>
<p>There was some discussion of this in this PR: <a href="https://github.com/kubernetes/kubernetes/pull/36759" rel="noreferrer"... |
<p>I have a docker image that serves a simple static web page.
I have a working Kubernetes cluster of 4 nodes (physical servers not in the cloud anywhere).</p>
<p>I want to run that docker image on 2 of the 4 Kubernetes nodes and have it be accessible to the world outside the cluster and load balanced and have it mov... | <p>What you need is to <strong>expose</strong> your <strong>service</strong> (that consists of <strong>pods</strong> which are run/scaled/restarted by your <strong>replication controller</strong>). Using <strong>deployment</strong> instead of replication controller has additional benefits (mainly for updating the app).... |
<p>I need to delete a kubernetes deployment resource using REST API. That's possible and it works, but I just found out that while the deployment resource is deleted ok, its associated ReplicaSet is not.</p>
<p>That means its pods are still running.</p>
<p>I don't know how to find name of a ReplicaSet associated to a... | <p>An easy way to find the calls associated would be to use the associated <code>kubectl</code> command with a higher level of verbosity (<code>--v=6</code> or <code>--v=9</code>). </p>
<pre><code>#~ kubectl delete deployment nginx-deployment --v=6
I1201 12:26:16.511683 6235 round_trippers.go:318] GET https://XXX/a... |
<p>We run our cluster with two nodes of type standard 2: 7.5Gb and 2vCPU</p>
<p>are there any recommended minimum size for a cluster on GKE. I assume there is no real master as this is a managed "service"?</p>
<p>I'm struggling to deal with resource limits.</p>
| <p>There is no recommended minimum size. However, pods have both <a href="http://kubernetes.io/docs/user-guide/compute-resources/" rel="nofollow noreferrer">CPU and memory requests and limits.</a> </p>
<p>Requests define how much free CPU/memory there must be on a node so a pod can be scheduled there; that amount is t... |
<p>I have been trying to setup Jenkins to utilize Kubernetes as in the tutorials. I have everything working really well, but I have been trying to add some custom images using the Kubernetes Jenkins plugin. It seems that any public images work just fine, but when I create an image and put it in my private Container R... | <p>Never tried google container registry but from what I understand is that you can just use the complete repo+image name. Something like:
gcr.io/my_project/image:tag</p>
<p>Make sure your images/repo are under the same service account as your kubernetes and jenkins on google cloud!</p>
|
<p>i have a (spring boot/spring cloud) application (micro-service 'MS' architecture) built with netflix tools and which i want to deploy it on kubernetes cluster (one master and 2 minions) to get advantage from its orchestration fact.</p>
<p>By the way, i created a kube-dns service on the cluster and i tried also to m... | <p>The problem here is that Eureka is a stateful app and you cannot scale it by just increasing the number of replicas.</p>
<p>See the Eureka "peer awereness" docs : <a href="http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html" rel="nofollow">http://cloud.spring.io/spring-cloud-netflix/spring-cloud-n... |
<p>The status of nodes is reported as <code>unknown</code></p>
<pre><code>"conditions": [
{
"type": "Ready",
"status": "Unknown",
"lastHeartbeatTime": "2015-11-12T06:03:19Z",
"lastTransitionTime": "2015-11-12T06:04:03Z",
"reason": "Kubelet stopped p... | <h3>Get nodes</h3>
<pre><code>kubectl get nodes
</code></pre>
<p>Result:</p>
<pre><code>NAME STATUS AGE
192.168.1.157 NotReady 42d
192.168.1.158 Ready 42d
192.168.1.159 Ready 42d
</code></pre>
<h3>Describe node</h3>
<p>Here is a <strong>NotReady</strong> on the node of <code>192.16... |
<p>I would like to be informed when ever a service is changed on kubernetes using client-go.</p>
| <p>this can be done like this:</p>
<pre><code>package main
import (
"fmt"
"flag"
"time"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/pkg/fields"
)
var (
kubeconfig = flag.String("ku... |
<p>I would like to run a Cassandra cluster under Kubernetes on Google Container Engine using the examples given here: <a href="https://github.com/kubernetes/kubernetes/tree/master/examples/storage/cassandra" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/storage/cassandra</a></p... | <p>You should definitely check out Flocker and Flockerhub from ClusterHQ. I've been playing around with their products in order to prove with a POC that containerized sharded db's can be done in an easy and manageable way. Make sure to check them out:
<a href="https://clusterhq.com/" rel="nofollow noreferrer">https://c... |
<p>I have a VM installed on my desktop which is running windows 8 and with minikube i
am running a single-node kubernetes cluster on the VM. Now i want to expose a service so as to access it from outside my VM e.g from chrome browser of my desktop or from anywhere else. </p>
<p>I have already tried the "kubectl expose... | <p>Did you use the nodeport service when you made the kubernetes service? If so, you can access your service through your vm it's ip and the port you assigned with the nodeport k8s service.</p>
|
<p>We are debating the best node size for our production GKE cluster.</p>
<p>Is it better to have more smaller nodes or less larger nodes in general?</p>
<p>e.g. we are choosing between the following two options</p>
<ol>
<li>3 x n1-standard-2 (7.5GB 2vCPU)</li>
<li>2 x n1-standard-4 (15GB 4vCPU)</li>
</ol>
<p>We ru... | <p>Two things to consider in my opinion:</p>
<ul>
<li><strong>Replication</strong>: </li>
</ul>
<p>services like Elasticsearch or Redis cluster / sentinel are only able to provide reliable redundancy if there are enough Pods running the service: if you have 2 nodes, 5 elasticsearch Pods, well chances are 3 Pods will ... |
<p>AWS + Kubeadm (k8s 1.4)
I tried following the README at: </p>
<blockquote>
<p><a href="https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx" rel="nofollow">https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx</a></p>
</blockquote>
<p>but that doesnt seem to work. I a... | <p>Unfortunately it seems that using ingress controllers with Kubernetes clusters set up using kubeadm doesn't is not supported at the moment.</p>
<p>The reason for this is that the ingress controllers specify a <strong>hostPort</strong> in order to become available on the public IP of the node, but the cluster create... |
<p>I am having trouble using the HTTP Load Balancer (Layer 7) with a service in GKE. I originally exposed the service in GKE using the LoadBalancer service type:</p>
<p>kubectl expose deployment myservice --type="LoadBalancer"</p>
<p>This will create a public IP address for my cluster in the same zone and it has been... | <p>It turns out if I want to follow the ingress tutorial, I cannot define a HTTP(S) Load Balancer on the same endpoint. You either choose to follow the tutorial and let the ingress object to define a LB automatically, which worked for me after deleting my testing LB, or do not use ingress and define LB manually (which ... |
<p>Is it possible to create a replication controller and service for a containerized application using one configuration file (yml/json)</p>
| <p>yes, you can have a normal yaml array of objects under List type, typical example can be found in the main repo like <a href="https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/testdata/list.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/testdata/... |
<p><code>kubectl get nodes</code> all nodes status NotReady. </p>
<p>What is the actions should I take to diagnose and fix the issue?</p>
<p>I tried <code>kubectl drain</code> status changed to <code>NotReady,SchedulingDisabled</code> and then <code>kubectl uncordoned</code> changed back to NotReady.</p>
<p>Master v... | <p>I you run <code>kubectl get nodes</code> you'll get the nodes ids.</p>
<p>Then usually, you may find relevant infos about such problems by running <code>kubectl describe node node_id</code> (<code>node_id</code>being the one you've seen listed by the previous command)</p>
|
<p>i have a (spring boot/spring cloud) application (micro-service 'MS' architecture) built with netflix tools and which i want to deploy it on kubernetes cluster (one master and 2 minions) to get advantage from its orchestration fact.</p>
<p>By the way, i created a kube-dns service on the cluster and i tried also to m... | <p>As it seems you want to replace Eureka discovery by Kubernetes discovery here is another answer (from <a href="http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html" rel="nofollow noreferrer">http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html</a>) :</p>
<p>First disable eureka su... |
<p>I am new to Kubernetes and so I'm wondering what are the best practices when it comes to putting your app's source code into container run in Kubernetes or similar environment?</p>
<p>My app is a PHP so I have PHP(fpm) and Nginx containers(running from Google Container Engine)</p>
<p>At first, I had git volume, bu... | <p>Ideally, you would use continuous delivery patterns, which means use Travis CI, Bitbucket pipelines or Jenkins to build the image on code change.</p>
<p>that is, every time your code changes, your automated build will get triggered and build a new Docker image, which will contain your source code. Then you can trig... |
<p>Sometimes people create a deployment without liveniess/readiness probe. How can we patch a probe for that deployment.I try to use PATCH + "Content-Type:application/strategic-merge-patch+json" it doesn't work.</p>
<p>On the other hand, if we created a deployment with probe how can we remove it?</p>
| <p>You should be able to do </p>
<pre><code>kubectl edit deployment <your deployment>
</code></pre>
<p>and the yaml from the currently running deployment should pop up in your default editor. </p>
<p>Edit it (add/remove probe) and save and kubectl will apply the new file automatically.</p>
<p>Of course, a bet... |
<p>I would like to be able to get a description of my current state of the cluster so that in the future I would be able to recover from a failure. Aside from recreating all of the services from source/cli individually, what solutions are available?</p>
| <p>Update: this is a really old method. We now have much better tools to backup k8s clusters, like <a href="https://heptio.github.io/velero/v0.11.0/" rel="nofollow noreferrer">velero</a></p>
<p>I'm using a bash script from CoreOS team, with small adjustments, that works pretty good. I'm using it more for cluster migra... |
<p>I've got a 5 node kubernetes cluster set up with 3 HA masters working nicely. Unfortunately DNS is not working or doesn't exist as a service to my knowledge.</p>
<p>The api-server, controller-manager, and scheduler are all running in pods and working correctly using the hyperkube 1.4.6 image on quay. I've created m... | <p>The addons are handled differently by different deployment methods. The <a href="https://coreos.com/kubernetes/docs/latest/deploy-addons.html" rel="nofollow noreferrer">CoreOS method</a> that you linked to simply has you start them by hand using <code>kubectl create -f dns-addon.yml</code>; there is no automation ar... |
<p>I have an off-the-shelf Kubernetes cluster running on AWS, installed with the <code>kube-up</code> script. I would like to run some containers that are in a private Docker Hub repository. But I keep getting a "not found" error:</p>
<pre><code> > kubectl get pod
NAME READY STATUS ... | <p>Another possible reason why you might see "image not found" is if the namespace of your secret doesn't match the namespace of the container. </p>
<p>For example, if your Deployment yaml looks like</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mydeployment
namespace: kube-system... |
<p>Assuming I have two multi-container pods and services for exposing the pods to the cluster. I also have Replication controller for maintaining the number of pods at any time. </p>
<p>The above cluster is an trivial example. In this point I have two pod files, two service files and two RC files. This makes the file ... | <p>You can use triple dashes or List resource as in these examples:</p>
<ul>
<li><a href="https://github.com/kubernetes/kubernetes/blob/8fd414537b5143ab039cb910590237cabf4af783/hack/testdata/list.yaml" rel="noreferrer">List</a></li>
<li><a href="https://github.com/kubernetes/kubernetes/blob/8fd414537b5143ab039cb910590... |
<p>I have a multi-tier app in Google Container Engine and I have a single ingress with single static IP address where I'll be forwarding multiple domains. Each domain will require its own ssl certificate(let's encrypt). The issue I am facing is that I do not see any option to use multiple certificates in the load balan... | <p>Update:
GCE now supports SNI by attaching at most 10 SSL certificates to a load balancer. You can specify the SSL certificates list with TargetHttpsProxy or TargetSslProxy.</p>
<p>Reference:
<a href="https://cloud.google.com/compute/docs/load-balancing/http/ssl-certificates#multiple_ssl_certificate_example" rel="no... |
<p>I have a multi-tier app in Google Container Engine and I have a single ingress with single static IP address where I'll be forwarding multiple domains. Each domain will require its own ssl certificate(let's encrypt). The issue I am facing is that I do not see any option to use multiple certificates in the load balan... | <p>The <a href="http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_ingressspec" rel="nofollow noreferrer">TLS config is an array</a> where you can define <a href="http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_ingresstls" rel="nofollow noreferrer">multiple... |
<p>How does Kubernetes create Pods?</p>
<p>I.e. what are the sequential steps involved in creating a Pod, is it implemented in Kubernetes? </p>
<p>Any code reference in Kubernetes repo would also be helpful.</p>
| <p>A <strong>Pod</strong> is described in a definition file, and ran as a set of Docker containers on a given host which is part of the Kubernetes cluster, much like <code>docker-compose</code> does, but with several differences.</p>
<p>Precisely, a Pod always contains multiple Docker containers, even though, only the... |
<p>I am trying to connect to a JMX port that I have defined to be 1099 (as is the default) on my Java application (Java 8 and with Spring Boot 1.4 and Tomcat) using a client such as JConsole, Java Mission Control, or Java VisualVM, but I am reaching an error: </p>
<pre><code>java.rmi.ConnectException: Connection refus... | <p>The, jmx remote connection is a pain to work with, proxying it is impossible from my view. I had similar problems and in the end I just used jolokia to connect.</p>
<p>Jolokia is a JMX-HTTP bridge giving an alternative to JSR-160 connectors. It is an agent based approach with support for many platforms. In addition... |
<p>I deployed Kubernetes on AWS with KOPS and the nginx-ingress. </p>
<p>To evaluate multiple clouds (and cut costs), I want to deploy on GKE. Everything worked, except the darn Ingress's. (That was the hardest part on AWS).</p>
<p>Below is the Ingress I'm using on GKE. It makes two Ingresses in the dashboard, ea... | <p>Prashanth's comments were helpful, in the end, native cloud Ingress (AWS/GCE) isn't finished in Kubernetes enough to be useful for my purposes. There's no point learning an abstraction that is more complicated and less functional than the thing underneath. </p>
<p>I ended up using the nginx-ingress from this answ... |
<p>I'm using minikube on macOS 10.12 and trying to use a private image hosted at docker hub. I know that minikube launches a VM that as far as I know will be the unique node of my local kubernetes cluster and that will host all my pods.</p>
<p>I read that I could use the VM's docker runtime by running <code>eval $(min... | <p>i think what u need is to create a secrete which will tell kube from where it can pull your private image and its credentials</p>
<pre><code>kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EM... |
<p>I've run into an interesting situation where I need to clone a private github repo into a docker container that I'm running in Kubernetes. Originally I tried using a gitRepo mount, however, having an OAuth key in my deployment manifest is unacceptable and I would like to use a repo deploy key rather an OAuth key att... | <p>Try to mount your secret containing your deploy key like this:</p>
<pre><code>volumeMounts:
- mountPath: /root/.ssh
name: ssh-key
volumes:
- name: ssh-key
secret:
secretName: ssh-key
defaultMode: 256
</code></pre>
<p>Here is the full example of how I'm using it:</p>
<pre><code>apiVersion: batch/v2... |
<p>According to the <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy" rel="nofollow noreferrer">docs</a> -</p>
<blockquote>
<p>Failed containers that are restarted by Kubelet, are restarted with an
exponential back-off delay, the delay is in multiples of
sync-frequency 0, 1x, 2x... | <p>The backoff delay is not tunable because it could severely affects the reliability of kubelet. Imagine you have some pods that keep crashing on the node, kubelet will continuously restarting all those pods/containers with no break, consuming a lot of resources.</p>
<p>Why do you want to change the restart backoff d... |
<p>We have a <code>aiohttp</code> based web services which uses <code>ZMQ</code> to send jobs to workers and waits for the result. We are of course using the <em>ZMQ eventloop</em>, so we can wait for <em>ZMQ sockets</em>. "Sometimes" the process crashes and we get this stack trace:</p>
<pre><code>...
await socket.sen... | <p>aiohttp is not intended to be used with vanilla pyzmq.
Use <a href="https://github.com/aio-libs/aiozmq" rel="nofollow noreferrer">aiozmq</a> loopless streams instead.</p>
<p>See also <a href="https://github.com/zeromq/pyzmq/issues/894" rel="nofollow noreferrer">https://github.com/zeromq/pyzmq/issues/894</a> and <a ... |
<p>Is it possible to turn off/remove/disable the basic auth in GKE that was added by default?</p>
<p>It's possible to authenticate towards the GKE master using a number of ways, <a href="http://kubernetes.io/docs/admin/authentication/" rel="nofollow noreferrer">as listed in the documentation</a>.</p>
<p>When you crea... | <p>It is not currently possible to disable basic auth in GKE. </p>
<p>On the bright side, <a href="https://github.com/kubernetes/kubernetes/pull/36778" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/36778</a> was recently merged into Kubernetes core which makes it possible to disable basic aut... |
<p>I am using Kubernetes cluster for deploying our bunch of Microservices.I am able to manage Blue Green depoyment for all microservices at the same time like below<a href="https://i.stack.imgur.com/zveaq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zveaq.png" alt="enter image description here"></... | <p>I would suggest switching your deployment strategy from combined to per microservice completely. That includes the fact that you will no longer run all-blue or all-green deployment.</p>
<p>You can launch new deployment for given service, and when it is in place switch the selector under your kubernetes service from... |
<p>I'm pretty new to Docker orchestration and managing a fleet of containers. I'm wanting to build an app that would give the user a container when they ran a command. What is the best tool and best way to accomplish this?</p>
<p>I plan on having a pool of CoreOS servers to run the containers on and I'm imagining the ... | <p>I'd look at Kubernetes + the <a href="http://kubernetes.io/docs/user-guide/jobs/#what-is-a-job" rel="nofollow noreferrer">Jobs API</a> (short lived) or <a href="http://kubernetes.io/docs/user-guide/deployments/" rel="nofollow noreferrer">Deployments</a> (long lived)</p>
<p>I'm not sure exactly what you mean by comm... |
<p>I would like to setup a HA swarm / kubernetes cluster based on low power architecture (arm).
My main objective is to learn how works a HA web cluster, how it reacts to failures and recover from them, how easy it is to scale.</p>
<p>I would like to host a blog on it as well as other services once it is working (git ... | <p>Raspberry Pi, ODroid, CHIP, BeagleBoard are all suitable hardware.
Note that flash card has a limited lifetime if you constantly read/write to them.</p>
<p>Kubernetes is a great option to learn clustering containers.
Docker Swarm is also good.
None of these solutions provide distributed storage, so if you're talki... |
<p>Can <a href="https://github.com/coreos/etcd" rel="noreferrer">etcd</a> be used as reliable database replacement? Since it is distributed and stores key/value pairs in a persistent way, it would be a great alternative nosql database. In addition, it has a great API. Can someone explain why this is not a thing?</p>
| <p><strong>etcd</strong></p>
<ul>
<li><a href="http://kubernetes.io/docs/admin/etcd/" rel="noreferrer">etcd</a> is a highly available key-value store which Kubernetes uses for persistent storage of all of its objects like <strong>deployment, pod, service</strong> information. </li>
<li>etcd has high access control, th... |
<p>Is there a groovy script out there to setup a kubernetes cloud config in jenkins?</p>
<p>I had one for mesos but have since moved to kubernetes. I have multiple masters and would like to keep them all up to date with the active kubernetes cluster and current list of containers.</p>
| <p>Found this</p>
<p><a href="https://gist.github.com/jhoblitt/ce91b458526e3a03d365e2689db825f0" rel="nofollow noreferrer">https://gist.github.com/jhoblitt/ce91b458526e3a03d365e2689db825f0</a></p>
<pre><code>import org.csanchez.jenkins.plugins.kubernetes.*
import jenkins.model.*
def j = Jenkins.getInstance()
def k ... |
<p>I'm getting acquainted with Kubernetes, and haven't found simple solution for deploying stateful services in Kubernetes.</p>
<ul>
<li>Every pod has to be bootstrapped with contact points (list of other pod IPs), which can't be load balanced (i'm afraid of split-brain in case of bad luck: in worst case load-balancer... | <p>If you're looking at a set number of Pods in your stateful cluster in the Kubernetes cluster, PetSets (StatefulSets I believe it is called now) is the answer... or you can define a Service per Pod to achieve the same.</p>
<p>For Pods to be aware of other Pods's IPs, you can use Headless Services, which provide you ... |
<p>I'm currently using Kubernetes for our staging environment - and because it is only a small one, I'm only using one node for <code>master</code> and for running my application pods on there.</p>
<p>When we switch over to production, there will be more than one node - at least one for master and one bigger node for ... | <p>If you look at the output of <code>kubectl get nodes</code>, you'll see something like:</p>
<pre><code>~ kubectl get nodes
NAME STATUS AGE VERSION
test-master Ready,SchedulingDisabled 23h v1.6.0-alpha.0.1862+59cfdfb8dba60e
test-minio... |
<p>I've deployed Spring Cloud Data Flow server on a local Kubernetes cluster. All seems fine.
Then I create an App of type <code>Task</code>, giving the URL of a Spring-Boot JAR.
Then I create a task 'definition' and launch it.
The task definition hangs in status 'launching'. </p>
<p>Here are my findings: </p>
<ol... | <p>What you are trying to do will not work for Spring Cloud Dataflow for Kubernetes. In the Kubernetes implementaton, only Docker images are supported as a deployment artifact.</p>
<p>Currently this fact is not explicitly mentioned in the documentation.
Check out <a href="https://github.com/spring-cloud/spring-cloud-d... |
<p>I am trying to spin up a Kube cluster on AWS.</p>
<p>The documentation (<a href="http://kubernetes.io/docs/getting-started-guides/aws/" rel="nofollow noreferrer">http://kubernetes.io/docs/getting-started-guides/aws/</a>) specifically mentions that kube-up.sh is deprecated.</p>
<p>What is the correct way to configu... | <p>The information is in the article you linked to.</p>
<p>You can either use <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">Kube Ops</a> or coreos's <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html" rel="nofollow noreferrer">kube-aws</a></p>
|
<p>I created the <a href="/questions/tagged/kubernetes" class="post-tag" title="show questions tagged 'kubernetes'" rel="tag"><img src="https://i.stack.imgur.com/8UH0j.png" height="16" width="18" alt="" class="sponsor-tag-img">kubernetes</a> cluster by using <a href="/questions/tagged/kubeadm" class="post-tag" ... | <p>I'm guessing that you forgot to <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/#installing-a-pod-network" rel="nofollow noreferrer">setup the pod network</a>.</p>
<p>From the documentation:</p>
<blockquote>
<p>It is necessary to do this before you try to deploy any applications to your cluster... |
<p>I need help to figure out how to port a current-working VM-based solution to a container-based solution using Kubernetes.</p>
<p><strong>Scenario</strong></p>
<p>An application is made of two components (lets'call them master and slave). A master instance is always up, while 0 or more slaves can be running.</p>
<... | <p>Does it matter what job goes to what slave?
Because in Kubernetes, you would have a load balancer (like an nginx instance) as your proxy from the outside, and then you need to use a Kubernetes Service targeting the slave Pods.</p>
<p>The point of Kubernetes is not to worry about where the Pods live, just to be able... |
<p>My application needs to run a lot of containers as worker nodes (to do various batch processing jobs) and I'm not really interested in keeping up web servers or databases - just short jobs that can take anywhere between 1 second to 1 hour. My idea is to work against a cloud of nodes without me having to worry about ... | <p>Kubernetes, Swarm, and Mesos can all technically schedule jobs for you and handle constraining resources for you. </p>
<p>Unlike the other two, Mesos was designed primarily to handle distribution, task, and resource management at a lower level. Focusing on these bits led to greater power and flexibility, but also m... |
<p>I just installed k8s cluster but the URLs are all using localhost and would like to change it to use the hostname or even IP address. Due to this the cluster can be accessed only from the master node. I am unable to find the right place to make this change. Any help is really appreciated. </p>
<pre><code>OS: Red... | <p>Based on the port number (<code>8080</code>, which is the default value of <a href="http://kubernetes.io/docs/admin/kube-apiserver/" rel="nofollow noreferrer"><code>--insecure-port</code></a> of <code>kube-apiserver</code>), I am guessing that you are running the <code>kubectl cluster-info</code> command on the same... |
<p>Following are the steps I followed.</p>
<ol>
<li>Installed and configured etcd, kube apiserver, kube controller
manager , kube-scheduler, flannel on master. </li>
<li>List item kubectl get nodes doesnt display any nodes initially. </li>
<li><p>Installed and configured flannel network, kubernetes, docker on node.Wh... | <p>Issue was because of version mismatch in kubectl in between the master and nodes. Minor version in master was 2 whereas in the nodes it was 3. sudo update on master and node and restarted fixed the issue.</p>
|
<p>Does anyone have any advice on how to pull from Azure container registry whilst running within Azure container service (kubernetes)</p>
<p>I've tried a sample deployment like the following but the image pull is failing:</p>
<pre><code>kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: jenkins-master... | <p>I got this working after reading this info.</p>
<p><a href="http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod" rel="noreferrer">http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod</a></p>
<p>So firstly create the registry access key</p>
<pre><code>kube... |
<p>Volumes created through GKE can easily be resized using <code>gcloud compute disks resize [volume name from kubectl get pv]</code>. The pod will keep running.</p>
<p>However a <code>df</code> in the pod will still report the same size. More importantly <code>kubectl describe pv</code> will still report the original... | <p>Usually containers in pods are designed to be ephemeral. If this is the design of your deployment then kill the pod and once the pod restarts it should reattach to the gcePersistentDisk with the correct size. </p>
|
<p>I would like to update Heapster configuration (add sink for influxdb). The problem is that, since we created cluster via Google Container Engine, heapster was created by default and have configuration file on kubernetes master. I can't connect to kubernetes master the same way i can connect to minion nodes (ssh). I ... | <p>I have the same usecase, so I can share what I've found so far.</p>
<p>Heapster runs as cluster addon and it seems there's no way to add/delete/modify all of cluster addons on hosted Kubernetes in Google Container Engine (GKE).
You can, however, control two of them: "HorizontalPodAutoscaling" and "HttpLoadBalancing... |
<p>I would like to connect my Kubernetes cluster to Google Cloud SQL.</p>
<p>I have at least 10 different deployed pods which presently connect to MySQL [docker image deployed to k8s] using a JDBC url + username/password.</p>
<p>It it possible to use a single instance of the Google Cloud SQL Proxy and connect all the... | <p>I found a solution. </p>
<p>Deploy the proxy with the yml below, and expose the deployment as a service. Most importantly, make the proxy listen on 0.0.0.0, instead of default 127.0.0.1. All the secrets as per the Google Cloud sql documentation</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metada... |
<p>I have a node outside of my Kubernetes cluster running a web service that I need to access from inside a Pod. The documentation mentions using a Service without a Selector here:
<a href="http://kubernetes.io/docs/user-guide/services/" rel="noreferrer">http://kubernetes.io/docs/user-guide/services/</a></p>
<p>So I c... | <p>Note: A better way to solve this now is using <code>externalName</code> on the Service. This will add a <code>CNAME</code> record to the internal Kubernetes DNS:
<a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/network/service-external-name.md" rel="nofollow noreferrer">http... |
<p>I'm using kubernetes secret as my environment variable
(<a href="http://kubernetes.io/docs/user-guide/secrets/#using-secrets-as-environment-variables" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/secrets/#using-secrets-as-environment-variables</a>).</p>
<p>I've check whether env vars set correctly... | <p>I found the solution after discussion with some guys.</p>
<p>The problem should be docker level not kubernetes level.
<a href="https://ypereirareis.github.io/blog/2016/02/29/docker-crontab-environment-variables/" rel="nofollow noreferrer">https://ypereirareis.github.io/blog/2016/02/29/docker-crontab-environment-var... |
<h3>Problem</h3>
<p>I'd like to issue certs to many different developers (different subjects) all within the dev group, and have them all have access to create and modify things within the dev namespace, but not touch anything outside it, and definitely not see secrets outside it. I suspect the roles, role bindings, ... | <p>First, you need to allow access to the URLs kubectl uses for API discovery and validation (swagger, listings of API groups and resource types, etc).</p>
<p>The easiest way to do that is to load the default bootstrap <a href="https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/auth/authorizer/rbac/bootst... |
<p>I am trying to set up EFK stack on my k8s cluster using <a href="https://github.com/kubernetes/contrib/blob/master/ansible/roles/kubernetes-addons/tasks/cluster-logging.yml" rel="nofollow noreferrer">ansible repo</a>.</p>
<p>When i tried to browse kibana dashboard it shows me next output:</p>
<p><a href="https://i... | <p>Finally i found out what was causing the issue.
when installing docker from CentOS 7 repo, there is an option (--log-driver=journald) which force docker to run log output to journald. The default behavior is to write these logs to json.log files.So, the only thing i had to do, delete the last mentioned option from /... |
<p>I initialized Kubernetes with <code>kubeadm init</code>, and after I used <code>kubeadm reset</code> to reset it I found <code>--pod-network-cidr</code> was wrong. After correcting it I tried to use <code>kubeadm</code> to init Kubernetes again like this:</p>
<pre><code>kubeadm init --use-kubernetes-version v1.5.1 ... | <p>I figured it out, if you change <strong>--pod-network-cidr</strong> when you reinitialize kubernetes via <strong>kubeadm init</strong>, you should delete some auto-created things, just follow the steps below before you execute <strong>kubeadm init</strong> again:</p>
<ol>
<li><p>execute <strong>kubeadm reset</strong... |
<p>I'm trying to publish to an existing pubsub topic from a Scala application running in Google Container Engine (i.e. running in Kubernetes). </p>
<p>I have enabled (I think) the correct permissions for the underlying cluster: </p>
<p><a href="https://i.stack.imgur.com/WnEwS.png" rel="noreferrer"><img src="https://i... | <p>I've found that this problem happens when sbt manages the "com-google-cloud-pubsub" dependancy. My work around to this is, I created a maven project and built a jar with only that dependency. Then I added that jar to my classpath and in my build.sbt I annotated the "com-google-cloud-pubsub" as "provided". I hope thi... |
<p>I have a kubernetes cluster of 3 hosts where each Host has a unique id label.
On this cluster, there is a software that has 3 instances (replicas).</p>
<p>Each replica requires to talk to all other replicas. In addition, there is a service that contains all pods so that this application is permanently available.</... | <p>The feature you're looking for is called <a href="http://kubernetes.io/docs/concepts/abstractions/controllers/statefulsets/" rel="noreferrer">StatefulSets</a>, which just launched to beta with <a href="http://blog.kubernetes.io/2016/12/kubernetes-1.5-supporting-production-workloads.html" rel="noreferrer">Kubernetes ... |
<p>From what I can tell in the documentation, a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/" rel="noreferrer"><code>ReplicaSet</code></a> is created when running a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer"><code>Deployment</code><... | <p>Replica Set is the next generation of Replication Controller. Replication controller is kinda imperative, but replica sets try to be as declarative as possible.</p>
<p>1.The main difference between a Replica Set and a Replication Controller right now is the selector support.</p>
<pre><code>+-----------------------... |
<p>Trying to understand how sticky session should be configured when working with service type=loadbalancer in AWS
My backend are 2 pods running tomcat app
I see that the service create the AWS LB as well and I set the right cookie value in the AWS LB configuration ,but when accessing the system I see that I keep switc... | <p>Can you try setting Client-IP based session affinity by setting service.spec.sessionAffinity to "ClientIP" (the default is "None"). (<a href="http://kubernetes.io/docs/user-guide/services/" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/services/</a>)</p>
<p>You can also try running an ingress contr... |
<p>Do you know if there is a way to dynamically change the namespace of a running RC or pod in kubernetes?</p>
<p>Thanks for your help.</p>
| <p>You can not change the namespace of a running resource:</p>
<p><strong>A resource with the same name might already exist in another namespace, making a rename difficult and unpredictable</strong></p>
|
<p>I'd like to deploy kubernetes on a large physical server (24 cores) and I'm uncertain as to a number of things.</p>
<p>What are the pros and cons of creating virtual machines for the k8s cluster other than running on bare-metal.</p>
<p>I have the following considerations:</p>
<ul>
<li>Creating vms will allow for ... | <p>128 cores and doubts.... That is a lot of cores for a single server.</p>
<p>For kubernetes however this is not relevant:
Kubernetes can use different sized servers and utilize them to the maximum. However if you combine the master server processes and the node/worker processes on a single server, you might create u... |
<p>I'm using kubernetes secret as my environment variable
(<a href="http://kubernetes.io/docs/user-guide/secrets/#using-secrets-as-environment-variables" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/secrets/#using-secrets-as-environment-variables</a>).</p>
<p>I've check whether env vars set correctly... | <p>Instead of running cron scripts inside the container, you should probably use <a href="http://kubernetes.io/docs/user-guide/cron-jobs/" rel="nofollow noreferrer">CronJobs</a>, where you can set env vars from secrets in the same way you do for deployments.</p>
|
<p>I'm trying to set up environment for microservices. I'm using fabric8 to do that.</p>
<p>I'm using <code>mvn fabric8:cluster-start -Dfabric8.cluster.kind=openshift</code> command. while executing i'm getting following error...</p>
<pre><code> [INFO] gofabric8> Downloading https://github.com/openshift/origin/re... | <p>I had the similar problem today when I attempted to follow the fabric8 get started instructions here: <a href="https://fabric8.io/guide/getStarted/gofabric8.html" rel="nofollow noreferrer">https://fabric8.io/guide/getStarted/gofabric8.html</a>.
I used:
<code>gofabric8 start --minishift</code> and received this error... |
<p>How to set the maximum size of the log file? Or enable log rotation.
In the documentation I have not found anything about this.</p>
<p>Or it is necessary to write a script for this?</p>
| <p>I don't think kubernetes provides log rotation feature now. You can put logrotate configuration in your host machine. Something like this one:</p>
<pre><code>/var/lib/docker/containers/*/*.log {
rotate 7
daily
size=10M
compress
missingok
delaycompress
copytruncate
}
</code></pre>
|
<p>I'm wondering the graceful way to reduce nodes in a Kubernetes cluster on GKE.</p>
<p>I have some nodes each of which has some pods watching a shared job queue and executing a job. I also have the script which monitors the length of the job queue and increase the number of instances when the length exceeds a thresh... | <p>I think the best approach is instead of using a pod to run your tasks, use the kubernetes job object. That way when the task is completed the job terminates the container. You would only need a small pod that could initiate kubernetes jobs based on the queue. </p>
<p>The more kube jobs that get created, the more r... |
<p>I've successfully deployed a Kubernetes cluster using the <a href="https://github.com/kubernetes/kube-deploy" rel="nofollow noreferrer">docker-multinode configuration</a> as well as a Ceph cluster and am able to mount a CephFS device manually using the following:</p>
<p><code>sudo mount -t ceph monitor1:6789:/ /cep... | <p>AFAIK you might have 2 problems here:</p>
<ul>
<li>Ceph required the ip addresses of the machines to work</li>
<li>The OS you are running the container on, is the one which mounts the storage: The ceph tooling needs to be installed on that machine. The container is completely unaware of the mounted disks</li>
</ul>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.