prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am currently trying to reproduce this tutorial on Minikube:</p>
<pre><code>http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html
</code></pre>
<p>I updated the configuration files to use a hostpath as a persistent storage on minikube node.</p>
<pre><code>kind: PersistentVolume
a... | <h2>TL; DR</h2>
<p>In the situation described in the question the problem was that the Pods for the StatefulSet did not start up at all therefore the Service had no targets. The reason for not starting up was:</p>
<blockquote>
<p>WarningFailedCreate pvc: myclaim-mongo-0, error: PersistentVolumeClaim "myclaim-mongo-... |
<p>I have some services with external IP addresses in Kubernetes that I was able to reach by navigating to the IP. I then configured an Ingress with a nginx Ingress-Controller:</p>
<pre><code> annotations:
kubernetes.io/ingress.class: "nginx"
</code></pre>
<p>I can now reach the service over the static IP of the... | <p>The Ingress Controller needs to be configured to allow access via its <code>rules</code>. See the documentation here: <a href="https://kubernetes.io/docs/user-guide/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/user-guide/ingress/</a></p>
|
<p>I was wondering if there was a centralized document on options that are available for use in Kubernetes manifest files;</p>
<p>I know there's a bunch on general YAML files but since theres an overlap of docker run commands and kubectl commands, I wanted to know which ones are actually useable for Kubernetes.</p>
<... | <p>All options and fields are documented within the resource references which you can find in the <a href="https://kubernetes.io/docs/reference/" rel="nofollow noreferrer">Kubernetes reference</a> section. </p>
<p>E.g. for the definition of a <a href="https://kubernetes.io/docs/resources-reference/v1.6/#pod-v1-core" r... |
<p>I know there are about a thousand answers to various permutations of this question but none of the fifteen or so that I've tried have worked.</p>
<p>I'm running on Mac OS Sierra and using Minikube 0.17.1 as well as kubectl 1.5.3.</p>
<p>We run our own private Docker registry that is insecure as it is not open to t... | <p>Thank you to Janos for your alternative solution. I'm confident that is the right choice for some use cases.</p>
<p>It turns out that what I needed was a good night sleep and the following command to start Minikube in the first place:</p>
<pre><code>minikube start --insecure-registry="X.X.X.X"
</code></pre... |
<p>When I run my service locally, I get a warning that epoll isn't available, so it's using NIO. Fair enough. When I deploy it in Kubernetes, I get this, which prevents the service from running:</p>
<pre><code>2017-03-29T19:09:22.739482458Z 19:09:22.739 WARN com.datastax.driver.core.NettyUtil - Found Netty's native e... | <p>Adding this dependency fixed the problem:</p>
<p><code>"io.netty" % "netty-transport-native-epoll" % "4.1.6.Final" classifier "linux-x86_64"</code></p>
|
<p>I've rather a teoretical question which I can't answer with the reousrces found online. The question is: <strong>what's the rule to decide how to compose containers in POD?</strong> . Let me explain with an example.</p>
<p>I've these microservices:</p>
<ul>
<li>Authentication </li>
<li>Authorization </li>
<li>Ser... | <p>It is generally recommended to keep different services in different pods or better deployments that will scale independently. The reasons are what is generally discussed as benefits of a microservices architecture. </p>
<ul>
<li><p>A more loose coupling allowing the different services to be developed independently ... |
<p>I use the <a href="https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/tutorials/stateless-application/deployment.yaml" rel="noreferrer">yaml file</a>, which is in the Kubernetes official document, to create a Deployment in Kubernetes, and it uses <code>apiVersion: apps/v1beta1</code> at t... | <p>The <code>apps</code> API group will be where the v1 Deployment type lives. The <code>apps/v1beta1</code> version was added in 1.6.0, so if you have a 1.5.x client or server, you should still use the <code>extensions/v1beta1</code> version. </p>
<p>The <code>apps/v1beta1</code> and <code>extensions/v1beta1</code> D... |
<p>I'm running the following command and getting an error:</p>
<pre><code>$ kubectl get nodes
error: You must be logged in to the server (the server has asked for the client to provide credentials)
</code></pre>
<p>What's going on?</p>
| <p>You have to run:</p>
<pre><code>$ gcloud container clusters get-credentials [cluster-name]
</code></pre>
<p>Docs <a href="https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials?hl=en_US&_ga=1.254512651.2069297816.1484122139" rel="nofollow noreferrer">here</a>.</p>
|
<p>Two pods <code>app</code> and <code>postgres</code> are successfully created and are able to communicate through each other's services in a node. In the current process, the two pods get created at the same time, but that can be changed to have them be created/started in a sequence.</p>
<p>Initially, the database c... | <p>You can use a "readiness probe" on the postgresql pod that will not report the container as ready before the data is imported (e.g. query the DB or Table you import). You app container can query the readiness status of the db pod in order to restart automatically once it reports ready.
The readiness probe can be a ... |
<p>From what I understand the Job object is supposed to reap pods after a certain amount of time.
But on my GKE cluster (Kubernetes 1.1.8) it seems that "kubectl get pods -a" can list pods from days ago. </p>
<p>All were created using the Jobs API.</p>
<p>I did notice that after delete the job with
kubectl delete... | <p>It looks like starting with Kubernetes 1.6 (and the v2alpha1 api version), if you're using cronjobs to create the jobs (that, in turn, create your pods), you'll be able to <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="noreferrer">limit</a> how many old jobs are kept. Just add t... |
<p>I have a private Docker image registry running on a Linux VM (10.78.0.228:5000) and a Kubernetes master running on a different VM running Centos Linux 7.</p>
<p>I used the below command to create a POD:<br>
<code>kubectl create --insecure-skip-tls-verify -f monitorms-rc.yml</code></p>
<p>I get this:</p>
<blockquo... | <p>The issue you're seeing is actually a docker issue. Using <code>--insecure-skip-tls-verify</code> is a valid arg to <code>kubectl</code>, but it only deals with the connecition between <code>kubectl</code> and the kubernetes API server. The error you're seeing is actually because the docker daemon cannot login to th... |
<p>If I have a GitLab project, which contains several sub-folders: </p>
<ul>
<li>two with java code (from java:alpine, to compile with maven and build containers)</li>
<li>one with nginx config (from openresty:alpine, to build a web server container)</li>
</ul>
<p>Every of sub-projects has a Dockerfile, deployment.ym... | <p>I used a dirty hack like setting several build blocks in .gitlab-ci.yml for every sub-project and setting for every on them <code>only</code> parameter:</p>
<pre><code>maven-build-akka:
image: maven:3-jdk-8
stage: build
only:
- /^akka-.*$/
script:
- cd akka
- mvn package -B --settings ../setting... |
<p>I'm running kubernetes v1.5 (api reference <a href="https://kubernetes.io/docs/api-reference/v1.5/#service-v1" rel="nofollow noreferrer">here</a>). The field <code>service.spec.loadBalancerIp</code> should exist but I keep getting the following error when I attempt to set it. </p>
<p><code>error: error validating "... | <p>You have a typo in your spec. It should be <code>loadBalancerIP</code>, not <code>loadBalancerIp</code>. Note the uppercase <code>P</code></p>
|
<p>I'm deploying microservices to Kubernetes with Spring Boot, Fabric8's Spring-Cloug-Kubernetes and I now want to have a Hystrix Dashboard, provided by <a href="https://github.com/fabric8io/kubeflix" rel="nofollow noreferrer">Fabric8 Kubeflix</a>.</p>
<p>I have set labels on my deployments :</p>
<pre><code>metadata ... | <p>Ok it works, I had to disable the default Eureka discovery :</p>
<pre><code>ribbon.eureka.enabled: false
eureka.client.enabled: false
</code></pre>
<p>so that the Kubernetes one is used.</p>
<p>And the instanceUrlSuffix still need to be :8080/hystrix.stream as it takes the internal k8s IP of the pods.</p>
|
<p>Jenkins is failing to build due to "Free Swap Space" being 0. I don't know how to fix that. The build process keeps hanging. Here part of the output:</p>
<p><a href="https://i.stack.imgur.com/2Ceeo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2Ceeo.png" alt="enter image description here"></a></p>
<p><... | <p>Your screenshot shows "waiting for next available executor" so try increasing the number of executors in jenkins ("Manage Jenkins" -> "Configure System" -> "# of executors").</p>
<p>Also here the info how to create Swapfile (for avoiding out of memory on building large docker containers etc.). The example creates 4... |
<p>I have two (independent) Kubernetes clusters, one setup as a GKE/GCE cluster and the other setup in an AWS environment created using the <code>kube-up.sh</code> script. Both clusters are working properly and I can start / stop pods, services, and everything else between.</p>
<p>I want pods located in these clusters... | <p>What you are asking in kubernetes <a href="https://kubernetes.io/docs/concepts/cluster-administration/federation/" rel="nofollow noreferrer">federation</a>. </p>
<blockquote>
<p>Federation makes it easy to manage multiple clusters. It does so by
providing 2 major building blocks:</p>
<ul>
<li><p>Sync res... |
<p>I can use kubectl to see to which subjects a cluster role is applied, eg:</p>
<pre><code>kubectl get clusterrolebindings system:node --all-namespaces -o json ... | <p>There is no API for the reverse index. You can look up bindings and filter on ones containing the expected subject. For example, using bash, jq, and kubectl:</p>
<pre><code># $1 is kind (User, Group, ServiceAccount)
# $2 is name ("system:nodes", etc)
# $3 is namespace (optional, only applies to kind=ServiceAccount)... |
<p>I am trying to deploy a simple node.js application with the new Kubernetes support in Bluemix. When I run the container I made, I get a <code>ImagePullBackOff</code> error, which means it can't pull down the image. </p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">... | <p>I see the docker build of the image, and I'm presuming that you're using the kubectl with the exported cluster config (bx cs cluster-config ...), so that it's targetting your cluster.</p>
<p>Did you tag and push that image from your local docker into the bluemix registry, or to another remote registry that would be... |
<p>In order to do ease development in Docker, the code is attached to the containers through volumes. In that way, there is no need to rebuild the images each time the code is changed.</p>
<p>So, is it correct to think to use the same idea in Kubernetes?</p>
<p><strong>PS:</strong> I know that the concepts <code>Pers... | <p>Based on this <a href="https://github.com/kubernetes/minikube/blob/master/README.md" rel="nofollow noreferrer">doc</a>, Host folder sharing is not implemented in the KVM driver yet. This is the driver I am using actually.</p>
<p>To overcome this, there are 2 solutions:</p>
<ul>
<li><p>Use the <strong>virtualbox</s... |
<p>The <a href="https://github.com/kubernetes/minikube/blob/master/README.md" rel="nofollow noreferrer">kubernetes docs</a> provides for each OS and each driver the name VM when mounting a volume of type <strong>hostPath</strong>.</p>
<p>Nevertheless, it is missing that case:</p>
<ul>
<li>OS: linux</li>
<li>Driver: k... | <p>Based on this <a href="https://github.com/kubernetes/minikube/blob/master/README.md" rel="nofollow noreferrer">doc</a>, Host folder sharing is not implemented in the KVM driver yet. This is the driver I am using actually.</p>
<p>To overcome this, there are 2 solutions:</p>
<ul>
<li><p>Use the <strong>virtualbox</s... |
<p>I deployed a single node kubernetes cluster with "kubeadm". This deployed Kubernetes 1.6. According to the instructions (<a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/kubeadm/</a>) I need to install a network layer for... | <p>What should happen is that Kubernetes should be installed with a flag to kubelet <code>--network-plugin=cni</code>, and then kubelet will look for a CNI config file in <code>/etc/cni/net.d</code>, and use the network config in that file to look for a CNI plugin (an executable) to call.</p>
<p>Installing Weave Net v... |
<p>Can someone please detail the steps necessary to install the <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns" rel="noreferrer">kube-dns</a> addon? I've downloaded the nearly 400MB git repo in the previous link and run <code>make</code> as instructed but get <code>Nothing to be done ... | <p>The kube-dns addon should be enabled by default in minikube. You can run <code>kubectl get po -n kube-system</code> to check if the pod the addon-manager launches is there. If you don't see the pod listed, make sure that the addon is enabled in minikube by running <code>minikube addons list</code> and verifying th... |
<p>Runnning <code>kubectl exec -it <PODNAME> -- /bin/bash</code> is printing a lot of trash of the shell:</p>
<pre><code>) Data frame handling
I0331 17:46:15.486652 3807 logs.go:41] (0xc4201158c0) Data frame received for 5
... | <p>Just found it:
<code>unset DEBUG</code> fixed it !</p>
|
<p>I would like to deploy an application cluster by managing my deployment via k8s Deployment object. The documentation has me extremely confused. My basic layout has the following components that scale independently:</p>
<ol>
<li>API server</li>
<li>UI server</li>
<li>Redis cache</li>
<li>Timer/Scheduled task server<... | <p>Pagids answer has most of the basics. You should create 4 <code>Deployments</code> for your scenario. Each deployment will create a <code>ReplicaSet</code> that schedules and supervises the collection of <code>PODs</code> for the <code>Deployment</code>.</p>
<p>Each <code>Deployment</code> will most likely also req... |
<p>Just ran the following command to create a new ConfigMap from a file:<br>
<code>kubernetes create configmap foo --from-file=foo</code></p>
<p>It gets created successfully.</p>
<p>Now when I run,<br>
<code>kubernetes get configmaps foo -o yaml</code></p>
<p>I see the following lines in the resulting output: </p>
... | <p><code>|+</code> is not kubernetes specific, it's part of yaml.</p>
<p>From <a href="http://lzone.de/cheat-sheet/YAML" rel="noreferrer">http://lzone.de/cheat-sheet/YAML</a>:</p>
<pre><code># + indicator (keep extra newlines after block)
content: |+
Arbitrary free text with two newlines after
foo: ...
</code></... |
<p>So I'm using Kubernetes for a side project and it's great. It's cheaper to run for a small project like the one I'm on (a small cluster of 3-5 instances gives me basically everything I need for ~$30/month on GCP). </p>
<p>The only area where I'm struggling is in trying to use the kubernetes Ingress resource to map ... | <p>Yes this is possible. Deploy your ingress controller, and deploy it with a NodePort service. Example:</p>
<pre><code>---
apiVersion: v1
kind: Service
metadata:
name: nginx-ingress-controller
namespace: kube-system
labels:
k8s-app: nginx-ingress-controller
spec:
type: NodePort
ports:
- port: 80
t... |
<p>Creating a new ConfigMap from a file:<br>
<code>kubernetes create configmap foo --from-file=foo</code></p>
<p>This is how the ConfigMap looks internally:
<code>kubernetes get configmaps foo -o yaml</code></p>
<pre><code>apiVersion: v1
data:
foo: |
VAR1=value1
VAR2=value2
</code></pre>
<p>Then, I use thi... | <p>This is not possible with the current version (1.6.x) of Kubernetes. As written in the <a href="https://kubernetes.io/docs/user-guide/kubectl/v1.6/#-em-configmap-em-" rel="nofollow noreferrer">offical documentation</a> for <code>kubectl create configmap</code>:</p>
<blockquote>
<p><strong>--from-file:</strong> Ke... |
<p>I am trying to understand how development is done efficiently with dockerized applications, specifically on Kubernetes. I am struggling to find the proper way to go about live editing containers. </p>
<p>In the past with Docker, I would just use something like Nodemon to watch for files to change locally and then w... | <p>Kubernetes is a container orchestration tool. It's not a development platform. It's designed to ease the deployment of hundreds of containers, and deal with lifecycle/networking/storage issues. </p>
<p>If you're developing your application, you really don't need kubernetes/minikube at the moment. My suggested workf... |
<p>I want to delete a pod permanently so I can create the deployment.yaml and derveice.yaml again from fresh, so I tried:</p>
<pre><code> kubctl delete pod <pod>
</code></pre>
<p>and the pod is still there, also tried:</p>
<pre><code>kubectl delete pods <pod> --grace-period=0
</code></pre>
<p>and didnt ... | <p>Pods are created by Deployment, so when you delete a Pod then Deployment automatically create it base on <code>replicas</code> value, you have to delete Deployment and then create it again,</p>
<p>You can use:</p>
<pre><code>kubectl create -f deployment.yml
kubectl delete -f deployment.yml
</code></pre>
|
<p>I'm a bit confused by this, because it was working for days without issue. </p>
<p>I use to be able to join nodes to my cluster withoout issue. I would run the below on the master node:</p>
<pre><code>kubeadm init .....
</code></pre>
<p>After that, it would generate a join command and token to issue to the other ... | <p>To me </p>
<pre><code>sudo service kubelet restart
</code></pre>
<p>didn't work.
What I did was the following:</p>
<ul>
<li>Copied from master node contents of /etc/kubernetes/* into slave nodes at same location /etc/kubernetes</li>
</ul>
<p>I tried again "kubeadm join ..." command. This time the nodes joined th... |
<p>I am still kind of getting my feet under me with kubernetes. We have a spring-boot based app with ~17 microservices running on Kubernetes 1.4.2 on AWS. When I run this app on an AWS cluster of 4 m3.medium workers, my containers are all in the 200-300MB range of memory usage at rest (with a couple exceptions). For pr... | <p>In my opinion, the problem is that your processes inside the container see the total host RAM available as the RAM available for them. </p>
<p>If you use a bigger instance, the JVM will try to use even more RAM. You should try to limit your java virtual machine heap with -Xmx300m (adjust this value with what your a... |
<p>Let's say I have a simple deployment kubernetes config:</p>
<pre><code>kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: backend
spec:
replicas: 1
template:
metadata:
name: backend
spec:
containers:
- name: backend
image: backend:1.0.0
resources:
... | <p>Helm charts become an increasingly popular way of managing kubernetes deployments. In short it allows you to generate deployments with only defining the variables that you need with a simple configuration and it has a built in upgrade mechanism as well. In other words it provides meta-deployments.</p>
<p>Refer to t... |
<p>My website is not accessible from the browser for a few minutes after idling or not accessing it like 30 minutes or more. I would have to reload the page for how many times to view the page and I am not sure which to debug. </p>
<p>the stack I am running is a Golang app behind nginx that runs on kubernetes ingress.... | <p>The service.type=LoadBalancer allocates a public IP per k8s service, which is not how ingress works. You should expose your service as nodeport, and let ingress route traffic to it. <a href="https://github.com/kubernetes/ingress/blob/master/controllers/gce/ingress-app.yaml" rel="nofollow noreferrer">example here</a>... |
<p>I have an ACS Kubernetes cluster that was created with an agent count of 1. I went to the portal to increase the agent count to 2 and received a generic error saying the provisioning of resource(s) for container service failed.</p>
<p><a href="https://i.stack.imgur.com/8DfHy.jpg" rel="nofollow noreferrer"><img src=... | <p>This is a known service issue for old clusters. A fix is currently rolling out and is being tracked in this github issue, <a href="https://github.com/Azure/ACS/issues/16" rel="nofollow noreferrer">https://github.com/Azure/ACS/issues/16</a> </p>
<p>Jack (a dev on the ACS team)</p>
|
<p>This morning I learned about the (unfortunate) default in kubernetes of all previously run cronjobs' jobs instances being retained in the cluster. Mea culpa for not reading that detail in the documentation. I also notice that deleting jobs (<code>kubectl delete job [<foo> or --all]</code>) takes quite a long... | <p>I don't know if k8s provides that kinda details of what job is consuming how much disk space but here is something you can try.</p>
<p>Try to find the pods associated with the job:</p>
<pre><code>kubectl get pods --selector=job-name=<job name> --output=jsonpath={.items..metadata.name}
</code></pre>
<p>Once ... |
<p>Does Mesos or Kubernetes provide the tooling to dynamically allocate/de-allocate virtual machines?</p>
<p>I need to build a workflow engine that has a highly variable load and a mixture of short and long running tasks. For example, at 9am I might need to run 10,000 jobs with 500 taking 4 hours to run and the rest ... | <p>I don't know of an auto scaler for DCOS/MESOS in azure. Here is a github repository for making an auto scaler inside of an ACS kubernetes cluster though.
<a href="https://github.com/wbuchwalter/Kubernetes-acs-autoscaler" rel="nofollow noreferrer">https://github.com/wbuchwalter/Kubernetes-acs-autoscaler</a></p>
<p>A... |
<p>is it possible to do a reverse DNS lookup from one pod to another in the same namespace on Kuberenetes?
Setup: Kubernetes 1.5, kube-dns 1.9</p>
<p>When I exec a pod with nslookup I don't get a hostname but only a nslookup timeout like:</p>
<pre><code>$ time kubectl exec mypod -- nslookup 172\.18\.14\.13
nslookup:... | <p>The conclusion is that it's impossible by design.</p>
<p>General pod ip reverse lookup require a lot of work in kubedns and kubernetes, and this does not have many use cases. While headless services dns reverse lookup is supported after kubedns 1.11.</p>
<p>You can get more discussion about this in <a href="https:... |
<p>I am running NGINX and Tomcat on Docker containers (container OS is Red Hat linux) and deployed through Kubernetes pods. Host OS is Red Hat Linux.</p>
<p>My query is which OS parameter will be effective - host OS or container OS? During performance tuning do I need to tune both OS or host OS parameters are effectiv... | <p>As Crazykev already mentioned, you can set ulimits using the respective <code>docker run</code> flags.</p>
<p>Parameters like <code>net.ipv4.tcp.*</code> are <strong>kernel parameters</strong>. Docker containers are run in the same Linux kernel as the host system; for this reason, parameters set on the host will al... |
<p>I started a test if my kubernetes installation is running well, with:</p>
<pre><code>$ kubectl run -it hello --image=busybox -- sh
</code></pre>
<p>However it didn't work. Now I want to just clean up everything before I figure out how to continue. But if I <code>delete</code>the pod it gets restarted, I suppose by... | <p>The run command creates a deployment which controls the replicaset please run the following commands to verify and solve:</p>
<pre><code>kubectl get deployments
kubectl delete deployment hello
</code></pre>
|
<p>When running a Kubernetes cluster on Google Cloud Platform is it possible to somehow have the IP address from service endpoints automatically assigned to a Google CloudDNS record? If so can this be done declaratively within the service YAML definition?</p>
<p>Simply put I don't trust that the IP address of my <code... | <p>One option is to front your services with an ingress resource (load balancer) and attach it to a static IP that you have previously reserved.</p>
<p>I was unable to find this documented in either the Kubernetes or GKE documentation, but I did find it here:</p>
<p><a href="https://github.com/kelseyhightower/ingress... |
<p>I have a Kubernetes up and running on AWS working correctly.</p>
<p>I'm trying to deploy this <a href="https://github.com/mikechernev/dockerised-php" rel="nofollow noreferrer">sample application</a>. I can run the project locally with <code>docker-compose up</code> without any issue</p>
<p>I used <a href="https://... | <p>I think I was quite confused by how it works so it was difficult for anybody to answer. I'm just going to give a couple of hints.</p>
<ol>
<li>Don't learn Kompose and just learn Kubernetes</li>
<li>The root cause of the problem was I didn't created the volumes on EBS first</li>
</ol>
|
<p>How to creating Rewrite Rules about nginx ingress controller, in the same way as NGINX able to do redirect.</p>
<p>like : (exemple)
server_name www.foo.com;
rewrite ^/search$ <a href="https://www.foo.com/all/search" rel="nofollow noreferrer">https://www.foo.com/all/search</a> permanent;</p>
| <p>This is supported in the latest (beta.3) version of the ingress controller.</p>
<p>You set it using annotations. Have a look at the example <a href="https://github.com/kubernetes/ingress/tree/master/examples/rewrite/nginx#rewrite-target" rel="nofollow noreferrer">here</a></p>
<p>Essentially, when you set up your i... |
<p>I upgrade my GKE API server to 1.6, and am in the process of upgrading nodes to 1.6, but ran into a snag...</p>
<p>I've got a prometheus server (version 1.5.2) running in a pod managed by a Kubernetes deployment with a couple of nodes running version 1.5.4 Kubelet, with a single new node running 1.6.</p>
<p>Promet... | <p>401 means unauthenticated, which means it is not an RBAC issue. I believe GKE no longer allows anonymous access to the kubelet in 1.6. What credentials are you using to authenticate to the kubelet?</p>
|
<p>The <a href="https://kubernetes.io/docs/admin/kube-proxy/" rel="nofollow noreferrer">kube-proxy admin page</a> says:</p>
<pre><code>--masquerade-all If using the pure iptables proxy, SNAT everything
</code></pre>
<p>But it does explain in detail.</p>
<ul>
<li>When should I set <code>--masquerade-all</code> ... | <p>If you enable this and route the service IP range to your nodes then it will be possible to reach the service IPs from outside of the cluster.</p>
<p>The discussion is in <a href="https://github.com/kubernetes/kubernetes/issues/24224" rel="noreferrer">Issue #24224</a> and it's implemented in <a href="https://github... |
<p>I'm following the <a href="https://tensorflow.github.io/serving/serving_inception.html" rel="nofollow noreferrer">Serving Inception Model with TensorFlow Serving and Kubernetes</a> workflow and everything work well up to the point of the final serving of the inception model via k8s when I am trying to do inference f... | <p>The error message seems to indicate that your client cannot connect to the server. Without some additional information it is hard to trouble shoot. If you post your deployment and service configuration as well as give some information about the environement (is it running on a cloud? which one? what are your securit... |
<p>Has anyone managed to run a H2O Cluster in Kubernetes?</p>
<p>I tried 2 options both using flatfile 1) using StatefulSet, but since the ip generated for the pod can change the cluster is unreliable 2) using a bunch of pairs of service/deployments and specifying the the flatfile the dns name of the service but the c... | <p>If multicast packets can be transmitted between the pods, then you could rely on that for the cluster formation. Just specify a unique -name for all the nodes to share. This is easy if it works, with no code changes.</p>
<p>UPDATE (2018/04/21) -- one of my colleagues says:</p>
<p>I used weave as the network laye... |
<p>My question is about PersistentVolumeClaim
I have one node cluster setup on aws ec2
I am trying to create a storage class using <strong>kubernetes.io/host-path</strong> as <strong>Provisioner</strong>. </p>
<p>yaml file content for storage class as follows,</p>
<pre><code>kind: StorageClass
apiVersion: storage.k8s... | <p>It seems you might not be running the provisioner itself, so there's nothing to actually do the work of creating the hostpath directory.</p>
<p>Take a look <a href="https://github.com/kubernetes-incubator/external-storage/blob/master/docs/demo/hostpath-provisioner/pod.yaml" rel="noreferrer">here</a></p>
<p>The way... |
<p>I'm currently using Kubernetes on GKE to serve the various parts of my product on different subdomains with the Ingress resource. For example: <code>api.mydomain.com</code>, <code>console.mydomain.com</code>, etc.</p>
<p><strong>ingress.yml (current)</strong>:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: In... | <p>There certainly isn't anything like wildcard domains available in kubernetes, but you might be able to get want you want using <a href="http://helm.sh/" rel="noreferrer">Helm</a></p>
<p>With helm, you can template variables inside your manifests, so you can have the name of your branch be in the helm <a href="https... |
<p>Say I have 1000 identical pods I'd like to be run eventually, but node resources only allow for 10 pods to be run in parallel.</p>
<p>Each pod eventually removes their RC if they exit cleanly, so given enough time, all pods should be run.</p>
<p>If I schedule all 1000 pods at the same time, though, 990 of them wil... | <p>This type of workload is better suited for the <a href="https://kubernetes.io/docs/concepts/jobs/run-to-completion-finite-workloads/" rel="nofollow noreferrer">Job</a> resource.</p>
<p>Since you have a fixed number of pods to run, the easiest way to do this would be create a Job with <code>.spec.completions</code> ... |
<p>I'm tring to install minikube in Ubuntu vm (in virtual box). I have enabled VT-X/AMD-v for the vm. But i'm getting following error.</p>
<pre><code># minikube start
Starting local Kubernetes cluster...
E0217 15:00:35.395801 3869 start.go:107] Error starting host: Error creating host: Error with pre-create check: ... | <p><strong>Virtual Box does not support VT-X/AMD-v in nested virtualisation</strong>. See this open <a href="https://www.virtualbox.org/ticket/4032" rel="noreferrer">ticket/feature request</a> on virtualbox.org. </p>
<p>There are also some more questions and answers here on SO discussing <a href="https://stackoverflow... |
<p>Consider the following nginx config file:</p>
<pre><code>server {
listen 443;
ssl on;
ssl_certificate /etc/tls/cert.pem;
ssl_certificate_key /etc/tls/key.pem;
location / {
proxy_pass http://api.default.svc.cluster.local;
}
}
</code></pre>
<p>All incoming TCP requests on 443 s... | <p>As mentioned in the question, trailing slashes in URIs are important. I fixed this in the location, however, I didn't add it to the URI I pass using <code>proxy_pass</code>.</p>
<p>As for the nginx proxy I got it to work using the following config:</p>
<pre><code>server {
listen 443;
ssl on;
ssl_cer... |
<p>Is there any way to get hold of the log file of the pod in Kubernetes cluster?</p>
<p>I know I can fetch logs using "kubectl exec log -f $POD_NAME" command but I want to get access to log file directly.</p>
| <p>It depends on the logging driver you're using
I'm assuming you're using the default json logging driver here, but you can see the node the pod is scheduled on by using <code>kubectl get po -o wide</code></p>
<p>Then, logon to that node and you'll see the docker logs of the container under <code>/var/lib/docker/con... |
<p>While running Minikube, I want to connect to a server that has the annoying habit of announcing itself to a service registry with its internal IP address from inside its pod. </p>
<p>However for legacy reasons I have to connect to this registry first and retrieve that server's ip address from it. The only way to ac... | <p>You can add a route to the k8 internal network from localhost</p>
<p>Add a route to the internal network using the minikube ip address</p>
<pre><code>$ sudo ip route add 172.17.0.0/16 via $(minikube ip) # linux
$ sudo route -n add 172.17.0.0/16 $(minikube ip) # OSX
</code></pre>
<p>your subnet mask could be foun... |
<p>I have a <code>PersistentVolumeClaim</code> that looks like the following:</p>
<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitlab-config-storage
namespace: gitlab
annotations:
volume.beta.kubernetes.io/storage-class: fast
spec:
accessModes:
- ReadWriteMany
resources:
... | <p>By using a persistent volume claim, you are asking GKE to use a persistent disk, and then always use the same volume.</p>
<p>However, by deleting the claim, you've essentially destroyed it.</p>
<p>Don't delete the claim, ever, if you want to continue using it.</p>
<p>You can attach a claim to a multiple pods over... |
<p>Is it worth using SSD as boot disk? I'm not planning to access local disks <a href="https://cloud.google.com/container-engine/docs/local-ssd" rel="nofollow noreferrer">within pods</a>.</p>
<p>Also, GCP by default creates 100GB disk. If I use 20GB disk, will it cripple the cluster or it's OK to use smaller sized dis... | <p>I would always recommend SSD considering the small difference in price and large difference in performance. Even if it just speeds up the deployment/upgrade of containers. </p>
<p>Reducing the disk size to what is required for running your PODs should save you more. I cannot give a general recommendation for disk s... |
<p>I have deployed an app using Kubernetes to a Google Cloud Container Engine Cluster.</p>
<p>I got into autoscaling, and I found the following options:</p>
<p><strong>Kubernetes Horizontal Pod Autoscaling (HPA)</strong></p>
<p>As <a href="https://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/walkthrough/... | <blockquote>
<p>Is a Pod the same as VM instance inside my cluster, or can multiple
Pod's run inside a single VM instance?</p>
</blockquote>
<p>Multiple Pods can run the same instance (called node in kuberenetes). You can define maximum resources to consume for a POD in the deployment yaml. See the <a href="https:... |
<p>I am using <strong>container Probes</strong> to check the health of the application running inside the container within kubernetes pod. For now my example pod config looks like,</p>
<pre><code>"spec":{
"containers":[
{
"image":"tomcat",
"name":"tomcat",
"livenessProbe":{
... | <p>It's not possible, try to encapsulate the health check inside your application</p>
<p>Ex:
<a href="http://localhost:80/health_check?full" rel="nofollow noreferrer">http://localhost:80/health_check?full</a> => (proxy to) => <a href="http://localhost:443/health_check?full" rel="nofollow noreferrer">http://localhost:... |
<p>I'm running Nginx on Kubernetes.</p>
<p>When I use the following proxy_pass directive it works as expected:</p>
<pre><code>proxy_pass "http://service-1.default";
</code></pre>
<p>However the following does not work:</p>
<pre><code>set $service "service-1";
proxy_pass "http://$service.default";
</code></pre>
<p>... | <p>I've found the reason and a solution.</p>
<p>Nginx detects if a variable is being used in <code>proxy_pass</code> (I don't know how it does that). If there is no variable it resolved the hostname at startup and caches the IP address. If there is a variable it uses a resolver (DNS server) to lookup the IP at runtime... |
<p>I’m getting <code>Failed to pull image</code> because the image pull is timing out, I know the image is there I just think my private registry is slow, is there a way to set a timeout limit on image pulls?</p>
| <p>The timeout limit can be controlled with the <code>--runtime-request-timeout</code> option for the <code>kubelet</code> service.</p>
<p><a href="https://kubernetes.io/docs/admin/kubelet/" rel="noreferrer">Official documentation</a> for this:</p>
<blockquote>
<p>Timeout of all runtime requests except long running... |
<p>I'm trying to deploy my cluster using <a href="https://github.com/Azure/acs-engine" rel="nofollow noreferrer" title="acs-engine">acs-engine</a>
I followed the steps everything went good. But then when i go <code>kubectl get pods --all-namespaces</code> I find some of them in pending state.
On <code>kubectl describe... | <p>This will happen when the service principal does not have Contributor access, scoped to the resource group of the route table. Once you recreate your service principal with contributor access, this will work. More information here: <a href="https://github.com/Azure/acs-engine/blob/master/docs/serviceprincipal.md" ... |
<p>Could you please assist me with the following issue.
I use Apiman version 1.2.1</p>
<pre><code>FROM jboss/wildfly:9.0.2.Final
ENV APIMAN_VERSION 1.2.1.Final
</code></pre>
<p>I expose this version via kubernetes, as a persistent volume I use postgres in the same container. Once I create it at the first time, after ... | <p>If anybody will met such error, so, I have solved it with the following steps, first of all we need to use only new version of APIMAN, list of fixes already implemented. And also apiman-gateway cannot live without elastic search to restore itself. Hence elasticsearch configuration should to be provided.</p>
|
<p>I was trying to deploy my local docker image on kubernetes, but doesn't work for me.
I loaded image into docker and tagged it as <strong>app:v1</strong>, then I ran image by use kubectl this way <code>kubectl run app --image=app:v1 --port=8080</code>.</p>
<p>If I want to lookup my pods I see error <code>"Failed to ... | <p>In normal case your Kubernetes cluster runs on a different machine than your <code>docker build</code> was run on, hence it has no access to your local image (unless you are using minikube and you eval minikubes environment to actually run your docker commands against docker daemon powering the minikube install).</p... |
<p>I'm using <a href="https://github.com/mpdavis/python-jose" rel="nofollow noreferrer">python-jose</a>'s JWT implementation to generate JWT tokens for authentication purposes.</p>
<p>We're running our backend in a Docker container on Kubernetes and <strong>sometimes, when we have multiple pods, we get different token... | <p>This occurs because Python dictionaries are unordered. If you decode the two JWTs, you will see that the header portion is ordered differently for each token.</p>
<pre><code>{
"typ": "JWT",
"alg": "HS256"
}
</code></pre>
<p>and </p>
<pre><code>{
"alg": "HS256",
"typ": "JWT"
}
</code></pre>
<p>Th... |
<p>I have k8s v1.5 installad, I tried to following <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/</a> to implement HPA with custom metric.</p>
<p>In the page above, it said "<code... | <p>--horizontal-pod-autoscaler-use-rest-clients is supported after 1.6. <br/> you can refer <a href="https://medium.com/@marko.luksa/kubernetes-autoscaling-based-on-custom-metrics-without-using-a-host-port-b783ed6241ac" rel="nofollow noreferrer">https://medium.com/@marko.luksa/kubernetes-autoscaling-based-on-custom-met... |
<p>My company has been running Kuberenetes for over a year now and GitLab for about 6 months. We recently upgrade to GitLab 9.x and are having trouble trying to figure out what's up with the decision around the CI + app configuration with Kube. This feature is awesome and would love to get it working in our environme... | <p>You're correct. I found it frustrating too. </p>
<p>But you can use environments even without their kubernetes integration </p>
<pre><code>development:
<<: *deploy_definition
stage: development
environment:
name: development
url: https://development.yourdomain.com
script:
... |
<p>Is it worth using SSD as boot disk? I'm not planning to access local disks <a href="https://cloud.google.com/container-engine/docs/local-ssd" rel="nofollow noreferrer">within pods</a>.</p>
<p>Also, GCP by default creates 100GB disk. If I use 20GB disk, will it cripple the cluster or it's OK to use smaller sized dis... | <p>Why one or the other?. Kubernetes (Google Conainer Engine) is mainly Memory and CPU intensive unless your applications need a huge throughput on the hard drives. If you want to save money you can create tags on the nodes with HDD and use the node-affinity to tweak which pods goes where so you can have few nodes with... |
<p>In the Kubernetes/Docker ecosystem there is a convention of using <code>/healthz</code> as a health-check endpoint for applications.</p>
<p>Where does the name 'healthz' come from, and are there any particular semantics associated with that name?</p>
| <p>It historically comes from Google’s internal practices. They're called "z-pages".</p>
<p>The reason it ends with <code>z</code> is to reduce collisions with actual application endpoints with the same name (like <code>/status</code>). See this talk for more: <a href="https://vimeo.com/173610242" rel="noreferrer">htt... |
<p>I am working on setting up environment for deploying microservices.</p>
<p>I have gotten as far as building my code and deploying to a registry but having problem running it in Azure Container Services.</p>
<p>I am following this guide to connect to ACS: <a href="https://learn.microsoft.com/en-us/azure/container-s... | <p>This command copy the cluster credentials to your machine. Background processes are ssh to your cluster VM and copy the credentials. </p>
<p>So, <strong>you should ensure you could ssh to the master VM manual</strong>. If you could not ssh to master VM manual, <code>az</code> command also could not do it. You could... |
<p>We have an app that runs on GKE Kubernetes and which expects an auth url (to which user will be redirected via his browser) to be passed as environment variable.</p>
<p>We are using different namespaces per environment </p>
<p>So our current pod config looks something like this:</p>
<pre><code> env:
- name: ... | <p>This seems like an ideal opportunity to use <a href="https://helm.sh/" rel="noreferrer">helm</a>!</p>
<p>It's really easy to get started, simply install tiller into your cluster.</p>
<p>Helm gives you the ability to create "charts" (which are like packages) which can be installed into your cluster. You can templat... |
<p>I am running Cassandra on Kubernetes (3 instances) and want to expose it to the outside, my application is not yet in Kubernetes. So i crated a load balanced service like so:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
namespace: getquanty
labels:
app: cassandra
name: cassandra
annotations:
... | <p>After more reading I found out that the replication strategy was the one causing the problem, NetworkStrategy is suitable for multi-cluster, I have one, so I changed the replication to simple with the number of nodes i had, now every thing works as expected.</p>
<p>EDIT 1:
Putting databases on Kube is not a good so... |
<p>I need to update my database schema before running our app. For that based on <a href="https://github.com/kubernetes/kubernetes/issues/3312#issuecomment-245668148" rel="nofollow noreferrer">this thread</a> and on <a href="https://stackoverflow.com/a/37264976/911849">this answer</a> I've decided to use init container... | <p>You are expecting that the init containers are all running next to each other like the normal containers in a pod.</p>
<p>But unfortunately for you the init containers are started one after the other as the previous one is finished. See
<a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#un... |
<p>I have allocated a static IP on my GCP account. Then, I updated my application's service definition to use this in a load balancer, like so:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
# Unique key of the Service instance
name: my-app-service
spec:
ports:
# Accept traffic sent to port 80
- n... | <p>You need to create an <code>Ingress</code> and use the <code>kubernetes.io/ingress.global-static-ip-name: "name-of-your-ip"</code> annotation on the Ingress for Kubernetes to be able to find it. </p>
<p>You can find a tutorial here: <a href="https://github.com/kelseyhightower/ingress-with-static-ip#tutorial" rel="n... |
<p>Trying to understand why I'm seeing this output from my kube-proxy logs</p>
<pre><code>W0328 08:00:53.755379 1 server.go:468] Failed to retrieve node info: nodes "ip-172-31-55-175" not found
W0328 08:00:53.755505 1 proxier.go:249] invalid nodeIP, initialize kube-proxy with 127.0.0.1 as nodeIP
</code></pre>
<p>Th... | <p>Can you please show the output of the command <code>kubectl get node</code>?</p>
<p>Probably the registered name used when kubelet starts is different from the name that kube-proxy is using.</p>
<p>You can force the usage of this very same name starting kube-proxy with the <code>--hostname-override</code> directiv... |
<p>I was considering using secrets to mount a single file but it seems that you can only mount directory that will overwrites all the other content. How can I share a single config file without mounting a directory?</p>
| <p>For example you have a configmap which contain 2 config files:</p>
<pre><code>kubectl create configmap config --from-file <file1> --from-file <file2>
</code></pre>
<p>You could use subPath like this to mount single file into existing directory:</p>
<pre><code>---
volumeMounts:
- name: ... |
<p>I was using the following code to randomly kill processes inside the pods</p>
<pre><code> : ${DELAY:=30}
if [ "$#" -ne 1 ]; then
echo "One argument expected specifying the time in seconds to run"
else
end=$((SECONDS+$1))
while [ $SECONDS -lt $end ]; do
kubectl \
-o 'jsonpath={.items[*].metadata.name}... | <p>Two things:
<code>-o 'jsonpath={.items[*].metadata.name}'</code> should go after <code>kubectl get pods</code>, otherwise kubectl will return help message.
Also, add -t to <code>kubectl exec</code> in order to see output from the container in your terminal.</p>
|
<p>I set up Kubernetes on a Ubuntu 16.04 vServer following this tutorial <a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/getting-started-guides/kubeadm/</a></p>
<p>On this node I want to make <a href="https://github.com/kubernetes/dashboard" rel... | <p>The easiest is to try running <code>kubectl proxy</code> on the client machine where you want to use the dashboard and then access the dashboard at <code>http://127.0.0.1:8001</code> with a browser on the same client machine.
If you want to connect via master node ip as described in your answer you need to set up a... |
<p>Now we have deployed services as Kubernetes Deployments with multiple replicas. Once the server crashes, Kubernetes will migrate its containers to another available server which tasks about 3~5 minutes.</p>
<p>While migrating, the client can access the the Deployment service because we still have other running repl... | <p>You need to configure health checking to have properly working load balancing for a Service. Please have a read of:</p>
<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/config... |
<p>I have got the following service for Kubernetes dashboard</p>
<pre><code>Name: kubernetes-dashboard
Namespace: kube-system
Labels: k8s-app=kubernetes-dashboard
kubernetes.io/cluster-service=true
Annotations: kubectl.kubernetes.io/last-applied-configurati... | <p>As we know, expose the service to internet, we can use <code>nodeport</code> and <code>LoadBalancer</code>.</p>
<p>As far as I know, Azure does <strong>not</strong> support nodeport type now.</p>
<blockquote>
<p>But I want to access it outside the cluster too.</p>
</blockquote>
<p>we can use <code>LoadBalancer</code... |
<p>I am running a Kubernetes cluster with quite a few users, it has happened several times that the NodePorts from different users conflict. Is it possible in Kubernetes to set different NodePort ranges for different users? Just like the --service-node-port-range with kube-apiserver, but this is for all the users not f... | <p>Your question is similar to <a href="https://stackoverflow.com/questions/43324199/dynamic-kubernetes-port-range">this existing question</a> and the answer will be same. It is not possible. You will have to communicate port ranges to your users and then check their deployments for enforcing the ranges, before actuall... |
<p>When I create a Pod that cannot be scheduled because there are no nodes with sufficient CPU to meet the Pod's CPU request, the events output from <code>kubectl describe pod/...</code> contain a message like <code>No nodes are available that match all of the following predicates:: Insufficient cpu (3)</code>.</p>
<p... | <p>It means that your Pod doesn't fit on 3 nodes because of Insufficient CPU and 1 node because of <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/taint-toleration-dedicated.md" rel="noreferrer">taints</a> (likely the master).</p>
|
<p>The following is the file used to create the Deployment:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kloud-php7
namespace: kloud-hosting
spec:
replicas: 1
template:
metadata:
labels:
app: kloud-php7
spec:
containers:
- name: kloud-php7
... | <p>This is working as intended. The Deployment creates (and recreates) a ReplicaSet and the ReplicaSet creates (and recreates!) Pods. You need to delete the Deployment, not the Pods or the ReplicaSet:</p>
<pre><code>kubectl delete deploy -n kloud-hosting kloud-php7
</code></pre>
|
<p>I have <a href="/questions/tagged/node.js" class="post-tag" title="show questions tagged 'node.js'" rel="tag">node.js</a> application built using <code>Dockerfile</code> that defines:</p>
<pre><code>CMD node dist/bin/index.js
</code></pre>
<p>I'd like to "append" a parameter to the command as it is defined... | <p>No way to append. You can either set the <code>command:</code> or <code>args:</code> on container.spec. You can learn more about how to override CMD/ENTRYPOINT here: <a href="https://kubernetes.io/docs/concepts/configuration/container-command-args/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/confi... |
<p>I want to use Minikube for local development. It needs to access my companies internal docker registry which is signed w/ a 3rd party certificate. </p>
<p>Locally, I would copy the cert and run <code>update-ca-trust extract</code> or <code>update-ca-certificates</code> depending on the OS. </p>
<p>For the Minikube... | <p>I had to do something similar recently. You should be able to just hop on the machine with minikube ssh and then follow the directions here </p>
<p><a href="https://docs.docker.com/engine/security/certificates/#understanding-the-configuration" rel="noreferrer">https://docs.docker.com/engine/security/certificates/... |
<p>I am trying to call <code>kubectl create -n $test_namespace -f <absolute-path-to-tea-rc-file>.yaml</code> from a shell script.</p>
<pre><code>#!/bin/bash
current_dir=$(pwd)
echo "current_dir is $current_dir"
parentdir="$(dirname "$current_dir")"
echo $parentdir
kubectl create -n $test_namespace -f $parentdir... | <p>I think it's because the variable $test_namespace has not been set.</p>
<p>If you change the last line to <code>echo "kubectl create -n $test_namespace -f $parentdir/deployment/common/tea-rc.yaml"</code> you'll see what it's trying to run, it will look like <code>kubctl create -n -f /path/to/dir/deployment/common/... |
<p>I'm attempting to deploy a Docker container to a minikube instance running locally, and getting this error when it attempts to pull(?) the image. The image exists in a self-hosted Docker registry. The image I'm testing with is built with the following Dockerfile:</p>
<pre><code>FROM alpine:latest
ENTRYPOINT ["echo"... | <p>Kubernetes 1.6 may not compatible with latest Docker version(17.xx.xx), could you lower down your Docker version and retry this.</p>
<p>The recommend version of Docker in Kubernetes(v1.6) is 1.12, if you not sure how to find that version. Use this in ubuntu or debain:</p>
<pre><code>apt-get update && apt-g... |
<p>i build the docker image on my local machine and trying to pull docker image using kubectl. but its not starting the docker container.</p>
<p>images starts with docker command.</p>
<pre><code>REPOSITORY TAG IMAGE ID CREATED SIZE
tomc... | <p>I see from your comments bellow you are using Minikube locally.</p>
<p>Minikube runs inside a virtual machine, the Docker running inside Minikube and the Docker running on you machine are two separate instances so will not have access to the same images, you can however link the Docker inside Minikube to your local... |
<p>I have minikube version v0.17.1 running on my machine. I want to simulate the environment I will have in AWS, where my MySQL instance will be outside of my Kubernetes cluster. </p>
<p>Basically, how can I expose my local MySQL instance running on my machine to the Kubernetes cluster running via minikube?</p>
| <p>Kubernetes allows you to create a service without selector, and cluster will not create related endpoint for this service, this feature is usually used to proxy a legacy component or an outside component.</p>
<ol>
<li><p>Create a service without selector</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
na... |
<p>My model as follows:</p>
<ul>
<li>a NFS server pod (Pod A) with an empty directory volume already mounted. This volume will be served as the NFS.</li>
<li>a pod (Pod B) with a container that will access a NFS volume "/resource" when a function is run on the container.</li>
</ul>
<p>I want Pod B to be able to mount... | <p>That's not possible with kubernetes concepts.</p>
<p>If you really really want you could run your pod in privileged mode and issue the mount commands from your app. I do not recommend this.</p>
|
<p>I'm relatively new to golang and need some help pointing to the right direction.</p>
<p>I'm trying to declare a new <code>Deployment</code> type.</p>
<p>My imports look like:</p>
<pre><code>import (
"encoding/json"
"fmt"
yaml "gopkg.in/yaml.v2"
"io/ioutil"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
... | <p>When using an embedded struct, the key is usually the type name without the package. You can declare your <code>TypeMeta</code> like this:</p>
<pre><code>test := v1beta1.Deployment{
TypeMeta: metav1.TypeMeta{
APIVersion: "apps/v1beta1",
Kind: "Deployment",
},
}
</code></pre>
<p>However, manually settin... |
<h1>Overview</h1>
<p>Pod fails to access its own service (timeout) in a single-node cluster. </p>
<ul>
<li>OS is Debian 8</li>
<li>Cloud is DigitalOcean or AWS (reproduced on both)</li>
<li>Kubernetes version is 1.5.4</li>
<li>Kube proxy uses iptables</li>
<li>Kubernetes installed manually</li>
<li>I do not use overl... | <blockquote>
<p>"targetPort": "agent"</p>
</blockquote>
<p>I don't think this is valid style in normal service yaml, could you change it to normal port like 8080 and try again.</p>
|
<p>Currently, fluentd is used to collect logs produced by kubernetes pods, which are located under `/var/log/containers/'. The problem is that different kinds of pods may have different log formats. And I want to classify those log files so that they can be processed distinctively. </p>
<p>Can I add labels to kubernet... | <p>You can use <a href="https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter" rel="nofollow noreferrer">fluent plugin kubernetes metadata filter</a> to get the pod's metadata and classify it with other approach.</p>
|
<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>The solution could be to label a node, and then use the nodeSelector in the deployment to indicate that is has to run at that node. This is certainly not an advised solution since it will break once you scale to much.</p>
|
<p>I run an application which needs a list of all client ips for synchronization. I run this application in Kubernetes and make requests against <code>https://kubernetes/api/v1/pods</code> from these client-pods. So I am searching for a reliable way to identify all pods, which are created by the same deployment (replic... | <p>That is what the <code>app</code> selector is typically used for.</p>
<p>You can use kubectl to list pods for a deployment. </p>
<p>The following is from the <a href="https://kubernetes.io/docs/tutorials/stateless-application/run-stateless-application-deployment/" rel="nofollow noreferrer">official docs</a>:</p>
... |
<p>I use ansible to send jobs / configurations to my k8s cluster via the kubectl command on my local machine. I have my inventory file setup so that each cluster is it's own group and each cluster is basically a connection to localhost .</p>
<pre><code># Inventory File
#
[east.k.example.com]
localhost ans... | <p>Refactor your inventory to use distinct names:</p>
<pre><code># Inventory File
#
[east.k.example.com]
east ansible_connection=local
[east2.k.example.com]
east2 ansible_connection=local
</code></pre>
<p>This way Ansible will treat them as different hosts, thus not merging variables from different groups.</p>
|
<p>I am new to Kubernetes (aren't we all?).</p>
<p>Can a <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">Secret</a>, consisting of course of keys and values, be represented as a <em>single</em> file when used by a container?</p>
<p>I understand that normally a Secret, whe... | <p>This is not possible currently. The only way to get around this is to have a key value pair where the value is a base64 encoded JSON object.</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
conf.json: eyJrZXkiOiAidmFsdWUiLCAia2V5MiI6ICJ2YWx1ZTIifQ==
</code></pre>
<p>The <c... |
<p>I am a bit new to (g)rpc, and I do not really understand the concept. We have a set of NodeJS servers in a Kubernetes cluster communicating between each other through grpc. The rpc interfaces are set up towards each server on client upstart.</p>
<p>We have recently discovered that upon restarting a server, its clie... | <p><a href="https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md" rel="nofollow noreferrer">https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md</a> suggests that the Channel <em>will</em> go from "transient_failure" to "connecting" (and back to "ready") <em>eventuall... |
<p>I'm writing a shell script which needs to login into the pod and execute a series of commands in a kubernetes pod.</p>
<p>Below is my sample_script.sh:</p>
<pre><code>kubectl exec octavia-api-worker-pod-test -c octavia-api bash
unset http_proxy https_proxy
mv /usr/local/etc/octavia/octavia.conf /usr/local/etc/octavi... | <p>Are you running all these commands as a single line command? First of all, there's no <code>;</code> or <code>&&</code> between those commands. So if you paste it as a multi-line script to your terminal, likely it will get executed locally.</p>
<p>Second, to tell bash to execute something, you need: <code>b... |
<p>I am trying to create a kubernetes NFS volume on Google Container Engine (GKE) and get it used by a deployment.</p>
<p>I did this in several steps as it shown in this github repository <a href="https://github.com/mappedinn/kubernetes-nfs-volume-on-gke" rel="nofollow noreferrer">kubernetes-nfs-volume-on-gke</a>:</p>... | <p>This <a href="https://github.com/kubernetes/kubernetes/issues/33447#issuecomment-275198328" rel="nofollow noreferrer">comment</a> in the <a href="https://github.com/kubernetes/kubernetes/issues/33447" rel="nofollow noreferrer">issue</a> on kubernetes seems to solve this NFS issue on GKE.</p>
<p>Qutoing that comment:... |
<p>I have</p>
<ul>
<li>kubernetes v1.6.0 setup by kubeadm v1.6.1</li>
<li>calico setup by offical <a href="http://docs.projectcalico.org/v2.1/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml" rel="nofollow noreferrer">yaml</a></li>
<li>iptables v1.6.0</li>
<li>nodes are provided by AliCloud</li>
... | <p>Problem is found by <code>calicoctl node status</code>. The calico/node use a public ip to communicate with each other. But nodes in AliCloud are behind a firewall. So they cannot do that via public ip address.</p>
<p>As gunjan5 suggested, I used this env var <code>IP_AUTODETECTION_METHOD</code> to specify the inte... |
<p>I'm trying set up custom metrics with a <code>HorizontalPodAutoscaler</code> on a 1.6.1 alpha GKE cluster.</p>
<p>According to <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#prerequisites" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-... | <p>You can't manipulate any of the kubernetes cluster component directly in GKE(Google Container Engine), Google will do that job, if you want to achieve that you may need to deploy your own kubernetes cluster.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.