prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I setup a <strong>self-hosted</strong> registry on my machine to store the docker image files to test it thoroughly using <strong>minikube</strong> (lightweight Kubernetes implementation for local development).</p> <p>Though I'm able to successfully push &amp; pull repositories from local registry using <strong>doc...
<p>Well, I wouldn't expect <strong>your</strong> <code>localhost</code> to be the same as <code>localhost</code> from <code>minikube</code>'s point-of-view. Actually, I wouldn't expect your localhost to be the same localhost from <em>anything</em> in the kubernetes world's point-of-view.</p> <p>So, some practical thin...
<p>I used helm stable charts to install mongodb in my AWS kubernetes cluster, when i run helm install mongodb for the first time, no issues all pod runs and i am able to access the db too.</p> <p>however, when i run helm install mongodb second time with new release name , pod logs shows that mongodb running successful...
<p>Yes, We can deploy multiple instances of mongodb on the same cluster using helm package.</p> <p>The above issue is due to not allocating enough resource for my pv(persistant volume), issue got resolved when i dedicated min of 1Gi of memory for my pv and created respected pvc. </p> <p>Once allocating enough resourc...
<p>We have helm charts to deploy our application. We use a <code>configuration.json</code> file for application properties and load them to config map. But users typically use their own configuration file. </p> <p>Default configuration.json file is packaged inside helm charts under data directoty. This file is read as...
<p>Adding custom configuration to a values file and execute <code>helm install</code> using <code>-f</code> flag is a solution.</p> <p>customValues.yaml</p> <pre><code>overrideConfig: true customConfig:{ //Add your custom json here as variable value } </code></pre> <p>Config map yaml </p> <pre><code>#If custom valu...
<p>It is a recommended best practice to not run dockerized Node.JS applications as PID 1 (see <a href="https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals" rel="noreferrer">https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals</a>) in...
<p>If you enable process (PID) namespace sharing for your pods, the init process (<code>pause</code>) will come from Kubernetes. If you have a separate process namespace for your containers, they need to include <code>tini</code> or another init process themselves.</p> <p>According to <a href="https://www.ianlewis.org...
<p>I have created a workload on Rancher. This workload created from an image which is hosted on a gitlab-ci project registry.</p> <p>I want to force rancher to download a new version of this image and upgrade workload.</p> <p>I want to do this from a .gitlab-ci.yml script. How to do this with Rancher <strong>version ...
<p>In rancher 2, much of the management of workloads is delegated to Kubernetes via its api or CLI (kubectl).</p> <p>You could patch the deployment to specify a new image/version, but if you are using a tag like <code>:latest</code> which moves, you will need to force Kubernetes to redeploy the pods by changing someth...
<ol> <li>I've created the persistent volume (EBS 10G) and corresponding persistent volume claim first. But when I try to deploy the postgresql pods as below (yaml file) :</li> </ol> <p><a href="https://i.stack.imgur.com/1bM88.png" rel="noreferrer">test-postgresql.yaml</a></p> <p>Receive the errors from pod:</p> <p><...
<blockquote> <p>So what's the way to correctly mount a postgresql volume using Aws EBS</p> </blockquote> <p>You are on a right path...</p> <p>Error you get is because you want to use root folder of mounted volume <code>/</code> as postgresql Data dir and postgresql complains that it is not best practice to do so si...
<p>I am very new to OpenWhisk and have some difficulties in the setup. The Ngnix Pod is running in a CrashLoopBackOff because of an error in the Pod.</p> <pre><code>2018/07/02 16:14:27 [emerg] 1#1: host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41 nginx: [emerg] host not found in resolver ...
<p>kubeadm gets and checks environment from your currently running host OS session.</p> <p>You can check if proxy has been set by executing the below command:</p> <pre><code>env | grep _proxy </code></pre> <p>In environments where a proxy server is configured to access the internet services, such as the Docker Hub o...
<p>I have a multiplayer application consisting of many containers and at the top level i have a REST API. I managed to run this application and i can access the rest api using the public ip. I am using the google cloud kubernetes engine. I would like to make many replicas of this multilayer application that each one s...
<p>You should use statefulsets. Then create as many load balancer services equal to your number of replicas. Use the custom labels that are added to the statefulset pods by default for selecting one service for one pod (see <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-identity" r...
<p>I'm running through what looks like a configuration issue! I am using traefik as ingress controller within kubernetes and I have an ingress to route some URLs to route some frontends to various backends. Let's say I have something like this:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: na...
<p><strong>Note:</strong> since the documentation is changed, I've updated the links, but content on the documentation pages would be different.</p> <p><code>ReplacePathRegex</code> is a <strong>modifier</strong> rule. According to <a href="https://doc.traefik.io/traefik/v1.7/basics/#modifiers" rel="nofollow noreferre...
<p>I am trying to create multiple roles in Kubernetes in a single YAML file.<br> I am not sure if it possible. </p> <p>This is what I tried: </p> <pre><code>cat &gt; ~/tmp/Role.yaml &lt;&lt;EOF kind: Role apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: namespace: default name: testRole1 rules: - apiG...
<p>I just received an answer from @liggitt. </p> <p>Need to add a record separator between them (<code>---</code>). </p>
<p>How can I create a Pod using REST API ? </p> <p>I checked the Kubernetes API documentation:<br> <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#-strong-write-operations-strong--54" rel="noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#-strong-write-oper...
<p>Need to translate the YAML file to JSON file: </p> <pre><code>cat &gt; nginx-pod.json &lt;&lt;EOF { "apiVersion": "v1", "kind": "Pod", "metadata": { "name": "nginx1" }, "spec": { "containers": [ { "name": "nginx", "image": "nginx:1.7.9...
<p>I try install kubernetes using kubespray</p> <p><a href="https://github.com/patsevanton/create-kubernetes-kubespray-gitlab-ci" rel="nofollow noreferrer">github repo</a></p> <p>Change clusterip to nodeport command line without editor</p> <pre><code>kubectl -n kube-system get service kubernetes-dashboard -o yaml &g...
<p>ClusterIP can't simply change to nodeport just by replace ClusterIP with NodePort, since the ClusterIP is the default, there is maybe no 'ClusterIP' in the definitions at all.</p> <p>You should delete everthing involve 'clusterIP/ClusterIP', then insert 'type: NodePort' in the proper place, something like:</p> <pr...
<p>EKS documentation says </p> <blockquote> <p>"When you create an Amazon EKS cluster, the IAM entity (user or role) is automatically granted system:master permissions in the cluster's RBAC configuration". </p> </blockquote> <p>But after the EKS cluster creation, if you check the aws-auth config map, it does NOT ha...
<p>I got to know the answer. Basically on the heptio server side component, the static mapping for system:master is done under /etc/kubernetes/aws-iam-authenticator/ (<a href="https://github.com/kubernetes-sigs/aws-iam-authenticator#3-configure-your-api-server-to-talk-to-the-server" rel="noreferrer">https://github.com...
<p>I have a working Kubernetes cluster that I want to monitor with Grafana.</p> <p>I have been trying out many dashboards from <a href="https://grafana.com/dashboards" rel="nofollow noreferrer">https://grafana.com/dashboards</a> but they all seem to have some problems: it looks like there's a mismatch between the Prom...
<p>The Prometheus node exporter changed a lot of the metric names in the 0.16.0 version to conform to new naming conventions.</p> <p>From <a href="https://github.com/prometheus/node_exporter/releases/tag/v0.16.0" rel="nofollow noreferrer">https://github.com/prometheus/node_exporter/releases/tag/v0.16.0</a>:</p> <bloc...
<p>I am testing Rancher 2 as a Kubernetes interface. Rancher 2 is launched with docker-compose, using image rancher/rancher:latest.</p> <p>Everything is Ok for clusters, nodes, pods. Then I try to secure some load balancers with certificates. Do do so, I install cert-manager from the catalog/helm.</p> <p><a href="htt...
<p>I just found an information to unblock the situation.</p> <p>Thanks to <a href="https://www.idealcoders.com/posts/rancher/2018/06/rancher-2-x-and-lets-encrypt-with-cert-manager-and-nginx-ingress/" rel="nofollow noreferrer">https://www.idealcoders.com/posts/rancher/2018/06/rancher-2-x-and-lets-encrypt-with-cert-mana...
<p>I have 6 google nodes with single core and kube-system pods take too much of CPU.</p> <pre><code> default scylla-2 200m (21%) 500m (53%) 1Gi (38%) 1Gi (38%) kube-system fluentd-gcp-v2.0.9-p9pvs 100m...
<p>As peer <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/" rel="nofollow noreferrer">the documentation</a> To specify a CPU request for a Container, include the <strong>resources:requests</strong> field in the Container’s resource manifest. To specify a CPU limit, include <strong...
<p>I need to point Ingress to images so that my Pods gets the URL, in full. I have the below config:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: solar-demo annotations: nginx.org/server-snippet: "proxy_ssl_verify off;" nginx.ingress.kubernetes.io/rewrite-target: / spec: ru...
<p>Here should be a working config:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: solar-demo annotations: kubernetes.io/ingress.class: "nginx" spec: rules: - host: shmukler.example.com http: paths: - path: /city backend: serviceName: solar-dem...
<p>I need advice in managing deployments in K8S. I need to have blue/green deployment, using gitops, and this leave me basically two options:</p> <h2>1. Use single namespace.</h2> <p>This will necessitate using helm to manage removing resources and whatnot, and by proxy managing blue/green through helm, and this in t...
<p>The official <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" rel="nofollow noreferrer">documentation</a> mentions the following:</p> <blockquote> <p>Namespaces are intended for use in environments with many users spread across multiple teams, or projects. For clusters with a f...
<p>I move kubernetes from Google GKE to own in house rack. What persistent storage should I use?</p> <p>Kubernetes Local Persistent became beta in 13th of April 2018 only <a href="https://kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/" rel="nofollow noreferrer">https://kubernetes.io/blog/2018/04/13/local...
<p>In Deployment files from GKE, you need to change <code>spec.volumes</code> settings according to your Persistent Volume setups.</p> <p>I recommend you to choose one of the following options:</p> <ol> <li><p>The easiest way is to use <code>HostPath</code>. It mounts a file or a directory from the host Node’s file s...
<p>I have tried to run this YAML fine, but I am getting the below issue 1 master <code>2</code> nodes has been configured and I ran kubectl get nodes output looks fine</p> <pre><code>kubectl apply -f https://k8s.io/examples/application/deployment.yaml </code></pre> <p>then I have downloaded the file locally and trie...
<p>This is a RBAC restriction about which you can read on <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="nofollow noreferrer">Kubernetes - Using RBAC Authorization</a> docs.</p> <p>You want to create your own <code>ServiceAccount</code> then <code>Role</code> and then bind them together ...
<p>I have a helm chart that requires <code>stable/redis</code> as a child chart. The parent chart needs to expose the redis service as an environment variable.</p> <p>The redis chart includes a template called <code>redis.fullname</code>. How can I refer to this in my parent chart? I.e. I want something like this in m...
<p>You can use <code>'{{ .Release.Name }}-redis'</code> in your parent chart. I had same requirement. This is my example in case you want to take a look -><a href="https://github.com/kubernetes/charts/tree/master/incubator/distribution" rel="nofollow noreferrer">https://github.com/kubernetes/charts/tree/master/incubato...
<p>I am using kubernetes 1.10 cluster and I want to schedule cron job which will use bash script to loop forever and send get request to http endpoint in every two seconds.</p> <p>Here is my job yaml:</p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: notifsender-sms-cron namespace: staging spec: tem...
<p>Minor modification:</p> <p>dollar sign <strong>$</strong> should be escaped -> <strong>\$</strong></p> <p>"<strong>\$exit_status</strong>" in place of $exit_status </p> <pre><code>bash -c " echo \"Running cron loop\"; while true; do exit_status=\$(curl -v -o /dev/null -w '%{ht...
<p>I need to set a custom error in traefik ingress on kubernetes so that when there is no endpoint or when the status is "404", or "[500-600]" it redirects to another error service or another custom error message I used the annotation as it's in the documentation in the ingress file as this (Note: this a helm template ...
<p>The answer by ldez is correct, but there are a few caveats:</p> <ul> <li>First off, these annotations only work for traefik >= 1.6.x (earlier versions may support error pages, but not for the kubernetes backend)</li> <li>Second, the traefik backend <strong>must</strong> be configured through kubernetes. You cannot ...
<p>i created user teamcity to be able to use <strong>kube-apiserver</strong> </p> <blockquote> <p>kubectl create serviceaccount teamcity</p> </blockquote> <p>With the command below i get the secrets name </p> <blockquote> <p>kubectl get accourcissements teamcity -o yaml</p> </blockquote> <p>To find the token ...
<p>It might be your typo the part of "bearer", as i remeber it's "Bearer".</p> <p>Some command sample is as follows, <a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api" rel="nofollow noreferrer">Kubernetes - Accessing Clusters</a></p> <pre><code>$ APIS...
<p>is it possible to deploy an ingress controller (nginx) without a public ip address? </p> <p>Thanks!</p>
<blockquote> <p>is it possible to deploy an ingress controller (nginx) without a public ip address?</p> </blockquote> <p>Without question, yes, if the Ingress controller's <code>Service</code> is of <code>type: NodePort</code> then the Ingress controller's private IP address is <strong>every</strong> <code>Node</cod...
<p>I am trying to mount a PV into a pod with the following:</p> <pre><code> { "kind": "PersistentVolume", "apiVersion": "v1", "metadata": { "name": "pv", "labels": { "type": "ssd1-zone1" } }, "spec": { "capacity": { "storage": "150Gi" }, "hostPath": { "path": "/mn...
<p>It looks like your /mnt/data is on root partition, hence it provides the same free space as any other folder in rootfs.</p> <p>The thing about requested and defined capacities for PV/PVC is that these are ony values for matching or hinting dynamic provisioner. In case of hostPath and manually created PV you can def...
<p>is there a way to scale dynamically the memory size of Pod based on size of data job (my use case)? </p> <p>Currently we have Job and Pods that are defined with memory amounts, but we wouldn't know how big the data will be for a given time-slice (sometimes 1000 rows, sometimes 100,000 rows).<br> So it will break i...
<p>It's a best practice always define <code>resources</code> in your container definition, in particular: </p> <ul> <li><code>limits</code>:the upper level of CPU and memory</li> <li><code>requests</code>: the minimal level of CPU and memory</li> </ul> <p>This allows the scheduler to take a better decision and it eas...
<p>Can we use nfs volume plugin to maintain the High Availability and Disaster Recovery among the kubernetes cluster?</p> <p>I am running the pod with MongoDB. Getting the error </p> <blockquote> <p>chown: changing ownership of '/data/db': Operation not permitted .</p> </blockquote> <p>Cloud any body, Please sugg...
<blockquote> <p>chown: changing ownership of '/data/db': Operation not permitted .</p> </blockquote> <p>You'll want to either launch the mongo container as <code>root</code>, so that you <em>can</em> <code>chown</code> the directory, or if the image prohibits it (as some images already have a <code>USER mongo</code>...
<p>Trying to add autoscaling to my deployment,but getting <code>ScalingActive False</code>,most answers are about DNS,Heapster,Limits I've done all but still can't find solution.</p> <pre><code>kubectl get hpa NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE fetch Deployment/fetc...
<p>I've experienced similar issues, my solutions are setting <code>resources.requests.cpu</code> section up in deployment config in order to calculate the current percentage based on the requested resource values. Your event log messages also means not to set up the request resource, but your deployment yaml seems no p...
<p>It might be a question based on curiosity which couldn't find help on google.</p> <p>Consider this part of the yaml for a headless service:</p> <pre><code>ports: - port: abcd --&gt; this line </code></pre> <p>My doubt is when the cluster-ip for a headless service is already none (as it is a set of pods that it ...
<blockquote> <p>But then, do we really have a use-case for the port functionality of a headless service?</p> </blockquote> <p>IMHO, yes: because the very idea of a <code>Service</code> is not "a random IP address" -- otherwise it would be called <code>DHCPIPAddress</code>. The idea of a <code>Service</code> in kuber...
<p>I have a web application consisting of a few services - web, DB and a job queue/worker. I host everything on a single Google VM and my deployment process is very simple and naive:</p> <ul> <li>I manually install all services like the database on the VM </li> <li>a bash script scheduled by crontab polls a remote git...
<blockquote> <p>I wonder if docker-compose is a reasonable choice for a simple web application.</p> </blockquote> <p>It can be, sure, if the development time is best spent focused on the web application and <em>less</em> on the non-web stuff such as the job queue and database. The other asterisk is whether the devel...
<p>Most tutorials I've seen for developing with Kubernetes locally use Minikube. In the latest Edge release of Docker for Windows, you can also enable Kubernetes. I'm trying to understand the differences between the two and which I should use.</p> <ol> <li>Minikube lets you choose the version of Kubernetes you want, c...
<p>I feel like you largely understand the space, and mostly have answers to your questions already. You might find <a href="https://docs.docker.com/docker-for-mac/docker-toolbox/" rel="noreferrer">Docker for Mac vs. Docker Toolbox</a> an informative read, even if it's about the Mac equivalent rather than Windows and a...
<p>I wrote a python script to dump my database, gzip it and move it to a cloud storage.</p> <p>Locally everything works smooth and consumses basically no memory (max 20MB RAM, CPU is quite high, I/O is at max).</p> <p><strong>When I run it as a job in my kubernetes cluster, the memory usage piles up to about 1.6 GB.</s...
<p>I reproduced your setup and the dump still works with more restrictive limits.</p> <p>I just set the ressource caps in the my-job.yml and it does not consume much memory any more:</p> <pre><code>resources: limits: memory: "100Mi" requests: memory: "50Mi" </code></pre>
<p>I have a very strange effect with a pod on Kubernetes: It tries to mount a volume of type <code>emptyDir</code>, but fails to do so. The events list of the pod brings up the following entries:</p> <pre><code>LAST SEEN FIRST SEEN COUNT NAME ...
<p>You don't use emptyDir in podSpec directly. I would suggest replacing PVC with just <code>emptyDir: {}</code> and checking if it solved things for you.</p> <p>If you want to still chase the PVC and PV approach, provide their manifests and describes. It's possible that ie. you have a PVC mound to PV with empty dir o...
<p>I am trying to make a <code>cron job</code> in Openshift but I got this error:</p> <pre><code>error: unable to parse "openshift/cronJob-template.yml", not a valid Template but *batch.CronJob </code></pre> <p>I ran this command:</p> <pre><code>oc process -f openshift/cronJob-template.yml -p namespace=test-project ...
<p>The template looks ok. Try run <code>oc create -f openshift/cronJob-template.yml -n test-project</code> instead.</p>
<p>I have some up &amp; running kubernetes cluster which potentially can produce a lot of logs. Kubernetes is running on top of docker so I think I need to <a href="https://docs.docker.com/config/containers/logging/json-file/" rel="noreferrer">configure dockerd to rollout logs</a>.</p> <p>I found some settings for log...
<p>Sadly it appears the configuration reload SIGHUP feature does not support all configuration options.</p> <p>The docs at <a href="https://docs.docker.com/v17.09/engine/reference/commandline/dockerd/#miscellaneous-options" rel="noreferrer">https://docs.docker.com/v17.09/engine/reference/commandline/dockerd/#miscellan...
<p>In the <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/resource-qos.md#qos-classes" rel="nofollow noreferrer">kubernetes documentation here</a> the conditions for a pod that is classified as <code>Burstable</code> in regards to resource QOS is defined as </p> <blockqu...
<p>The evaluation of the <strong>Quality of Service (QoS)</strong> is done by scheduler on the <strong>whole</strong> pod, i.e. container by container and then taking the lowest evaluation.</p> <p>Take a look at this example:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: class spec: containers: - name...
<p>I'm using python kubernetes 3.0.0 library and kubernetes 1.6.6 on AWS.</p> <p>I have pods that can disappear quickly. Sometimes when I try to exec to them I get ApiException <code>Handshake status 500</code> error status.</p> <p>This is happening with <code>in cluster configuration</code> as well as <code>kube con...
<p>I know that this question is a little old, but I thought I would share what I found when trying to use python/kubernetes attach/exec for several debugging cases (since this isn't documented anywhere I can find).</p> <p>As far as I can tell, it's all about making the keyword arguments match the actual container conf...
<p>I want to setup a PVC on AWS, where I need <code>ReadWriteMany</code> as access mode. Unfortunately, EBS only supports <code>ReadWriteOnce</code>.</p> <p>How could I solve this?</p> <ul> <li>I have seen that there is a beta provider for AWS EFS which supports <code>ReadWriteMany</code>, but as said, this is still ...
<h3>Using EFS without automatic provisioning</h3> <p>The EFS provisioner may be beta, but EFS itself is not. Since EFS volumes can be mounted via NFS, you can simply create a <code>PersistentVolume</code> with a NFS volume source manually -- assuming that automatic provisioning is not a hard requirement on your side:<...
<p>I'm trying to configure the kubernetes provider in Terraform, however I've been unable to do it so far. EKS uses heptio authenticator, so I don't have certificate paths I can provide to the Kubernetes provider. What is the right way to accomplish this?</p> <p>I already tried something like this:</p> <pre><code>pro...
<p>Such behaviour could be caused by known core bug: <a href="https://github.com/hashicorp/terraform/issues/12393" rel="nofollow noreferrer">core: No interpolation for cross-provider dependencies #12393</a>. </p> <p>There is an issue on the Terraform Github that describes a similar case with the same error - <a href="...
<p>We can use below command to install azure cli on Linux:</p> <p>curl -L <a href="https://aka.ms/InstallAzureCli" rel="nofollow noreferrer">https://aka.ms/InstallAzureCli</a> | bash</p> <p>But what if we want to install a specific version of azure cli lets say version 2.0.23 as 2.0.24 has some issue</p> <p>Please H...
<p>There is another way you can install and lock the version of CLI. Say you want to install 2.0.38 on Ubuntu 16.04: <code> sudo apt-get install -y azure-cli=2.0.38-1~xenial echo azure-cli hold | sudo dpkg --set-selection sudo apt-get upgrade -y </code></p>
<p>I was learning Kubernetes authentication, and authorization using RBAC. Now a question always puzzling me, How exactly the users in Kubeconfig file(eg /home/.kube/config) differ from the users of basic-auth-file in kube-apiserver startup command? </p> <p>I have gone through the offical documents, and there seems no...
<p>A kubeconfig file contains three types of stanzas: clusters, users, and contexts.</p> <ol> <li><p>A cluster stanza describes how kubectl should reach a particular cluster. It has the URL and optionally a CA bundle to use to verify a secure connection.</p></li> <li><p>A user stanza describes credentials kubectl shou...
<p>I have executed the samples from the book "Kubernetes Up and Running" where a pod with a work queue is run, then a k8s job is created 5 pods to consume all the work on the queue. I have reproduced the yaml api objects below.</p> <p>My Expectation is that once a k8s job completes then it's pods would be deleted but ...
<p>The <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="noreferrer">docs</a> say it pretty well:</p> <blockquote> <p>When a Job completes, no more Pods are created, but the Pods are not deleted either. Keeping them around allows you to still view the logs of comple...
<p>I'm trying to add helm to a micro-services project that is very similar to the eShopOnContainers example project. </p> <p><a href="https://github.com/dotnet-architecture/eShopOnContainers" rel="nofollow noreferrer">https://github.com/dotnet-architecture/eShopOnContainers</a></p> <p>My question is should the charts...
<p>My practical experience has been that, in a microservices architecture implemented using Helm, each individual service should have its own Helm chart.</p> <p>The real problem is that Helm doesn't deal well with recursive dependencies. A typical architectural statement is that each service has its own independent s...
<p>I am running Mongodb pod in kunernetes cluster using nfs volume.I am writing pod.yml like this</p> <p><a href="https://i.stack.imgur.com/qPtlS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qPtlS.png" alt="enter image description here"></a></p> <p>but i am getting the below error<a href="https:...
<blockquote> <p>I am running Mongodb pod in kunernetes cluster using nfs volume.I am writing pod.yml like this</p> </blockquote> <p>Putting <code>mongo</code> in the <code>command:</code> is erroneous. The <strong>daemon</strong> is <code>mongod</code> and the image <a href="https://github.com/docker-library/mongo/b...
<p>I created a gossip cluster in AWS using <strong>kops</strong>, which means my cluster name is ending with <strong>k8s.local</strong> (clusters.test.k8s.local to be exected ), All is working fine until I tried to create a deployment where the pod name needs to be with a domain at the end (api-manager.iot.test.co.nz)...
<p>after a lot of struggling, This is my solution:</p> <p><a href="http://kubernetes%20manual" rel="nofollow noreferrer">https://kubernetes.io/blog/2017/04/configuring-private-dns-zones-upstream-nameservers-kubernetes/</a></p> <p>1.) create a <strong>dnsmasq</strong> with this your domain configuration inside, you wi...
<p>I'm trying to locate a performance issue that might be network related. Therefore I want to inspect all packets entering and leaving a pod.</p> <p>I'm on kubernetes 1.8.12 on GKE. I ssh to the host and I see the bridge called <code>cbr0</code> that sees all the traffic. I also see a ton of interfaces named like <co...
<p>If you have <code>cat</code> available in the container, you can compare the interface index of the containers <code>eth0</code> with those of the <code>veth*</code> devices on your host. For example:</p> <pre><code># grep ^ /sys/class/net/vet*/ifindex | grep ":$(docker exec aea243a766c1 cat /sys/class/net/eth0/ifl...
<p>Looks like issues is because of CNI (calico) but not sure what is the fix in ICP (see journalctl -u kubelet logs below)</p> <p><strong>ICP Installer Log:</strong></p> <pre><code>FAILED! =&gt; {"attempts": 100, "changed": true, "cmd": "kubectl -n kube-system get daemonset kube-dns -o=custom-columns=A:.status.number...
<p>Firstly, from ICP 2.1.0.3, the insecure port 8888 for K8S apiserver is disabled, so you can not use this insecure port to talk to Kubenetes.</p> <p>For this issue, could you let me know the below information or outputs.</p> <ul> <li>The network configurations in your environment. -> ifconfig -a</li> <li>The route ...
<p>I have an existing system that uses a relational DBMS. I am unable to use a NoSQL database for various internal reasons.</p> <p>The system is to get some microservices that will be deployed using Kubernetes and Docker with the intention to do rolling upgrades to reduce downtime. The back end data layer will use the...
<p>I work in an environment that achieves continuous delivery. We use MySQL.</p> <p>We apply schema changes with minimal interruption by using <a href="https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html" rel="nofollow noreferrer">pt-online-schema-change</a>. One could also use <a href="htt...
<p>I have an existing system that uses a relational DBMS. I am unable to use a NoSQL database for various internal reasons.</p> <p>The system is to get some microservices that will be deployed using Kubernetes and Docker with the intention to do rolling upgrades to reduce downtime. The back end data layer will use the...
<p>All of the following under the assumption that I understand correctly what you mean by "rolling updates" and what its consequences are.</p> <p>It has very little (as in : nothing at all) to do with "relational DBMS". Flatfiles holding XML will make you face the exact same problem. Your "rolling update" will inevi...
<p>I am <strong>completely new</strong> to Kubernetes, so go easy on me.</p> <p>I am running <code>kubectl proxy</code> but am only seeing the JSON output. Based on <a href="https://github.com/kubernetes/dashboard/issues/2011" rel="nofollow noreferrer">this discussion</a> I attempted to set the memory limits by runni...
<p>Have you considered using the minikube dashboard? You can reach it by:</p> <pre><code>minikube dashboard </code></pre> <p>Also you will get json on <a href="http://127.0.0.1:8001/ui" rel="nofollow noreferrer">http://127.0.0.1:8001/ui</a> because it is deprecated, so you have to use full proxy URL as it states in t...
<p>I'm building a container cluster using CoreOs and Kubernetes on DigitalOcean, and I've seen that in order to expose a Pod to the world you have to create a Service with Type: LoadBalancer. I think this is the optimal solution so that you don't need to add external load balancer outside kubernetes like nginx or hapro...
<p>Things have changed, DigitalOcean created their own cloud provider implementation as answered <a href="https://github.com/kubernetes/kubernetes/issues/34783#issuecomment-357974666" rel="nofollow noreferrer">here</a> and they are maintaining a Kubernetes "<a href="https://kubernetes.io/docs/tasks/administer-cluster/r...
<p>Sorry if this sounds like I'm lazy, but I've search around, around and around, but couldn't find it!</p> <p>I'm looking for a reference that explains each of the fields that may exist in an OpenShift / Kubernetes template, e.g. what possible values there are.</p>
<p>The templates you get in OpenShift are OpenShift specific and not part of Kubernetes. If you mean the purpose of each of the possible fields you can specify for a parameter, you can run <code>oc explain template</code>. For example:</p> <pre><code>$ oc explain template.parameters RESOURCE: parameters &lt;[]Object&g...
<p>my question is simple.</p> <p>How to execute a bash command in the pod? I want to do everything with one bash command?</p> <pre><code>[root@master ~]# kubectl exec -it --namespace="tools" mongo-pod --bash -c "mongo" Error: unknown flag: --bash </code></pre> <p>So, the command is simply ignored.</p> <pre><code>[r...
<p>The double dash symbol &quot;--&quot; is used to separate the command you want to run inside the container from the kubectl arguments. So the correct way is:</p> <pre><code>kubectl exec -it --namespace=tools mongo-pod -- bash -c &quot;mongo&quot; </code></pre> <p>You forgot a space between &quot;--&quot; and &quot;b...
<p>I have created the single master kubernetes <code>v1.9.0</code> cluster using kubeadm command in bare metal server. Now I want to add two more master and make it multi master. </p> <p>Is it possible to convert to multi master configuration? Is there a document available for this type of conversation? </p> <p>I ...
<p>Yes, it's possible, but you may need to break your master setup temporarily. You'll need to follow the instructions <a href="https://kubernetes.io/docs/setup/independent/high-availability/" rel="noreferrer">here</a></p> <p>In a nutshell:</p> <p>Create a kubeadm config file. In that kubeadm config file you'll need ...
<p>When creating ingress, no address is generated and when viewed from GKE dashboard it is always in the <code>Creating ingress</code> status. Describing the ingress does not show any events and I can not see any clues on GKE dashboard.</p> <p>Has anyone has a similar issue or any suggestions on how to debug?</p> <p>...
<p>The problem in this case was I had did not include the addon <code>HttpLoadBalancing</code> when creating the cluster! My fault but was would have been noice to have an event informing me of this mistake in the ingress resource.</p> <p>Strange that when I created a new cluster to follow the tutorial cloud.google.co...
<p>I have a quick question regarding kubernetes yaml files :</p> <p>can I reference a node label value in a pvc, using a node label as variable?</p> <p>Something like :</p> <pre><code> volumes: - name: data-storage persistentVolumeClaim: claimName: main-dev-pvc-${node.failure-domain.beta.kubernete...
<p>Is the idea to force the use of PV created in a specific zone? <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/" rel="nofollow noreferrer">StorageClass</a> can help with that.</p> <p>Custom StorageClass:</p> <pre><code>apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ssd-usc1...
<p>Is there any resource out there that gives an overview of all the possible status conditions a kubernetes job can have?</p> <p>I'm wondering because I would like to check, when I run a job if it is already running and if so, exit the new job.</p> <p>I came across <code>until kubectl get jobs myjob -o jsonpath='{.s...
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#jobcondition-v1-batch" rel="noreferrer">kubernetes API docs for JobCondition</a> imply that the only <code>type</code> values are “Complete” and “Failed”, and that they may have a <code>”True”</code> or <code>”False”</code> <code>statu...
<p>Can I start minikube on a remote dedicated server to develope and test kubernetes with my team? For now we didn‘t want to make a real 3 node cluster to safe money and I only can find information about minikube running for locally development.</p>
<p>Minikube is only designed for local development. You need to deploy a Kubernetes cluster using something like <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/" rel="nofollow noreferrer">kubeadm</a></p>
<p>I'm having a dockerfile that runs fine with CentOS as a baseimage and enabled systemd, as suggested on CentOS official docker hub image documentation - <a href="https://hub.docker.com/_/centos/" rel="nofollow noreferrer">https://hub.docker.com/_/centos/</a>.</p> <p>I'll have to start my container using this followi...
<p>According to <a href="https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod" rel="nofollow noreferrer">the fine manual</a>, if you provide <code>command:</code> it supersedes <code>ENTRYPOINT</code>, and <code>args:</code> sup...
<p>I have created a Persistant Disk Claim for my Postgres Database. </p> <pre><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: creationTimestamp: null labels: io.kompose.service: pgdata name: pgdata spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Mi status: {} </...
<p>In the PersistenVolume manifest you can set the reclaiming policy (Retain or Delete, there was a third option now deprecated - Recycle):</p> <pre><code>persistentVolumeReclaimPolicy: Retain </code></pre> <p>Reference: <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes" rel="...
<p>I am trying to get Ansible AWX installed on my Kubernetes cluster but the RabbitMQ container is throwing "Failed to get nodes from k8s" error.</p> <p><strong>Below are the version of platforms I am using</strong> </p> <pre><code>[node1 ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"9", GitVersi...
<p>I <em>believe</em> the solution is to omit <a href="https://github.com/ansible/awx/blob/1.0.6/installer/roles/kubernetes/templates/deployment.yml.j2#L40" rel="nofollow noreferrer">the explicit kubernetes host</a>. I can't think of any good reason one would need to <em>specify</em> the kubernetes api host from inside...
<p>I'm learning Kubernetes. I have a 3 node cluster, to which I have deployed nginx with 3 replicas. Therefore I have 3 replicated nginx pods.</p> <p>I have provisioned a Load Balancer server to access these pods and exposed Port 80 - all this works fine.</p> <p>That is, until I try to update the website. I think may...
<p>Pods are considered disposable groupings of containers. You should not modify them directly instead use a <strong>Deployment</strong></p> <p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer">Kubernetes deployments</a></p> <p>There is a very nice interactive <...
<p>I have configured a working EFK(Elasticesearch,Fluentd,Kibana) in one of my kubernetes cluster builded in GCP. I have two more clusters and installed the same EFK in remaining too. Now If I want to monitor the logs of each cluster environment,then I need to check all the three kibana console. Please let me know is i...
<p>In fact <code>Kibana</code> only draws and allows to sort/manage data which exists in <code>Elasticsearch</code>. Let's say, you have 3 k8s clusters. Consequently, you have 3 <code>DaemonSet</code> of <code>Fluentd</code>. All you should do - is configure all <code>Fluentd</code> deployments to send data to the one ...
<p>I have installed the Edge version of Docker for Windows 18.05.0-ce (Windows 10 Hyper-V) and enabled Kubernetes afterwards.<br> On my other machine a kubectl context was created automatically, but on this new machine it was not.</p> <pre><code>&gt; kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO ...
<p>There is an issue with docker for windows when the <code>HOMEDRIVE</code> is set by a corporate policy.</p> <p>If you set the <code>$KUBECONFIG</code> environment variable to <code>C:\Users\my_username\.kube\config</code> (make sure the <code>$HOME</code> environment variables expand, don't use <code>$HOME</code> it...
<p>I am trying to start minikube behind a corporate proxy on Windows machine. I am using the following start command</p> <pre><code>minikube start --alsologtostderr --vm-driver="hyperv" --docker-env http_proxy=http://proxyabc.uk.sample.com:3128 --docker-env https_proxy=http://proxyabc.uk.sample.com:3128 --docker-env "...
<blockquote> <p><code>set NO_PROXY="$NO_PROXY,192.168.211.158/8443"</code></p> </blockquote> <p>That slash is not the port, it's the <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" rel="nofollow noreferrer">CIDR</a> which defines how many IPs should be excluded from the proxy. Separately, it a...
<p>guys I want to watch all kubernetes events and I find the source code here: <a href="https://github.com/kubernetes/client-go/blob/master/informers/events/v1beta1/event.go" rel="nofollow noreferrer">https://github.com/kubernetes/client-go/blob/master/informers/events/v1beta1/event.go</a></p> <p>However, I can not fi...
<p>I’d like to collect the event logs with <code>kubectl</code> or REST API[2] as JSON, then you can send the logs to <code>fluentd</code> for centralized monitoring such as Elasticsearch.</p> <p>Here is a good sample;[0], though it's OpenShift, but if <code>oc</code> cmd replace with <code>kubectl</code> cmd, it's ...
<p>I have a job definition based on example from kubernetes website.</p> <pre><code>apiVersion: batch/v1 kind: Job metadata: name: pi-with-timeout-6 spec: activeDeadlineSeconds: 30 completions: 1 parallelism: 1 template: metadata: name: pi spec: containers: - name: pi image: ...
<p>By now this is possible by setting <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy" rel="noreferrer"><code>backoffLimit: 0</code></a> which tells the controller to do 0 retries. default is 6</p>
<p>I've build the following script:</p> <pre><code>import boto import sys import gcs_oauth2_boto_plugin def check_size_lzo(ds): # URI scheme for Cloud Storage. CLIENT_ID = 'myclientid' CLIENT_SECRET = 'mysecret' GOOGLE_STORAGE = 'gs' dir_file= 'date_id={ds}/apollo_export_{ds}.lzo'.format(ds=ds) ...
<p>If it works in one environment and fails in another, I assume that you're getting your auth from a .boto file (or possibly from the OAUTH2_CLIENT_ID environment variable), but your kubernetes instance is lacking such a file. That you got a 403 instead of a 401 says that your remote server is correctly authenticating...
<p>I did K8s(1.11) cluster using kubeadm tool. It 1 master and one node in the cluster. </p> <ol> <li><p>I applied dashboard UI there. kubectl create -f <a href="https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml" rel="noreferrer">https://raw.githubuserconte...
<p>I recreated all the steps in accordance to what you've posted.</p> <p>Turns out the issue is in the <code>&lt;k8s master node IP&gt;</code>, you should use localhost in this case. So to access the proper dashboard, you have to use:</p> <p><a href="http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/https:...
<p>I have a .NET Core console application running in a docker container that I am deploying through Kubernetes. When I update the deployment image, I would like to keep the existing pod around for a while, without accepting new connections, but to keep existing connections alive for a period to allow existing users to ...
<p>The way the grace period works is that the main docker process is immediately sent a SIGTERM signal, and then it is allowed a certain amount of time to exit on its own before it is more forcefully shutdown. If your app is quitting right away, it is because it quits when it gets this signal.</p> <p>Your app could ca...
<p>guys I want to watch all kubernetes events and I find the source code here: <a href="https://github.com/kubernetes/client-go/blob/master/informers/events/v1beta1/event.go" rel="nofollow noreferrer">https://github.com/kubernetes/client-go/blob/master/informers/events/v1beta1/event.go</a></p> <p>However, I can not fi...
<p>One or several of these could help:</p> <ul> <li><p>"watches" for (quote) "...efficient change notifications on resources" - see <a href="https://kubernetes.io/docs/reference/using-api/api-concepts/" rel="nofollow noreferrer">Kubernetes API Concepts</a> as well as the <a href="https://kubernetes.io/docs/reference/#...
<p>I have a cluster running on GCP that currently consists entirely of preemtible nodes. We're experiencing issues where kube-dns becomes unavailable (presumably because a node has been preempted). We'd like to improve the resilience of DNS by moving <code>kube-dns</code> pods to more stable nodes.</p> <p>Is it possib...
<p>The solution was to use taints and tolerations in conjunction with node affinity. We created a second node pool, and added a taint to the preemptible pool.</p> <p>Terraform config:</p> <pre><code>resource "google_container_node_pool" "preemptible_worker_pool" { node_config { ... preemptible = true ...
<p>I am reading a blog to integrate EFK(a log system) into k8s in centos 7.4. There are following instructions:</p> <pre><code># mkdir ~/es_data # chmod g+rwx es_data # chgrp 1000 es_data # chown 1000 -R es_data # ls -l /root/es_data/ total 8 drwxrwxr-x 2 1000 1000 4096 Jun 8 09:50 ./ drwx------ 8 root root 4096 Jun...
<p><code>chown</code> changes the owner, <code>chgrp</code> changes the group. Because you have user and group both named <code>master16g</code> having <code>1000</code> as UID and GID respectively, this is why you see the user name and the group name on the list. <code>chown</code> accepts UID as parameter as well as ...
<p>For every command with <code>kubectl</code> I need to use <code>sudo kubectl</code>. </p> <p>I understand the security perspective but I am working on a test environment and I want to be able use it without <code>sudo</code>. </p> <p>I tried to run <code>sudo -i</code> and use the root account to run<code>kubect...
<p><strong>Fix file permissions</strong></p> <p>Most likely your kubectl files are not owned by your user.</p> <p>You can set these permissions using below command.</p> <pre><code>sudo chown -R $USER $HOME/.kube </code></pre> <p><strong>Run kubectl with sudo</strong></p> <p>Alternatively you can run kubectl as sud...
<p>I have config my ingress support SSL:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: "service" annotations: nginx.ingress.kubernetes.io/whitelist-source-range: "x.x.x.x/xx" nginx.ingress.kubernetes.io/ssl-redirect: "false" spec: tls: - hosts: - "example.com" secr...
<p>I have resolved my issue by add more config to nginx location (listen both http and https) by use <code>nginx.ingress.kubernetes.io/configuration-snippet</code> annotation.</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: "service" annotations: nginx.ingress.kubernetes.io/ssl-redi...
<p>I have kubernetes running on 4 centos 7 boxes, master and minions. I also have flannel and skydns installed. flannel overlay ip is 172.17.0.0/16 and my service cluster ip is 10.254.0.0/16. I'm running spinnaker pods on the k8 cluster. what I see is that the spinnaker services are unable to find each other. Each pod ...
<p>I have the same problem, and it turns out that the selector is wrong. After fixing that, everything works just fine.</p>
<p>how can I describe this command in yaml format?</p> <pre><code>kubectl create configmap somename --from-file=./conf/nginx.conf </code></pre> <p>I'd expect to do something like the following yaml, but it doesn't work </p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: somename namespace: default fro...
<p>That won't work, because kubernetes isn't aware of the local file's path. You can simulate it by doing something like this:</p> <pre><code>kubectl create configmap --dry-run=client somename --from-file=./conf/nginx.conf --output yaml </code></pre> <p>The <code>--dry-run</code> flag will simply show your changes on s...
<p>We can use below command to install azure cli on Linux:</p> <p>curl -L <a href="https://aka.ms/InstallAzureCli" rel="nofollow noreferrer">https://aka.ms/InstallAzureCli</a> | bash</p> <p>But what if we want to install a specific version of azure cli lets say version 2.0.23 as 2.0.24 has some issue</p> <p>Please H...
<p>If you want to get the complete list of versions for different distros: <a href="https://packages.microsoft.com/repos/azure-cli/dists/" rel="nofollow noreferrer">https://packages.microsoft.com/repos/azure-cli/dists/</a></p> <p>E.g Azure CLI versions for Ubuntu <a href="https://packages.microsoft.com/repos/azure-cl...
<p>I want to filter the output of a <code>kubectl</code> command running in <code>--watch</code> mode to keep an eye on changes to a certain k8s annotation. I'm using the following command:</p> <p><code>kubectl get pod my-pod --watch -o json | jq '.metadata.annotations["my-annotation"]'</code></p> <p>Problem is - not...
<p>So i've tested your command and it works perfectly. You are however missing a quote at the end of your command.</p> <pre><code>kubectl get pod nginx-5dfd5597bb-tp8h7 --watch -o json | jq '.metadata.name' </code></pre> <p>gives me </p> <pre><code>"nginx-5dfd5597bb-tp8h7" </code></pre> <p>if you can this command t...
<p>I recently started looking into istio and got confused by the destination rule configuration.</p> <p>Say I have a service A that have 10 pods running behind it. I pushed a destination rule that has two subsets with label version=v1 and version=v2.</p> <p>So I'm wondering what will happen to the 10 pods under the h...
<p>The general purpose is to set up <code>DestinationRule</code> resource in order to specify how the network traffic will reach your underlying Kubernetes cluster Pods. <code>Subsets</code> parameter in Istio defines labels that identify version specific instances. </p> <p>The below example of Istio <code>Destination...
<p>I'm looking for a way to deploy a pod on kubernetes to run for a few hours each day. Essentially I want it to run every morning at 8AM and continue running until about 5:30 PM. </p> <p>I've been researching a lot and haven't found a way to deploy the pod with a specific timeframe in mind. I've found cron jobs, but ...
<p>According to the Kubernetes architecture, a Job creates one or more pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the job tracks the successful completions. When a specified number of successful completions is reached, the job itself is complete. </p> <p>In ...
<p>How can I set the timeout for the kubectl exec command ?</p> <p>The below command does not work</p> <pre><code>kubectl exec -it pod_name bash --requrest-timeout=0 -n test </code></pre>
<p>You have a typo, try:</p> <pre><code>kubectl exec -it pod_name bash --request-timeout=0 -n test </code></pre> <p>See <a href="https://kubernetes.io/docs/reference/kubectl/kubectl/" rel="nofollow noreferrer">kubectl official documentation</a> about request-timeout</p> <pre><code>--request-timeout string ...
<p>i am trying to install a kops cluster on AWS and to that as a pre-requisite i installed kubectl as per these instructions provided,</p> <p><a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl" rel="noreferrer">https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl</a></p...
<p>Two things :</p> <ol> <li>If every instruction was followed properly, and still facing same issue. @VAS answer might help.</li> <li>However in my case, i was trying to verify with kubectl as soon as i deployed a cluster. It is to be noted that based on the size of the master and worker nodes cluster takes some time...
<p>I've got a problem with our Kubernetes not issuing certificates for kubelet.</p> <p>The kubelet is submitting CSR and this seems to get approved and at this point certificate should be issues but this step never seems to take place.</p> <p>I searched far and wide but nothing...</p> <pre><code>$ kubectl get csr NA...
<p>Just to let you know what was the original cause of the problem: somehow, and we still don't know how, the content of file holding the certificate on one of the master nodes (/srv/kubernetes/ca.crt) had its content duplicated. Strange... During troubleshooting we tested that certificate using openssl which read that...
<p>I have an angular app I'm trying to deploy to Kubernetes in Google Cloud. My problem is, that whenever I try to navigate to a path within the app that's not the root path, for example <a href="http://[ip]/demo" rel="noreferrer">http://[ip]/demo</a>, the request isn't routed in the application but in the container: I...
<p>You run into this issue, because k8s is trying to call the path /demo on your ingress, and there is no backend handling this path. This happens because of the angular history routing. </p> <p>It works in dev because the the dev http server is aware of that, because of this:</p> <pre><code>rewrites": [ { "source"...
<p>I have installed 3 servers kubernetes setup by following <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/</a> </p> <p>I created calico network service in the master node. my question shoul...
<p>Every single node needs calico service running, that's general knowledge.</p>
<p>I have a Kubernetes deployment that has 3 replicas. It starts 3 pods which are distributed across a given cluster. I would like to know how to reliably get one pod to contact another pod within the same <code>ReplicaSet</code>.</p> <p>The deployment above is already wrapped up in a Kubernetes <code>Service</code>. ...
<p>Ofcourse you can use statefulset, and ingress doesn't need ClusterIP that assigned to the service, since it uses the endpoints, so 'headless service' is ok.</p>
<p>I'm novice in using Kubernetes, Docker and GCP, sorry if the question is stupid and (or) obvious.</p> <p>I try to create simple gRPC server with http(s) mapping using as example Google samples. The issue is that my container can be started from Google cloud shell with no complains but fails on Kubernetes Engine aft...
<p>That was my stupid mistake. I changed the image, but the name of image was the same, so the cluster continued using the old wrong image thinking nothing changed. The right way to redeploy a code is create image with new tag, for instance v1.01 and set the new image for existing deployment as it is described in <a hr...
<p>I am trying to deploy a configmap onto a cluster </p> <pre><code>- name: Make/Update all configmaps on the cluster kubernetes: api_endpoint: blah url_username: blah url_password: blah inline_data: apiVersion: v1 kind: ConfigMap metadata: name: blah namespace: blah data: my-data.txt: "{{ data }}" state: ...
<p>This seems to be similar to <a href="https://github.com/kubernetes/kubernetes/issues/36222" rel="noreferrer">kubernetes/kubernetes issue 36222</a> when creating configMap from files.</p> <p>In your case, that happens when created from a <code>data</code> block.</p> <p>The recent <a href="https://github.com/kubernete...
<p>We have Spring Boot service running in Kubernetes.<br> This service has endpoint:<br> - GET /healthz</p> <p>We have liveness probe that uses this endpoint. Probe runs successfully.<br> It means that the endpoint is reachable from the service pod (localhost). </p> <p>When I run in the service pod : <code>wge...
<p>Your issue can be caused by <a href="https://github.com/spring-projects/spring-boot/issues/13205" rel="nofollow noreferrer">https://github.com/spring-projects/spring-boot/issues/13205</a>. All you have to do is upgrade Tomcat version to 8.5.32. You can do that by adding the version in pom.xml file.</p> <pre><code> ...
<p>For company rules, our VMs can not access internet (can not use http proxy too). I installed a kubernetes cluster by downloading rpm packages and docker images as below:</p> <pre><code> k8s.gcr.io/kube-apiserver-amd64:v1.11.0 k8s.gcr.io/kube-controller-manager-amd64:v1.11.0 k8s.gcr.io/kube-scheduler-amd64:v1.11.0...
<p>There are several solutions:</p> <ol> <li>Since your machines don't have internet connection and you want use the same images names - you need to provide internet to them. It could be done with any PROXY server, like <code>squid</code> or something else. In this case, you'll need to reconfigure <code>docker</code> ...
<p>is there a way to scale dynamically the memory size of Pod based on size of data job (my use case)? </p> <p>Currently we have Job and Pods that are defined with memory amounts, but we wouldn't know how big the data will be for a given time-slice (sometimes 1000 rows, sometimes 100,000 rows).<br> So it will break i...
<p>If you don’t know the memory requirement for your pod a priori for a given time-slice, then it is difficult for Kubernete Cluster Autoscaler to automatically scale node pool for you as per this documentation [1]. Therefore for both of your suggestions like running either Cloud Dataflow or Spark on Kubernete with Kub...
<p>I've just noticed from a very nasty gcp bill that cockroachDB has logged 1.5tb of errors on stackdriver, costing me several hundred dollars in just a few days. Sadly I had left it on 100% logging. The errors look like this and are piling up multiple times per second.</p> <pre><code>E I180712 11:18:41.963205 106 se...
<p>These are all CockroachDB logs, not just errors. This is indicated by the <code>I</code> prefix (meaning <code>Info</code>) in the CockroachDB log line. The listed log lines show basic memory information for the <code>cockroach</code> process. This is logged every 10 seconds.</p> <p>If you wish to persist logs I wo...
<p>I have setup a <code>kubernetes</code> cluster which is working fine. I created <code>deployment</code> with type as <code>daemonset</code> which then created few pods and it worked fine. I made few changes so I deleted the <code>daemonset</code> using:</p> <pre><code>kubectl delete daemonset &lt;name&gt; --namespa...
<p>Re-run the second command with <code>namespace</code> parameter will do your job.</p> <p><code>--grace-period=0 --force</code> is the right command to delete such pods.</p>
<p>I have three kubernetes cluster environments set up in GCP. I have installed Fluentd as daemonset in all these environments to collect the logs from all the pods. I have also installed elasticsearch and kibana in a separate server outside the cluster. I need to feed the logs in fluentd to the elasticsearch in rem...
<p>There are two common ways mentioned in <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">documentation</a> to access external resources from inside the Pod:</p> <ol> <li><p>Create a Service and Endpoint objects. Set external IP address in Endpoint's specification:<...
<p>I am trying to deploy <strong>elastic-search in kubernetes</strong> with local drive volume but I get the following error, can you please correct me. <strong>using ubuntu 16.04 kubernetes v1.11.0 Docker version 17.03.2-ce</strong> Getting error 'unknown field hostPath' Kubernetes Elasticsearch using with local vol...
<p>You have the wrong structure. <code>volumes</code> must be on the same level as <code>containers</code>, <code>initContainers</code>.</p> <pre><code>apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: es-data labels: component: elasticsearch role: data spec: serviceName: elasticsearch-data re...
<p>We have a <code>.net core</code> app being deployed to a Kubernetes cluster which accesses an AWS RDS MS SQL database.</p> <p>In this environment we'd like to use EF Code First to handle our model (maybe with migrations later, but initially dropping and creating is fine).</p> <p>How in this environment do we creat...
<p>I've been tussling with this question as well. We're doing .NET Core EF code first on Kubernetes with a Microsoft SQL database.</p> <p>I've been messing around with context.Database.Migrate(). This will create the DB then create the tables and do the migrations (case 1), or if the DB already exists, it will just ...
<p>I'm running more than one replicas of pods with kubernetes <code>deployment</code> and I'd like to update the replicas to use updated <code>configmap</code> in a rolling way. same like rolling-update works.</p> <p>So that kubernetes will terminate pod and start sending traffic to the newly updated pods one at a tim...
<p>Applying a change to the Deployment object will trigger a rolling-update. From the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment" rel="noreferrer">docs</a>:</p> <blockquote> <p>A Deployment’s rollout is triggered if and only if the Deployment’s pod template (...
<p>I have deployed kubernetes v1.8 in my workplace. I have created roles for admin and view access to namespaces 3months ago. In the initial phase RBAC is working as per the access given to the users. Now RBAC is not happening every who has access to the cluster is having clusteradmin access. </p> <p>Can you suggest t...
<p>Ensure the RBAC authorization mode is still being used (<code>--authorization-mode=…,RBAC</code> is part of the apiserver arguments)</p> <p>If it is, then check for a clusterrolebinding that is granting the cluster-admin role to all authenticated users:</p> <p><code>kubectl get clusterrolebindings -o yaml | grep -...