prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I have installed kubeadm. Heapster show me metrics, but hpa no</p> <p><strong>kubectl get hpa</strong></p> <pre><code>NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE httpd Deployment/httpd &lt;unknown&gt; / 2% 2 5 2 19m </code></pre> <p><strong>ku...
<p>You may have had to enable a metrics-server. Heapster is now deprecated. Also make sure you have Kubernetes version greater than 1.7. You can check this buy typing <code>kubectl get nodes</code>.</p> <p>You can enable the metrics server by looking at the minikube addons.</p> <p><code>minikube addons list</code> gi...
<p>I've followed <a href="http://rahmonov.me/posts/zero-downtime-deployment-with-kubernetes/" rel="nofollow noreferrer">http://rahmonov.me/posts/zero-downtime-deployment-with-kubernetes/</a> blog, created two docker images with index.html returning 'Version 1 of an app' and 'Version 2 of an app'. What I want to achieve...
<p>I've recreated the mentioned experiment and changed the number of requests to something close to 30 per second by starting the three simultaneous processes of the following:</p> <pre><code>While True do curl -s https://&lt;NodeIP&gt;:&lt;NodePort&gt;/ -m 0.1 --connect-timeout 0.1 | grep Version || echo ...
<p>I have installed kube v1.11, since heapster is depreciated I am using matrics-server. Kubectl top node command works.</p> <p>Kubernetes dashboard looking for heapster service. What is the steps to configure dashboard to use materics server services</p> <pre><code>2018/08/09 21:13:43 Metric client health check fail...
<p>This must be the week for asking that question; it seems that whatever is deploying heapster is omitting the <code>Service</code>, which one can fix <a href="https://stackoverflow.com/questions/51641057/how-to-get-the-resource-usage-of-a-pod-in-kubernetes/51645461#comment90363934_51645461">as described here</a> -- o...
<p>This is the helm and tiller version:</p> <pre><code>&gt; helm version --tiller-namespace data-devops Client: &amp;version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"} Server: &amp;version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390eb...
<p>This is or has been a helm issue for a while. It only affects the situation where the first install of a chart fails and has up to helm 2.7 required a manual delete of the failed release before correcting the issue and installing again. However there is now a --force flag available to address this case - <a href="ht...
<p>with a new release of our product, we want to move to new technologies(kubernetes) so that we can take advantage of it services. we have a local kubernetes application running in our infra. we have made our applicatons dockerize and now we want to use the images to integrate it with kubernetes to make cluster --pods...
<p>A Docker registry of some sort is all but a requirement to run Kubernetes. Paid Docker Hub supports private images; Google and Amazon both have hosted registry products (GCR and ECR respectively); there are third-party registries; or you can deploy the <a href="https://hub.docker.com/_/registry/" rel="nofollow nore...
<p>There are 6 kinds of namespaces in linux: <code>Network, UTS, Users, Mount, IPC, Pid</code>. I know that all the containers share the same network namespace with the pause container in a Kubernetes pod. And by default, different containers have different PID namespaces because they have different init process. Howev...
<p>According to <a href="https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/" rel="noreferrer">this article</a>:</p> <blockquote> <p>Containers in a Pod run on a “logical host”; they use the same network namespace (in other words, the same IP address and port space), and the sa...
<p>I have setup a name based ingress controller, but it doesn't seem to work for anything other than <code>/</code>.</p> <p>So <code>http://metabase.domain.com</code> works but <code>http://metabase.domain.com/style/app.css</code> does not.</p> <p>This is my config:</p> <pre><code>apiVersion: extensions/v1beta1 kind...
<p>As you mentioned, there is no error in the log files, and everything looks normal from your perspective. I may suggest to tune up ingress using annotations tags. I've checked <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#rewrite" rel="noreferrer"...
<p>How do I assign a variable within a <strong>helmfile</strong>?</p> <pre><code>context: example.com # kube-context (--kube-context) releases: # Published chart example - name: controller-pod-nginx # Name of this release namespace: ingress-nginx # Target nam...
<p>Typically, if using the <code>set</code> parameter in <code>helmfile.yaml</code>, you would specify it this way:</p> <pre><code>set: - name: 'controller.service.annotations.service\.beta\.kubernetes\.io/aws-load-balancer-ssl-ports' value: 'https' </code></pre> <p><strong>NOTE</strong> the backslashes are use...
<p>We're requesting persistence on kubernetes using persistence volume claim.</p> <p>Currently, we're setting <code>storage class</code> using <code>volume.beta.kubernetes.io/storage-class</code> annotation:</p> <pre><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: name: vault-file-backend-volumeclaim a...
<p>Yes, you should opt for <code>storageClassName</code>, because the annotation will be deprecated in the future, as state in <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class" rel="nofollow noreferrer">kubernetes.io</a>:</p> <blockquote> <p>In the past, the annotation <code>volume.beta...
<p>I am trying to understand the benefits and drawbacks of the following architectures when it comes to deploying my application and database containers using kubernetes.</p> <p>A little background: The application sits behind an Nginx proxy. All requests flow from the proxy to the web server. The web server is the on...
<p>Being able to scale the application and database independently would be the key reason for having them separated. Scaling with high load (or highly variable load) requires a robust architecture and what counts as 'high load' will depend on your app. For example, if the database and application are in different pods ...
<p>I would like to know, which are the endpoints correctly configured for a certain ingress.</p> <p>For instance I have the following ingress:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: dictionary spec: tls: - hosts: - dictionary.juan.com secretName: microsyn-secret ba...
<blockquote> <p>But then Why I get a 404?</p> </blockquote> <p>Ingress resources -- or certainly the one you showed in your question -- use virtual-host routing, so one must set the <code>host:</code> header when interacting with that URL:</p> <pre><code>curl -H 'host: dictionary.juan.com' http://192.168.99.100:312...
<p>I have written the <code>nifi.properties</code> into a <code>Kubernetes ConfigMap</code>. When I deploy NiFi (as a <code>StatefulSet</code>) I want to have this <code>nifi.properties</code> file to be used by the NiFi I just deployed. To do so I added a volume for the <code>ConfigMap</code> and mounted it in the Con...
<p>There are two problems with the above setup:</p> <ul> <li>You have to specify the subpath to tell which item you mount from the configmap as a single file, see: <a href="https://github.com/kubernetes/kubernetes/issues/44815#issuecomment-297077509" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/i...
<p>I need to connect to Google Cloud SQL from a Kubernetes pod using Go.</p> <p>I have been following the following guides religiously: <a href="https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine" rel="nofollow noreferrer">https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine</a> <a href="ht...
<p>I know you've solved your issue already, but wanted to provide another alternative for anyone else reading this thread.</p> <p>There are 2 ways you can connect to your instance: 1: Through a TCP connection: You have that solution already and <a href="https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine...
<p><a href="https://i.stack.imgur.com/EKOoX.png" rel="nofollow noreferrer">Startup Logs of Pod</a> I am not able to access a spring boot service on my minikube cluster. On my local machine,I configured minikube cluster and built the docker image of my service. My service contains some simple REST endpoints.</p> <p>I ...
<p>The behaviour you describe would suggest a port mapping problem. Is your Spring boot service on the default port of 8080? Does the internal port of your Service match the port the Spring boot app is running on (it'll be in your app startup logs). The port in your screenshot seems to be 8899. It's also possible your ...
<p>What specific changes need to be made to the <code>yaml</code> below in order to get the <code>PersistentVolumeClaim</code> to bind to the <code>PersistentVolume</code>?</p> <p>An EC2 instance in the same VPC subnet as the Kubernetes worker nodes has an ip of 10.0.0.112 and and has been configured to act as an NFS ...
<p>I diagnosed the problem by typing <code>kubectl describe pvc my-pv-claim</code> and looking in the Events section of the results.</p> <p>Then, based on the reported Events, I was able to fix this by changing <code>storageClassName: manual</code> to <code>storageClassName: slow</code>. </p> <p>The problem was that...
<p>I have an Kubernetes environment running multipe applications (services). Now i'm a little bit confused how to setup the MySQL database instance(s). </p> <p>According to different sources each microservice should have there own database. Should i create a single MySQL statefulset in HA mode running multiple databa...
<p>Slightly subjective question, but here's what we have setup. Hopefully, that will help you build a case. I'm sure someone would have a different opinion, and that might be equally valid too:</p> <p>We deploy about 70 microservices, each with it's own database ("schema"), and it's own JDBC URL (defined via a service...
<p>I have a docker image that when created should check if the volume is empty, in case it should initialize it with some data. This saved data must remain available for other pods with the same or different image.</p> <p><a href="https://i.stack.imgur.com/2sJos.png" rel="nofollow noreferrer"><img src="https://i.stac...
<p>You have 2 options:</p> <ol> <li>First option is to mount the pod into the node and save the data in the node so when new pod will create in the same node it will have an access to the same volume (persistent storage location).</li> </ol> <p>Potential problem: 2 pods on the same node can create deadlock for the sa...
<p>I've managed to deploy a .netcore api to azure kubernetes managed service (ACS) and it's working as expected. The image is hosted in an azure container registry.</p> <p>I'm now trying to get the service to be accessible via https. I'd like a very simple setup. </p> <ul> <li><p>firstly, do I have to create an ope...
<p>From what I understand, you will need something like an NGINX ingress controller to handle the SSL termination and will also need to manage certificates. Kubernetes cert-manager is a nice package that can help with the certs.</p> <p>Here is a write up on how to do both in an AKS cluster:</p> <p><a href="https://le...
<p>I have Kubernetes cluster hosted in Google Cloud. I created a deployment and defined a hpa rule for it:</p> <pre><code>kubectl autoscale deployment my_deployment --min 6 --max 30 --cpu-percent 80 </code></pre> <p>I want to run a command that editing the <code>--min</code> value, <strong>without remove and re-creat...
<blockquote> <p>Is this possible to edit hpa (min, max, cpu-percent, ...) on command line?</p> </blockquote> <p>They are editable just as any other resource is, though either <code>kubectl edit hpa $the_hpa_name</code> for an interactive edit, or <code>kubectl patch hpa $the_hpa_name -p '{"spec":{"minReplicas": 1}}'...
<p>I have a docker image that when created should check if the volume is empty, in case it should initialize it with some data. This saved data must remain available for other pods with the same or different image.</p> <p><a href="https://i.stack.imgur.com/2sJos.png" rel="nofollow noreferrer"><img src="https://i.stac...
<p>I assume you create your pods using Deployment object in Kubernetes. What you want to look into is a StatefulSet, which, in opposite to deployments, retains some identity aspects for recreated pods including to some extent network and storage.</p> <p>It was introduced specifically as a means to run services that ne...
<p>I am using helm 2.6.1 to deploy a package to my kubernetes cluster. I have created a nexus raw repository to host the packaged helm charts. I also have the index file uploaded to the same.</p> <pre><code>--charts - wordpress-0.1.0.tgz - index.yaml </code></pre> <p>However, when I try to do a helm install, it nev...
<p>You references the chart wrong way. Try <code> helm search helm-repo/wordpress helm install helm-repo/wordpress </code></p> <p>If you need to install particular version:</p> <p><code> helm install helm-repo/wordpress --version=0.1.0 </code></p>
<p>I'm trying to deploy my web service to Google Container Engine:</p> <p>Here's my <strong>deployment.yaml:</strong></p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: handfree labels: app: handfree spec: replicas: 3 template: metadata: labels: app: handfree ...
<blockquote> <p>Unknown user "client".</p> </blockquote> <p>Means there is no <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#rolebinding-v1-rbac-authorization-k8s-io" rel="nofollow noreferrer"><code>RoleBinding</code></a> or <a href="https://kubernetes.io/docs/reference/generated/kuber...
<p>I have a kubernetes cluster setup on AWS. When i make call to elasticsearch-client.default.svc.cluster.local from a pod, i get unknown host exception occasionaly. It must have something to do with the name resolution, coz hitting the service IP directly works fine. </p> <p>Note : I already have kube-dns autoscaler ...
<p>Here's a good <a href="https://blog.quentin-machu.fr/2018/06/24/5-15s-dns-lookups-on-kubernetes/" rel="nofollow noreferrer">write-up</a> that may be related to your problems, also check <a href="https://www.weave.works/blog/racy-conntrack-and-dns-lookup-timeouts" rel="nofollow noreferrer">this</a> one out by Weavewo...
<p>I have three services running in my backend and the Ingress routing is defined like this:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: myapp-ingress annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubern...
<p>You have two options:</p> <p>a) Change the port of the API and have it serve / on that port.</p> <p>b) Change your app so it will serve the API on "/v1/myresource" and give it the "api" part of the URL through the Ingress.</p> <p>Either way, you'll have your resources at "myapp.westeurope.cloudapp.azure.com/api/v...
<p>I need to setup a RabbitMQ cluster with queue mirroring enabled on all queues in Kubernetes. The RabbitMQ plugin for kubernetes peer discovery only provides a clustering mechanism based on peer discovery , as the plugin name indicates. But how do I enable queue mirroring and achieve HA , so that if pods a restarted...
<p>Add a definitions.json file into your ConfigMap and ensure that your pods mount the file (in /etc/rabbitmq). In that file, specify all exchanges/queues, and have a policy defined for mirroring that would be applied to those exchanges/queues.</p> <p>It may be easier to manually set this up and export the definitions...
<p>I am very new to development on Azure ASE and I am working on an existing Azure cloud solution that has Service Bus receiving messages from a UI and the message events start Azure (on-demand) Web Jobs at various points in the solution.</p> <p>Similar to this: <a href="https://i.stack.imgur.com/l7BtS.png" rel="nofoll...
<p><em>Having spent more time on this, here's some information which has helped me (you can see from the question above that there are gaps in my understanding, building my knowledge up slowly and publishing in case its useful for others).</em></p> <p>Moving WebJobs off ASE - this is not as straight forward as my ques...
<p>I'm trying to setup Kubernetes with Nvidia GPU nodes/slaves. I followed the guide at <a href="https://docs.nvidia.com/datacenter/kubernetes-install-guide/index.html" rel="nofollow noreferrer">https://docs.nvidia.com/datacenter/kubernetes-install-guide/index.html</a> and I was able to get the node join the cluster. I...
<p>According to the AWS G2 <a href="https://aws.amazon.com/blogs/aws/new-g2-instance-type-with-4x-more-gpu-power/" rel="nofollow noreferrer">documentation</a>, <code>g2.8xlarge</code> servers have the following resources:</p> <ul> <li>Four NVIDIA GRID GPUs, each with 1,536 CUDA cores and 4 GB of video memory and the a...
<p>How to refer to the local image that exists? </p> <pre><code>kubectl run u --rm -i --tty --image my_local_image -- bash </code></pre> <p>Results in <code>ImagePullBackOff</code> and <code>kubectl</code> is obviously trying to pull from a remote repository instead of local register.</p> <p>This <a href="https://st...
<p>Kubernetes Pods have an <code>imagePullPolicy</code> field. If you set that to <code>Never</code>, it will never try to pull an image, and it's up to you to ensure that the docker daemon which the kubelet is using contains that image. The default policy is <code>IfNotPresent</code>, which should work the same as <co...
<p>I'm kind of new to the Kubernetes world. In my project we are planning to use windows containers(.net full framework) in short term and linux containers(.net core) for the long run.</p> <p>We have a K8 cluster provided by infrastructure team and the cluster has mix of Linux and Windows nodes. I just wanted to know ...
<p>Below are the details from the <a href="https://kubernetes.io/docs/getting-started-guides/windows/" rel="nofollow noreferrer">Kubernetes Windows Documentation</a>.</p> <blockquote> </blockquote> <p>Because your cluster has both Linux and Windows nodes, you must explicitly set the nodeSelector constraint to be able t...
<p>I am having a trouble creating a kubernets using kops inside existing AWS vpc and subnets. I have an existing vpc with the following CIDR blocks:</p> <p><strong>IPv4 CIDR:</strong> 10.10.16.0/20</p> <p>And in that VPC I have my subnets with their assigned CIDR blocks:</p> <p><strong>SubnetDatabaseA:</strong> 10.1...
<pre><code>kops create cluster --help --subnets stringSlice Set to use shared subnets --vpc string Set to use a shared VPC </code></pre> <p>See following </p> <pre><code> kops create cluster --name=${CLUSTER_NAME} --vpc=vpc-1010af11 --subnets=subnet- 000e123a,subnet-123b456,...
<p>I have MiniKube running on my Windows 10 machine. I would like to add an additional node to the cluster.</p> <ol> <li>I have a Centos VM running on a different host that has k8s installed. How to I get the <code>kubectrl join command</code> to run on the VM from the master node running on my Windows machine?</li> <...
<p>Minikube is officially single-node at the moment. There's a discussion about this limitation at <a href="https://github.com/kubernetes/minikube/issues/94" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/issues/94</a> But it seems people have <a href="https://stackoverflow.com/a/51706547/9705485">fou...
<p>I have Kuberenetes cluster hosted in Google Cloud. </p> <p>I deployed my deployment and added an <code>hpa</code> rule for scaling. </p> <pre><code>kubectl autoscale deployment MY_DEP --max 10 --min 6 --cpu-percent 60 </code></pre> <p>waiting a minute and run <code>kubectl get hpa</code> command to verify my scal...
<blockquote> <p>If I changed the MINPODS parameter to "1" - why I still have 6 pods?</p> </blockquote> <p>I believe the answer is because of the <code>&lt;unknown&gt;/60%</code> present in the output. <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">The f...
<p>I would like to run a kubernetes cluster with 1 master and 2 worker nodes all 3 in different separate private subnets within our on-premise data center. What would be the best strategy to implement the kubernetes cluster while exposing front end application to public network implementing a good kubernetes security? ...
<p>In the cloud my answer will be different! From what i understand טםו are not going to scale your nodes so my answer is based on that.</p> <ol> <li><p>Create all your services in K8S cluster (do not expose any one of them).</p></li> <li><p>Create Nginx or any Loadbalancer that you prefer as VM (if you can create 2 V...
<p><code>kubectl logs -f pod</code> shows all logs from the beginning and it becomes a problem when the log is huge and we have to wait for a few minutes to get the last log. Its become more worst when connecting remotely. Is there a way that we can tail the logs for the last 100 lines of logs and follow them?</p>
<p>In a cluster best practices are to gather all logs in a single point through an aggregator and analyze them with a dedicated tool. For that reason in K8S, log command is quite basic.</p> <p>Anyway <code>kubectl logs -h</code> shows some options useful for you:</p> <pre><code># Display only the most recent 20 lines o...
<p>We have a Java Spring Boot project with Swagger and docker. We deploy it on kubernetes behind an ingress controller.</p> <p>It works properly in localhost (using postman and swagger-ui try button). Problem comes when we deploy it.</p> <p>Rest Controller:</p> <pre><code>@ApiOperation(value = "Operation", ...
<p>The problem is how to get swagger's base path to match to the one that is being used behind the proxy. There is more than one solution as per <a href="https://github.com/springfox/springfox/issues/1443" rel="nofollow noreferrer">https://github.com/springfox/springfox/issues/1443</a> </p> <p>Since you have a specifi...
<p>I have a spring boot application with the below docker file.</p> <pre><code>FROM docker.com/base/jdk1.8:latest MAINTAINER Application Engineering [ https://docker.com/ ] RUN mkdir -p /opt/docker/svc COPY application/weather-service.war /opt/docker/svc/ CMD java -jar /opt/docker/svc/weather-service.war --spring....
<p>Usually you do not want to provide the whole <code>logback.xml</code> file but rather it's <code>logger</code> list which requires updating at runtime most frequently. In order to achieve this you can use <a href="https://logback.qos.ch/manual/configuration.html#fileInclusion" rel="noreferrer">Logback's file inclus...
<p>I have a number of <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="noreferrer">Jobs</a> running on k8s. </p> <p>These jobs run a custom agent that copies some files and sets up the environment for a user (trusted) provided container to run. This agent runs on the sid...
<p>From <a href="https://github.com/kubernetes/kubernetes/issues/37838#issuecomment-328853094" rel="nofollow noreferrer">this GitHub issue</a>, it seems that the answer is that adding or removing containers to a pod is not possible, since the container list in the pod spec is immutable. </p>
<p>Our GKE cluster is shared to multiple teams in company. Each team can have different public domain (and hence want to have different CA cert setup and also different ingress gateway controller). How to do that in Istio? All the tutorial/introduction articles in Istio's website are using a shared ingress gateway. See...
<p>Okay, I found the answer after looking at the code of Istio installation via helm. So, basically the istio have an official way (but not really documented in their readme.md file) to add additional gateway (ingress and egress gateway). I know that because I found this <a href="https://github.com/istio/istio/blob/3a0...
<p>I try to run an mongodb inside an kubernetes cluster which is hosted on azure aks</p> <p>I was not able to get it running, following this tutorial: <a href="https://kubernetes.io/blog/2017/01/running-mongodb-on-kubernetes-with-statefulsets/" rel="nofollow noreferrer">https://kubernetes.io/blog/2017/01/running-mongo...
<blockquote> <p>mongodb://mongo-0.mongo,mongo-1.mongo:27017</p> </blockquote> <p>You are indicating that you have a replicaset with 2 members and both use the port 27017. Your mongodb library will handle that url to connect to the cluster.</p> <p>In order to connect locally you have to do a port forwarding:</p> <b...
<p>After manually adding some iptables rules and rebooting the machine, all of the rules are gone (no matter the type of rule ). </p> <p>ex.</p> <pre><code>$ iptables -A FUGA-INPUT -p tcp --dport 23 -j DROP $ iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination KUBE-EXTERNAL-SE...
<p>Running <code>iptables</code> on <strong>any</strong> system is not a persistent action and would be forgotten on reboot, a k8s node is not an exception. I doubt that k8s will erase the IPTABLES rules when it starts, so you could try this:</p> <ul> <li>create your rules (do this starting with empty iptables, with <...
<p>I have a program that executes some code, sleeps for 10 minutes, then repeats. This continues in an infinite loop. I'm wondering if theres a way to let Kubernetes/GKE handle this scheduling.</p> <p>I see that GKE offers cron scheduling. I could schedule a pod to run every 10 minutes. The problem is that in some sce...
<p>In K8S there's a specific resource for that goal: <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="noreferrer">CronJob</a></p> <p>In the following example you see a <code>schedule</code> section with the tipical cron notation:</p> <pre><code>apiVersion: batch/v1beta1 kind: CronJo...
<p>Im new at helm. Im building a splunk helm chart with numerous conf files. I currently use something like this in a configmap ..</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: splunk-master-configmap data: indexes.conf: | # global settings # Inheritable by all indexes: no hot/warm bucket c...
<p>If the content of the files is static then you could create a files directory in your chart at the same level as the templates directory (<a href="https://github.com/Activiti/activiti-cloud-charts/tree/master/activiti-keycloak" rel="noreferrer">not inside it</a>) and reference them like:</p> <pre><code>kind: Config...
<p>I am trying to parse the logs from kubernetes like this for example</p> <pre><code>2018-08-14 13:21:20.013 [INFO][67] health.go 150: Overall health summary=&amp;health.HealthReport{Live:true, Ready:true} </code></pre> <p>And this is the configuration</p> <pre><code>&lt;source&gt; @id calico-node.log @type tai...
<p>From what I can see, you are missing something in the <code>fluentd config</code>.</p> <p>Your <code>time_format %Y-%m-%d %H:%M:%S</code> will not work with the timestamp <code>2018-08-14 13:21:20.013</code>, as it's missing <code>.%3N</code>.</p> <p>It should be as follows: <code>time_format %Y-%m-%d %H:%M:%S.%3N...
<p>I would like to use consul (or would you recommend another technology?) to store environment variables that are used in a kubernetes pod/container. I have a software which uses those environment variables to setup its application state.</p> <p>I heard that I could use consul for that, but I have to use something li...
<p>Give a try in <a href="https://github.com/hashicorp/envconsul" rel="nofollow noreferrer">envconsul</a></p> <p>Install it in your pods to transform configs from consul to enviroment variables</p>
<p>I have a Cloud MySQL instance which allows traffic only from whitelisted IPs. How do I determine which IP I need to add to the ruleset to allow traffic from my Kubernetes service?</p>
<p>The best solution is to use the Cloud SQL Proxy in a sidecar pattern. This adds an additional container into the pod with your application that allows for traffic to be passed to Cloud SQL.</p> <p>You can find instructions for setting it up <a href="https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine"...
<p>I understand that <code>{{.Release.namespace}}</code> will render the namespace where the application being installed by <code>helm</code>. In that case, <code>helm template</code> command will render it as empty string (since it doesn't know yet the release namespace). </p> <p>However, what makes me surprise is <c...
<p>The generated value <code>.Release.Namespace</code> is case-sensitive. The letter N in "namespace" should be capitalized.</p>
<p>Given a Node with 10 cpu, if I request a Pod with <code>request 4cpu and limit 6cpu</code>, does that mean the Node has only 4cpu for usage left?</p> <p>real question here is if I need a Pod with 2 cpu request and 5 cpu limit, as the Node doesn't have 5 cpu left the pod won't be provisioned?</p> <p>its not clear i...
<p>The requests are used for scheduling, the limits are that, limits. So, in your example, the node will still have 6 CPU remaining after scheduling your 4 CPU request. It will let your pod use up to 6 CPU, but it will start to limit its performance if it tries to use more than 6, so that it never exceeds 6.</p> <p>Th...
<p>Kubernetes allows to specify the cpu <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" rel="noreferrer">limit and/or request</a> for a POD.</p> <p>Limits and requests for CPU resources are measured in <em>cpu units</em>. One cpu, in Kubernetes, is equivalent to:</p> <p...
<p>No, you can't have different requests per node type. What you can do is create a pod manifest with a node affinity for a specific kind of node, and requests which makes sense for that node type. For a second kind of node, you will need a second pod manifest which makes sense for that node type. These pod manifests w...
<p>I am running Kubernetes 1.9.6 with Weave Net 2.4.0. I am trying to lock down access to the Kubernetes internal DNS server and a specific port on another host. I cannot seem to find the proper format for the egress.</p> <p>I know the following is not a valid policy but is a representation of what I want to do. Ho...
<p>I was not paying enough attention to multiple blocks for the cidr and ports. This is what I was looking for.</p> <pre><code>--- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: test-network-policy namespace: dev spec: podSelector: matchLabels: app: plem-network-policy ...
<p>I've followed this doc from microsoft <a href="https://learn.microsoft.com/en-us/azure/aks/ingress" rel="noreferrer">Deploy an HTTPS ingress controller on Azure Kubernetes Service (AKS)</a> and have successfully deployed a managed Kubernetes cluster (AKS) with nginx ingress controller. it works with https as expect...
<p>Here's the yaml that worked for me. </p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: webapp-ingress annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-staging nginx.ingress.kubernetes.io/rewrite-target: / spec: tls: - hosts...
<p>I've been struggling for a while trying to get HTTPS access to my Elasticsearch cluster in Kubernetes.</p> <p>I <em>think</em> the problem is that Kubernetes doesn't like the TLS certificate I'm trying to use, which is why it's not passing it all the way through to the browser.</p> <p>Everything else seems to work...
<p>I figured it out!</p> <p>What I ended up doing was adding a default ssl certificate to my nginx-ingress controller on creation using the following command</p> <pre><code>helm install --name nginx-ingress --set controller.extraArgs.default-ssl-certificate=default/search-tls-secret stable/nginx-ingress </code></pre>...
<p>I want to run a CronJob on my GKE in order to perform a batch operation on a daily basis. The ideal scenario would be for my cluster to scale to 0 nodes when the job is not running and to dynamically scale to 1 node and run the job on it every time the schedule is met.</p> <p>I am first trying to achieve this by us...
<p><strong>Update:</strong></p> <blockquote> <p>Note: Beginning with Kubernetes version 1.7, you can specify a minimum size of zero for your node pool. This allows your node pool to scale down completely if the instances within aren't required to run your workloads.</p> </blockquote> <p><a href="https://cloud...
<p>I'm having an extremely hard time setting up EKS on AWS. I've followed this tutorial: <a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-launch-workers" rel="noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-launch-workers</a></p> <p>I got up to th...
<p>This issue occurs if your <code>user</code> configuration isn't working in your <code>kubeconfig</code>, or if you are on a version of <code>kubectl</code> less than v1.10</p>
<p>I am a newbie in kubernetes clustering. I have a simple question. I am in multiple kubernetes clustering. It seems multiple clusters are available in kubernetes. So "Multiple clustering" in kubernetes means:</p> <blockquote> <ul> <li>It is physical multiple clusters which have their own master, nodes?</li> <l...
<p>It seems this has been answered by @<a href="https://stackoverflow.com/users/6716781/jonah-benton">Jonah Benton</a> and @<a href="https://stackoverflow.com/users/129570/oliver-charlesworth">Oliver Charlesworth</a> in the comments. Using <a href="https://kubernetes.io/docs/concepts/cluster-administration/federation/"...
<p>i want to uninstall kubernetes from Centos 7 and all it's dependencies and files like : </p> <pre><code>kube-apiserver kube-controller-manager kubectl kubelet kube-proxy kube-scheduler </code></pre>
<p>Check this <a href="https://stackoverflow.com/questions/44698283/how-to-completely-uninstall-kubernetes">thread</a> or else these steps should help, </p> <p>First clean up the pods running into your k8s cluster using,</p> <pre><code>$ kubectl delete node --all </code></pre> <p>then remove data volumes and back-up...
<pre><code>apiVersion: extensions/v1beta1 kind: Deployment metadata: name: my-app labels: run: my-app spec: replicas: 3 selector: matchLabels: run: my-app template: metadata: labels: run: my-app spec: containers: - image: gcr.io/google-samples/hello-app:1.0 ...
<blockquote> <p>This is a sample yaml from kubenetes site, there are so many my-app, do they all have to be same? what are their purpose?</p> </blockquote> <p>No they don't have to be the same as far as the <code>name</code> field goes, that can be different. The <code>my-app</code> references seen in the <code>meta...
<p>We are trying to get <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel="noreferrer">this example</a> to work on a kubernetes setup on a bunch of virtual servers as a proof of concept. However, we are running in to a problem with the <code>kubectl port-...
<p>After diving into the apiserver logs (<code>--v=9</code> as argument in the apiserver yaml config, which we found a hint of on <a href="https://github.com/kubernetes/kubeadm/issues/132" rel="noreferrer">this</a> and <a href="https://github.com/kubernetes/kubernetes/issues/35054" rel="noreferrer">this</a> github issu...
<p>I have a container that performs some actions over some data. This container is heavy in memory and CPU resources, and I want it to start only an on-demand basis.</p> <p>As an example, with docker-compose, out of Kubernetes, I use it this way:</p> <pre><code>docker-compose run heavycontainer perform.sh some-action...
<p><strike> I hope it help you.</p> <ul> <li><p>The pod need to <code>run regularly</code>, <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#creating-a-cron-job" rel="nofollow noreferrer">CronJob</a></p></li> <li><p>The pod need to <code>run on demand</code>, <a href="https://kubernetes.io...
<p>I am looking for help to troubleshoot this basic scenario that isn't working OK:</p> <p>Three nodes installed with <strong>kubeadm</strong> on <strong>VirtualBox VMs</strong> running on a MacBook:</p> <pre><code>sudo kubectl get nodes NAME STATUS ROLES AGE VERSION kubernetes-master Re...
<p>I was running into a similar problem with my K8s cluster with Flannel. I had set up the vms with a NAT nic for internet connectivity and a Host-Only nic for node to node communication. Flannel was choosing the NAT nic by default for node to node communication which obviously won't work in this scenario. </p> <p>...
<p>I'm developing a test hello app in Go, which will have access to a Postgres DB. This will use a statefulset to release in kubernetes and has one pod with two container images (one for pgsql &amp; one for goapp).</p> <pre><code>├── hello-app | ├── templates | ├── file1.gohtml | ├── file2.gohtml | ...
<p>In the second stage of your Dockerfile, you are only copying your Go binary from the previous stage. You must also copy your <code>templates</code> directory to the second stage as well so the Go binary can reference your HTML templates:</p> <pre><code>FROM golang:1.8-alpine RUN apk add --update go git RUN go get g...
<p>I set up 1 master 2 nodes k8s cluster in according to documentation. A pod can ping the other pod on the same node but can't ping the pod on the other node.</p> <p>To demonstrate the problem I deployed below deployments which has 3 replica. While two of them sits on the same node, the other pod sits on the other no...
<p>I found the problem.</p> <p>Flannel uses UDP port 8285 and 8472 which was being blocked by AWS security groups. I had only opened TCP ports. </p> <p>I enable UDP port 8285 and UDP port 8472 as well as TCP 6443, 10250, 10256.</p>
<p>In Istio, I was wondering why VirtualService and DestinationRule are separated into two separate config files? AFAICT, the DestinationRule defines the subset and the VirtualService routes to the subset. Obviously, they both do more than just that, but my question is, what could have been the design thought behind se...
<p>They were designed to provide a clear separation of routing from post-routing behaviors.</p> <p>A VirtualService is used to describe the mapping (route rules) from one or more user-addressable destinations (hosts) to the actual destination workloads (services) inside the mesh.</p> <p>A DestainationRule then define...
<p>I am trying to switch from an <code>nginx</code> Ingress to using <code>Istio</code> to take advantage of route weights for canary deployments, and integrated monitoring, among other things.</p> <p>My regular routing was defined as:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: sola...
<p>You need a Gateway and a VirtualService.</p> <p>Check out <a href="https://istio.io/docs/tasks/traffic-management/ingress/" rel="nofollow noreferrer">this task</a> for an example.</p>
<p>I have an image of size of 6.5GB in the Google Container Registry. When I try to pull the image on a Kubernetes cluster node(worker node) via a deployment, an error occurs: ErrImagePull(or sometimes ImagePullBackOff). I used the describe command to see the error in detail. The error is described as <strong>Failed to...
<p>It seems that the kubelet expects a updates on progress during the pull of a large image but this currently isn't available by default with most container registries. It's not ideal behaviour but it appears people have been able to work around it from reading the responses on <a href="https://github.com/kubernetes/k...
<p>I am using <strong>container Probes</strong> to check the health of the application running inside the container within kubernetes pod. For now my example pod config looks like,</p> <pre><code>"spec":{ "containers":[ { "image":"tomcat", "name":"tomcat", "livenessProbe":{ ...
<p>If you have curl / wget on the container you could just run a container exec healthcheck, and do something like <code>curl localhost:80 &amp;&amp; curl localhost:443</code>.</p>
<p>To be specific, here is the permalink to the relevant line of code: <a href="https://github.com/istio/istio/blob/e3a376610c2f28aef40296aac722c587629123c1/install/kubernetes/helm/istio/templates/sidecar-injector-configmap.yaml#L84" rel="nofollow noreferrer">https://github.com/istio/istio/blob/e3a376610c2f28aef40296aa...
<p>I got the answer after posting the same question on the Istio's google group <a href="https://groups.google.com/forum/#!topic/istio-users/0dfU_y06n1Q" rel="nofollow noreferrer">here</a>. Without discrediting the author who answering me in the google group, the answer is yes it is a template of a template. The templa...
<p>I created a Kubernetes cluster with the following CLI command: <code> gcloud container clusters create some-cluster --tags=some-tag --network=some-network </code></p> <p>I would now like to:</p> <ol> <li>Disable the <code>--tags</code> option, so that new nodes/VMs are created <em>without</em> the tag <code>some-t...
<p>Currently, its not possible to update cluster network and remove tags for existing cluster using the gcloud command. I have verified this information using the gcloud container clusters update command <a href="https://cloud.google.com/sdk/gcloud/reference/container/clusters/update" rel="noreferrer">documentation</a>...
<p>I was wondering what the correct approach to deploying a containerized Django app using gunicorn &amp; celery was. </p> <p>Specifically, each of these processes has a built-in way of scaling vertically, using <code>workers</code> for gunicorn and <code>concurrency</code> for celery. And then there is the Kubernetes...
<p>These technologies aren't as similar as they initially seem. They address different portions of the application stack and are actually complementary.</p> <p>Gunicorn is for scaling web request concurrency, while celery should be thought of as a worker queue. We'll get to kubernetes soon.</p> <hr /> <h3>Gunicorn</h3>...
<p>I have below small python script </p> <pre><code>import os os.system('kubectl get pods --context students-cmn') </code></pre> <p>when i run this command manually from terminal it is working , no issue , so i configured it to run as a cron job , but when cron job triggered getting below error </p> <pre><code>sh: k...
<p>First of all, I imagine you are planning on adding code to your python script and that that is why you use python. I assume you used the crontab of the user that can run the command.</p> <p>When you execute a command in <code>cron</code> you must specify the full path to the command. To find the full path to <code>...
<p>We are using a Apache-Kafka deployment on Kubernetes which is based on the ability to label pods after they have been created (see <a href="https://github.com/Yolean/kubernetes-kafka" rel="noreferrer">https://github.com/Yolean/kubernetes-kafka</a>). The init container of the broker pods takes advantage of this featu...
<p>It was pointed out in one of the comments that the issue may be caused by a missing permission even though the error message does not insinuate so. We officially filed a ticket with Docker and actually got exactly this result: In order to be able to set/modify a label from within a pod the default user of the namesp...
<p>I would like to implement my own iptables rules before Kubernetes (kube-proxy) start doing it's magic and dynamically create rules based on services/pods running on the node. The kube-proxy is running in <code>--proxy-mode=iptables</code>.</p> <p>Whenever I tried to load rules when booting up the node, for example ...
<p>The most common practice is to put all custom firewall rules on the gateway(<a href="https://en.wikipedia.org/wiki/Application_delivery_controller" rel="noreferrer">ADC</a>) or into cloud <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/" rel="noreferrer">securit...
<p>I am attempting to enforce a limit on the number of pods per deployment within a namespace / cluster from a single configuration point. I have two non-production environments, and I want to deploy fewer replicas on these as they do not need the redundancy.</p> <p>I've read <a href="https://kubernetes.io/docs/tasks/...
<p>Since the replicas is a fixed value on a deployment YAML file, you may better to use <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a> to make a template for adding some flexibility in your application.</p>
<p>Currently, I want to introduce istio as our service-mesh framework for our microservices. I have played it sometime (&lt; 1 week), and my understanding is that Istio really provides an easy way to secure service to service communication. Much (or all?) of Istio docs/article provides an example how client and server ...
<p>You want to add a third party to your Istio mesh outside of your network via SSL over public internet?</p> <p>I dont think Istio is really meant for federating external services but you could just have an istio ingress gateway proxy sat at the edge of your network for routing into and back out of your application....
<p>Pretty basic question. We have an existing swarm and I want to start migrating to Kubernetes. Can I run both using the same docker hosts?</p>
<p>See the official documentation for <em>Docker for Mac</em> at <a href="https://docs.docker.com/docker-for-mac/kubernetes/" rel="nofollow noreferrer">https://docs.docker.com/docker-for-mac/kubernetes/</a> stating:</p> <blockquote> <p>When Kubernetes support is enabled, you can deploy your workloads, in parallel, o...
<p>I am using YML to create pod and have specified the resource request and limit. Now I am not aware of how to modify the resource limits of a running pod. For example</p> <p>memory-demo.yml</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: memory-demo namespace: mem-example spec: containers: - name: m...
<p>First and for most, it is very unlikely that you really want to be (re)creating Pods directly. Dig into what <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noreferrer">Deployment</a> is and how it works. Then you can simply apply the change to the spec template in deployment and...
<p>Following the interactive tutorial on <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/" rel="nofollow noreferrer">kubernetes.io</a> where a <code>NodePort</code> type service is created via <code>kubectl expose deploy kubernetes-bootcamp --type=&quot;NodePort&quot; --port 8080</co...
<p>It will help to break this down but the general theme is that NodePort isn't the most common way to expose services outside of a cluster so some of the features around it aren't all that intuitive. LoadBalancer (or an ingress controller using it) is the preferred way to expose services to the world outside the clust...
<p>I've a simple kubernetes ingress network.</p> <p>I need deny the access some critical paths like /admin or etc.</p> <p>My ingress network file shown as below.</p> <pre><code> apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-test spec: rules: - host: host.host.com http: paths...
<p>You can use <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-snippet" rel="noreferrer">server-snippet</a> annotation. <a href="https://github.com/nginxinc/kubernetes-ingress/issues/161#issuecomment-322224255" rel="noreferrer">This</a> seems like exactly what you ...
<p>All kubernetes instruction ask to work with minikube that gives you a single kubernetes host. What options are available to work with true multinode clusters. For example I have VM servers available to me. What tools I need to employ to spin up a few VMWare fusion machines on my Mac and create a Kubernetes cluster. ...
<p>I think that we need to clear up some definitions here.</p> <p>First, what is Kubernetes:</p> <blockquote> <p>Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.</p> <p>Kubernetes has...
<p>I have stacked in this phase:</p> <ol> <li>Have local docker insecure registry and some images in it, e.g. 192.168.1.161:5000/kafka:latest</li> <li>Have kubernetes cloud cluster, for which I can access only via ~/.kube/config file, e,g. token.</li> </ol> <p>Need to deploy below deployment, but kubernetes cannot pu...
<p>You need to go to each of your nodes, edit the file <code>/etc/default/docker.json</code> and add the following in it:</p> <pre><code>{ &quot;insecure-registries&quot;: [&quot;192.168.1.161:5000&quot;] } </code></pre>
<p>I have a problem with headers not forwarded into my services, I am not sure how support for Ingress was added, however I have the following Ingress service:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: my-ingress annotations: ingress.kubernetes.io/rewrite-target: / "nginx....
<p>I've just changed &quot;true&quot; instead of &quot;on&quot;, for nginx ingress controller , and workd for me . As mentioned here : <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/nginx-conf...
<p>I solved a permission issue when mounting <code>/var/lib/postgresql/data</code> by following <a href="https://stackoverflow.com/questions/51200115/chown-changing-ownership-of-data-db-operation-not-permitted/51203031#51203031">this answer</a> with <code>initContainers</code>.</p> <p>Now I'm trying to mount <code>pos...
<p>From kubernetes 1.8 on, configmap is mounted readonly, excerpt from the CHANGELOG-1.8.md:</p> <blockquote> <p>Changes secret, configMap, downwardAPI and projected volumes to mount read-only, instead of allowing applications to write data and then reverting it automatically. Until version 1.11, setting the fea...
<p>I'm trying to update an image in Kubernetes by using the following command:</p> <pre><code>kubectl set image deployment/ms-userservice ms-userservice=$DOCKER_REGISTRY_NAME/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT --insecure-skip-tls-verify </code></pre> <p>But when I receive the following error:</p> <pre><code>erro...
<blockquote> <p>I have a suspicion that it has something to do with user - not much help from the error message.</p> </blockquote> <p>@TietjeDK is correct that it is just a misleading error message. It means one of two things is happening (or maybe both): the <code>kubectl</code> binary is newer than the supported v...
<p>I am looking to access a Postgres service outside of GKE, but on a compute engine VM in the same zone using the VMs internal IP.</p> <p>So far I've managed to access it via the external IP from inside the pod, but I'm looking to access it without leaving google infrastructure.</p> <p>I have done some testing and I...
<p>It turns out with the compute engine VM I did not have the kubernetes <strong>pod address range</strong> whitelisted for port 5432. I simply added that to the network configuration for the VM and it started working...</p>
<p>I have a simple ingress network, I want to access services at different namespaces, from this ingress network.</p> <p>How I can do this? My ingress network yaml file: </p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress spec: rules: - host: api.myhost.com http: paths: - ba...
<blockquote> <p>An ExternalName service is a special case of service that does not have selectors and uses DNS names instead.</p> </blockquote> <p>You can find out more about ExternalName service from the official <a href="https://kubernetes.io/docs/concepts/services-networking/service/#externalname" rel="noreferr...
<p>I am working on a design where I will have my git repository located at one of the google cloud instance. I am trying to run my tests in parallel using kubernetes cluster. However I am not able to share the Standard persistent disk(which is having the github repository) that is configured to my instance with the kub...
<p>You need to create a persistant volume and then mount that pv to the kubernetes pod.</p> <p>You should note that this will be read only as you cant attach multiple containers to write to a persistent disk - if you want RW then you will need to use NFS/Gluster or more sensibly GCR.</p>
<p>How do I set the <code>client_max_body_size</code> parameter for a single subdomain? I have a server that will accept file uploads up to 5TB. All the examples I've looked at show you how to set it globally. I have multiple rules in my ingress.yaml, I don't want every single rule to inherit the <code>client_max_body_...
<p>Because I don't see <code>client-max-body-size</code> on the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/" rel="nofollow noreferrer">list of annotations</a>, that leads me to believe you'll have to use the <a href="https://kubernetes.github.io/ingress-nginx/user-gui...
<p>I have a kubernetes namespace that I want to leverage for Gitlab runners. I installed the runners following the <a href="https://docs.gitlab.com/ee/install/kubernetes/gitlab_runner_chart.html" rel="nofollow noreferrer">Helm Chart</a> instructions. The problem I am running into is that when the job container spins up...
<p>I would presume you'll need to specify a <code>values.yaml</code> to the <code>helm install</code> that points to your mirrored copy of the images it needs. So:</p> <ul> <li><a href="https://gitlab.com/charts/gitlab-runner/blob/1e329394f69b80003a43c503e7d11eb6463d008a/values.yaml#L4" rel="nofollow noreferrer">gitla...
<p>Basically we have a set of microservices we have deployed to a kubernetes cluster hosted in AWS. We would like to run these through a gateway configuration in nginx. </p> <p>Our current configuration which doesn't work looks something like this-</p> <pre><code>upstream some-api1 { server some-api1:80; } upstr...
<p>As @Luminance suggests, you're seeing traffic to /api1 go to some-api1/api1 instead of just some-api1 on the base path for that target service (which is what your app would respond to). Following <a href="https://gist.github.com/soheilhy/8b94347ff8336d971ad0" rel="nofollow noreferrer">https://gist.github.com/soheilh...
<p>Is it possible to use Kubespray with Bastion but on custom port and with agent forwarding? If it is not supported, what changes does one need to do?</p>
<p>Always, since you can configure that at three separate levels: via the host user's <code>~/.ssh/config</code>, via the entire playbook with <code>group_vars</code>, or as inline config (that is, on the command line or in the inventory file).</p> <p>The ssh config is hopefully straightforward:</p> <pre><code>Host 1...
<p>When adding origin to Cloud CDN, only HTTP(S) Load Balancer appears in the options. While the TCP/UDP Load Balancer doesn't.</p> <p><a href="https://i.stack.imgur.com/fwPw1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fwPw1.png" alt="enter image description here"></a></p> <p>Is it possible to...
<p>According to <a href="https://cloud.google.com/cdn/docs/using-cdn" rel="nofollow noreferrer">this</a> doc </p> <blockquote> <p>Cloud CDN uses HTTP(S) load balancing as the origin for cacheable content. You must use HTTP(S) load balancing as the origin of content cached by Cloud CDN.</p> </blockquote> <p>At t...
<p>Anyone who can tell me how to get pods under the service with client-go the client library of kubernetes? </p> <p>thanks</p>
<p>I found this accepted answer a little lacking, as far as clarity. This code works under 1.10. In this example, my svc deployments all have a controlled name based on the artifact that it is fronting, and the pods leverage that as well. Please note I am a Java programmer learning go, so there may be a little too much...
<p>I am looking for a way to rollback a helm release to its previous release without specifying the target release version as a number.</p> <p>Something like <code>helm rollback &lt;RELEASE&gt; ~1</code> (like <code>git reset HEAD~1</code>) would be nice.</p>
<p>As it turns out, there is an undocumented option to rollback to the previous release by defining the target release version as 0. like: <code>helm rollback &lt;RELEASE&gt; 0</code></p> <p>Source: <a href="https://github.com/helm/helm/issues/1796" rel="nofollow noreferrer">https://github.com/helm/helm/issues/1796</a>...
<p>I am using external nginx loadbalancer and trying to configure K8s Master but its failing with below error :</p> <blockquote> <p>error uploading configuration: unable to create configmap: configmaps is forbidden: User "system:anonymous" cannot create configmaps in the namespace "kube-system"**</p> </blockquote> ...
<p>If your nodes speak to the apiserver through a load balancer, and expect to use client certificate credentials to authenticate (which is typical for nodes), the load balancer must not terminate or re-encrypt TLS, or the client certificate information will be lost and the apiserver will see the request as anonymous. ...
<p>I'm new in Kubernetes and I have a code error 403 trying the access.</p> <pre><code>kubectl cluster info Kubernetes master is running at https://x.x.x.x:6443 KubeDNS is running at https://x.x.x.x:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy "status": "Failure", "message": "namespaces is forbid...
<p>That sounds like you're being blocked by the cluster's RBAC policies. The <code>system:anonymous</code> user is being prevented from listing the namespaces in the cluster. (Along the lines of <code>kubectl get namespaces</code>)</p> <p>Running <code>kubectl create clusterrolebinding cluster-system-anonymous --clus...
<p>I am trying to implement the CI/CD pipeline for my microservice by using Jenkins, Kubernetes and Kubernetes Helm. Here I am using Helm chart for packaging of YAML files and deployment into Kubernetes cluster. I am now learning the implementation of Helm chart and deployment. When I am learning, I found the image na...
<p>Docker image names in Kubernetes manifests follow the same rules as everywhere else. If you have an image name like <code>postgres:9.6</code> or <code>myname/myimage:foo</code>, those will be looked up on Docker Hub like normal. If you're using a third-party repository (Google GCR, Amazon ECR, quay.io, ...) you ne...
<p>I was trying to create a namespace using <code>kubectl</code>, but I got this error:</p> <blockquote> <p>Error from server (Forbidden): error when creating "namespacefoo": namespaces is forbidden: User "xyz@pqr.com" cannot create namespaces at the cluster scope</p> </blockquote> <p>Is there a concept of "scope" ...
<p>That depends on your Kubernetes environment.</p> <p>This <a href="https://stackoverflow.com/a/49094802/6309">answer suggest</a> (in a <a href="https://cloud.google.com/" rel="nofollow noreferrer">Google Cloud environment</a>):</p> <blockquote> <p>That suggests that <code>gcloud config set container/use_client_certif...
<p>I need an Akka cluster to run multiple CPU intensive jobs. I cannot predict how much CPU power I need. Sometimes load is high, while at other times, there isn't much load. I guess autoscaling is a good option, which means, example: I should be able to specify that I need minimum 2 and maximum 10 Actors. The cluster ...
<p>If you consider a <a href="https://github.com/hseeberger/constructr" rel="nofollow noreferrer">project like <code>hseeberger/constructr</code></a> and its <a href="https://github.com/hseeberger/constructr/issues/179" rel="nofollow noreferrer">issue 179</a>, a native Akka solution should be based on <a href="https://...
<p>I created a Mongodb service according to the Kubernetes <a href="http://kubernetes.io/docs/getting-started-guides/meanstack/" rel="noreferrer">tutorial</a>.</p> <p>Now my question is how do I gain access to the database itself, with a client like Robomongo or similar clients? Just for making backups or exploring wh...
<p>You can use <code>kubectl port-forward mypod 27017:27017</code> and then just connect your mongodb client to <code>localhost:27017</code>.</p> <p>If you want to stop, just hit <code>Ctrl+C</code> on the same cmd window to stop the process.</p>
<p>Background : I am trying to learn and experiment a bit on docker and kubernetes in a "development/localhost" environment, that I could later replicate "for real" on some Cloud. But I'm running low on everything (disk capacity, memory, etc.) on my laptop. So I figured out "why not develop from the cloud ?"</p> <p>I ...
<p>Heres how to do it</p> <p>Start an ec2 instance with 8gb of ram and a public ip, ensure you can ssh to this box in the normal ways. Ensure its an unbuntu instance (I'm using 16.04).</p> <p>once ssh'd into the instance run the following to update and install docker</p> <pre><code>sudo -i apt-get update -y &amp;&am...
<p>I am new to kubernetes. Is there anyway we can fix the name of pod ? If we are creating only one replica, then I want to be generated with same name all time. It's generating different name all time. If I want to see the logs of a container, each time I need to change the command with the newly generated pod name....
<p>There is no way to generate the same name for a deployment produced pod. as far as the command is concerned, you can use <code>kubectl get po -l app=nagendra-app-deploy1 -o jsonpath={.items[0].metadata.name}</code> to get the pod's name.</p>