prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I've thought about this a lot but can't come up with a solution I'm happy with. </p> <p>Basicly this is the problem: Log 100k+ Chats (some slower, some faster) into cassandra. So save userId, channelId, timestamp and the message.</p> <p>Cassandra already supports horizontal scaling out of the box, I have no issue ...
<p>I think in this case looking for a description of existing algorithm might be not very useful: the problem is not complicated and generic enough to be worth publication. </p> <p>As described, the problem could be solved by using Cassandra itself as a mediator and to share chat channel assignment information among t...
<p>Integrated kubernetes with jenkins and run the command in Jenkins file <code>kubectl create -f deployment.yaml --validate=false</code> and getting the error:</p> <pre><code>unable to recognize "deployment.yaml": no matches for extensions/,Kind=Deployment </code></pre> <p>But if I run the same command in terminal I...
<p>I suppose your minikube (if you are checking in your local machine) is NOT running. Start minikube using the following command</p> <ul> <li>$minikube start</li> </ul> <p>Now try </p> <ul> <li>$kubectl create OR</li> <li>$kubectl apply</li> </ul>
<p>I've installed the Kubernetes dashboard, and created a service account user with the appropriate permissions, however logging in with a token fails for some reason.</p> <p>I see the following logs:</p> <pre><code>2018/08/17 14:26:06 [2018-08-17T14:26:06Z] Incoming HTTP/2.0 GET /api/v1/csrftoken/login request from ...
<p>As <a href="https://github.com/floreks" rel="noreferrer">floreks</a> wrote on <a href="https://github.com/kubernetes/dashboard/issues/3216#issuecomment-414042254" rel="noreferrer">GitHub</a> :</p> <blockquote> <p>NOTE: Dashboard should not be exposed publicly over HTTP. For domains accessed over HTTP it will not ...
<p>I was reading about <a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/" rel="nofollow noreferrer"><strong>Pod Priority and Preemption</strong></a>, I had a question in my mind. </p> <p>Lets say A is higher priority pod and B is lower one. B is already running , A came along and now ...
<p>Answer is Yes.</p> <blockquote> <p>If a pending Pod has inter-pod affinity to one or more of the lower-priority Pods on the Node, the inter-Pod affinity rule cannot be satisfied in the absence of those lower-priority Pods. In this case, the scheduler does not preempt any Pods on the Node. Instead, it looks for an...
<p>The Flink official documentation provides a <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.6/ops/jobmanager_high_availability.html" rel="nofollow noreferrer">jobmanager high availability</a> solution for Standalone And Yarn Flink clusters. But what should be done for high availability using a Kub...
<p>The <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.6/ops/jobmanager_high_availability.html" rel="nofollow noreferrer">official doc says</a> that high availability for the job manager is to deal with cases where the job manager crashes. So there is only a single job manager needed but you want to ...
<p>When I run <code>kubectl -n abc-namespace describe pod my-pod-zl6m6</code>, I get a lot of information about the pod along with the Events in the end. </p> <p>Is there a way to output just the Events of the pod either using <code>kubectl describe</code> or <code>kubectl get</code> commands?</p>
<p>You can use the <code>event</code> command of <code>kubectl</code>.</p> <p>To filter for a specific pod you can use a field-selector:</p> <pre><code>kubectl get event --namespace abc-namespace --field-selector involvedObject.name=my-pod-zl6m6 </code></pre> <p>To see what fields are possible you can use <code>kube...
<p>I have a virtualbox <code>development</code>:</p> <pre><code>$docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS development - virtualbox Running tcp://*.*.*.*:**** v18.05.0-ce </code></pre> <p>Inside <code>development</code> I have this:</p> <pre><...
<p>you can use docker push command </p> <pre><code>docker push imageTagName </code></pre> <blockquote> <p><a href="http://docs.docker.com/engine/reference/commandline/push" rel="nofollow noreferrer">http://docs.docker.com/engine/reference/commandline/push</a></p> </blockquote> <p>For your own registry you can use<...
<p>I have a multinode kubernetes cluster. Multiple services are deployed as Pods. They communicate over each other via rabbitmq which also exists as Pod in the Cluster. </p> <h2>Problem Scenario:</h2> <p>Many time services fails to connect to required queue in the Rabbitmq. Log for the same are reported in Rabbitmq p...
<p>I'd suggest implementing http endpoint for liveness probe that would check statew of the connection to rabbitmq or actualy failing miserably and exiting whole process when rabbit connection does not work.</p> <p>But... the best solution would be to retry the connection indefinitely when it fails so a temporary netw...
<p>I am writing a custom Kubernetes controller and resource to keep track of the number of times a service object is called. The idea behind this is to add a "hitcount" field to the resource and update it every time a service is invoked. (Meaning update the count every time a request is made to the pod that is part of ...
<p>it sounds like you're in fact trying to implement a metric inside kubernetes api. It's hardly a controller though. In a nutshell, controller is piece of software that continuously realizes an intent stated in kubernetes API in a real world. </p> <p>Semantics aside, status object in kubernetes API is defined in it's...
<p>I'm trying to set up a simple HTTP to HTTPS redirect for traffic going to a Kubernetes cluster. The SSL termination is happening on the ELB. When I try to use the <code>nginx.ingress.kubernetes.io/ssl-redirect = true</code> it results in an infinite redirect which led me to setting up a config map to handle this (<...
<p>The issue was the target port I was using on the load balancer not matching the port the redirection server was listening on:</p> <pre><code>ports: - name: http port: 80 protocol: TCP targetPort: http </code></pre> <p>This was just sending everything to port 80. It should have been this:</p> <pre><c...
<p>I am currently trying to use the "--overrides" option in k8s to mount a local directory that a docker container can access and then run a command against that container utilizing that directory.</p> <pre><code>kubectl run -i --tty cic-v1 --image=image1 --restart=Never --overrides={"spec":{"volumeMounts":[{"name":"i...
<p>Answer found here.</p> <p><a href="https://stackoverflow.com/a/37621761/6309">https://stackoverflow.com/a/37621761/6309</a></p> <p>I was incorrectly specifying the 'overrides' option in k8s.</p>
<p>I am not sure I am understanding Kubernetes Init containers properly. What i want to do is run an initialization on the pod so that it pip installs some additional libraries that are not in my app container image. Specifically I am wanting to install the Azure storage queue such that i can use it with the standard T...
<p>That's not really how init containers work... Init containers are meant to initialize the <strong>pod</strong> and the image isn't really shared with other containers that will later run on that pod.</p> <p>The best solution is to create a new container image including the Python modules you need.</p> <p>An altern...
<p>I'm working on the microservices project that is the dockerized Spring Cloud Netflix project and contains 3 microservices except for some Netflix services which are turbine,zipkin,discovery,configserver etc , yet. </p> <p>(Its just working on locally now..)</p> <p>Soon, I decided to deploy my project to a cloud pr...
<p>I think that Christian Posta article you refer to is very good. As he says, you can deal with the most common use-cases with the out of the box Kubernetes solutions for discovery (kub dns), load-balancing (with Services) and edge services/gateway (Ingress). </p> <p>As Christian also points out, if you need to dynam...
<p>Assume a VM with 4 cores. I have a docker image which has a web application that provides some REST services. I am using K8S to deploy this application on that VM. So, is there any difference if I use a single pod on the single VM vs mutiple pods on the same host, in terms of performance. </p> <p>For people who d...
<p>Personally, I think the performance had better to run <code>multiple pods</code> on the same host. I don't know what <code>web server</code> you use, but the requests are processed by <code>limited cpu time</code>, though it has <code>multiple processes</code> or <code>threads</code> for work. Additionally it's more...
<p>When i execute </p> <blockquote> <p>kubectl proxy </p> </blockquote> <p>it gives me o/p: Starting to serve on 127.0.0.1:8001 on virtual machine </p> <p>i want to see dashboard on host machine it gives me problem.</p> <blockquote> <p>192 168 113 8001 api namespaces kube system services https kubernetes dashbo...
<p>If you use kubectl proxy, you should then access the dashboard with the URL <a href="http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/" rel="nofollow noreferrer">http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/</a> from the ...
<p>I'm trying to secure Nifi in a Kubernetes cluster, behind a Traefik proxy. Both are running as services in K8S. Traefik is secured with a public certificate. I want it to redirect calls to nifi, while securing the communication between Traefik (as an Ingress Controller) and the backend pods : Nifi.</p> <p>Looks lik...
<p>I had the same problem and could solve it with the <code>insecureSkipVerify</code> flag.<br> The problem with traefik is, that NiFi gets the request from traefik and sends it's self signed certificate back to traefik for hand shaking. Traefik doesn't accept it, thus the handshake fails, leading to a <code>bad_certif...
<p>I followed the <a href="https://learn.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks" rel="nofollow noreferrer">guide here</a> (Grant AKS access to ACR), but am still getting "unauthorized: authentication required" when a Pod is attempting to pull an image from ACR.</p> <p>The bash script ...
<p>The link you posted in the question is the correct steps for Authenticate with Azure Container Registry from Azure Kubernetes Service. I tried before and it works well.</p> <p>So I suggest you can check if the service-principal-ID and service-principal-password are correct in the command <code>kubectl create secret...
<p>I am trying to create a system health check. I would like to be able to determine how often the pods are restarting. Since the pods have liveness probes, they may continuously restart if something is wrong. Is there anyway to check the time a pod restarted at instead of just the number of restarts and the total time...
<p>You may want to use a <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/" rel="nofollow noreferrer">monitoring tool</a>, like cAdvisor/Heapster/Grafana/Prometheus.</p> <p>Another option you have is to deploy the <a href="https://github.com/kubernetes/kube-state-metrics" r...
<p>I have suchlike problem:</p> <pre><code> spec: hostname: kafka containers: - name: kafka image: registry/wurstmeister:latest imagePullPolicy: Always restartPolicy: Always env: - name: HOSTNAME_COMMAND valueFrom: fieldRef: {fieldPath: metadata.name} - name: KAFK...
<p>You can use <code>$(ENV_NAME)</code> format inside other config, The details is here, <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config" rel="nofollow noreferrer">Using environment variables inside of your config...
<p>I'm using fabric8 maven plugin in order to deploy my spring boot services on kubernetes.</p> <p>Nevertheless, I'd like to deploy other kind of services, like postgresql, hashicorp vault, so on so forth.</p> <p>So I've my <code>configmap.yaml</code>, <code>deploymentconfig.yaml</code>, <code>service.yaml</code> and...
<p>As @<a href="https://stackoverflow.com/users/873601/vishal-biyani">Vishal Biyani</a> says, the best choice for deploying instances of third-party applications is probably helm. There are public charts available with installation instructions for <a href="https://hub.kubeapps.com/charts/stable/postgresql" rel="nofoll...
<p>I am following this <a href="https://cloud.spring.io/spring-cloud-pipelines/single/spring-cloud-pipelines.html#jenkins-pipeline-k8s" rel="nofollow noreferrer">tutorial</a> and I am facing build failure in 'deploy to test' stage when this <a href="https://github.com/spring-cloud-samples/github-webhook-kubernetes" rel...
<p>It was a bug <a href="https://github.com/spring-cloud/spring-cloud-pipelines/issues/187" rel="nofollow noreferrer">https://github.com/spring-cloud/spring-cloud-pipelines/issues/187</a>. Please try again using the latest commits from the master branch</p>
<p>I have configured my Kubernetes cluster in GCP as follows,</p> <p><strong>ingress.yaml</strong></p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress annotations: kubernetes.io/ingress.class: "gce" kubernetes.io/ingress.global-static-ip-name: "ip-name" ingress.kubernet...
<p>GCE ingress doesn't support <code>ingress.kubernetes.io/rewrite-target</code>, so your application pod is receiving paths of the form <code>/myService/api/test</code>, and it's returning the HTTP/404 because of that.</p>
<p>I was performing a practical where i was deploying a containerised sample application using kubernetes.</p> <p>i was trying to run container on google cloud platform using kubernetes engine.But while deploying container using "kubectl run" command using google cloud shell.</p> <p>its showing an error "<strong><em>...
<p>You may try following steps,</p> <ol> <li><p>List all the available clusters,</p> <pre><code>$ gcloud container clusters list </code></pre></li> <li><p>Depending upon how you have configured the cluster, if the cluster location is configured for a specific zone then,</p> <pre><code>$ gcloud container clusters get...
<p>Can I run both docker swarm and kubernetes on same nodes , can overlay network and kubernetes internal cluster network work together ?</p>
<p>Technically yes, but it's not as good an idea as it sounds at first. Unfortunately it confuses Kubernetes about the amount of resources available on the nodes.</p>
<p>I want to deploy a .NET Core app with NGINX reverse proxy on Azure Kubernetes Service. What is the best way to organize the pods and containers?</p> <ol> <li><p>Two single-container pods, one pod for nginx and one pod for the app (.net-core/kestrel), so each one can scale independently of the other</p></li> <li><p>...
<p>The best practice for inbound traffic in Kubernetes is to use the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a> resource. This requires a bit of extra setup in AKS because there's no built-in ingress controller. You definitely don't want to do #2 bec...
<p>I am new to kubernetes. The whole setup I have configured in Minikube. I am not sure it should different than any other kubernetes setup. </p> <p>I have created a POD in my setup and an spring boot application is running inside on 8080 port and this service to expose to Cluster on 20080 port.</p> <p>I am running a...
<p>The POD that is running tcpdump can only see its own netns, except you run the POD with the <code>hostNetwork: true</code> option. </p> <p>So maybe what you can do is running POD with <code>hostNetwork: true</code> option, then use tcpdump to monitor the host's physical interface to grab the network packages on po...
<p>Im having trouble invoking functions using kubeless. Here is the function spec</p> <pre><code>--- apiVersion: kubeless.io/v1beta1 kind: Function metadata: name: smk namespace: smktest spec: handler: hello.handler runtime: python2.7 function: | import json def handler(): return "...
<blockquote> <p>When I try to call the function as below,</p> <p><code>kubeless function call smk</code></p> <p>I get</p> <p><code>FATA[0000] Unable to find the service for smk</code></p> <p>Running <code>kubeless function ls --namespace=smktest</code></p> </blockquote> <p>Then surely you would n...
<p>I am getting started with Airflow and trying to use the KubernetesPodOperator, but I am having trouble with downloading images from private registries. I did some research but I couldn't find an answer to my problem.</p> <p>Putting it simply: can I use private images from DockerHub with the KubernetesPodOperator?</...
<p>It looks like <a href="https://github.com/apache/incubator-airflow/blob/1.10.0rc4/airflow/contrib/kubernetes/pod_generator.py#L28" rel="nofollow noreferrer">pod_generator.PodGenerator</a> accepts some kind of object <code>kube_config</code> that <a href="https://github.com/apache/incubator-airflow/blob/1.10.0rc4/air...
<p>I made a customer-pod (including image with a spring boot application running on port 8080).</p> <p>** On the yaml file, I didnt explicitly write container port number like spec:containers:port:8080.</p> <pre><code>kind: Pod apiVersion: v1 metadata: name: customer-pod spec: containers: - name: customer-pod...
<p>You do not open port in kubernetes. By default, all pods can communicate to each other, in most setups also node-to-port will be allowed. Refering to Docker you mean the port mapping <code>-p</code> option, which also is not port opening (you can access docker container ports if you use container IP even if not mapp...
<p>I am trying to create a Helm Chart with the following resources:</p> <ol> <li>Secret</li> <li>ConfigMap</li> <li>Service</li> <li>Job</li> <li>Deployment</li> </ol> <p>These are also in the order that I would like them to be deployed. I have put a hook in the Deployment so that it is post-install, but then Helm do...
<p>Helm collects all of the resources in a given Chart and it's dependencies, groups them by resource type, and then installs them in the following order (see <a href="https://github.com/helm/helm/blob/release-2.10/pkg/tiller/kind_sorter.go#L29" rel="noreferrer">here</a> - Helm 2.10):</p> <ol> <li>Namespace</li> <li>R...
<p>I created a cluster:</p> <pre><code>gcloud container clusters create test </code></pre> <p>so there will be 3 nodes:</p> <pre><code>kubectl get nodes NAME STATUS ROLES AGE VERSION gke-test-default-pool-cec920a8-9cgz Ready &lt;none&gt; 23h v1.9.7-gke.5 gk...
<p>After running <code>kubectl delete node gke-test-default-pool-cec920a8-9cgz</code> run <code>gcloud compute instances delete gke-test-default-pool-cec920a8-9cgz</code></p> <p>This will actually delete VM (<code>kubectl delete</code> only "disconnects" it from the cluster). GCP will recreate the VM and it will auto...
<p>I was configuring the gce ingress on my kubernetes cluster and I specified a Django application as default backend. The app enforces HTTPS so if you try to do a simple HTTP request Django will return a 301. Obviously HTTP health check will not pass. I was following this <a href="https://github.com/kubernetes/ingress...
<p>As a workaround, I disabled the <code>DJANGO_SECURE_SSL_REDIRECT</code> and forced the ingress to accept only HTTPS request in case of GCE ingress. <code>kubernetes.io/ingress.allow-http: "false"</code></p> <p>If you are using NGINX as ingress just set <code>nginx.ingress.kubernetes.io/ssl-redirect: "True"</code></...
<p>Is it enabled by default? How could I set up an example audit log?</p> <p>I've tried:</p> <pre><code>minikube start --extra-config=apiserver.Authorization.Mode=RBAC --extra-config=apiserver.Audit.LogOptions.Path=/var/log/apiserver/audit.log --extra-config=apiserver.Audit.LogOptions.MaxAge=30 --extra-config=apiserv...
<p>As far as I know and as per all available information: There is no way no enable audit log on minikube. Its under implementation <a href="https://github.com/kubernetes/minikube/issues/2934" rel="nofollow noreferrer">right now</a> and lets hope kube team will shortly release this feature. </p>
<p>I want to add role from namespace <code>kube-system</code> in my <code>MyRoleBinding.yaml</code> file like that:</p> <pre><code>kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: myrolebinding namespace: default subjects: - kind: ServiceAccount name: myservice namespace: default ...
<p>The <code>roleRef</code> field doesn't support namespace. You can use <code>roleRef</code> either with ClusterRoles which are not namespaced or with Roles which always has to be in the same namespace as the RoleBinding. See also the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#rolere...
<p>A Kubernetes StatefulSet (v1.8) will automagically rollover the pods it is managing to a new image if you patch the image name in the StatefulSet spec -- orchestrating this kind of update is one of its main jobs, after all. However, if deployment of a revised image fails at the image pull step (say, there was a typ...
<p>I've raised the same issue on <a href="https://github.com/kubernetes/kubernetes/issues/67250" rel="nofollow noreferrer">GitHub</a>. The answer right now is that, no, there is no option for that, and that the documentation is probably lacking. We are starting a discussion to see if there is any way to improve this. R...
<p>I am trying to get the "user" and "pw" variables to resolve in a heredoc that is wrapped with single quotes because it is part of a larger command. I believe that as described here <a href="https://stackoverflow.com/questions/4937792/using-variables-inside-a-bash-heredoc">Using variables inside a bash heredoc</a> th...
<p>Put double quotes around the string in the variable assignment, so that variables will be expanded in it.</p> <pre><code>doc="mongo &lt;&lt;END use DATABASE db.auth('$user', '$pw') db.collection.find() END " </code></pre>
<p>I have a K8S cluster launched using kops with topology=private and networking=weave. Want to mount an EFS volume to my pods but the EFS endpoint is not resolving inside pods.</p> <p>I suspect because of internal routing(weave) the name resolution is not forwarding to subnet DNS server (correct me if I am wrong).</p...
<p>This issue is resolved after enabling "DNS hostname resolution" for the specific VPC.</p>
<p>We have a simple release test for a <code>Redis</code> chart. After running <code>helm test myReleaseName --tls --cleanup</code>, we got </p> <pre><code>RUNNING: myReleaseName-redis ERROR: timed out waiting for the condition </code></pre> <p>There are several issues in Github repository at <a href="https://github....
<p>This first looks puzzling and shows little information because <code>--cleanup</code> will kill the pods after running. One can remove it to get more information. I, thus, reran the test with </p> <pre><code>helm test myReleaseName --tls --debug </code></pre> <p>Then use <code>kubectl get pods</code> to examine th...
<p>I'm trying to automatically provision a loadbalancer on GCP by using the <code>ingress</code> object with our GKE cluster.</p> <p>I have three GKE deployments and each is available with a service on port <code>8080</code> with a unique nodePort. </p> <p>When using <code>ingress-fanout.yaml</code>, it creates 4 bac...
<p>First of all, "backends" have nothing to do with the "paths" you specified. "backends" on GCP Console are pointing to your GKE node pools.</p> <p>Ingress supports adding a default backend. You could have tried just searching for "ingress default backend". You can find documentation about this here: <a href="https:/...
<p>In my docker image I have a directory <code>/opt/myapp/etc</code> which has some files and directories. I want to create statefulset for my app. In that statefulset I am creating persistent volume claim and attach to <code>/opt/myapp/etc</code>. Statefulset <code>yaml</code> is attached below. Can anyone tell me ho...
<p>check if you have storage class defined in your cluster. <code> kubectl get storageclass </code> If your are using default storage class as host-path(in case of minikube) then you do not need to include storage class into your template.</p> <p><code> volumeClaimTemplates: - metadata: name: data spec: access...
<p>I'm running a Google Kubernetes Engine with the "private-cluster" option. I've also defined "authorized Master Network" to be able to remotely access the environment - this works just fine. Now I want to setup some kind of CI/CD pipeline using Google Cloud Build - after successfully building a new docker image, thi...
<p>It's <strong>currently</strong> not possible to add Cloud Build machines to a VPC. Similarly, Cloud Build does not announce IP ranges of the build machines. So you can't do this today without creating a "ssh bastion instance" or a "proxy instance" on GCE within that VPC.</p> <p>I suspect this would change soon. GCB...
<p>I have setup k8s cluster using kismatic and created CI/CD pipeline in gitlab. K8s cluster is in aws ec2 single instance. So how to connect gitlab with k8s cluster + helm to deploy the images. </p>
<p>All newer versions of k8 have rbac enabled so the token runner will ultimately be using will have to be clusterbinding or you won't be able to deploy outside of the namespace of the token</p> <p>1) If you use a runner with persistent state such as an ec2 instance then you can just copy over your working kubeconfig ...
<p>I'm trying to scale my docker containers with Minikube on Windows 10 Enterprise Edition. However, I'm running into a few conflicts with Hyper-V and VirtualBox. I know Dockers require Hyper-V to run properly while Minikube requires VirtualBox to run (shows an error if Hyper-V is enabled) </p> <pre><code>C:\WINDOWS\s...
<blockquote> <p>I also tried running minikube with Hyper-V driver, but also get this error:</p> </blockquote> <p>There is an explicit warning about that HyperV and vswitch situation in their docs: <a href="https://github.com/kubernetes/minikube/blob/v0.28.2/docs/drivers.md#hyperv-driver" rel="nofollow noreferrer">ht...
<p>Hi I am managing a Kubernetes cluster that has been created with Kops. I recently updated Kubernetes to <code>1.9.9</code> and executed a rolling-update to the cluster. All seems to have gone well, except a new annoying problem arised:</p> <p>My Kubernetes api server becomes unavailable in a very sporadic unexpecte...
<p>I posted this same question on <a href="https://github.com/kubernetes/kops/issues/5557" rel="nofollow noreferrer">kubernets/kops</a> github repository when @justinsb pointed me into the right direction. He advised to ssh into the master node and do a <code>docker ps</code> to see if all containers were stable.</p> ...
<p>The environment I'm working with is a secure cluster running cockroach/gke. </p> <p>I have an approved default.client.root certificate which allows me to access the DB using root, but I can't understand how to generate new certificate requests for additional users. I've read the cockroachDB docs over and over, and ...
<p>The <code>request-cert</code> job is used as an init container for the pod. It will request a client or server certificate (the server certificates are requested by the CockroachDB nodes) using the K8S CSR API.</p> <p>You can see an example of a client certificate being requested and then used by a job in <a href="...
<p>While creating service with node port in Play with kubernetes its not exposing the url to access the service</p> <p>I think its happening very frequently now, does any one facing this issue?</p>
<p>NodePort never "exposes URL". NodePort is only creating a specific forwarding/nat rules to make sure trafic from port X on all nodes running kube-proxy is "redirected" to endpoints of service Y.</p>
<p>How can be quota set on Kubernetes using label selector like: </p> <pre><code>apiVersion: v1 kind: ResourceQuota metadata: name: thequota-for-restrictedsoftware spec: hard: pods: "3" selector: matchLabels: restricted: true </code></pre>
<p>I've spent some time digging in the documentation and trying to find the answer to your question, and I'm not 100% sure, but it is not possible at this moment in the way you need it.</p>
<p>I'm struggling with finding a way to include the <a href="https://docs.helm.sh/chart_template_guide/#built-in-objects" rel="noreferrer">Release.Time</a> builtin as part of a helm name. </p> <p>If I just include it as: <code>name: {{ template "myapp.name" . }}-{{ .Release.Time }}</code></p> <p>Dry run shows this: <...
<p>To format timestamp, you can use <code>date FORMAT TIME</code> from Sprig doc. And because <code>.Release.Time</code> got removed in Helm 3, you have to use <code>now</code> instead:</p> <pre><code>{{ now | date &quot;20060102150405&quot; }} </code></pre> <p>Refer the format options: <a href="https://golang.org/pkg/...
<p>Is there a way to tell <code>k8s</code> to delete the oldest <code>pods</code> in the <code>deployment</code> first?</p> <p>For instance I have a <code>deployment</code> which consist of 3 pods. I then decided to scale it up by adding 3 more <code>pods</code>:</p> <pre><code>kubectl scale deployment some-deploymen...
<p>This is an open <a href="https://github.com/kubernetes/kubernetes/issues/45509" rel="nofollow noreferrer">issue</a>. You may find <a href="https://github.com/kubernetes/kubernetes/issues/4301" rel="nofollow noreferrer">this related item</a> interesting. Currently you are not able to do it. Let's hope it will be fixe...
<p>I was looking into Kubernetes Heapster and Metrics-server for getting metrics from the running pods. But the issue is, I need some custom metrics which might vary from pod to pod, and apparently Heapster only provides cpu and memory related metrics. Is there any tool already out there, which would provide me the fun...
<p>What you're looking for is application &amp; infrastructure specific metrics. For this, the <a href="https://www.influxdata.com/time-series-platform/" rel="nofollow noreferrer">TICK</a> stack could be helpful! Specifically Telegraf can be set up to gather detailed infrastructure metrics like Memory- and CPU pressur...
<p>I have this weird error plaguing me.</p> <p>I am trying to get an activemq pod running with a kubernetes stateful set, volume attached. </p> <p>The activemq is just a plain old vanila docker image, picked it from here <a href="https://hub.docker.com/r/rmohr/activemq/" rel="nofollow noreferrer">https://hub.docker.c...
<blockquote> <p>WARN | Failed startup of context o.e.j.w.WebAppContext@478ee483{/admin,file:/opt/apache-activemq-5.15.4/webapps/admin/,null}</p> <p>java.lang.IllegalStateException: Parent for temp dir not configured correctly: writeable=false</p> </blockquote> <p>Unless you altered the <code>activemq</code> use...
<p>I'm trying to expose a Kubernetes pod on a single node bare metal cluster without a domain. In my understanding I've the these options:</p> <ol> <li>Expose using NodePort</li> <li>Expose using an Ingress controller</li> <li>Expose using ClusterIP and manually set an external IP</li> </ol> <p>As I mentioned alread...
<p>Why not Option 3 ? you can setup externalIPs to your node ip.</p> <pre><code>apiVersion: v1 kind: Service ... spec: externalIPs: - your node ip </code></pre> <p>Also with NodePort, the service port can be specified.</p>
<p>I'm flabbergasted.</p> <p>I have a staging and production environment. Both environments have the same deployments, services, ingress, firewall rules, and both serve a <code>200</code> on <code>/</code>. </p> <p>However, after turning on the staging environment and provisioning the same ingress, the staging servic...
<p>Yesterday even this guide <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer" rel="noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer</a></p> <p>didn't work. Don't know what happened but even waiting 30minutes + the ingress was reporting UNKNOWN state f...
<p>Is there any method of setting <strong>default</strong> QoS for all of the nodes from given namespace? Or just set QoS on namespace level instead of pod level. I mean the situation where every existing and every newly created pod will have this default setting for given namespace.</p> <p>Eg. All pods in namespace <...
<p>It's possible. Some basic information about QoS:</p> <blockquote> <p>Kubernetes uses QoS classes to make decisions about scheduling and evicting Pods.</p> <h3>For a Pod to be given a QoS class of Guaranteed:</h3> <ul> <li>Every Container in the Pod must have a memory limit and a memory request, and they must be the ...
<p>I have created a fresh kubernetes cluster on VirtualBox. I have one master node and two worker nodes. I want to use the dashboard but I get error. When I run <code>kubectl proxy</code> the master start listening on port 8001:</p> <pre><code>Starting to serve on 127.0.0.1:8001 </code></pre> <p>and then I create a S...
<blockquote> <p>I want to use the dashboard but I get error.</p> </blockquote> <p>According to the excerpts from <a href="https://github.com/kubernetes/dashboard" rel="nofollow noreferrer">the dashboard documentation</a>, after successful default installation of the dashboard (the default Dashboard deployment contai...
<p>I'm trying to get my head around Persistent Volumes &amp; Persistent Volume Claims and how it should be done in Helm...</p> <p>The <strong>TLDR</strong> version of the question is: How do I create a PVC in helm that I can attach future releases (whether upgrades or brand new installs) to? </p> <p><strong>My curren...
<p>It will be a headache indeed. </p> <p>Let's start with how you should do it to achieve scalable deployments with RWO storages that are attached to your singular pods when they are brought up. This is where volumeClaimTemplates come into play. You can have PVC created dynamicaly as your Deployment scales. This howev...
<p>looking a guide to install kubernetes over AWS EC2 instances using kops <a href="https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4" rel="nofollow noreferrer">Link</a> I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and e...
<blockquote> <p>I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and etcd nodes</p> </blockquote> <p>The correct way, and the way almost every provisioning tool that I know of does this, is to use either an Elastic Load Balancer (ELB) or the new Network Load Balancer (NLB) ...
<p>I can run ejabberd service on docker swarm. Do I Deployment a ejabberd service on kubernetes ?</p> <p>YML for swarm:</p> <pre><code>version: "3.3" services: ejabberd: image: ejabberd/ecs:18.03 networks: - backend ports: - 5222:5222 - 5269:5269 - 5280:5280 volumes: -...
<p>This is a basic deployment yaml file for kubernetes without volumes. you can add some volume mounts also depending how are you using them.</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: ejabberd-deployment labels: app: ejabberd spec: replicas: 1 selector: matchLabels: app:...
<p>I need to generate my own SSL certificates for Kubernetes cluster components (apiserver, apiserver-kubelet-client, apiserver-etcd-client, front-proxy-client etc.). The reason for this is because Validity period for those certificates are set to 1 year by default and I need to have validity set to more than one year,...
<p>I found out reason why it did not worked.</p> <p>When creating .csr file i used this:</p> <pre><code>openssl req -new -key apiserver-kubelet-client.key -out apiserver-kubelet-client.csr -subj "/O=system:masters,CN=kube-apiserver-kubelet-client" </code></pre> <p>But in -subj was wrong formatting which caused probl...
<p>So I am trying to build a helm chart.</p> <p>in my templates file I've got a file like:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: config-map data: {{ Do something here to load up a set of files | indent 2 }} </code></pre> <p>I have another directory in my chart: <code>configmaps</code> where...
<p>I had same problem for a few weeks ago with adding files and templates directly to container. </p> <p>Look for the sample syntax: </p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: nginx-configmap-{{ .Release.Name }} namespace: {{ .Release.Namespace }} labels: chart: "{{ .Chart.Name }}-{{ .C...
<p>I am trying to further understand what exactly is happening when I provision a private cluster in Google's Kubernetes Engine.</p> <p>Google provides this example here of provisioning a private cluster where the control plane services (e.g. Kubernetes API) live on the <code>172.16.0.16/28</code> subnet.</p> <p><a hre...
<p>The <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters" rel="noreferrer">Private Cluster</a> feature of GKE depends on the <a href="https://cloud.google.com/vpc/docs/alias-ip" rel="noreferrer">Alias IP Ranges</a> feature of VPC networking, so there are multiple things happening when you...
<p>I'm having trouble deleting custom resource definition. I'm trying to upgrade kubeless from v1.0.0-alpha.7 to <strong>v1.0.0-alpha.8</strong>.</p> <p>I tried to remove all the created custom resources by doing </p> <pre class="lang-sh prettyprint-override"><code>$ kubectl delete -f kubeless-v1.0.0-alpha.7.yaml de...
<p>So it turns out , the root cause was that Custom resources with finalizers can &quot;deadlock&quot;. The CustomResource &quot;functions.kubeless.io&quot; had a</p> <pre><code>Finalizers: customresourcecleanup.apiextensions.k8s.io </code></pre> <p>and this is can leave it in a bad state when deleting.</p> <p><a h...
<p>I’m looking for a way to differentiate between Prometheus metrics gathered from different dynamically discovered services running in a Kubernetes cluster (we’re using <a href="https://github.com/coreos/prometheus-operator" rel="nofollow noreferrer">https://github.com/coreos/prometheus-operator</a>). E.g. for the met...
<blockquote> <p>Is there a way to implement this over Prometheus itself, e.g. that Prometheus adds a service-specific label per time series after a scrape?</p> </blockquote> <p>This is how Prometheus is designed to be used, as a target doesn't know how the monitoring system views it and prefixing metric names makes ...
<p>I'm using config maps to inject env variables into my containers. Some of the variables are created by concatenating variables, for example:</p> <p>~/.env file</p> <pre><code>HELLO=hello WORLD=world HELLO_WORLD=${HELLO}_${WORLD} </code></pre> <p>I then create the config map</p> <p><code>kubectl create configmap ...
<p>I can't find any documentation on interpolating environment variables, but I was able to get this to work by removing the interpolated variable from the configmap and listing it directly in the deployment. It also works if all variables are listed directly in the deployment. It looks like kubernetes doesn't apply in...
<p>I would like to expose a port on an <code>initContainer</code> in a Kubernetes <code>Job</code> I am working on. So far I have been unsuccessful in doing so, and when reading through <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#detailed-behavior" rel="nofollow noreferrer">the docs</a>...
<p>It is an ambiguous choice of words but the upshot is you cannot access the initContainer through a Service. </p> <p>Kubernetes Services provide access to a set of Pods by matching to their labels. In this sense a service is an aggregator. I think this is the intended meaning. </p> <p>There can also be multiple con...
<p>I'm using minikube to run kubernetes locally. My local k8s have two pods which one of them is PostgreSQL and another one is my own app. I've mounted a <code>PersistentVolume</code> and <code>PersistentVolumeClaim</code> in order to make a stateful pod for PostgreSQL:</p> <pre><code>kind: PersistentVolume apiVersion...
<p>Change:</p> <pre><code>volumeMounts: - mountPath: /var/lib/postgresql </code></pre> <p>to</p> <pre><code>volumeMounts: - mountPath: /var/lib/postgresql/data </code></pre> <p>With the wrong mountPoint postgres executables were overridden.</p> <p>I attach an image with the data I see from inside the pod (on t...
<p>If I have a buggy app in a container that is constantly writing to an emptyDir volume it could use up all the space on the worker node and affect the performance of other pods / containers on the node. Thus breaking the expectation that containers are isolated from each other what one container does should not negat...
<p>You can set <code>sizeLimit</code> on the volume (see <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#emptydirvolumesource-v1-core" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#emptydirvolumesource-v1-core</a>). Setting this will, once t...
<p>I am following the <a href="https://github.com/kelseyhightower/kubernetes-the-hard-way" rel="nofollow noreferrer">https://github.com/kelseyhightower/kubernetes-the-hard-way</a></p> <p>After completing the installation getting following issue:</p> <blockquote> <p>kubectl get po —all-namespaces</p> </blockquote> ...
<p>You get the error:</p> <pre><code>x509: certificate is valid for 10.240.0.10, 10.240.0.11, 10.240.0.12, 35.240.168.187, 127.0.0.1, not 10.32.0.1 </code></pre> <p>It sounds to me that you may have forgotten a certificate configuration for <code>kube-apiserver</code>.</p> <p>Check all controller machines and if the...
<p>I am running a java application on tomcat in a k8s cluster, I am using a prestop lifecycle hook to run <code>/usr/local/tomcat/bin/shutdown.sh</code> before the container gets terminated. Also defining a termination grace period of 60 secs. </p> <p>expected behaviour: tomcat shutsdown gracefully when I kill a pod o...
<p>found the issue:</p> <p>I was running this prestop lifecycle hook:</p> <p>lifecycle: preStop: exec: command: [&quot;/usr/local/tomcat/bin/catalina.sh stop&quot;]</p> <p>It should be something like:</p> <p>lifecycle: preStop: exec: command: [&quot;/usr/local/tomcat/bin/catalina.sh stop &amp;&amp; sleep 30&quot;]</p> ...
<p>In <a href="https://github.com/kubernetes/client-go/blob/79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562/tools/cache/reflector.go#L100" rel="nofollow noreferrer">this</a> reflector package it mentions an unstable value being used as a name suffix. It's the number of nanoseconds modulo 12345. Is this meaningful or is it jus...
<p>The meaning seems clear:</p> <blockquote> <p><a href="https://github.com/kubernetes/client-go/commit/755bbca820db30c1a1d071d0ab4709fc49c003a5" rel="nofollow noreferrer">Kubernetes-commit: 1da4f4a745bf536c34e377321a252b4774d1a7e0</a></p> <p>tools/cache/reflector.go</p> <pre><code>// reflectorDisambiguator is...
<p>I deployed prometheus server (+ kube state metrics + node exporter + alertmanager) through the <a href="https://github.com/helm/charts/tree/master/stable/prometheus" rel="nofollow noreferrer">prometheus helm chart</a> using the chart's default values, including the chart's default <a href="https://github.com/helm/ch...
<p>I was able to figure out how to add the "missing" labels by navigating to the prometheus service-discovery status UI page. This page shows all the "Discovered Labels" that can be processed and kept through relabel_configs. What is processed/kept shows next to "Discovered Labels" under "Target Labels". So then it ...
<p>I am new to cluster container management, and this question is the basis for all the freshers over here.</p> <p>I read some documentation, but still, my understanding is not too clear, so any leads.. helping to understand?</p> <ol> <li>Somewhere it is mentioned, Minikube is used to run Kubernetes locally. So if we...
<p>Presuming that your goal here is to run a set of containers over a number of different Raspberry Pi based nodes:</p> <ul> <li><p>Minikube isn't really appropriate. This starts a single virtual machine on a Windows, MacOS or Linux and installs a Kubernetes cluster into it. It's generally used by developers to quickl...
<p>I'm attempting to deploy a parallelized data processing task that uses many containers of the same docker image which would each run with different incrementing environment variables. The image is setup to read env vars in order to determine which segment of a larger list to process.</p> <p><strong>Background:</str...
<p>What about using <a href="https://kubernetes.io/docs/tasks/job/fine-parallel-processing-work-queue/" rel="nofollow noreferrer">Parallel Processing Using Work Queue</a> for passing different environment variables to your k8s job pods with .spec.parallelism. Although having a separate service for work queue may be lit...
<p>I have the following that config that works when I try <code>&lt;NodeIP&gt;:30080</code></p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: app-deployment spec: replicas: 3 template: metadata: labels: name: app-node spec: containers: - name: app ...
<p>Your ingress definition creates rules that proxy traffic from the <code>{path}</code> to the <code>{backend.serviceName}{path}</code>. In your case, I believe the reason it's not working is that <code>/app</code> is proxied to <code>app-service:80/app</code> but you're intending on serving traffic at the <code>/</co...
<p>I'm attempting to deploy a parallelized data processing task that uses many containers of the same docker image which would each run with different incrementing environment variables. The image is setup to read env vars in order to determine which segment of a larger list to process.</p> <p><strong>Background:</str...
<p>My understanding is you'd like to do something like <a href="https://kubernetes.io/docs/tasks/job/parallel-processing-expansion/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/job/parallel-processing-expansion/</a> where jobs are created from a template, one for each data item in a list. But you don't w...
<p>I have a Scala App running on a Service, using a PostgreSql Service, Tables are being created by the database management plugin (Slick)</p> <p>however, need to edit a particular table and I cant find it!</p> <p>postgres service:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: core-db spec: ports: ...
<p>Steps I would do to check where the problem are:</p> <ol> <li><p>the app is working so, if it's persisting data, these data should be somewhere. Try to <code>kubectl delete deploy core-db</code>. Is the app still working and saving data? </p> <p>I expected <code>no</code> as answer, and so we can go to the follow...
<p>Similar question: <a href="https://stackoverflow.com/questions/37449121/how-to-expose-kube-dns-service-for-queries-outside-cluster">How to expose kube-dns service for queries outside cluster?</a></p> <p>I have a PerconaDB instance in a VM in Google compute engine. Next to it is running Kubernetes cluster where serv...
<p>At this moment, the reverse DNS lookup or PTR type lookup for a POD IP is possible only in case of pods that are part of a headless service (details: <a href="https://github.com/kubernetes/dns/pull/25" rel="nofollow noreferrer">https://github.com/kubernetes/dns/pull/25</a>) but even that has it's limitations. Furthe...
<p>I'm trying to create a proper set of permissions for a serviceAccount. For some reason it seems to ignore the permissions I granted and gives me a bunch of errors because of that. I don't see what I did wrong. Did I apply something in the wrong namespace or similar?</p> <p>My Role:</p> <pre><code>kind: Role apiVer...
<p>Yes, it looks like you are applying the resources into a wrong namespace. If you want to set these permissions up for the namespace <code>kube-ingress</code>, you need to create the resources in this namespace.</p> <p>So you would add this line to the metadata of your <code>Role</code>, <code>RoleBinding</code> and...
<p>Is it possible to change the VPC of an already created EKS cluster? Or do I have to create a new one and there to select the new VPC?</p>
<p>you should be able to change the VPC configuration for the EKS cluster. However, as per the documentation which I found, it states that if VPC config is updated, the update type is replacement i.e., a new cluster will be created with the updated config.</p> <p>Please see <a href="https://docs.aws.amazon.com/AWSClou...
<p>I'm trying a Job deployment in kubernetes with the configuration below but I'm getting this error :</p> <pre><code>spec.template.spec.restartPolicy: Unsupported value: "Always": supported values: OnFailure, Never </code></pre> <p>It's like kubernetes doesn't read my restartPolicy configuration (set to never) or it...
<p>I was able to run it by removing 2 lines :</p> <pre><code>"jobTemplate": { "spec": { </code></pre> <p>And so the restartPolicy was at the wrong level in the json and wasn't read.</p>
<p>I am trying to make ignite deployed in k8s discoverable using <code>TcpDiscoveryKubernetesIpFinder</code>. I have also used all the deployment configurations as recommended in apache ignite documentation to make it discoverable. Ignite version is <code>v2.6</code>. When I try to access the ignite from another servic...
<p>According to the URL, the IP finder tries to use a service named <code>ignite</code>, while you create it by name <code>ignite-service</code>.</p> <p>You should provide both namespace and service name in the IP finder configuration:</p> <pre><code>&lt;bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubern...
<p>We have an Istio cluster and we are trying to configure horizontal pod autoscale for Kubernetes. We want to use the request count as our custom metric for hpa. How can we utilise Istio's Prometheus for the same purpose?</p>
<p>This question turned out to be much more complex than I expected, but finally here I am with the answer.</p> <ol> <li><p>First of all, you need to configure your application to provide custom metrics. It is on the developing application side. Here is an example, how to make it with Go language: <a href="https://my...
<p>I am following the Getting Started guide for Traefik from <a href="https://docs.traefik.io/" rel="nofollow noreferrer">here</a> and am trying to launch the service into Kubernetes (Minikube) instead of Docker:</p> <pre><code>Edit your docker-compose.yml file and add the following at the end of your file. # ... wh...
<p>I'm not sure if this is along the lines of what you're looking for, but Traefik has a <a href="https://docs.traefik.io/user-guide/kubernetes/" rel="nofollow noreferrer">small tutorial</a> for getting an Ingress controller set up on Kubernetes, with a <a href="https://docs.traefik.io/configuration/backends/kubernetes...
<p>I'm trying to access .NET Web API which I docker-ized and mounted in an Kubernet Cluster on Microsoft Azure.</p> <p>The application works fine on local docker machine. The cluster is running, my deployment was correct and the pods where created. Everything I check is fine, but I cannot access my application through...
<p>I would give the deployment/pods port a name (e.g. <code>http</code>) and then make the service serve off port 80 but target the pod port by name... that way you don't have to worry about port numbers when connecting to a service.</p> <p>Also, you shouldn't need or want to use <code>nodePort</code> if you are using...
<p>Is there any way to share the directory/files to kubernetes container from your local system?</p> <p>I have a deployment yaml file. I want to share the directory without using <code>kubectl cp</code>.</p> <p>I tried with <code>configmap</code> but I later came to know that configmap can not have the whole director...
<p>I found a way.</p> <p>We can specify the directory we want to add into container by using <code>hostPath</code> in <code>volumes</code></p> <pre><code> volumeMounts: - name: crypto-config mountPath: &lt;PATH IN CONTAINER&gt; - name: channel-artifacts mountPath: /opt/gopath/...
<p>I am facing this error from kubernetes cluster. Though it works perfectly from my local server. Here is my application.yml of SpringBoot App</p> <h1>spring:</h1> <pre><code>datasource: dataSourceClassName: org.postgresql.ds.PGPoolingDataSource url: jdbc:postgresql://${POSTGRES_HOST}:5432/test_db database...
<p><code>${POSTGRES_HOST}</code> is expecting a <a href="https://stackoverflow.com/questions/35531661/using-env-variable-in-spring-boots-application-properties">system environment variable</a> that you probably missing in the specific machine, add it for example:</p> <pre><code>export POSTGRES_HOST="1.1.1.1" </code></...
<p>I have an application running in Kubernetes. To take the advantage of rolling updates with no downtime, I have to implement the proper Health Checks, so the cluster can know when the application/container is ready to handle requests.</p> <p>I'm trying to use the <a href="https://blogs.msdn.microsoft.com/webdev/2018...
<p>A "degraded" check could be used for checks that did succeed but are slow or unstable. E.g. a simple database query did succeed but took more than a second. Moving traffic to another instance is probably a good idea until the problem has resolved.</p> <p>An "unhealthy" check means that the component does not work a...
<p>I have a public key that all my pods needs to have. </p> <p>My initial thought was to create a ConfigMap or Secret to hold it but as far as I can tell neither of those can be used across namespaces. Apart from that, it's really boiler plate to paste the same volume into all my Deployments</p> <p>So now I'm left wi...
<p>You can use Kubernetes initializers to intercept object creation and mutate as you want. This can solve copy-paste in all your deployments and you can manage it from a central location.</p> <p><a href="https://medium.com/google-cloud/how-kubernetes-initializers-work-22f6586e1589" rel="nofollow noreferrer">https://m...
<p>I have a Scala App running on a Service, using a PostgreSql Service, Tables are being created by the database management plugin (Slick)</p> <p>however, need to edit a particular table and I cant find it!</p> <p>postgres service:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: core-db spec: ports: ...
<p>Ok so, it happens that I just lacked some brain activity.</p> <p>All my tables are stored into Schemas, and that's the reason I can see them when I use \dt on any of the databases</p> <p>Connecting to the 'app' database and using \dn will list the schemas and thus, we can find the tables.</p> <p>Select "schema".t...
<p>Hello kubernetes experts,</p> <p>I've a kubernetes cluster running on 4 raspberry pis with docker 18.04ce and kubernetes 1.9.7.</p> <p>I deployed a service and this service can be accessed from within the cluster via the cluster IP. I also deployed an ingress as described in <a href="https://docs.traefik.io/user-g...
<p>I found a configuration how the ingress based on traefik works on my Raspberry Pi cluster with docker 18.04CE, kubernetes 1.9.7 and 2018-06-27-raspbian-stretch-lite.img:</p> <p>Use the DaemonSet definition from <a href="https://docs.traefik.io/user-guide/kubernetes/" rel="nofollow noreferrer">https://docs.traefik.i...
<p>I tried <code>kubectl rollout history deployment/my-app</code>, it returns only <code>No rollout history found.</code></p> <p>I think there exists a method to get all the deploy histories. It will be very helpful.</p> <p>Reference official document: <a href="https://kubernetes.io/docs/concepts/workloads/controller...
<p>Use <code>--record</code> while creating the deployment so that it will start recroding the deployment into the ReplicaSet.</p> <pre><code>$ kubectl create -f deploy.yaml --record=true </code></pre> <p>Whenever you deploy new version of deployment, the replica set preserves the previous configuration of the deploy...
<p>We have Zuul and Eureka both up and running on our kubernetes cluster. Zuul is registered with Eureka.</p> <p>I start up a new service called "Resource-Service" this correctly boots up and registers with Eureka, all services are up.</p> <p>When I attempt to hit Zuul endpoint to access "Resource-service" I get the...
<p>I think you've a mismatch between the host name being registered to Zuul and the one on which the service is reachable in k8s. Do 'kubectl get services' to find the names of your k8s services. Zuul will get the name that is registered to it from eureka (it seems you are registering names and not IPs). If you change ...
<p>I just started kubernetes with help of minikube in windows10 machine+Hyper V. deployed and exposed nginx container as followed but could not access the deployed application through minikube ip or inside the minikube server.</p> <pre><code> C:\WINDOWS\system32&gt;kubectl run nginx --image=nginx --port=809...
<p>The nginx dockerfile exposes port 80, but your pod is using port 8090. Run the deployment using the right port 80 should fix it:</p> <pre><code>kubectl run nginx --image=nginx --port=80 </code></pre>
<p>We would like to deploy Airflow application on Kubernetes on 2 Data centers.</p> <p>Airflow Schedular container generates DAGs for every 1min, 5mins and 10 mins. These DAGs are the tasks that will be assigned to Airflow Worker container.</p> <p>In the process of assigning tasks to Airflow worker, Airflow Schedular...
<p>Redis clustering would help with it, but it is a bit of a pain to set up and it's not a complete replacement for backups.</p> <p>In your case a much simpler solution in my opinion would be to incorporate a recovery procedure in your redis pod startup. You do not have a permanent data loss as you have your MariaDB s...
<p>I am trying to deploy Hyperledger Fabric on Kubernetes. Everything is working fine other than <code>peer chaincode instantiate</code>. Whenever I try to instantiate chaincode it keeps waiting for around 10-15 mins and then it throws timeout error as shown below:</p> <pre><code>Error: could not assemble transaction,...
<p>I found the solution. Adding <code>CORE_PEER_ADDRESSAUTODETECT</code> variable in env fixed the issue.</p> <p>So you should add</p> <pre><code>- name: CORE_PEER_ADDRESSAUTODETECT value: "true" </code></pre> <p>into your env</p>
<p>I am trying to setup kubernetes on my bare metal cluster using <code>kubeadm</code>. But during initialization <code>kubeadm init</code> i get following error :</p> <pre><code>[root@server docker]# kubeadm init [init] using Kubernetes version: v1.11.2 [preflight] running pre-flight checks [WARNING Firewalld...
<p>Error was due to enabled firewall in my system. I had to disable firewall using command </p> <pre><code>systemctl stop firewalld </code></pre>
<p>I'm in the process of migration of our application from single instance Docker-compose configuration to Kubernetes. I currently have the following example NGINX configuration, running as a reverse proxy of my application:</p> <pre><code>server { server_name example.com; ssl_certificate /etc/...
<p>After several hours of unsuccessful attempts to solve my issue, I did it with Nginx ingress controller and it works great! Here's the ingress configuration:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/configuration-snippet: | rewrite /pu...
<p>I am trying to setup kubernetes on my bare metal cluster using <code>kubeadm</code>. But during initialization <code>kubeadm init</code> i get following error :</p> <pre><code>[root@server docker]# kubeadm init [init] using Kubernetes version: v1.11.2 [preflight] running pre-flight checks [WARNING Firewalld...
<p>Try to restart kubelet:</p> <pre><code>systemctl restart kubelet </code></pre> <p>Then check if kubelet is active and running:</p> <pre><code>systemctl status kubelet </code></pre> <p>Check kubelet logs:</p> <pre><code>journalctl -xeu kubelet </code></pre> <p>If the restart of kubelet does not help, you can tr...
<p>The following deployment file is working if I'm uploading it from my local machine.</p> <pre><code>kind: Deployment apiVersion: apps/v1 metadata: name: api namespace: app spec: replicas: 2 selector: matchLabels: run: api template: metadata: labels: run: api spec: cont...
<p>Probably the <code>kubectl</code> version in your Jenkins server or agent is old. Try running <code>kubectl version</code> from the Jenkins job to check for mismatches.</p>
<p>I have my ssh private key (/home/user/.ssh/id_rsa) as a volume mounted secret in my container. Kubernetes seems to mount it with uid 0. However, my app runs as a specific user, and therefore can't access the ssh private key whose permission must be 600 at min. How can I change the ownership of my private key to refl...
<p>In Linux, usernames are mapped to a user id which can be seen with the command <code>id -u someusername</code>.</p> <p>SSH requires by default in many cases that your SSH key be owned by the user running SSH and be hidden to others <code>600</code></p> <p>Therefore, I highly recommend you copy your key instead of ...