prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>With manually installed Kubernetes <a href="https://coreos.com/kubernetes/docs/latest/getting-started.html" rel="noreferrer">on CoreOS</a>, how does one install and use the <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/addon-manager" rel="noreferrer">Kubernetes addon manager</a>?</p> ...
<p>The addon manager is deployed as a normal pod or a deployment, with a simple <code>kubectl apply -f</code>.</p> <p>The yaml looks something like this, look at the specific version that you need:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 kind: Pod metadata: name: kube-addon-manager name...
<p>How can I use the <code>--output=custom-columns</code> option for the the Kubernetes CLI (<code>kubectl</code>) to select array elements?</p> <p>In other words, how can I turn this:</p> <pre class="lang-shell prettyprint-override"><code>kubectl get services #=&gt; NAME TYPE CLUSTER-IP EXTERNAL...
<p><strong>TLDR</strong></p> <p>For an element that is in a list use <code>*</code> in square brackets.</p> <p>So your query should look like this:</p> <pre class="lang-shell prettyprint-override"><code>kubectl get service \ -n kube-system \ -o=custom-columns='NAME:.metadata.name,IP:.spec.clusterIP,PORT:.spec.ports[*]....
<p>Is there a recommended way of initiating 'docker build' commands from a container loaded in to Kubernetes?</p> <p>IE. Spinning up a Jenkins container (from the community image) and then ensuring that docker is installed within that container so you can issue 'docker build' commands.</p> <p>I've read up on various ...
<p>There are two ways of accessing docker daemon from a Kubernetes Pod. </p> <ol> <li><p>You can expose the docker daemon running on the host machine (this is the docker daemon used by kubernetes to spin up your container) inside your container. To do this you need to modify your Pod specification to add a hostPath fo...
<p>I need a deployment where each pod has a single container and each container has 2 java processes running. Since a container starts with a process(P1), and if that particular process(P1) is killed, the pod restarts. Is it possible, that container starts with 2 processes, and even if one of them is killed, the contai...
<p>You can do this using <a href="http://supervisord.org/" rel="nofollow noreferrer">supervisord</a>. Your main process should be bound to supervisord in docker image and two java processes should be managed using supervisord. </p> <blockquote> <p>supervisord‘s primary purpose is to create and manage processes based...
<p>I am running minikube on my Mac laptop. I am using VirtualBox to host the minikube virtual machine, following the <a href="https://github.com/kubernetes/minikube#quickstart" rel="nofollow noreferrer">official instructions</a>.</p> <p>I would like a pod that I am going to deploy into the cluster to be able to ping ...
<p>You should be able to use the ipv4 address listed under <code>vboxnet0</code>. Look for the <code>vboxnet0</code> interface in the list of outputs for <code>ifconfig</code>. Alternatively the address <code>10.0.2.2</code> will also map back to the host from the guest.</p> <p>This IP address will be accessible fro...
<p>Given a registry with several tags for an image, e.g.:</p> <pre><code>myimage 0.0.3 myimage 0.0.2 </code></pre> <p>Can I somehow extract <code>0.0.3</code> (or rather the most recent tag) into a variable in bash?<br> I'd like to find out this value so that I could then <code>tagValue+...
<p>we use this with an inhouse v2 docker registry. it depends on jq, so it may not be the right fit for you. the registry seems to return them in the order in which they were added, so we just grab the latest, which is quite possible with jq, if you have a new enough version:</p> <pre><code>tags_url="https://hot.regis...
<p>I'm running a Kubernetes cluster on AWS using kops. I've mounted an EBS volume onto a container and it is visible from my application but it's read only because my application does not run as root. How can I mount a <code>PersistentVolumeClaim</code> as a user other than root? The <code>VolumeMount</code> does not s...
<p>The Pod Security Context supports setting an <code>fsGroup</code>, which allows you to set the group ID that owns the volume, and thus who can write to it. The example in the docs:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: hello-world spec: containers: # specification of the pod's containers #...
<p>When creating a Job in kubernetes 1.6, the following error occurs:</p> <pre><code>Error from server (BadRequest): error when creating "job.yaml": Job in version "v1" cannot be handled as a Job: [pos 217]: json: expect char '"' but got char '1' </code></pre> <p>The job.yaml in question is:</p> <pre><code>apiVers...
<p>Found the solution:</p> <p>The JSON parser returns a rather unrelated error on a piece of the data in the environment variables:</p> <pre><code> env: - name: OLTP_TABLE_SIZE value: 10000 </code></pre> <p>Should read:</p> <pre><code> env: - name: OLTP_TABLE_SIZE value: "10000" </code></pre...
<p>I have following setting for readiness probe:</p> <pre><code> readinessProbe: httpGet: path: /xyzapi/health port: 8888 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 30 successThreshold: 2 failureThreshold: 5 </code></pre> <p>I want this readiness prob...
<p>Oswin Noetzelmann's comment is spot-on. The purpose of a readiness probe is to continually check for the state of readiness. You can probably still change it so that your readiness-check script checks once and then caches that result, but it wouldn't be idiomatic use of readiness. </p> <p>Better alternatives for a ...
<p>I have a K8S cluster running on DigitalOcean. I have a Postgresql database running there and I want to create a volume using the DigitalOcean BlockStorage to be used by the Postgresql pod as volume. Is there any examples on how to do that? </p> <p>If it's not possible to use DigitalOcean blockstorage then how do...
<p>No official support yet. You can try the example from someone in <a href="https://github.com/kubernetes/kubernetes/issues/32334" rel="nofollow noreferrer">this github issue</a>:</p> <blockquote> <p>Update: I finished writing a volume plugin for digitalocean. Attach/detach is working on my cluster. Looking for any...
<p>First of all, this is a question regarding my thesis for school. I have done some research about this, it seems like a problem that hasn't been tackled yet (might not be that common).</p> <p>Before jumping right into the problem, I'll give a brief example of my use case.</p> <p>I have multiple namespaces containin...
<p>For uninterrupted upgrade you should use clusters of nodes providing your service and perform a rolling update, which takes out a single node at a time, upgrading it, leaving the rest of the nodes for continued servicing. I recommend looking at the concept of virtual services (e.g. in <a href="https://coreos.com/kub...
<p>I am using below yaml file to create the pod, kubectl command giving below error.</p> <p>How to correct this error message?</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: command-demo labels: purpose: demonstrate-command spec: containers: - name: command-demo-container image: debian co...
<p>Your&mdash;syntactically correct&mdash;YAML results in an incorrect data-structure for kubernetes. In YAML the indentations can affect the structure of the data. See <a href="https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html" rel="noreferrer">this</a>. </p> <p>I think this should ...
<p>I have a sandbox Kubernetes cluster, in which I shutdown all pods at night, so it can scale down with the <code>cluster-autoscaler</code> add-on.</p> <p>The problem is, it almost always keep the master plus 2 nodes running.</p> <p>Looking into <code>cluster-autoscaler</code> logs, I see the problem seems to be thi...
<p>An alternative to using nodeselector would be to use <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature" rel="nofollow noreferrer">inter-pod affinity</a> to ensure that your pods get packed better. </p> <p>'Preferred' rather than 'Required' ...
<p>When running <code>helm upgrade --install --namespace $PROJECT_NAMESPACE --values values.yaml --name $SOME_NAME some/chart</code>.</p> <p>I get <code>Error: unknown flag: --name</code>.</p> <p>Is there no way to set the name of a chart you are targeting with <code>upgrade</code>? Is this only possible for <code>in...
<p>The solution was that no <code>--name</code> was needed.</p> <p>The syntax for a Helm Upgrade is <code>"helm upgrade [RELEASE] [CHART]"</code>, so the "RELEASE" is the same as what would be the <code>--name</code> in a Helm Install.</p>
<p>I am using Google Container Engine . Now I want auto scaling functionality in my cluster . As per documentation <strong>GKE autoscaler</strong> is in <strong>beta release</strong> . I can also enable autoscaling in <strong>instance group</strong> that is managing cluster nodes . Cluster autoscaler add/remove nodes ...
<p>Short answer - don't use GCE MIG autoscaling feature. It will just not work properly with your cluster.</p> <p>See details in this FAQ: <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#should-i-use-a-cpu-usage-based-node-autoscaler-with-kubernetes" rel="nofollow noreferrer">ht...
<p>Problem : Not able to write in the directory inside the container. </p> <p>I am using hostPath storage for the persistent storage requirements. I am not using PV anc PVC to use hospath, instead of that, using it's volume plugin. for example</p> <pre><code>{ "apiVersion": "v1", "id": "local-nginx", "kin...
<p>I think the problem you are encountering is not related to the user or group (your pod definition does not have RunAsUser spec, so by default it is run as root), but rather to the SELinux policy. In order to mount a host directory to the pod with rw permissions, it should have the following label: <code>svirt_sandb...
<p>Google App Engine (Flex) has an elegant way to ensure that apps are exposed to the internet using HTTPS. (From what I know, you just specify <code>secure: always</code> in app.yaml, and you are good to go (<a href="https://cloud.google.com/appengine/docs/standard/python/config/appref#handlers_element" rel="nofollow ...
<p>Assuming you have a containerized application that already knows how to terminate TLS connections and has TLS certificates, you can use the <code>kubectl expose</code> command you mentioned to create a load balancer on port 443. It should work.</p> <p>If you do not have TLS certificates and you're expecting Google ...
<p>In the pre-k8s, pre-container world, I have a cloud VM that runs nginx and lets an authorized user scp new content into the webroot.</p> <p>I'd like to build a similar setup in a k8s cluster to host static files, with the goal that:</p> <ol> <li>An authorized user can scp new files in</li> <li>These files are stat...
<p>I think you're trying to fit a square peg into a round hole here.</p> <p>Essentially, you're building an FTP server (albeit with scp rather than FTP). </p> <p>Kubernetes is designed to orchestrate containers. </p> <p>The two don't really overlap at all.</p> <p>Now, if you're really intent on doing this, you coul...
<p>I was able to get it working following NFS example in Kubernetes.</p> <p><a href="https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs</a></p> <p>However, when I want to automate all the steps,...
<p>I got it working after I add <strong>kube-dns</strong> address to the each minion|node where <strong>Kubernetes</strong> is running. After login each minion, update <strong>resolv.conf</strong> file as the following;</p> <pre><code>cat /etc/resolv.conf # Generated by NetworkManager search openstacklocal localdomai ...
<p>i have a problem. i want to install helm on the kubernetes but when i want run this command <code>helm init --upgrade</code> but i have this error :</p> <pre><code>Creating /root/.helm Creating /root/.helm/repository Creating /root/.helm/repository/cache Creating /root/.helm/repository/local Creating /root/.hel...
<p>Maybe you have an internal proxy? If so, you want to set the <code>https_proxy</code> environment as <code>https_proxy=&lt;your proxy&gt; helm init --upgrade</code>. You can also set it globally as <code>export https_proxy=&lt;your proxy&gt;</code>.</p>
<p>I have 3 kube masters running and 5 agent nodes. When deploying one of the pod, it fails to start up with the below message</p> <pre><code>2017-03-23T01:47:25.164033000Z I0323 01:47:25.160242 1 main.go:41] Starting NGINX Ingress controller Version 0.7.0 2017-03-23T01:47:25.165148000Z F0323 01:47:25.164609 ...
<p>You generate certificates on one machine and then copy over to the others. What you have done is the right thing. </p> <p>But when you generate the server certificates make sure you put the IP address or the hostnames of the machines.</p> <p><a href="https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/...
<p>I’m trying to install a Helm chart from a Google Storage URL <code>(https://storage.cloud.google.com/bucket-name/php-1.5.tgz)</code>, as per the example <code>A full URL (helm install https://example.com/charts/foo-1.2.3.tgz)</code> <a href="https://github.com/kubernetes/helm/blob/master/docs/using_helm.md#more-inst...
<p>I found that the link format <code>https://storage.cloud.google.com/bucket-name/php-1.5.tgz</code> was only for browsers and redirected, a direct link to the same file can be achieved using the format <code>https://storage.googleapis.com/bucket-name/php-1.5.tgz</code>.</p>
<p>I am using kubernetes helm to deploy apps to my cluster. Everything works fine from my laptop when helm uses the cluster's kube-config file to deploy to the cluster.</p> <p>I want to use helm from my CI/CD server (which is separate from my cluster) to automatically deploy apps to my cluster. I have created a k8s se...
<p>Helm works by using the installed kubectl to talk to your cluster. That means that if you can access your cluster via kubectl, you can use helm with that cluster. </p> <p>Don't forget to make sure you're using to proper context in case you have more than one cluster in you kubcfg file. You can check that by running...
<p>I have kubernetes pod where I am mounting my app source code as git volume. I tried various setups for how to put the source code into the pod and git volume was the one I ended up with in the end.</p> <p>But now I have an issue with data. My app has a files directory in it(empty) and I need to mount a volume(fuse)...
<p>What I usually do is add the sources to the docker image when building the image. This is a straight forward process and you can always see the images as a black box in terms of deployment. What this achieves is effectively decoupling the preparation of the image and deploying/updating at run time as two different p...
<p>I am trying to install Kubernetes on Ubuntu 16.04 VM, I tried this <a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/kubeadm/</a>, but the API server does not start.</p> <p>The connection to the server localhost:8080 was ...
<p>You probably haven't set up the credentials for <code>kubectl</code>.</p> <pre><code>sudo cp /etc/kubernetes/admin.conf $HOME/ &amp;&amp; sudo chown $(id -u):$(id -g) $HOME/admin.conf; if ! fgrep -q KUBECONFIG= $HOME/.bashrc; then echo 'export KUBECONFIG=$HOME/admin.conf' &gt;&gt; $HOME/.bashrc; fi;. $HOME/.bashrc ...
<p>I am exploring the <a href="https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/KubernetesClient.java#L104" rel="nofollow noreferrer">(undocumented?) <code>events()</code> API</a> in <a href="https://github.com/fabric8io/kubernetes-client" rel="nofo...
<p>You can watch a particular pod or particular job for example. The T type in that case is Pod or Job respectively. Try </p> <pre><code>kube.extensions().jobs().createNew()...done().watch(new Watcher&lt;Job&gt;(){...}) </code></pre>
<p>I have a Kubernetes Ingress resource where I'm trying to redirect all non-www traffic to www subdomain for url canonicalization. So all traffic on <code>example.com</code> should be rewritten to <code>www.example.com</code>. I can't seem to figure out how to use the <a href="https://github.com/kubernetes/contrib/tre...
<p>The <code>ingress.kubernetes.io/rewrite-target</code> is used for rewriting the request URI, not the host.</p> <p>It looks like from your link you're using the nginx ingress controller. You can get the effect you want by adding a second <code>Ingress</code> for <code>example.nl</code> that uses the <code>ingress.ku...
<p>Following snippet is from kubernetes official documentation (<a href="http://kubernetes.io/docs/user-guide/volumes/#gitrepo" rel="nofollow">http://kubernetes.io/docs/user-guide/volumes/#gitrepo</a>):</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: server spec: containers: - image: nginx name: ngin...
<p>Yes there is a way to do it. See following example. I have <a href="https://github.com/surajssd/hitcounter" rel="noreferrer">git repo</a> which has sub directory <a href="https://github.com/surajssd/hitcounter/tree/master/configs" rel="noreferrer"><code>configs</code></a>.</p> <p>So here is pod file which I am usin...
<p>I am working in set up a kubernetes cluster using the following stuff:</p> <ul> <li><strong>AWS</strong> as a cloud provider</li> <li><strong>kops (Version 1.6.0-alpha, just to test)</strong> as a cli tool to create and manage cluster</li> <li><strong>kubectl (server : v1.6.2 and client : 1.6.0 )</strong> to contro...
<p>Firstly you <a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#releases" rel="nofollow noreferrer">should use</a> autoscaler <code>gcr.io/google_containers/cluster-autoscaler:v0.5.0</code> when using Kubernetes <code>1.6.x</code> .</p> <p>Secondly from my understanding the autoscaler i...
<p>I have Kubernetes working well in two different environments, namely in my local environment (MacBook running minikube) and as well as on Google's Container Engine (GCE, Kubernetes on Google Cloud). I use the MacBook/local environment to develop and test my YAML files and then, upon completion, try them on GCE. </...
<p>You can switch from local (minikube) to gcloud and back with:</p> <p><code>kubectl config use-context CONTEXT_NAME</code></p> <p>to list all contexts:</p> <p><code>kubectl config get-contexts</code></p> <p>You can create different enviroments for local and gcloud and put it in separate yaml files. </p>
<p>I found that <strong>startup scripts</strong> can be added to <strong>Google compute instances</strong> using either the <strong>console</strong> or <strong>cli(gcloud).</strong> I want to add the <strong>startup scripts</strong> to <strong>google container engine.</strong> </p> <p>The <strong>goal</strong> is to <...
<p>First of all your question is fairly complicated. The concept of startup scripts do not belong to the containers world. <strong>As far as I know you can't add startup scripts in Google Container Engine</strong>. This is because Container Engine instances are immutable (e.g. you can't or you are not supposed to modif...
<p>The <a href="https://kubernetes.io/docs/concepts/overview/components/" rel="nofollow noreferrer">kubernetes documentation</a> describes the two types of components that live within a kubernetes cluster: master components and node components. I wasn't able to find diagrams that accurately and completely described the...
<p>My advices:</p> <ul> <li>There could be any number of master nodes, so I would make this visible somehow on the diagram.</li> <li>kube-proxy and kubelet runs on every node, even on master nodes.</li> <li>docker can be interchanged with rkt as well, I would show it up as well.</li> <li>fluentd is not part of the cor...
<p>I have 2 namespaces and 1 pod, 1 service running in each.</p> <p>Example</p> <pre><code>Namespace 1: default Pod: pod1 Service: pod1service Namespace 2: test Pod: pod1 Service: pod1service </code></pre> <p>I can actually make HTTP request from namespace2 pod to namespace1 pod.</p> <pre><code>curl -H "Content-Ty...
<p>You need to configure <a href="https://kubernetes.io/docs/concepts/services-networking/networkpolicies/" rel="nofollow noreferrer">network policies</a>. For that to work you also need to use a <a href="https://kubernetes.io/docs/concepts/cluster-administration/addons/" rel="nofollow noreferrer">network addon</a> tha...
<p>I am exploring <a href="https://kubernetes.io/" rel="nofollow noreferrer">Kubernetes</a> Cluster orchestration and I am familiar with docker based containerization techniques.</p> <p>Normally when starting docker containers, we pass different CLI Arguments(port options + Env variables) something like below</p> <pr...
<p><code>kubectl run</code> is just a shorthand convenience method. Normally you should be writing pod specs in YAML/JSON.</p> <p>Based on your unfamiliarity with basics, I would highly recommend sitting down and following through some of the training material at <a href="https://kubernetes.io/docs/tutorials/" rel="no...
<p>I was able to get it working following NFS example in Kubernetes.</p> <p><a href="https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs</a></p> <p>However, when I want to automate all the steps,...
<p>You can use do this with the help of <code>kube-dns</code>, check whether it's service running or not,</p> <p><code> kubectl get svc --namespace=kube-system </code></p> <p>and kube-dns pod also,</p> <p><code> kubectl get pods --namespace=kube-system </code></p> <p>you have to add respected name-server according...
<p>I'm trying to figure out the best way to work with Docker containers in my dev environment, but deploy versioned images of my app to Kubernetes. Here's what I have so far:</p> <p>I'm using the following Docker image as a base - <a href="https://github.com/shufo/docker-phoenix" rel="nofollow noreferrer">https://gith...
<p>In my opinion you are on the right track. Including the code in the image is probably considered best practice. I have recently written an <a href="https://stackoverflow.com/questions/43626583/how-to-mount-volume-into-the-source-code-of-the-app/43627520#43627520">answer to another question</a> describing some of the...
<p>I have a a 3 nodejs grpc server pods and a headless kubernetes service for the grpc service (returns all 3 pod ips with dns tested with getent hosts from within the pod). However all grpc client request always end up at a single server.</p> <p>According to <a href="https://stackoverflow.com/a/39756233/2952128">http...
<p>After diving deep into Grpc-c core code and the nodejs adapter I found that it works by using the option key <code>"grpc.lb_policy_name"</code>. Therefore, constructing the gRPC client with</p> <pre><code>new Client(address, credentials, {"grpc.lb_policy_name": "round_robin"}) </code></pre> <p>works. Note that in ...
<p>Based on this (<a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/kubeadm/</a>) step I have installed Kubernetes in Centos 7 box and ram the kubeadm init command.</p> <p>But node is not in ready status. When I looked the /v...
<p>Looks like you've chosen flannel as CNI-networking. Pls check if you've specified --pod-network-cidr 10.244.0.0/16 while kubeadm init.</p> <p>Also check if you've ConfigMaps created for flannel as in here @ <a href="https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml" rel="noreferrer">https...
<p>I have setup this 3 nodes cluster (<a href="http://docs.projectcalico.org/v2.1/getting-started/kubernetes/installation/vagrant/" rel="nofollow noreferrer">http://docs.projectcalico.org/v2.1/getting-started/kubernetes/installation/vagrant/</a>).</p> <p>after restarting my nodes. KubeDNS service is not starting. log ...
<p>service account mount <code>/var/run/secrets/kubernetes.io/serviceaccount</code> from secret <code>default-token-r5xws</code> failed. Check the logs for this secret creation failure.</p>
<p>I am new to cloud and have 5 distributed instances on AWS running the same images. I have attached an image of the CPU usage CloudWatch monitor here:</p> <p><a href="https://i.stack.imgur.com/5KdIl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5KdIl.png" alt="enter image description here"></a><...
<p>Are you using T2 Instances ? </p> <p>T2 instances are designed to provide moderate baseline performance and the capability to burst to significantly higher performance as required by your workload</p> <p>You can get more information from below link for Initial CPU credit available for t2 series of instances. </p> ...
<p>I have sample apps running on my cluster. I have a webapp pod which has three containers. Each running as a separate springboot webservice. employee, test1 and test2. The service exposing this is shown below</p> <p><code>apiVersion: v1 kind: Service metadata: labels: name: webapp name: webappservice spec: por...
<p>Your service yaml shows clearly that you are only exposing port 8080 as NodePort 30062. It is possible to simply add another <code>-port:8081 nodePort:30063</code> to your existing configuration, but - Since your two services are separate containers anyway you may prefer to create two separate deployments and servic...
<p>Question is similar to following SO question. But I am not looking forward to create classic load balancer. </p> <p><a href="https://stackoverflow.com/questions/31611503/how-to-create-kubernetes-load-balancer-on-aws">How to create Kubernetes load balancer on aws</a> </p> <p>AWS now provide 2 types of loadbalancer...
<p>An AWS ALB Ingress Controller has been built which you can find on GitHub: <a href="https://github.com/coreos/alb-ingress-controller" rel="nofollow noreferrer">https://github.com/coreos/alb-ingress-controller</a></p>
<p>I would like to deploy a kubernetes cluster with weave virtual network in a node that is behind a NAT. (for example, using a floating IP in openstack)</p> <p>Here is an example:</p> <p><em>Kube Master</em>: weave pod running here</p> <ul> <li>Internal IP: 192.168.0.10</li> <li>External IP: 172.10.0.10</li> </ul> ...
<p>My current workaround is to fix the IPs of the nodes in the weave configuration file:</p> <pre><code>wget https://git.io/weave-kube-1.6 vim weave-kube-1.6 </code></pre> <p>and modify it with your IPs</p> <pre><code> containers: - name: weave env: - name: KUBE_PEERS value: "172.10....
<p>I have a super simple container with cron scheduled:</p> <pre><code>* * * * * root /bin/bash /alive.sh </code></pre> <p>alive.sh:</p> <pre><code>#!/bin/bash /bin/echo "I'm alive" /bin/echo $(/bin/date) &gt;&gt; /tmp/alive.log </code></pre> <p>I build the docker image locally and run it:</p> <pre><code>docker b...
<p>I've followed a <a href="https://stackoverflow.com/a/21928878/436754">https://stackoverflow.com/a/21928878/436754</a> on enabling logs.</p> <p>Running: <code>/var/log/syslog</code> </p> <pre><code>May 4 12:33:05 crondemo rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="14" x-info="http://www.rsyslog...
<p>We have a rest API that is written in Java (hosted in Wildfly). Our service is running in kubernetes (GKE). We want to leverage Cloud Endpoints to track usage and responsiveness of our API. The API is not new, we have been shipping software that interacts with it for years. It is also quite large (thousands of publi...
<p>I have had the exact same problem with Endpoints, where it does not seem to think that passing an array of objects is valid as a body parameter. I worked around this by just using a generic object and a decent description. The description will not programatically fix anything, but using a generic object allows End...
<p>Say I have, my-namespace -> my-pod -> my-container and I have a file located at my-container:/opt/tomcat/logs/catalina.2017-05-02.log. I have applied the below command to copy the file which isn't working,</p> <pre><code>kubectl cp my-namepace/my-pod:/opt/tomcat/logs/catalina.2017-05-02.log -c my-container . </code...
<p>What you are asking <code>kubectl</code> to do is copy the file catalina.2017-05-02.log to the current context, but the current context is a directory. The error is stating that you can not copy a file to have the name of a directory.</p> <p>Try giving the copied version of the file a name:</p> <p><code>kubectl cp...
<p>I'm a newbie on Spring Cloud, and I'm a little confused about it. Kubernetes and Spring Cloud are both micro-services framework. If I have Kubernetes(or mesos) already, why do I need use Spring Cloud? I notice that many projects use them both. What's the difference between Kubernetes and Spring Cloud? They both can ...
<p>Kubernetes and Spring Cloud address a lot of the same concerns with Microservices, but with different approaches and technologies. Redhat wrote a great article explaining this. Here the main takeaways:</p> <blockquote> <p>Spring Cloud has a rich set of well integrated Java libraries to address all runtime concerns a...
<h3>Main question:</h3> <p>Can we exclude a path from the cloud endpoint statistics/monitoring while still allowing traffic to our actual backend?</p> <h3>Explanation:</h3> <p>We have a backend running on Kubernetes and are now trying out Google Cloud Endpoints. We added the EPS container to the pod in front of the ...
<p>Google Cloud Endpoints doesn't support excluding a path from reporting statistics/monitoring yet. It's something that is on the radar and being actively looked at.</p> <p>In the meantime, your alternate solution would work as a stop-gap, but with the downsides that you posted.</p>
<p>I try to preserve the client IP with proxy protocol. Unfortunately it does not work.</p> <p>Azure LB => nginx Ingress => Service</p> <p>I end up with the Ingress Service Pod IP.</p> <p>Ingress Controller Deployment:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-ingress-co...
<p>Got it to work.</p> <p>In <code>Ingress Controller Deployment</code> I changed the image to </p> <pre><code>gcr.io/google_containers/nginx-ingress-controller:0.8.3 </code></pre> <p>and removed the <code>configmap</code>.</p> <p>I am using ingress to forward to a pod with a dotnet core api.</p> <p>Adding</p> <p...
<p>I'm currently exploring more and more of Google Cloud Platform and try to evaluate how I can change my default stack. I like the idea of using all the built-in tooling instead of having to go to various Saas products. One of the more open questions has been how to make use of Stackdriver Monitoring. I understand tha...
<p>The fluentd pod pre-installed in GKE is in kube-system namespace and managed by k8s, so you shouldn't mess with it. Currently it seems only proxying stdout/stderr to Stackdriver. But according to <a href="https://stackoverflow.com/a/41875676/5039117">this post</a>, k8s team is working on providing accessible node-wi...
<p>Add label to nodes: </p> <pre><code>$ kubectl label nodes 10.xx.xx.xx key1=val1 </code></pre> <p>If I want to delete <code>label(key1=val1)</code> on node(10.xx.xx.xx), how can I delete by kubectl command and API?</p>
<p><strong><em>create labels for the nodes:</em></strong></p> <p><code>kubectl label node &lt;nodename&gt; &lt;labelname&gt;=allow</code></p> <p><strong><em>delete above labels from its respecitve nodes:</em></strong></p> <p><code>kubectl label node &lt;nodename&gt; &lt;labelname&gt;-</code></p>
<p>For some reason Kubernetes 1.6.2 does not trigger autoscaling on Google Container Engine.</p> <p>I have a <code>someservice</code> definition with the following resources and rolling update:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: someservice labels: layer: backend sp...
<p>So it seems that this is a bug with Kubernetes 1.6.2. According to GKE support engineer:</p> <blockquote> <p>From the messages "No nodes are available that match all of the following predicates", this seems to be a known issue and the engineers managed to track down the root cause. It was an issue in clust...
<p><strong>What I Have:</strong> A Kubernetes Cluster on GCE with three Nodes. Lets suppose the master has the IP <code>&lt;MasterIP&gt;</code>. Additionally I have a Service within the cluster of Type NodePort which listens to the port <code>&lt;PORT&gt;</code>. I can access the service using <code>&lt;NodeIP&gt;:&lt;...
<p>A Kubernetes <code>Service</code> with <code>type: NodePort</code> opens the same port on every Node and sends the traffic to wherever the pod is currently scheduled using internal IP routing. You should be able to access the service at <code>&lt;AnyNodeIP&gt;:&lt;PORT&gt;</code>.</p> <p>In Google's Kubernetes clus...
<p>I'm trying to execute command in a contianer (in a Kubernetes POD on GKE with kubernetes 1.1.2). </p> <p>Reading documentation I understood that I can use GET or POST query to open websocket connection on API endpoint to execute command. When I use GET, it does not work completly, returns error. When I try to use P...
<p>Use websocket client it's work.</p> <p>In my local kuberenetes cluster, the connection metadata like this:</p> <pre><code>ApiServer = "172.21.1.11:8080" Namespace = "default" PodName = "my-nginx-3855515330-l1uqk" ContainerName = "my-nginx" Commands = "/bin/bash" </code></pre> <p>the connect url:</p> <pre><code>"...
<p>When starting up a Kubernetes cluster, I load etcd plus the core kubernetes processes - kube-proxy, kube-apiserver, kube-controller-manager, kube-scheduler - as static pods from a private registry. This has worked in the past by ensuring that the $HOME environment variable is set to "/root" for kubelet, and then ha...
<p>In 1.6, I managed to make it work with the following recipe in <a href="https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod</a></p> <pre><code>$ kubectl crea...
<p>I have following service configuration:</p> <pre><code>kind: Service apiVersion: v1 metadata: name: web-srv spec: type: NodePort selector: app: userapp tier: web ports: - protocol: TCP port: 8090 targetPort: 80 nodePort: 31000 </code></pre> <p>and an nginx container is behind ...
<p>Get the IP of the kubernetes service and then hit 8090; it will work. nodePort implies that the service is bound to the node at port 31000.</p> <p>These are the 3 things that will work:</p> <pre><code>curl &lt;node-ip&gt;:&lt;node-port&gt; # curl &lt;node-ip&gt;:31000 curl &lt;service-ip&gt;:&lt;service-por...
<p>I am trying to create a service using following yaml. As you can see I am trying to restrict access to the service from 10.0.0.0/8 range.</p> <pre><code>apiVersion: v1 kind: Service metadata: name: nginx-service spec: ports: # the port that this service should serve on - port: 443 targetPort: 44...
<p>This is now supported on GCE, GKE and AWS. If the provider does not support it, it'll be ignored.<a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/" rel="noreferrer">Kubernetes Doc</a></p> <pre><code>apiVersion: v1 kind: Service metadata: name: myapp spec: ...
<p>I set up <strong><a href="https://github.com/kubernetes/kubernetes" rel="nofollow noreferrer">Kubernetes</a></strong> cluster on <strong>aws</strong> using <strong><a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">kops</a></strong> using <strong><a href="https://github.com/kubernetes/kops/blob/m...
<blockquote> <p>Unable to connect to the server: x509: certificate is valid for *.secure.hosting prod.com, not api.subdomain.mydomain.com</p> </blockquote> <p>I can't tell if those names you listed are examples, or the actual values that <code>kubectl</code> is giving you, but I'll use them as you've written just to...
<p>I understand can use docker images, but do I need Kubernetes to create a cluster? There are instructions available for model serving, but what about model training on Kubernetes?</p>
<p>You can use Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="nofollow noreferrer">Jobs</a> to run batch compute tasks. But currently (circa v1.6) it's not easy to set up data pipelines in Kubernetes.</p> <p>You might want to look at <a href="http://pachyder...
<p>I have 4 Kubernetes/Helm deployments (web, emailworker, jobworker, sync) which all need to share exactly the same <code>spec.template.spec.containers[].env</code> key. The env keys are quite large and I'd like to avoid copy/pasting it in each deployment, e.g.:</p> <pre><code># ... env: - name: NODE_ENV value: "{{...
<p>So I found a solution with Helm named templates: <a href="https://github.com/kubernetes/helm/blob/master/docs/chart_template_guide/named_templates.md" rel="nofollow noreferrer">https://github.com/kubernetes/helm/blob/master/docs/chart_template_guide/named_templates.md</a></p> <p>I created a file <code>templates/_en...
<p>I have set up a single node K8S cluster using kubeadm by following the instructions <a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow noreferrer">here</a>:</p> <p>The cluster is up and all system pods are running fine:</p> <pre><code>[root@umeshworkstation hostpath-provisioner]# ku...
<p>I have figured out the issue.. Thanks @jaxxstorm for helping me move towards in the right direction.</p> <p>When I inspected provisioner pod logs I could see that its unable to access the API server to list StorageClass, PVC or PVs as it was created with default service account, which does not have the privileges t...
<p>Where does GKE log RBAC permission events?</p> <p>On Google Container Engine (GKE) clusters with kubernetes version v1.6 enable RBAC authorization per default. Apparently ABAC is enabled as fallback authorization as well in order to ease the transition of existing clusters to the new authorization scheme. The idea ...
<p>To make this more comprehensive. From <a href="https://kubernetes.io/docs/admin/authorization/rbac/#parallel-authorizers" rel="noreferrer">Using RBAC Authorization</a>:</p> <blockquote> <p>When run with a log level of 2 or higher (--v=2), you can see RBAC denials in the apiserver log (prefixed with RBAC DENY:).<...
<p>I have a parent helm chart with some child chart defined as a dependency in requirements.yaml. Child chart is packaged and uploaded to some-repo. </p> <p>Currently I'm doing: </p> <ul> <li>run <code>helm package parent-chart</code></li> <li>upload parent-chart.tgz to some-repo</li> </ul> <p>And when I'm trying to...
<p>One additional step should be added:</p> <pre><code>helm dep update parent-chart </code></pre> <p>it places child-chart.tgz into chart folder of parent chart and then packaging works</p>
<p>We are using Kubernetes to deploy our application docker images.</p> <p>We would like to be able to take the application logs and push it to cloudwatch.</p> <p>The application logs are generated using log4j or log4js depending on what language the microservice was built.</p> <p>What is the right way to do this?</...
<p>Build containers with the Cloudwatch Agent installed; <a href="https://docs.docker.com/engine/reference/builder/" rel="nofollow noreferrer">to do this you will need a <code>Dockerfile</code></a>. <a href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_cloudwatch_logs.html" rel="nofollow noreferrer"...
<p>I made a fresh install of gcloud for ubuntu as instructed <a href="https://cloud.google.com/sdk/" rel="noreferrer">here</a>. I want to use the additional components offered by gcloud like <strong>kubectl</strong> and <strong>docker</strong>.</p> <p>So, when I tried typing <code>gcloud components install kubectl</co...
<p>This is because you installed <code>google-cloud-sdk</code> with a package manager like <code>apt-get</code> or <code>yum</code>. </p> <p><strong>kubectl</strong>: If you look <a href="https://cloud.google.com/sdk/downloads#apt-get" rel="noreferrer">here</a> you can see how to install additional components. Basica...
<p>I'm a bit confused about what version of kubernetes I need and what method to use to deploy it. </p> <p>I have deployed 1.5 the manual way. But there is a fix we need (PR-41597). This fix doesn't seem to have been merge in 1.5 but it is in 1.6.</p> <p>But I can't find any way to install 1.6 without kubeadm. The do...
<p>There are plenty of ways to install Kubernetes 1.6:</p> <p><a href="https://kubernetes.io/docs/getting-started-guides" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides</a></p> <p>For example, CoreOS's CloudFormation installer supports 1.6: <a href="https://coreos.com/kubernetes/docs/late...
<p>I installed <code>minikube</code> on local.</p> <p>Dashboard is 192.168.99.100:30000</p> <p>I installed Jenkins by helm:</p> <pre><code>$ helm install stable/jenkins </code></pre> <p>Then the service always pending:</p> <pre><code>$ kubectl get services --namespace=default -w wandering-buffoon-jenkins NAME ...
<p>I'm guessing that you didn't update the parameters to use <code>NodePort</code> instead of the default <code>LoadBalancer</code>. The minikube cluster doesn't support the <code>LoadBalancer</code> type so Kubernetes is looping trying to create a load balancer to get an external IP.</p> <p>Use helm to see the option...
<p>I am trying to deploy my app to <em>Kubernetes</em> running in <em>Google Container Engine</em>.</p> <p>The app can be found at: <a href="https://github.com/Industrial/docker-znc" rel="noreferrer">https://github.com/Industrial/docker-znc</a>.</p> <p>The <em>Dockerfile</em> is built into an image on <em>Google Cont...
<p>To get the yaml for a deployment (service, pod, secret, etc):</p> <pre><code>kubectl get deploy deploymentname -o yaml </code></pre>
<p>How to allow only one pod of a type on a node in Kubernetes. Daemon-sets doesn't fit into this use-case.</p> <p>For e.g. - Restricting scheduling of only one Elasticsearch pod on a node, to prevent data loss in case the node goes down.</p> <p>It can be achieved by carefully planning CPU/memory resource of pod and ...
<p>Kubernetes 1.4 introduced <code>Inter-pod affinity and anti-affinity</code>. From the <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature" rel="noreferrer">documentation</a>: <code>Inter-pod affinity and anti-affinity allow you to constrain wh...
<p>Is there way to specify a custom <strong>NodePort</strong> port in a kubernetes service YAML definition? I need to be able to define the port explicitly in my configuration file.</p>
<p>You can set the type <code>NodePort</code> in your <code>Service</code> Deployment. Note that there is a <code>Node Port Range</code> configured for your API server with the option <code>--service-node-port-range</code> (by default <code>30000-32767</code>). You can also specify a port in that range specifically by ...
<p>I have a Docker container that expose a health check that is protected by a basic authentication. I've read the documentation on liveness probes <a href="http://kubernetes.io/v1.0/docs/user-guide/liveness/README.html" rel="noreferrer">here</a> but I cannot find any details of how to specify basic auth credentials. I...
<p>It is now possible to add headers for liveness probes:</p> <pre><code>livenessProbe: httpGet: path: /healthz port: 8080 httpHeaders: - name: Authorization value: Basic aGE6aGE= </code></pre> <p>It may be worth noting that:</p> <blockquote> <p>if the browser uses Aladdin as the userna...
<p>I am trying to run a small app in a g1 GKE instance (g1 instance has 1 vCPU, or 1000 millicores), and having issues with CPU request limits when scheduling pods. There are 4 pods, each being a different part of the app: Django web application, SQL service, and two helper Python processes.</p> <p>The pods have been ...
<p>If you have <a href="https://github.com/kubernetes/heapster" rel="nofollow noreferrer">Heapster</a> deployed in Kubernetes then you should be able to issue <code>kubectl top pods</code> straight after launching a pod. Append <code>-n kube-system</code> to view pods in the kube-system namespace.</p> <p>This displays...
<ol> <li>I have Kafka deployed and running in Kubernetes cluster. I am using this image from docker hub - <a href="https://hub.docker.com/r/cloudtrackinc/kubernetes-kafka/" rel="nofollow noreferrer">https://hub.docker.com/r/cloudtrackinc/kubernetes-kafka/</a></li> <li>I have 3 kube-nodes in my kubernetes cluster. I hav...
<p>I had the same problem with accessing kafka from outside of k8s cluster on AWS. I manage to solve this issue by using kafka listeners feature which from version 0.10.2 supports multiple interfaces. </p> <p>here is how I configured kafka container.</p> <pre><code> ports: - containerPort: 9092 - container...
<p>I'm running a jenkins instance on GCE inside a docker container and would like to execute a multibranch pipeline from this Jenkinsfile and Github. I'm using the <a href="https://cloud.google.com/solutions/continuous-delivery-jenkins-container-engine" rel="nofollow noreferrer">GCE jenkins</a> tutorial for this. Here ...
<p>That looks like DiD (Docker in Docker), which this <a href="https://forums.docker.com/t/docker-not-found-in-jenkins-pipeline/31683" rel="nofollow noreferrer">recent issue</a> points out as problematic.<br> See "<a href="http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/" rel="nofollow noreferre...
<p>Could we use to host Java and PHP runtime (2 application) on the same server using Docker or Kubernates.</p>
<p>what you're asking doesn't quite make sense.</p> <p>Kubernetes is a production management and orchestration system for Docker containers.</p>
<p>I am creating a grafana dashboard to show metrices. Is there any keyword which i can use in my query to check my service is running or not. I am using prometheus to retrive data from my api for the metrics creation.</p>
<p>You can create a query like so </p> <pre><code>count_scalar(container_last_seen{name=&lt;container_name&gt;}) </code></pre> <p>That will give you the count of how many containers are running with that name</p>
<p>I am using Kubernetes to run a python script as a cron job. The issue is that I am not seeing the output of the script (Which can take a while to run) until after the job finishes. I suspect this is due to the logging level (--v option) but I cannot for the life of my find either the documentation for it (it default...
<p>According to Kubernetes <a href="https://github.com/kubernetes/kubernetes/wiki/Debugging-FAQ" rel="nofollow noreferrer">docs</a>, </p> <pre><code>If you don't see much useful in the logs, you could try turning on verbose logging on the Kubernetes component you suspect has a problem using --v or --vmodule, to at l...
<p>I'm trying to setup auto deploy with Kubernetes on GitLab. I've successfully enabled Kubernetes integration in my project settings. </p> <p>Well, the integration icon is green and when I click "Test Settings" I see "We sent a request to the provided URL":</p> <p><a href="https://i.stack.imgur.com/5jjm1.png" rel="n...
<p>As it turns out, the Deployment Variables will not materialise unless you have configured and referenced an Environment.</p> <p>Here's what the <code>.gitlab-ci.yaml</code> file looks like with the <code>environment</code> keyword:</p> <pre><code>deploy: image: registry.gitlab.com/gitlab-examples/kubernetes-depl...
<p>In kubernetes, Deployments can have labels. But in my situation, I need the actual containers in a pod to have certain labels that triggers some action to be carried out by an agent on the node.</p> <p>Is there a way to add specific labels to containers in Kubernetes?</p>
<p>You can't add a label to individual containers, only to the pod in which they are running. I'd suggest rather than using labels (which is for identifying info) to leverage pod <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/" rel="nofollow noreferrer">annotations</a>, potential...
<p>In a default openshift install, there is an unused project titled <code>kube-system</code>. It seems like <code>openshift-infra</code> is for things like metrics, <code>default</code> is for the router and registry, and <code>openshift</code> is for global templates. </p> <p>What is the <code>kube-system</code> pro...
<p><code>kube-system</code> is the namespace for objects created by the Kubernetes system. </p> <p>Typically, this would contain pods like <code>kube-dns</code>, <code>kube-proxy</code>, <code>kubernetes-dashboard</code> and stuff like fluentd, heapster, ingresses and so on.</p>
<p>I am installing Kubernetes in a non-internet environment. I want to use Helm and want to set up a custom chart repository.</p> <p><code>helm init</code> barfs after creating <code>~/.helm/repository/repositories.yaml</code> as it can't reach the default Google repo, so I will end up installing manually via kubectl...
<p>I didn't see the section in the docs here: <a href="https://github.com/kubernetes/helm/blob/master/docs/chart_repository.md" rel="nofollow noreferrer">https://github.com/kubernetes/helm/blob/master/docs/chart_repository.md</a></p> <p>It's a web server.</p>
<p>I have two coreos machines with CoreOS beta (1185.2.0).</p> <p>I install kuberentes with rkt containers using a modified script, the original script is at <a href="https://github.com/coreos/coreos-kubernetes/tree/master/multi-node/generic" rel="nofollow noreferrer">https://github.com/coreos/coreos-kubernetes/tree/m...
<p>The option <code>--require-kubeconfig</code> for <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">kubelet</a> should help.</p>
<p>I am trying to add --admission-control=ServiceAccount to my kube-apiserver call to be able to host a https connection from the kubernetes-ui and the apiserver. I am getting this on the controller manager.</p> <p><code> Mar 25 18:39:51 master kube-controller-manager[1388]: I0325 18:39:51.425556 1388 event.go:211]...
<p>With 1.6 version, you can auto mount the token if you mention it while creating the service account like this:</p> <p><code>apiVersion: v1 kind: ServiceAccount metadata: name: sysdig automountServiceAccountToken: true </code></p>
<p>I am trying to install Helm (v2.4.1) Tiller into a Kubernetes cluster (v1.5.7). This needs to be able to be done in a non-internet environment, so I want to get the manifest for the Tiller deployment from <code>helm init --dry-run --debug</code>. However, when I copy the manifest into a file called <code>tiller.ya...
<p>All your attributes should start with a lowercase letter, and creationTimestamp/labels/etc should all appear within a "metadata" stanza. How was this manifest formed?</p>
<p>I am trying to connect Google Container Engine from my local machine using <code>gcloud</code> sdk but i am getting below error.</p> <pre><code>C:\Program Files (x86)\Google\Cloud SDK&gt;gcloud container clusters get-credential s cluster-2 --zone us-central1-a --project myapp-00000 Fetching cluster endpoint and au...
<p>I had the same issue. It turns out that KUBECONFIG refers to a file and not to a directory.</p> <p>So if you set up KUBECONFIG to 'C:\Tool\config\kubectl.cfg' it should work fine.</p>
<p>I have Kubernetes set up and running a grpc service in a pod. I am successfully hitting an endpoint on the service, which has a print() statement in it, but I see no logs in the log file. I have seen this before when I was running a (cron) job in Kubernetes and the logs only appeared after the job was done (as oppos...
<p>Found the root cause. Specifically, found it at <a href="https://stackoverflow.com/questions/29663459/python-app-does-not-print-anything-when-running-detached-in-docker">Python app does not print anything when running detached in docker</a> . The solution is to set the following environmental variable: PYTHONUNBUFFE...
<p>Based on this document <a href="https://github.com/kubernetes/ingress/tree/master/examples/deployment/nginx/kubeadm" rel="nofollow noreferrer">https://github.com/kubernetes/ingress/tree/master/examples/deployment/nginx/kubeadm</a> I am creating nginx controller. but my controller is not starting. its giving below er...
<p>which kubernetes version are you using?</p> <p>If you are using kubenetes 1.6.x you need to define RBAC rules for the controller to access the default-http-backend service and other required components.</p> <p>Please refer to this issue</p> <p><a href="https://github.com/kubernetes/ingress/issues/575" rel="nofoll...
<p>I am trying to deploy nginx on kubernetes, kubernetes version is v1.5.2, I have deployed nginx with 3 replica, YAML file is below,</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: deployment-example spec: replicas: 3 revisionHistoryLimit: 2 template: metadata: labels: ...
<p>It looks like you are using a custom Kubernetes Cluster (using <code>minikube</code>, <code>kubeadm</code> or the like). In this case, there is no LoadBalancer integrated (unlike AWS or Google Cloud). With this default setup, you can only use <a href="https://kubernetes.io/docs/concepts/services-networking/service/#...
<p>I'm following <a href="https://medium.com/@SystemMining/setup-kubenetes-cluster-on-ubuntu-16-04-with-kubeadm-336f4061d929" rel="noreferrer">a blog post</a> to setup a kubernetes cluster with kubeadm. So I have a Virtualbox created with bridge network and simply followed the instructions.</p> <p>I initially just did...
<p>It looks like you did not set a Network Overlay. For example, if for flanneld it would be like this</p> <pre><code> kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-mani...
<p>I already intalled minikube the single node Kubernetes cluster, I just want a help of how to deploy a multi-node hadoop cluster inside this kubernetes node, I need a starting point please!?</p>
<p>For clarification, do you want hadoop to leverage k8s components to run jobs or do you just want it to run as a k8s pod?</p> <p>Unfortunately I could not find an example of hadoop built as a Kubernetes scheduler. You can probably still run it similar to the <a href="https://github.com/kubernetes/kubernetes/tree/mas...
<p>I have a cluster of 3 nodes running Kubernetes 1.6.1, each has 2 CPU and 4G RAM.</p> <p>I am constantly redeploying my application with the same Docker tag by updating pod template hash by replacing environment variable value that is passed to the container.</p> <p><code>sed "s/THIS_STRING_IS_REPLACED_DURING_BUILD...
<p>Kubernetes allows you to tweak the garbage collection flags of kubelet. This can be done via changing the flags <code>--maximum-dead-containers</code> or <code>--maximum-dead-containers-per-container</code>. Read more about it in docs here:</p> <ul> <li><a href="https://kubernetes.io/docs/concepts/cluster-administr...
<p>I have a GKE cluster running in GCE, I was able to build + tag an image derived from ubuntu:16.04:</p> <pre><code>/ # docker images REPOSITORY TAG IMAGE ID CREATED SIZE eu.gcr.io/my-project/ubuntu-gcloud latest a723e43228ae 7 min...
<p>Try this:</p> <pre><code>gcloud docker -- push eu.gcr.io/my-project/ubuntu-gcloud </code></pre> <p>If you want to use regular docker commands, update your docker configuration with GCR credentials:</p> <pre><code>gcloud docker -a </code></pre> <p>Then you can build and push docker images like this:</p> <pre><co...
<p>We make use of Ingress to create HTTPS load balancers that forward directly to our (typically nodejs) services. However, recently we have wanted more control of traffic in front of nodejs which the Google load balancer doesn't provide.</p> <ul> <li>Standardised, custom error pages</li> <li>Standard rewrite rules (e...
<p>Following on from Vincent H, I'd suggest pipelining the Google HTTPS Load Balancer to an nginx ingress controller.</p> <p>As you've mentioned, this can scale independently; have it's own health checks; and you can standardise your error pages. </p> <p>We've achieved this by having a single <code>kubernetes.io/ingr...
<p>I am fairly new to Kubernetes and I have recently exposed a service using miniKube using <code>NodePort</code> type. I want to test the running of my application but I dont see any external ip but the port only. Here is the output of my:</p> <pre><code>$kubectl get service NAME CLUSTER-IP EXTERNA...
<p>As you are using <code>minikube</code>, the command <code>minikube ip</code> will return the IP you are looking for. </p> <p>In case you are not using <code>minikube</code>, <code>kubectl get nodes -o yaml</code> will show you, amongst other data, the IP address of the node. </p>
<p>Use this guide to install Kubernetes on Vagrant cluster:</p> <p><a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="noreferrer">https://kubernetes.io/docs/getting-started-guides/kubeadm/</a></p> <p>At <code>(2/4) Initializing your master</code>, there came some errors:</p> <pre><code>[root@l...
<p>In order to set <code>/proc/sys/net/bridge/bridge-nf-call-iptables</code> by editing <code>/etc/sysctl.conf</code>. There you can add [1]</p> <pre><code>net.bridge.bridge-nf-call-iptables = 1 </code></pre> <p>Then execute </p> <pre><code>sudo sysctl -p </code></pre> <p>And the changes will be applied. With this ...
<p>In my Kubernetes cluster I couldn't connect to the internet from my Containers. So after searching, I found a possible solution, that is to turn off "IP Masquerade". But I had no luck turning this off. Whatever I did I cannot get it disabled.</p> <p>First I change the following,</p> <pre><code>/etc/kubernetes/cni/...
<p>This is an example configuration for creating new flannel network using cni for docker. </p> <pre><code>/etc/kubernetes/cni/net.d/10-flannel.conf { "cniVersion": "0.2.0", "name": "mybridge", "type": "bridge", "bridge": "cni_bridge1", "isGateway": true, "ipMasq": true, "ipam": { ...
<p>Hi I am running kubernetes cluster where I run mailhog container.</p> <p>But I need to run it with own docker run parameter. If I would run it in docker directly. I would use command:</p> <pre><code>docker run mailhog/mailhog -auth-file=./auth.file </code></pre> <p>But I need to run it via Kubernetes pod. My pod...
<p>thanks to @lang2</p> <p>here is my deployment.yaml:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mailhog spec: replicas: 1 revisionHistoryLimit: 1 strategy: type: RollingUpdate template: metadata: labels: app: mailhog spec: volumes: ...
<p><em>Foreword:</em> My question is somewhat related to <a href="https://stackoverflow.com/questions/26705201/whats-the-difference-between-apaches-mesos-and-googles-kubernetes">this one</a>, but I'd like to go deeper on the particular aspect of scheduling.</p> <p>Apart from the fact that Kubernetes's scheduling is <e...
<p>I'm not sure if this is comparable. Kubernetes can be run as a Mesos framework. Its scheduler is described <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/scheduler_algorithm.md" rel="nofollow noreferrer">here</a>. It base on filtering and ranking the nodes.</p> <p>Mesos two step sche...
<p>I would like to run specific command after initialization of deployment is successful.</p> <p>This is my yaml file:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: auth spec: replicas: 1 template: metadata: labels: app: auth spec: containers: ...
<p>I resolved it using <a href="https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/" rel="noreferrer">lifecycles</a>:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: auth spec: replicas: 1 template: metadata: labels: app: a...
<p>I created a physical volume using NFS and PVC for the same volume. However, the PVC always creates a EBS disk storage instead of binding to the PV. Please see the log below:</p> <pre><code>&gt; kubectl get pv NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE mynfs...
<p>It looks like you have dynamic provisioning and default storageclass feature enabled, and the default class is AWS ebs. You can check your default class with following command:</p> <pre><code>$ kubectl get storageclasses NAME TYPE standard (default) kubernetes.io/aws-ebs </code></pre> <p>If this ...