prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>Sometimes when Minikube is already running and I try to run any <code>kubectl</code> command (like <code>kubectl get pods</code>) I get this error:<br></p> <pre><code>Unable to connect to the server: dial tcp 192.168.99.101:8443 </code></pre> <p>So I stop Minikube and start it again and all <code>kubectl</code> co...
<p>This usually happens when the IP of your VM might be changed, and your minikube is pointing to the previous IP, You can check through <code>minikube ip</code> and then check the IP of the VM created, they will be different. </p> <p>You can also try <code>minikube status</code>, your output will be : <code> minikube...
<p>I am trying to run fluentd as a daemonset on kubernetes cluster (GKE). The config is getting parsed successfully, then the plugins are receiving shutdown signal with few warn messages. There are no error messages. I tried increasing the verbosity level and following is the output of pods:</p> <pre><code>fluentd-7pr...
<p>This could be a kubernetes bug as mentioned here - <a href="https://github.com/kubernetes/kubernetes/issues/51376" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/51376</a></p> <p>Although this issue is closed as of now, I would suggest you to try running the same <code>daemonset</code> in...
<p>Regarding OpenEBS iscsi provisioner: How to use <code>ReadOnlyMany</code> with iscsi?</p> <p>When I apply it on kubernetes pod it gives the following error:</p> <blockquote> <p> (x12 over ) openebs.io/provisioner-iscsi openebs-provisioner-5569654c96-4rlsn 760ae66d-9ebc-11e8-97d4-823996605407 Failed to prov...
<p>Short answer no. Most volume types in Kubernetes are supported as <code>ReadWriteOnce</code>.</p> <p>Use cases for <code>ReadOnlyMany</code> are limited. If you are trying to share things among pods you can take a look at <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" re...
<p>I have deployed two services to a Kubernetes Cluster on GCP:</p> <p>One is a Spring Cloud Api Gateway implementation:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: api-gateway spec: ports: - name: main port: 80 targetPort: 8080 protocol: TCP selector: app: api-gateway tier...
<p>I had the same issue using Ingress resource with Contour 0.5.0 but I managed to solve it by upgrading Contour to v0.6.0-beta.3 with IngressRoute (be aware, though, that it's a beta version).</p> <p>You can add an IngressRoute resource (crd) like this (remove your previous ingress resource): </p> <pre><code>#ingre...
<p>I have an issue, I want to use an API Gateway client certificate with my ingress config. </p> <ol> <li>I've generated the certificate on AWS.</li> <li><p>I've created the secret of thi certificate: </p> <pre><code>kubectl create secret generic api --from-file=api-gateway-client-certificate.crt --namespace develop...
<p>So you are missing the key and/or the CA for your cert. Did you use a private CA in AWS? The regular certificate manage doesn't give you a key file because it creates the CSR under the hood.</p> <p>Generally, you'd create your tls secret like this:</p> <pre><code>kubectl -n kube-system create secret tls my-tls-cer...
<p>I'm trying to get a certificate signed by the Kubernetes CA (1.11) by submitting the following:</p> <pre><code>apiVersion: certificates.k8s.io/v1beta1 kind: CertificateSigningRequest metadata: name: openunison.openunison.svc.cluster.local spec: groups: - system:authenticated request: LS0tLS1CRUdJTiBORVcgQ0V...
<p>You are submitting it correctly, but the Kubernetes certificate manager doesn't like the format of your CSR header: </p> <ul> <li><code>-----BEGIN NEW CERTIFICATE REQUEST-----</code> nor the ending</li> <li><code>-----END NEW CERTIFICATE REQUEST-----</code>. </li> </ul> <p>However, it does like:</p> <ul> <li><cod...
<p>Accidentally tried to delete all PV's in cluster but thankfully they still have PVC's that are bound to them so all PV's are stuck in Status: Terminating.</p> <p>How can I get the PV's out of the "terminating" status and back to a healthy state where it is "bound" to the pvc and is fully working?</p> <p>The key he...
<p><strong>It is, in fact, possible to save data from your <code>PersistentVolume</code> with <code>Status: Terminating</code> and <code>RetainPolicy</code> set to default (delete).</strong> We have done so on GKE, not sure about AWS or Azure but I guess that they are similar</p> <p>We had the same problem and I will p...
<p>Currently, I have an application consisting of a backend, frontend, and database. The Postgres database has a table with around 60 million rows. This table has a foreign key to another table: <code>categories</code>. So, if want to count—I know it's one of the slowest operations in a DB—every row from a specific cat...
<blockquote> <p>will the performance of my queries go up if you also use a container DB</p> </blockquote> <p>Raw performance will only go up if the capacity of the nodes (larger nodes) is larger than your current node. If you use the same node as a kubernetes node it will not go up. You won't get benefits from conta...
<p>Trying to move my development environment to run on minikube.</p> <p>The page loads but my page uses websockets on the same port/protocol that the index.html is loaded with (https in this case), and the websockets do no seem to be working correctly.</p> <p>Here is an example of the correct output when run through ...
<p>So not exactly sure what changed as it worked on test box, apparently the issue lied in the form validation I was doing. Once I put in a novalidate option to temporarily bypass the form checking, the form was then able to be submitted and I did not have any websocket issues after all.</p> <p>Hopefully this post c...
<p>What is the best practice for backing up a Postgres database running on <a href="https://cloud.google.com/container-engine/" rel="noreferrer">Google Cloud Container Engine</a>?</p> <p>My thought is working towards storing the backups in <a href="https://cloud.google.com/storage/" rel="noreferrer">Google Cloud Stora...
<p>As @Marco Lamina said you can run pg_dump on postgres pod like </p> <pre><code>DUMP // pod-name name of the postgres pod // postgres-user database user that is able to access the database // database-name name of the database kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-nam...
<p>I have spent whole day looking for an answer why my node js app is not reachable from the internet when I run it on Kubernetes with loadbalancer as a service type. The solution was to change host from localhost to 0.0.0.0 in node js server app definition, but I still don’t know why?</p> <p>I hope this saves one’s t...
<p>When you say that you set the host I guess you mean what the app is told to listen on in the listen function like <a href="https://stackoverflow.com/questions/33953447/express-app-server-listen-all-intefaces-instead-of-localhost-only">express app server . listen all intefaces instead of localhost only</a> You can bi...
<p>I have a single service running on a NodePort service. How do i use ingress to access multiple services.</p> <h3>deployment.yml</h3> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: auth spec: replicas: 1 selector: matchLabels: app: auth template: metadata: labels: ...
<p>Your service is running in port 3000 but your Ingress routing rule is matching to port 8080. It will probably work if you just change the servicePort to 3000 in the backend section of your Ingress resource definition. </p> <p>I'd suggest making sure it works with NodePort first before trying Ingress. I suggest this...
<p>I have a requirement to set up Kubernetes on-prem and have Windows worker nodes that run .NET 4.5 containers. Now, while I found this <a href="https://onedrive.live.com/view.aspx?resid=E2B6765015E5FA01!339&amp;ithint=file%2Cdocx&amp;app=Word&amp;authkey=!AGvs_s_hWs7xHGs" rel="nofollow noreferrer">link</a>, I don't p...
<p>This is an opinion question so I'll answer in an opinionated way.</p> <p>So kubespray will give you more automation and it actually uses <code>kubeadm</code> to create the control plane and cluster components including your network overlay.</p> <p>It also provides you with capabilities for <a href="https://github....
<p>How do I enable a port on Google Kubernetes Engine to accept websocket connections? Is there a way of doing so other than using an ingress controller? </p>
<p>Web sockets are supported by Google's global load balancer, so you can use a k8s <code>Service</code> of type <code>LoadBalancer</code> to expose such a service beyond your cluster.</p> <p>Do be aware that load balancers created and managed outside Kubernetes in this way will have a default connection duration of 3...
<p><strong>cat /etc/redhat-release:</strong></p> <pre><code>CentOS Linux release 7.2.1511 (Core) </code></pre> <p><strong>docker version:</strong></p> <pre><code>Client: Version: 1.13.1 API version: 1.26 Package version: &lt;unknown&gt; Go version: go1.8.3 Git commit: 774336d/1.13.1 Built...
<p>The gitlab-runner has no build-in commands, it spin's of a container with a predefined image and then remotely executes the commands from your script, in that container.</p> <p>You have not defined an image, so the default image will be used as defined in the setup of the gitlab-runner.</p> <p>So, You could <a hre...
<p>I am trying to understand the relationship between Kubernetes and OpenStack. I am confused around the topic of deploying Kubernetes on OpenStack and doing my research I found there are too many tutorials. My understanding of the sequence is: </p> <ol> <li>Start several <code>nova</code> instances on OpenStack.</li>...
<p>1, 2 and 3 are correct.</p> <blockquote> <p>Self-healing</p> </blockquote> <p>You can deploy in master HA configuration. The recommended way is either 3 or 5 master with a quorum of <code>(n + 1)/ 2</code></p> <blockquote> <p>Can Kubernetes reprovision/restart some the failed nova instances?</p> </blockquote>...
<p>I dig into Kubernetes resource restrictions and have a hard time to understand what CPU <code>limits</code> are for. I know Kubernetes passes <code>requests</code> and <code>limits</code> down to the (in my case) Docker runtime.</p> <p><strong>Example</strong>: I have 1 Node with 1 CPU and 2 Pods with CPU <code>req...
<p>One reason to set CPU limits is that, if you set CPU request == limit <em>and</em> memory request == limit, your pod is assigned a Quality of Service class = <code>Guaranteed</code>, <a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#node-oom-behavior" rel="nofollow noreferrer">which makes...
<p>I have a single service running on a NodePort service. How do i use ingress to access multiple services.</p> <h3>deployment.yml</h3> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: auth spec: replicas: 1 selector: matchLabels: app: auth template: metadata: labels: ...
<p>Try these manifests and remember to deploy an Ingress Controller (I usually use traefik, <a href="https://stackoverflow.com/a/51425301/2718151">here</a> some instructions to set it)</p> <p><code>service.yml</code>: I changed NodePort to ClusterIP (the default, you can remove the line)</p> <pre><code>apiVersion: v1...
<p>How to update k8s certificate:</p> <p>Some certificates in the k8s cluster are currently expired, prompting: </p> <blockquote> <p>Unable to connect to the server: x509: certificate has expired or is not yet valid. Take a look at the online cluster master.</p> </blockquote> <p>The <code>ca.crt</code> and <code...
<p>The latest kubeadm should have support for <a href="https://github.com/kubernetes/kubernetes/pull/67910" rel="nofollow noreferrer">this</a>.</p> <p>Expected commands:</p> <pre><code>renew all renew apiserver renew apiserver-kubelet-client renew apiserver-etcd-client renew front-proxy-client renew etcd-server renew...
<p>I am new to Kops and a bit to kubernetes as well. I managed to create a cluster with Kops, and run a deployment and a service on it. everything went well, and an ELB was created for me and I could access the application via this ELB endpoint.</p> <p>My question is: How can I map my subdomain (eg. <code>my-sub.examp...
<p>When you have ELBs in place you can use external-dns (<a href="https://github.com/kubernetes-incubator/external-dns" rel="nofollow noreferrer">https://github.com/kubernetes-incubator/external-dns</a>) plugin which can attach DNS records to those ELBs using AWS Route53 integration. You need to add proper rights to Ku...
<p>I am new to Kubernetes and started working with it from past one month. When creating the setup of cluster, sometimes I see that Heapster will be stuck in Container Creating or Pending status. After this happens the only way have found here is to re-install everything from the scratch which has solved our problem. L...
<p>A pod stuck in pending state can mean more than one thing. Next time it happens you should do 'kubectl get pods' and then 'kubectl describe pod '. However, since it works sometimes the most likely cause is that the cluster doesn't have enough resources on any of its nodes to schedule the pod. If the cluster is low o...
<p>I'm using Kubernetes with Traefik as Ingress Controller. I've some web services within my network that can't be containerized yet. Therefore I'm looking for a way to expose my non-Kubernetes web services through the Traefik Ingress. I've no more public IP's, so splitting both environments is not an option.</p> <p>I...
<p>For starters, I bet that when you <code>kubectl describe svc my-service</code> you have empty endpoints, even though endpoints do exist, right ?</p> <p>To fix that, you need to adapt your endpoints <code>ports</code> key to have the same ports definition as your service has (name, protocol etc.). You should then se...
<p>If the installation of OpenEBS can be completed with a single command, why would a developer use helm install ? (It is probably more a helm benefits question). I'd like to understand the additional benefits OpenEBS charts can present to a helm user, if any. </p>
<p>I guess you're looking at the two current supported options for <a href="https://docs.openebs.io/docs/next/installation.html" rel="nofollow noreferrer">OpenEBS installation</a> and noting that the helm install section is much larger with more steps than the operator-based install option. If so, note that the helm se...
<p>Does anyone know a way to <strong>refer to a namespace</strong> inside of values.yaml using an environment variable? </p> <p>For example, when mapping a secret </p> <pre><code>secret: # RabbitMQ password V_RABBIT_PASSWORD: secretKeyRef: name: jx-staging-rabbit //&lt;--- this needs to work for...
<p>I guess this is in a helm chart for an app that you're deploying with jenkins-x. Helm has a <a href="https://github.com/helm/helm/blob/master/docs/chart_template_guide/builtin_objects.md" rel="nofollow noreferrer">Release.Namespace</a> value that you can access. So in the deployment.yaml you could use <code>{{ .Rele...
<p>I'm trying to expose a single database instance as a service in two Kubernetes namespaces. Kubernetes version 1.11.3 running on Ubuntu 16.04.1. The database service is visible and working in the default namespace. I created an ExternalName service in a non-default namespace referencing the fully qualified domain nam...
<p>This doesn't work for me with Kubernetes 1.11.2 with coredns and calico. It works only if you reference the external service directly in whichever namespace it runs:</p> <pre><code>$ kubectl get pods -n default NAME READY STATUS RESTARTS AGE mysql-0 2/2 Running 0 17m mysql-1 2/2 ...
<p>I am trying to port a monolithic app to k8s pods. In theory, pods are considered ephemeral and it is suggested to use service concept to provide a static IP. But in my test so far, I have not seen the POD IP being changed. So now the question when will k8s assign a new IP to my POD?</p> <p>I have created POD (witho...
<p>The IP won't change as long as the pod is running, but there are no promises that your pod will stay running. The closest there is to a stable network name is with a StatefulSet. That will create a consistent pod name, which means a consistent DNS name in kubedns/coredns. There is no generic way in Kubernetes to get...
<p>I created a kubernetes service that is exposed via <code>type: nodePort</code>. I can access the service in my browser if I enter <a href="http://PublicDropletIp:31433" rel="nofollow noreferrer">http://PublicDropletIp:31433</a>.</p> <p>Now I want to use a DigitalOcean Load Balancer to forward traffic from port <cod...
<p>I had this same issue and ended up on this thread. If anyone else is looking, I resolved it by configuring the firewall on my server. </p> <p>To answer the question above, the firewall should be configured to accept <code>tcp</code> connections from the load balancer's ip on port <code>31433</code>.</p>
<p>Is there a variant of <code>kubectl delete all --all</code> command or some other command to delete all resources except the <em>kubernetes service</em>?</p>
<p>I don't think there's a built-in command for it, which means you'll have to script your way out of it, something like this (add an <code>if</code> for the namespace you want to spare):</p> <pre><code>$ for ns in $(kubectl get ns --output=jsonpath={.items[*].metadata.name}); do kubectl delete ns/$ns; done; </code></...
<p>I have setup a K8S cluster (1 master and 2 slaves) using Kubeadm on my laptop.</p> <ul> <li>Deployed 6 replicas of a pod. 3 of them got deployed to each of the slaves.</li> <li>Did a shutdown of one of the slave.</li> <li>It took ~6 minutes for the 3 pods to be scheduled on the running node.</li> </ul> <p>Initiall...
<p>On the kubelet change this file on all your nodes:</p> <pre><code>/var/lib/kubelet/kubeadm-flags.env </code></pre> <p>Add the option at the end or anywhere on this line:</p> <pre><code>KUBELET_KUBEADM_ARGS=--cgroup-driver=cgroupfs --cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni --r...
<p>I am trying to add a file to a pod's disk during initialization of the pod but without luck. Below is my deployment file which I use to deploy the pod. The file gets downloaded to the persistent volume, but the pod doesn't get into ready state. After a few seconds, the pods fail and get rebuilt. Which kicks off the ...
<blockquote> <p>am trying to add a file to a pod's disk during initialization of the pod but without luck.</p> </blockquote> <p>In that case you might want to use <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer"><code>InitContainers</code></a> instead.</p> <p>J...
<p>I'm in a progress to migrate to kuberenetes from docker-compose. One of the services we're using is rabbit-mq. When I try to deploy rabbit-mq 3.6.16-management I receive the error:</p> <p><em>/usr/local/bin/docker-entrypoint.sh: line 382: /etc/rabbitmq/rabbitmq.config: Permission denied.</em></p> <p>While it works...
<p>Eventually I've used configmap and secrets to mount files instead of PV and works as expected.</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: labels: app: rabbit-mq name: rabbit-mq spec: replicas: 1 selector: matchLabels: app: rabbit-mq template: metadata: labels: ...
<p>Is there a way to be able to provide ReadWriteMany storage without having to implement a storage cluster?</p> <p>I was able to provide storage with gcsfuse but it is really slow. I need something close to the speed of GlusterFS.</p> <p>I am currently using GlusterFS.</p>
<p>Another option: Google Cloud Platform recently started offering a hosted NFS service called <a href="https://cloud.google.com/filestore/docs/" rel="nofollow noreferrer">Cloud Firestore</a>. </p> <p>Note that as of this writing, Cloud Firestore is still in Beta.</p> <p>Here's the description:</p> <blockquote> <...
<p>I'm developing a microservices application with Spring Boot and Postgres. Using Docker, the REST API in one container and Postgres in another container, everything works fine. But when I try to run this with Kubernetes , it always gives an API error.</p> <p>The <code>Dockerfile</code> where my Spring Boot-based API...
<p>As far as I understand your issue, your service k8s pod cannot reach the postgres. As you may already know, in k8s, pods are ephemeral and you need services abstraction if you need to invoke a service by its url.</p> <p>I would ssh into the App pod and try to ping the hostname with which you are trying to connect t...
<p>I am trying to install Traefik as an Ingress Controller for my self-installed Kubernetes cluster. For convenience I try to install the <a href="https://github.com/helm/charts/tree/master/stable/traefik" rel="nofollow noreferrer">helm chart of Traefik</a> and this works excellent without the acme part; this is my var...
<p>It is highly recommended you use <a href="https://github.com/jetstack/cert-manager" rel="nofollow noreferrer"><code>cert-manager</code></a> instead of the built-in ACME support in Traefik, at least at this time. It is much better at dealing with multiple copies of Traefik, which you probably want. Ingress-shim (whic...
<p>I'm building a service where users can build web apps - these apps will be hosted under a virtual DNS name *.laska.io</p> <p>For example, if Tom and Jerry both built an app, they'd have it hosted under:</p> <pre><code>tom.laska.io jerry.laska.io </code></pre> <p>Now, suppose I have 1000 users. <strong>Should I cr...
<p>You can create one ingress resource for each web app. If you search the official public charts repo, you'll see that <a href="https://github.com/helm/charts/search?q=ingress&amp;unscoped_q=ingress" rel="noreferrer">many of the charts define an ingress resource within them</a>. It's normal for each app to define its ...
<p>All of the leader election tools like Consul, Zookeeper or any other quorum system. I've seen have been for pods within the same cluster. I need to coordinate across clusters for a tutorial.</p>
<p>The short answer for a broad question: It's not the norm but yes you can run them in different clusters as long as you expose your containers/pods with the right ports and IP addresses and they can find each other using these ports and IP addresses.</p> <p>This answer relates to quorum systems that use a consensus ...
<p>I've configured Traefik (helm chart) with let'sencrypt ACME, but I'm not receiving any certificates. The Traefik Ingress is exposed on port 80 and 443 to the internet.</p> <p>traefik.toml</p> <pre><code>logLevel = "INFO" InsecureSkipVerify = true defaultEntryPoints = ["http","https"] [entryPoints] [entryPoints.h...
<p>How are you injecting the letsencrypt config to your traefik Ingress service/daemonset? </p> <p>Traefik doesn't officially have letsencrypt on Kubernetes Ingress docs. But this is a <a href="https://medium.com/@carlosedp/multiple-traefik-ingresses-with-letsencrypt-https-certificates-on-kubernetes-b590550280cf" rel=...
<p>I've found the documentation hard to find, such as "type: hostdir" for storage pools. What is hostdir? Is this the only type of pool OpenEBS supports?</p>
<p>Their documentation is missing explaining what <code>hostdir</code> is in their <code>StoragePool</code> resource definition. Judging by <a href="https://github.com/openebs/openebs/blob/master/k8s/openebs-config.yaml" rel="nofollow noreferrer">this</a> it's just a directory on your Kuberbetes nodes. </p> <p>Also, t...
<p>I am new to kubernetes and trying to deploy openstack on kubernetes cluster, below is the error I see when I try to deploy openstack. I am following the openstack docs to deploy.</p> <pre><code>kube-system ingress-error-pages-56b4446784-crl85 0/1 Pending 0 1d kube-system ingress-error-page...
<p>Looks like you have a toleration on your Pod and don't have nodes with the taints for those tolerations. Would help to post the definition for your Ingress and its corresponding Deployment or DaemonSet.</p> <p>You would generally taint your node(s) like this:</p> <pre><code>kubectl taint nodes &lt;your-node&gt; ke...
<p>Just as the title says, Kubernetes's liveness probe always fails when pod is under heavy load(500+ concurrency, 100000 request), i gave more cpu &amp; memory resources to the pod, but it does not work.</p> <p>Is there any method to handle this situation ?</p> <p>Thanks!</p>
<p>As per @Williams Mao issue was resolved by increasing <code>readinessProbe.timeoutSeconds</code>. </p> <p>If an application has huge load, the default <code>timeoutSeconds: 1</code> may be not enough. Good to read: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probe...
<p>I'm new to devops and kubernetes and was setting up the local development environment. For having hurdle-free deployment, I wanted to keep the development environment as similar as possible to the deployment environment. So, for that, I'm using minikube for single node cluster, and that solves a lot of my problems b...
<p>The official Kubernetes blog lists a couple of <strong>CI/CD dev tools</strong> for building Kubernetes based applications: <a href="https://kubernetes.io/blog/2018/05/01/developing-on-kubernetes/" rel="nofollow noreferrer">https://kubernetes.io/blog/2018/05/01/developing-on-kubernetes/</a></p> <p>However, as other...
<p>I am using the python kubernetes api with <a href="https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CoreV1Api.md#list_namespaced_pod" rel="noreferrer">list_namespaced_pod</a> to get the pods in my namespace. Now I would like to filter them, using the optional label selector parameter. </p> <p...
<p>Kubernetes CLI uses two types of label selectors.</p> <ol> <li><p>Equality Based Eg: <code>kubectl get pods -l key=value</code></p></li> <li><p>Set Based Eg: <code>kubectl get pod -l 'key in (value1,value2)'</code></p></li> </ol> <p><code>label_selector='label=my_label'</code> </p> <p>should work, else try using...
<p>We have several options how to correctly manage kubernetes delcaration files and dockerfiles. Services development may be considered as fully separate without any cross service communications for now.</p> <ol> <li>Setup separate repository which will contain all k8s and docker delcarations and build/deploy scripts...
<p>I would recommend #3. All companies I have worked with so far, keep it that way.</p> <h1>From a Kubernetes-native perspective</h1> <p>Some <strong>Kubernetes native devtools like DevSpace</strong> (<a href="https://github.com/covexo/devspace" rel="noreferrer">https://github.com/covexo/devspace</a>) <strong>and Dra...
<p>Can anyone share how kubectl exec works,like a technical overview. also what are the ways to troubleshoot it.</p> <p>For example I have the following issue :when trying to connect to a pod :</p> <blockquote> <p>kubectl.exe : I0502 04:25:18.562064 7288 loader.go:357] Config loaded from file C:\Users\u615648/...
<p>Internally, the kubectl command interacts with the Kubernetes API server via HTTP / SPDY. The API server of Kubernetes is a regular REST API. Kubernetes is using SPDY for now but the maintainers plan to switch to HTTP/2 as soon as docker allows them to do so: <a href="https://github.com/kubernetes/kubernetes/issues/...
<p>I have a Spring Boot 2.x project using Mongo. I am running this via Docker (using compose locally) and Kubernetes. I am trying to connect my service to a Mongo server. This is confusing to me, but for development I am using a local instance of Mongo, but deployed in GCP I have named mongo services.</p> <p>here i...
<p>Hard to tell what the exact issue is, but maybe this is just an issue because of the space " " after "spring.data.mongodb.uri=" and before "mongodb://mongo-serviceone:27017/serviceone"?</p> <p>If not, maybe exec into the "service" container and try to ping the mongodb with: <code>ping mongo-serviceone:27017</code><...
<p>I used the AWS Kubernetes Quickstart to create a Kubernetes cluster in a VPC and private subnet: <a href="https://aws-quickstart.s3.amazonaws.com/quickstart-heptio/doc/heptio-kubernetes-on-the-aws-cloud.pdf" rel="nofollow noreferrer">https://aws-quickstart.s3.amazonaws.com/quickstart-heptio/doc/heptio-kubernetes-on-...
<p>If you look at the <a href="https://docs.projectcalico.org/v3.0/reference/node/configuration" rel="nofollow noreferrer">Calico docs</a> <code>IP_AUTODETECTION_METHOD</code> is already defaulting to <code>first-round</code>.</p> <p>My guess is that something or the IP address is not being released by the previous 'r...
<p>My objective is to fetch the time series of a metric for a pod running on a kubernetes cluster on GKE using the <a href="https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries" rel="nofollow noreferrer">Stackdriver TimeSeries REST API</a>.</p> <p>I have ensured that Stackdriver monitoring and logging are...
<ol> <li><p>I wouldn't rely on <code>kubectl get deploy</code> for pod ids. I would get them with something like <code>kubectl -n default get pods | grep &lt;prefix-for-your-pod&gt; | awk '{print $1}'</code></p></li> <li><p>I don't think so, but the best way to find out is opening a support ticket with GCP if you have ...
<p>Do you know if it is possible to mount a local folder to a Kubernetes running container.</p> <p>Like <code>docker run -it -v .:/dev some-image bash</code> I am doing this on my local machine and then remote debug into the container from VS Code.</p> <p>Update: This might be a solution: <code>telepresence</code> Li...
<h1>Kubernetes Volume</h1> <p>Using <strong>hostPath</strong> would be a solution: <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath</a></p> <p>However, it will only work if your cluster runs on the same machin...
<p>I am trying to use the <a href="https://github.com/kubernetes/client-go" rel="nofollow noreferrer">kubernetes go-client</a> with cloud.google.com/go/container. I create the cluster using the google cloud go container package, then I want to deploy on that cluster using go-client. The <a href="https://github.com/kube...
<p>The ClientCertificate, ClientKey and ClusterCaCertificate need to be decoded as described <a href="https://github.com/terraform-providers/terraform-provider-kubernetes/issues/85" rel="noreferrer">here</a></p> <pre><code>func CreateK8sClientFromCluster(cluster *gkev1.Cluster) { decodedClientCertificate, err := b...
<p>I have a local kubernetes cluster setup using the edge release of docker (mac). My pods use an env var that I've defined to be my DB's url. These env vars are defined in a config map as:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: my-config data: DB_URL: postgres://user@localhost/my_dev_db?ss...
<h1>Option 1 - Local Networking Approach</h1> <p>If you are running minikube, I would recommend taking a look at the answers to this question: <a href="https://stackoverflow.com/questions/42268814/routing-an-internal-kubernetes-ip-address-to-the-host-system">Routing an internal Kubernetes IP address to the host system...
<p>I've been messing around with kubernetes and I'm trying to setup a development environment with minikube, node and nodemon. My image works fine if I run it in a standalone container, however it crashes with the following error if I put it in my deployment.</p> <pre><code>yarn run v1.3.2 $ nodemon --legacy-watch --e...
<p>There are several issues when mounting node_modules fro your local computer to a container, e.g.:</p> <p>1) node_modules has local symlinks which will not easily be resolvable inside your container.</p> <p>2) If you have dependencies which rely on native binaries, they will be compiled for the operating system whe...
<p>In a Helm Chart I have to following values</p> <pre><code>dataCenters: - name: a replicas: 3 - name: b replicas: 2 </code></pre> <p>When generating the template I would like my output to be like the following </p> <pre><code>server.1 = a-1 server.2 = a-2 server.3 = a-3 server.4 = b-1 server.5 = b-2 </...
<p>I have a way to do it that involves some trickery, heavily inspired by functional programming experience.</p> <p>A Go/Helm template takes a single parameter, but the <a href="http://masterminds.github.io/sprig/" rel="nofollow noreferrer">sprig</a> library gives you the ability to create lists, and the <a href="http...
<p>I'm trying to access a MySQL database hosted inside a docker container on localhost from inside a minikube pod with little success. I tried the solution described <a href="https://stackoverflow.com/questions/43354167/minikube-expose-mysql-running-on-localhost-as-service">Minikube expose MySQL running on localhost as...
<p>I'm using ubuntu with Minikube and my database runs outside of minikube inside a docker container and can be accessed from localhost @ 172.17.0.2. My Kubernetes service for my external mysql container reads as follows:</p> <pre><code>kind: Service apiVersion: v1 metadata: name: mysql-db-svc namespace: external ...
<p>I am facing "theoritical" compatility issues when using distroless-based containers with kubernetess 1.10.</p> <p>Actually, distroless requires docker 17.5 (<a href="https://github.com/GoogleContainerTools/distroless" rel="nofollow noreferrer">https://github.com/GoogleContainerTools/distroless</a>) whereas kubernet...
<p>The requirement for 17.05 is <strong>only</strong> to build a "distroless" image with <code>docker build</code> using <strong>multistage</strong> <code>Dockerfile</code>. When you have an image built, there is nothing stopping it from running on older Docker / containerd versions.</p> <p>Docker has supported images...
<p>I have created a local 3-node kubernetes cluster in GNOME-Boxes, using the CentOS minimal ISO. This is for testing a custom install on client-provisioned machines. Everything went very smooth, and I even had things working well for a few days. However, I needed to restart my server, so I brought the k8s cluster down...
<p>I ran into exact same issue on Centos 7 Virtual Box post creation of my Kubernetes single master using kubeadm , I ended up creating an <a href="https://github.com/kubernetes/kubeadm/issues/1082" rel="nofollow noreferrer">issue</a> against kubeadm .</p> <p>You might want to follow some or all of those steps mention...
<p>I am deploying a container in Google Kubernetes Engine with this YAML fragment:</p> <pre><code> spec: containers: - name: service image: registry/service-go:latest resources: requests: memory: "20Mi" cpu: "20m" limits: memory: "100M...
<h2>Considering Resources Request <strong>Only</strong></h2> <p>The google cloud console works well, I think you have multiple containers in your pod, this is why. The value shown above is the sum of resources requests declared in your truncated YAML file. You can verify easily with <code>kubectl</code>.</p> <p>First...
<p>I am trying to apply kubernetes to my minikube cluster for the first time. I have limited experience with cluster management and have never worked with prometheus before so I apologize for noob errors. </p> <p>I run the following commands:</p> <pre><code>docker build -t my-prometheus . docker run -p 9090:9090 my-p...
<p><code>kubernetes_sd_configs</code> is a list of configs, styled as block sequence in YAML terms.</p> <p>Now, your list of configs looks like this:</p> <pre><code>- role: endpoints - api_server: localhost:3000 </code></pre> <p>So you're defining two configs, and only the first one of them has a role. This is why y...
<p>I have a GoogleCloud Kubernetes cluster consisting of multiple nodes and a GoogleCloud Redis Memorystore. Distributed over these nodes are replicas of a pod containing a container that needs to connect to the Redis Memorystore. I have noticed that one of the nodes is not able to connect to Redis, i.e. any container ...
<ul> <li><p>Not for a node. The podCidr gets defined when you install your network overlay in initial steps when setting up a new cluster.</p></li> <li><p>Yes for the cluster. but it's not that easy. You have to change the podCidr for the network overlay in your whole cluster. It's a tricky process that can be done, bu...
<ul> <li><code>kubectl expose</code> doesn't work here</li> <li>how to do it with CLI</li> <li>In Console UI functionality is located in <a href="https://console.kyma.local/home/environments/stage/apis" rel="nofollow noreferrer">https://console.kyma.local/home/environments/stage/apis</a></li> </ul>
<ul> <li>API exposure to internet is realized through special "API Gateway" component. You can read about its architecture and usage here <a href="https://kyma-project.io/docs/latest/components/api-gateway" rel="nofollow noreferrer">https://kyma-project.io/docs/latest/components/api-gateway</a></li> <li>Exposure throug...
<p>I'm trying to copy files from Kubernetes Pods to my local system. I am getting the below error while running following command: </p> <pre><code>kubectl cp aks-ssh2-6cd4948f6f-fp9tl:/home/azureuser/test.cap ./test.cap </code></pre> <p>Output:</p> <blockquote> <p>tar: home/azureuser/test: Cannot stat: No such fil...
<p>As stated in<code>kubectl</code> help:</p> <pre><code>kubectl cp --help Copy files and directories to and from containers. Examples: # !!!Important Note!!! # Requires that the 'tar' binary is present in your container # image. If 'tar' is not present, 'kubectl cp' will fail. # Copy /tmp/foo_dir local directory to ...
<p>I am new to Prometheus and relatively new to kubernetes so bear with me, please. I am trying to test Prometheus out and have tried two different approaches. </p> <ol> <li><p>Run Prometheus as a docker container outside of kubernetes. To accomplish this I have created this Dockerfile:</p> <pre><code>FROM prom/prome...
<p>Kubernetes does not map the port outside it's cluster when you deploy your container.</p> <p>You also have to create a service (can be inside the same file) to make it available from your workstation (append this to your prometheus yaml):</p> <pre><code>--- apiVersion: v1 kind: Service metadata: name: promethe...
<p>I am running Apache Drill and Zookeeper on a Kubernetes cluster.</p> <p>Drill is connecting to zookeeper through a zookeeper-service running on port 2181. I am trying the persist storage plugin configuration on zookeeper. On the Apache Drill docs (<a href="https://drill.apache.org/docs/persistent-configuration-stor...
<p>The value should be:</p> <pre><code>&lt;name-of-your-zk-service&gt;.&lt;namespace-where-zk-is-running&gt;.svc.cluster.local:2181 </code></pre> <p>That's how services get resolved internally in Kubernetes. You can always test it by creating a Pod, connecting to is using <code>kubectl exec -it &lt;pod-name&gt; sh</c...
<p>I am trying to setup a private docker registry to work with Kubernetes. I've setup the registry and the master-server thats running the Kubernetes cluster can pull images from the registry without a problem. Also, I've followed the docs of Kubernetes that explain how to connect to a private docker registry (see <a h...
<p>Solved this issue, the master-server by default doesn't launch your deployments. So I needed to do the following at my slave servers:</p> <ol> <li>Add the certificate to /etc/docker/certs.d/my-registry-domain.com[:port]/ca.crt</li> <li>Do docker login my-registry-domain.com[:port]</li> <li>Add the docker registry s...
<p>I am trying to access the Kibana dashboard while trying to set up fluentd-elasticsearch on premises. This is the <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch" rel="nofollow noreferrer">link</a> which I followed. I checked the logs of Kibana's pod. It shows the fo...
<p><em>After a discussion it was more clear what seems to be wrong.</em></p> <p>You are using a local cluster with no load balancer. You have to set either an ingress or use NodePort as the service type. I am going to describe the solution with NodePort. Two steps to take:</p> <ol> <li>Modify the <code>kibana-deploym...
<p>I'm attempting to inject a ReplicationController's randomly generated pod ID extension (i.e. <code>multiverse-{replicaID}</code>) into a container's environment variables. I could manually get the hostname and extract it from there, but I'd prefer if I didn't have to add the special case into the script running insi...
<p>There is an <a href="https://stackoverflow.com/a/49649009/9521610">answer</a> provided by <a href="https://stackoverflow.com/users/5937420/anton-kostenko">Anton Kostenko</a> about inserting DB credentials into container environment variables, but it could be applied to your case also. It is all about the content of ...
<p>I have an entrypoint defined in my container image, and it runs before the args specified in my deployment manifest, as it should. But when I execute a command on that container using <code>kubectl exec</code>, it seems to bypass the container entrypoint. Is this the expected behavior? Can I somehow force it to a...
<p>That's expected. If you really want what's in the <code>entrypoint.sh</code> you can do something like this:</p> <pre><code>kubectl exec -it &lt;pod-name&gt; -c &lt;container-name&gt; -- /path/to/entrypoint.sh </code></pre> <p>Hope it helps!</p>
<p>The cni0 interface is missing altogether. Any direction on how to get it back without tearing down the cluster will be greatly appreciated. basically, the internal container networking is not working in trying to recover from that, I found this out the IP's for coredns are docker0 interface instead of cni0, so may b...
<p>First, check if your configs are present under <code>/etc/cni/net.d</code> on all your nodes.</p> <p>Then I would try removing your flannel DaemonSet, killing all the pods and reinstall flannel altogether. </p> <p>You may need to restart all your other pods except for the <code>kube-apiserver</code> and the <code>...
<p>I want to call a REST service running outside OpenShift via a Service and external domain name. This works perfect with a http:// request. The mechanism is described in the documentation : <a href="https://docs.okd.io/latest/dev_guide/integrating_external_services.html#saas-define-service-using-fqdn" rel="nofollow n...
<ol> <li>Ugly and might cost you extra $$</li> <li>Defeats the purpose of TLS.</li> <li><p>On Kubernetes 1.10 and earlier you can use <a href="https://kubernetes.io/docs/concepts/services-networking/service/#externalname" rel="nofollow noreferrer">ExternalName</a>. </p> <p>You can also use with <a href="https://docs.o...
<p>I want to choose config section from values.yaml by setting a variable in helm command line.</p> <p>example part of values.yaml:</p> <pre><code>aaa: x1: "az1" x2: "az2" bbb: x1: "bz1" x2: "bz2" </code></pre> <p>example part of configmap.yaml</p> <pre><code>data: {{ .Values.outsideVal.x1 }} </code></p...
<p>I suspect you're looking for the <a href="https://godoc.org/text/template" rel="noreferrer">text/template</a> <code>index</code> function, which can look up a value in a map by a variable key.</p> <pre><code>{{ (index .Values .Values.outsideVal).x1 }} </code></pre>
<p>Let's say I have a 3 node cluster (master01, node01, node02)</p> <p>How can I find the running container path on node? I can see container ID by "oc describe pod"</p> <pre><code>Container ID: docker://9982c309a3fd8c336c98201eff53a830a1c56a4cf94c2861c52656855cba3558 </code></pre> <p>eg: on node 01, I can see a l...
<p>You can use this to list the container image by pod name:</p> <p><code>kubectl get pods POD_NAME -o=jsonpath='{..image}'</code></p> <p>Source: <a href="https://kubernetes.io/docs/tasks/access-application-cluster/list-all-running-container-images/" rel="nofollow noreferrer">Docs</a></p>
<p>I am running into OOM issues on CentOs on some kubernetes nodes. I would like to set it up like they have in the demo:</p> <pre><code>--kube-reserved is set to cpu=1,memory=2Gi,ephemeral-storage=1Gi --system-reserved is set to cpu=500m,memory=1Gi,ephemeral-storage=1Gi --eviction-hard is set to memory.available&lt...
<p>Add them to this file (hopefully, you initiated your cluster with kubeadm):</p> <pre><code>/var/lib/kubelet/kubeadm-flags.env </code></pre> <p>For example:</p> <pre><code>KUBELET_KUBEADM_ARGS=--cgroup-driver=cgroupfs --cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --network-plugin=cni --resolv-conf=/run/...
<p>Basically, when using Google Cloud Build, how do I read a value that was written in an earlier build step in subsequent steps? </p> <p>Specifically, I'd like to make a custom image tag that's based on a combination of the timestamp and $SHORT_SHA. Something like the below. Though, it doesn't work, as docker compla...
<p>I never found a way to set an environment variable in one build step that can be read in other steps, but I ended up accomplishing the same effect by building on Konstantin's answer in the following way: </p> <p>In an early step, I generate and write my date-based tag to a file. The filesystem (/workspace) is reta...
<p>I have about 100 million json files (10 TB), each with a particular field containing a bunch of text, for which I would like to perform a simple substring search and return the filenames of all the relevant json files. They're all currently stored on Google Cloud Storage. Normally for a smaller number of files I m...
<ol> <li><p>Easier would be to just load the GCS data into <a href="https://cloud.google.com/bigquery/docs/loading-data-cloud-storage" rel="nofollow noreferrer">Big Query</a> and just run your query from there. </p></li> <li><p>Send your data to AWS S3 and use <a href="https://aws.amazon.com/athena/" rel="nofollow nore...
<p>I need to access google cloud memorystore from cloud function but i know it's not supported yet, so i tried workaround to add haproxy in my kubernetes cluster and make it publicly access able using kubernetes service from type loadbalancer and forward the tcp requests to memorystore.</p> <p>It works fine with me an...
<p>We don't support network connectivity from App Engine or Cloud functions yet. We are working on adding this support in the future.</p> <p>Like you found out connectivity from GKE environment is supported. </p> <p>We don't support AUTH config yet, this feature is on our roadmap in near future. </p> <p>Thanks for t...
<p>I'm trying to create a simple nginx service on GKE, but I'm running into strange problems. </p> <p>Nginx runs on port 80 inside the Pod. The service is accessible on port 8080. (This works, I can do <code>curl myservice:8080</code> inside of the pod and see the nginx home screen)</p> <p>But when I try to make it p...
<p>The configuration is missing a health check endpoint, for the GKE loadbalancer to know whether the backend is healthy. The <code>containers</code> section for the <code>nginx</code> should also specify:</p> <pre><code> livenessProbe: httpGet: path: / port: 80 </code></pre> <p>The <code>GET /</code> on...
<p><strong>What happened</strong>:</p> <p>Force terminate does not work:</p> <pre><code>[root@master0 manifests]# kubectl delete -f prometheus/deployment.yaml --grace-period=0 --force warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to...
<p>After some investigation and help from the Kubernetes community over on github. We found the solution. The answer is, in 1.11.0 there is a known bug in relation to this issue. after upgrading to 1.12.0 the issue was resolved. The issue is noted to be resolved in 1.11.1 </p> <p>Thanks to cduchesne <a href="https://g...
<p>Can someone help me in writing a promql query to get the node status whether node is schedulable or not. Thanks in advance.</p>
<p>If you use prometheus-operator, <code>kube-state-metrics</code> return <code>kube_node_status_condition</code> metric:</p> <pre><code>sum(kube_node_status_condition{condition="Ready",status!="true"}) </code></pre>
<p>I am still in the initial phase of understanding k8, so please forgive if you feel this lame. But I wanted to know if there is a way to have some kind of delay or ordered the execution of the containers in 1 single pod. Let's say we have 1 Pod A and has 2 containers. For example, a kafka container exposing port 9092...
<p>There is a Feature Request for it: <a href="https://github.com/kubernetes/kubernetes/issues/65502" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/65502</a></p>
<p>In some cases, we have Services that get no response when trying to access them. Eg Chrome shows ERR_EMPTY_RESPONSE, and occasionally we get other errors as well, like 408, which I'm fairly sure is returned from the ELB, not our application itself.</p> <p>After a long involved investigation, including ssh'ing into...
<p>After much investigation, we were fighting a number of issues: * Our application didn't always behave the way we were expecting. Always check that first. * In our Kubernetes Service manifest, we had set the <code>externalTrafficPolicy: Local</code>, which probably should work, but was causing us problems. (This w...
<p>I have deployed the Kubernetes dashboard which ended up in <code>CrashLoopBackOff</code> status. When I run:</p> <pre><code>$ kubectl logs kubernetes-dashboard-767dc7d4d-mc2sm --namespace=kube-system </code></pre> <p>the output is:</p> <pre><code>Error from server: Get https://10.4.211.53:10250/containerLogs/ku...
<p>I had the same issue when I reproduced all the steps from the tutorial you've linked - my dashboard was in <code>CrashLoopBackOff</code>state. After I performed this steps and applied new dashboard yaml from the official github documentation (there seems to be no difference from the one you've posted), the dashboard...
<p>I have a use case with elastic search for rack awareness, which requires me to identify the zone that a pod has been scheduled in.</p> <p>I've seen many requests for this outside of SO, such as:</p> <p><a href="https://github.com/kubernetes/kubernetes/issues/40610" rel="nofollow noreferrer">https://github.com/kube...
<p>I don't particularly like doing it this way but I've yet to find a better answer, and none of the feature requests or bug reports on github seem to be going anywhere.</p> <p>I opted to use a config map with a bash script which would do the curl request and some string manipulation, and then mount this into the cont...
<p>I basically want to access the Nginx-hello page externally by URL. I've made a (working) A-record for a subdomain to my v-server running kubernetes and Nginx ingress: vps.my-domain.com</p> <p>I installed Kubernetes via kubeadm on CoreOS as a single-node cluster using these tutorials: <a href="https://kubernetes.io/...
<p>So apparently I was missing one part: the load balancer. I'm not sure why this wasn't mentioned in those instructions as a requirement. But i followed this tutorial: <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#a-pure-software-solution-metallb" rel="nofollow noreferrer">https://kubernetes.gi...
<p>Having AWS EKS cluster in VPC with CIDR 172.20.0.0/16 and installed <code>istio 1.0.2</code> with helm:</p> <pre><code>helm upgrade -i istio install/kubernetes/helm/istio \ --namespace istio-system \ --set tracing.enabled=true \ --set grafana.enabled=true \ --set telemetry-gateway.grafanaEnabled=true \ --set teleme...
<p>Setting <code>global.proxy.includeIPRanges</code> is deprecated and should not work. There was a <a href="https://github.com/istio/istio/issues/6146" rel="nofollow noreferrer">discussion</a> on Git about this. The new closest thing is <code>includeOutboundIpRanges</code> in pod's sidecar-injector Config-Map or <code...
<p>In my kubernetes Ingress controller logging lots of handshake message like this. how to stop this error message? it appers request coming from with-in the pod 127.0.0.1</p> <pre><code>2018/09/15 13:28:28 [crit] 21472#21472: *323765 SSL_do_handshake() failed (SSL: error:1417D18C:SSL routines:tls_process_client_hello...
<p>My issue is with HAPROXY health check configuration I set to <code>ssl-hello-chk</code> now I changed it to <code>tcp-check</code> error message stopped.</p> <p>change this:</p> <pre><code>mode tcp balance leastconn option ssl-hello-chk </code></pre> <p>to</p> <pre><code> mode tcp bal...
<p>I am trying to setup spinnaker with kubernetes and getting an error: user cannot list namespace.</p> <p>I don't have access to list namespace in cluster scope. Is it possible to set up and apply hal configuration without access to list namespaces at cluster scope? if yes, please let me know the steps.</p> <p>Below...
<p>Short answer: no.</p> <p>You can try to get your admin to give you access to a <code>ClusterRole</code>+<code>RoleBinding</code> that has access to namespaces read.</p> <p>Something like this:</p> <pre><code>kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: namespace-reader rules: - api...
<p>Grafana, service graph and zipking aren't deployed after the installation of Istio.There's no way to install these add-ons after the initial install of Istio?? </p>
<p>It depends on how did you install istio.</p> <p>if installed with helm install, then you can install add-ons using command like this:</p> <pre><code>helm upgrade istio istio-1.0.0/install/kubernetes/helm/istio --set grafana.enabled=true,servicegraph.enabled=true,tracing.enabled=true </code></pre> <p>or you instal...
<p>I'm running jobs on EKS. After trying to start a job with invalid yaml, it doesn't seem to let go of the bad yaml and keeps giving me the same error message even after correcting the file.</p> <ol> <li>I successfully ran a job.</li> <li>I added an environment variable with a boolean value in the <code>env</code> se...
<p>"yes" must be quoted in yaml or it gets treated as a keyword that means a boolean true</p> <p>Try this:</p> <pre><code>value: "yes" </code></pre>
<p>has anyone recently deployed a k8s application after standing up a cluster via devstack / Magnum?</p> <p>Using devstack (latest) I've successfully deployed a K8s cluster on OpenStack. This is on a single bare metal server running Ubuntu 18.04.</p> <pre><code>openstack coe cluster template create k8s-cluster-templa...
<p>The issue appears to be a bug in the interaction between Kubenetes and Cinder in the latest devstack code (as of 19-Sep-2018). I backed off and deployed using the stable/queens branch and both the issues (cmd line args missing / PVC unbound) have gone away. I can successfully deploy MariaDB to a 2 - node cluster cre...
<p>When I run Kubernetes in Docker for Mac, the Kube API only seems to be accessible from a secure endpoint of <a href="https://localhost:6443/" rel="nofollow noreferrer">https://localhost:6443/</a></p> <p>With minikube I was able to use an insecure endpoint for Kube API like <a href="http://localhost:8080/" rel="nofo...
<p>You may be running an old version of Kubernetes with minikube.</p> <p>The default insecure port for the kube-apiserver is 8080, but that's disabled on the latest Kubernetes versions in the kube-apiserver with the flag: <code>--insecure-port=0</code>.</p> <p>You can always delete that line from your <code>/etc/kube...
<p>I am trying to set up Kubernetes cluster on Azure ubuntu-16.04 LTS VM. I installed docker 17.03.2~ce-0~ubuntu-xenial version on VM and followed all steps mentioned on kubernetes official website but while running kubeadm command on my master node I am getting error.</p> <p>My init command:</p> <pre><code> kubeadm in...
<p>You have a newer version of the <code>kubelet</code> - <code>v1.12.0-rc.1</code> than that of <code>kubeadm</code> - <code>v1.11.3</code>. You can try:</p> <ol> <li><p>Downgrading the kubelet to match your kubeadm version</p> <p>On Ubuntu run: <code>apt-get -y install kubelet=1.11.3-00</code></p></li> <li><p>The ...
<p>Is there any shortcut or kubectl command or REST API call to get a list of worker nodes only. ( not including the master nodes )</p> <p><strong>Update</strong>: For the masters we can do like this:</p> <pre><code>kubectl get nodes --selector=node-role.kubernetes.io/master </code></pre> <p>for the workers I dont s...
<p>You can get roles/labels of your nodes by </p> <pre><code>kubectl get nodes --show-labels </code></pre> <p>in my case, I do have three nodes each having the given roles and labels:</p> <pre><code>NAME STATUS ROLES AGE VERSION LABELS host01 Ready controlplane,etcd,wo...
<p>I have tried to set up PodSecurityPolicy on a 1.10.1 cluster installed on ubuntu 16.04 with kubeadm, have followed the instructions at <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/" rel="noreferrer">https://kubernetes.io/docs/concepts/policy/pod-security-policy/</a></p> <p>So I altered th...
<p>I have written a blog post on how I figured this stuff out, short answer was</p> <ul> <li>On master run kubeadm init with the PodSecurityPolicy admission controller enabled</li> <li>Add some pod security policies with RBAC config - enough to allow CNI and DNS etc. to start <ul> <li>CNI daemonsets will not start wi...
<p><strong>Intro:</strong></p> <p>On AWS, Loadbalancers are expensive ($20/month + usage), so I'm looking for a way to achieve flexible load-balancing between the k8s nodes, without having to pay that expense. The load is not that big, so I don't need the scalability of the AWS load balancer any time soon. I just need...
<p>Here is something what would be useful in your case <a href="https://github.com/unibet/ext_nginx" rel="nofollow noreferrer">https://github.com/unibet/ext_nginx</a> but I'm note sure if project is still in development and configuration is probably hard as you need to allow external ingress to access internal k8s netw...
<p>I have a (containerized) web service talking to an external CloudSQL service in Google Cloud. I've used the sidecar pattern in which a Google Cloud SQL Proxy container is next to the web service and authenticates+proxies to the external CloudSQL service. This works fine. Let's call this Deployment "deployment-api" w...
<p>In raw Kubernetes means? No.</p> <p>But I strongly encourage you to use Helm to deploy your application(s). With helm you can easily adapt manifest based on variables provided for each environment (or defaults). For example with variable <code>postgresql.proxy.enabled: true</code> in defaults and</p> <pre><code>{{...
<p>I am using micro-service to access hadoop and hbase to get data but it's not accessible from pod.</p> <p>It shows only: </p> <pre><code>INFO ipc.Client: Retrying connect to server: hdpcluster.internal/10.160.0.2:8020. Already tried 3 time(s); maxRetries=45 </code></pre> <p>IP <code>10.160.0.2</code> is accessible...
<p>You probably need to open a firewall rule to allow port 8020 on your Hbase nodes that your Kubernetes nodes can connect to them. Something like this on your Hbase firewall rules (for your Hbase nodes):</p> <p><a href="https://i.stack.imgur.com/oNExP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.co...
<p>We are working on migrating our application into kubernetes. We use apache camel to process very large files. But the problem is that when we migrate to kubernetes, there will be more than one pod and there is high chance that pods often restart. If the restart happens in the middle of the processing of a huge file,...
<p>I acknowledge that there are a lot of situations that can lead to a pod restart in a Kubernetes cluster, but the problems you describe applies to camel applications running outside Kubernetes as well. </p> <p>To answering your questions, in case of an application restart in the middle of the processing of a large f...
<p>I'm new to kubernetes and I'm setting up my first testing cluster. However, I'll get this error when I set up the master node. But I'm not sure how to fix it.</p> <pre><code>[ERROR KubeletVersion]: the kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a...
<p>I hit the same problem and used the kubeadm option: --kubernetes-version=v1.12.0-rc.1</p> <blockquote> <p>sudo kubeadm init --pod-network-cidr=172.16.0.0/12 --kubernetes-version=v1.12.0-rc.1</p> </blockquote> <p>I'm using a JVM image that was prepared a few weeks ago and have just updated the packages. Kubeadm, ...
<p>I have two ASP.NET Core apps. One is a Headless CMS (API), and the other one is a Razor Pages blog front-end (with a REST client that communicates with the Headless CMS/API).</p> <p>I then have an Azure AKS cluster. In it I have an ingress resource with the following routes (as per the instructions from the followi...
<h2>Problem</h2> <p>It seems that your proxy rewrites the path.</p> <ul> <li>Before proxy: /blog/images/banner1.png</li> <li>After proxy: /images/banner1.png</li> </ul> <p>Asp generates absolute (host relative) links (path only, but starting with a slash "/"). That means, we have to tell the framework that it must p...
<p>I am using <a href="https://github.com/jenkinsci/kubernetes-plugin" rel="nofollow noreferrer">jenkinsci/kubernetes-plugin</a> to provision slave pods in my Jenkins builds. I need to specify these pods' cpu and memory limit and request params. It can be done directly in the pipeline configuration, as shown <a href="h...
<p>I have found and option to configure it hidden under advanced options:</p> <p><a href="https://i.stack.imgur.com/h6Xwp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h6Xwp.png" alt="enter image description here"></a></p>
<p>I'm new to OpenShift (I've been using marathon/DCOS before) and I'm willing to install an Elastic stack on it, all the tutorials I've found online are describing it as a "complicated task"</p> <p>So here's my question, Am I looking for something impossible/not recommended?</p> <p>Thank you very much.</p>
<p>It's so much of a complicated task but it really depends on your experience. OpenShift essentially runs on top of Kubernetes and there are plenty of tutorials on how to install ELK or Elasticsearch on Kubernetes. </p> <p>Perhaps there's a little less information about OpenShift specifically, but you can start with ...