prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I have one <strong>kubernetes cluster</strong> on <strong>gcp</strong>, running my <strong>express</strong> and <strong>node.js</strong> application, operating <strong><code>CRUD</code></strong> operations with <strong><code>MongoDB</code></strong>.</p> <p>I created one secret, containing <code>username</code> and <...
<p>Your<code>kubernetes.yaml</code> file specifies which environment variable to store your secret so it is accessible by apps in that namespace.</p> <p>Using <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="noreferrer">kubectl secrets cli interface</a> you can upload your secret.</p> <pre><co...
<p>I am really having trouble debugging this and can use some help. I am successfully staring a kubernetes service and deployment using a working docker image. </p> <p>My service file:</p> <pre><code>apiVersion: v1 kind: Service metadata: name: auth-svc labels: app: auth_v1 spec: type: NodePort ports: -...
<p>Is it possible that you are running <code>docker ps</code> on the K8s-master instead of where the pods are located?</p> <p>You can find out where your pods are running by running the command below:</p> <pre><code>$ kubectl describe pod auth-deploy </code></pre> <p>It should return something similar to below (in m...
<p>I am new to Kubernetes and wanted to understand how I can expose a service running in Kubernetes to the outside world. I have exposed it using a NodePort on the cluster. So, for example: A service exposes port 31234 on the host and I can get to the service from another server through <a href="https://kubeserverIP:3...
<p>Thanks for pointing in the right direction. </p> <p>Essential steps broadly were:</p> <ol> <li><p>Create an app and its service definition.</p></li> <li><p>Create a namespace for ingress.</p></li> <li>Create a default backend deployment and service for redirecting all requests not defined in Ingress rules. Create ...
<p>I'm trying to deploy a function with <a href="https://github.com/openfaas" rel="nofollow noreferrer">OpenFaas project</a> and a kubernetes cluster running on 2 Raspberry Pi 3B+. Unfortunately, the pod that should handle the function is going to <code>ImageInspectError</code> state... I tried to run the function wi...
<p>I've seen this error because the docker version wasn't supported by Kubernetes. As of Kubernetes version 1.11, the supported versions are 1.11.2 to 1.13.1 and 17.03.x.</p> <p>I couldn't test the solution with OpenFaaS.</p>
<p>I have deployed an application into Kubernetes using the following command.</p> <pre><code>kubectl apply -f deployment.yaml -n &lt;NAMESPACE&gt; </code></pre> <p>I have my deployment content in the deployment yaml file.</p> <p>This is working fine. Now, I have updated few things in the deployment.yaml file and hence...
<p>As @Daisy Shipton has said, what you want to do could be simplified with a simple command: <code>kubectl apply -f deployment.yaml</code>. </p> <p><strong>I will also add that I don't think it's correct to utilize the <em>Option 2</em> to update the image utilized by the <code>Pod</code> with an imperative command!<...
<p>I am able to install kubernetes using kubeadm method successfully. My environment is behind a proxy. I applied proxy to system, docker and I am able to pull images from Docker Hub without any issues. But at the last step where we have to install the pod network (like weave or flannel), its not able to connect via pr...
<p>When you do work with a proxy for internet access, do not forget to configure the <code>NO_PROXY</code> environment variable, in addition of <code>HTTP(S)_PROXY</code>.</p> <p>See <a href="https://docs.openshift.com/container-platform/3.4/install_config/http_proxies.html#configuring-no-proxy" rel="nofollow noreferr...
<p>I have created a k8s cluster using kubeadm and have a couple of questions about the kube-controller-manager and kuber-apiserver components.</p> <ul> <li><p>When created using kubeadm, those components are started as pods, not systemd daemons. If I kill any of those pods, they are restarted, but who is restarting th...
<p>The feature you've described is called Static Pods. Here is a part of <a href="https://kubernetes.io/docs/tasks/administer-cluster/static-pod/" rel="nofollow noreferrer">documentation</a> that describes their behaviour.</p> <blockquote> <p>Static pods are managed directly by kubelet daemon on a specific node, w...
<p>I've recently setup a Kubernetes cluster and I am brand new to all of this so it's quite a bit to take in. Currently I am trying to setup and Ingress for wordpress deployments. I am able to access through nodeport but I know nodeport is not recommended so I am trying to setup the ingress. I am not exactly sure how t...
<p>You can configure your ingress to forward traffic to a different service depending on path.</p> <p>An example of such a confugration is this:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - host: ...
<p>I am using Minikube to setup a k8s environment for later production but I can't figure out how to pull private container from Docker Hub in my service definition.</p> <p>I added </p> <pre><code>imagePullSecrets: - name: dockerregistrykey </code></pre> <p>to the service definition <code>spec.template.spec</cod...
<p>You need to declare the use of the pullSecret at container level:</p> <pre><code>... spec: containers: - name: my_container image: your_image imagePullSecrets: - name: dockerregistrykey </code></pre>
<p>I have a 3rd party docker image that I want to use (<a href="https://github.com/coreos/dex/releases/tag/v2.10.0" rel="nofollow noreferrer">https://github.com/coreos/dex/releases/tag/v2.10.0</a>). I need to inject some customisation into the pod (CSS stylesheet and PNG images). </p> <p>I haven't found a suitable way...
<p>One way would be to mount 1 or more volumes into the desired locations within the pod, seemingly <code>/web/static</code>. This however would overwrite the entire directly so you would need to supply all the files not just those you wish to overwrite.</p> <p>Example:</p> <pre><code>apiVersion: v1 kind: Pod metadat...
<p>We want to use an app engine flexible process to update our ElasticSearch index, which is on Google Kubernetes Engine. We need to connect to ElasticSearch via a http(s) address. What's the recommended way to do this? We don't want to expose the cluster to the external networks since we don't have authentication in f...
<p>The post you linked to was about App Engine Standard. App Engine Flex is built on top of the same Google Cloud networking that is used by Google Compute Engine virtual machines and Google Kubernetes Engine clusters. As long as you put the App Engine flex application into the same VPC as the Google Kubernetes Engine ...
<p>I wish to setup pod that will access services in different projects in rancher's v2 kubernetes. (rancher setups network policy that pods can access pods in namespaces from same project)</p> <p>That pod is custom ingress proxy that might be used in front of all projects in kube </p>
<p>You can use "Flannel" network plugin instead of "Canal" while setting up the cluster. Work is <s>in progress</s> finished to provide enable/disable of the project network policies for Canal.</p> <p><strong>Edit 1 (09/03/2018):</strong></p> <p><a href="https://github.com/rancher/rancher/issues/14462" rel="nofollow ...
<p>When install <code>autoscaler</code> on AWS as:</p> <p><a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/aws" rel="nofollow noreferrer">https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/cloudprovider/aws</a></p> <p>Got error:</p> <pre><code>cluste...
<p>On AWS EKS (Elastic Kubernetes Service), the sslCertPath required by the cluster-autoscaler seems to be indeed <code>/etc/ssl/certs/ca-bundle.crt</code></p> <p>Exmple:</p> <pre><code>helm install stable/cluster-autoscaler --set "autoscalingGroups[0].name=myasgname-worker-nodes-3-NodeGroup-HHTVNI2VF9DF,autoscali...
<p>I'm using Azure for my Continuous Deployment, My secret name is "<strong>cisecret</strong>" using</p> <pre><code>kubectl create secret docker-registry cisecret --docker-username=XXXXX --docker-password=XXXXXXX --docker-email=SomeOne@outlook.com --docker-server=XXXXXXXXXX.azurecr.io </code></pre> <p>In my Visual St...
<p>Could this be due to your container name possibly? I had an issue where I wasn't properly prepending the ACR domain in front of the image name in my Kubernetes YAML which meant I wasn't pointed at the container registry / image and therefore my secret (which was working) appeared to be broken.</p> <p>Can you post ...
<p><a href="https://marketplace.visualstudio.com/items?itemName=ballerina.ballerina" rel="nofollow noreferrer">Ballerina extension</a> was installed successfully in visual code. Also I configured <code>ballerina.home</code> to point to the installed package </p> <pre><code>ballerina.home = "/Library/Ballerina/balleri...
<p>Solved! Just add the <code>import</code> instruction at the beginning of the file</p> <pre><code>import ballerinax/kubernetes; </code></pre> <p>Note, it is <code>ballerinax/kubernetes</code> and not <code>ballerina/kubernetes</code> (add <code>x</code>)</p>
<p>I'm new to Kubenetes, and would like to clarify the following.</p> <p>Assume we have a containerized java program (using docker) running in k8s. I need to stop getting requests to a pod when the heap size consumed by JVM reaches a limit. For that can I set the readiness and liveliness probes to certain values, so t...
<p>Yes this is possible. K8s livinessProbes can be a command.</p> <p>for instances.</p> <pre><code>livenessProbe: exec: command: - /bin/sh - -c - /home/test/check.sh </code></pre> <p>If you then write a script that checks the used heap by the JVM you should have the probe that you want.</p>
<p>I am setting up GPU monitoring on a cluster using a <code>DaemonSet</code> and NVIDIA DCGM. Obviously it only makes sense to monitor nodes that have a GPU.</p> <p>I'm trying to use <code>nodeSelector</code> for this purpose, but <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselecto...
<p><a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity" rel="nofollow noreferrer">Node Affinity</a> was the solution:</p> <pre><code>spec: template: metadata: labels: app: dcgm-exporter annotations: prometheus.io/scrape: 'true' ...
<p>I've been tinkering with Kubernetes on and off for the past few years and I am not sure if this has always been the case (maybe this behavior changed recently) but I cannot seem to get Services to publish on the ports I intend - they always publish on a high random port (>30000).</p> <p>For instance, I'm going thro...
<p>Matt,</p> <p>The reason a random port is being allocated is because you are creating a service of type NodePort. </p> <p>K8s documentation explains NodePort <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">here</a></p> <p>Based ...
<p>I installed <code>minikube</code> with the below command:</p> <pre><code>curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 &amp;&amp; chmod +x minikube &amp;&amp; sudo mv minikube /usr/local/bin/ </code></pre> <p>Then, I start <code>minikube</code> cluster using</p> <...
<p>I had the same issue, I was behind corporate proxy, adding <code>minikube ip</code> to the <code>no_proxy</code> env variable on host machine solved the issue.</p> <pre><code>export no_proxy=$no_proxy,$(minikube ip) </code></pre>
<p>We have an application that runs on an Ubuntu VM. This application connects to Azure Redis, Azure Postgres and Azure CosmosDB(mongoDB) services.</p> <p>I am currently working on moving this application to Azure AKS and intend to access all the above services from the cluster. The services will continue to be extern...
<blockquote> <p>I am currently working on moving this application to Azure AKS and intend to access all the above services from the cluster.</p> </blockquote> <p>I assume that you would like to make all services to access each other and all the services are in AKS cluster? If so, I advise you configure the interna...
<p>I have a problem when I set kubelet parameter <code>cluster-dns</code></p> <p>My OS is CentOS Linux release 7.0.1406 (Core)<br> Kernel:<code>Linux master 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</code></p> <p>kubelet config file:</p> <pre><code>KUBELET_HOSTNAME="--h...
<p>Recheck your kubelet config:</p> <pre><code>KUBELET_DNS="–-cluster-dns=10.254.0.10" </code></pre> <p>It seems to me that the first dash is <strong>longer</strong> than the second.</p> <p>Maybe a copy&amp;paste you made causes that strange character. Retype it and retry.</p>
<p>if I run <code>jx create cluster aws</code> -> it creates the cluster on aws without any issues but if I won't to specify some options like this:</p> <pre><code>jx create cluster aws --zones us-east-2b --nodes=2 --node-size=t2.micro --master-size=t2.micro </code></pre> <p>Then it fails constantly, whatever I tri...
<p>I asked about this in a comment, but the actual <em>answer</em> appears to be that you are on a version of <code>jx</code> that doesn't match the documentation. Because this is my experience with a freshly downloaded binary:</p> <pre><code>$ ./jx create cluster aws --verbose=true --zones=us-west-2a,us-west-2b,us-we...
<p>I am trying to use <a href="https://github.com/kubernetes-client/python#example" rel="nofollow noreferrer">Kubernetes python SDK</a>.<br> I tried to run the following code: </p> <pre><code>from kubernetes import client, config # Configs can be set in Configuration class directly or using helper utility config.loa...
<p>I ran <code>sudo -s</code> and then from the pycharm folder (<code>pycharm-community-2018.1.4/bin</code>) I ran <code>sh ./pycharm.sh</code> and it worked. </p>
<p>With Kubernetes 1.10.* we can use <code>binaryData:</code> with <code>ConfigMap</code> and I am trying to combine it with <code>Helm</code>:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: some_config_map data: text_data: |- {{ .Files.Get "truststores/simple_text_file.txt" }} binaryData: tru...
<p>Your syntax looks fine and everything should work properly. Files in the field <code>binaryData</code> must be encoded with base64, so, <code>{{ .Files.Get "truststores/trustore.jks" | b64enc }}</code> is correct.</p> <p>Try to apply the configuration with debug key and investigate what went wrong, possibly there ...
<p>Currently, my <strong>kubernetes</strong> cluster (sitting on <strong>AWS</strong>) has a simple setup with a <code>Deployment</code>, which has a web container listens on <strong>80</strong> and <strong>443</strong>. </p> <p>The cluster also has a <code>NodePort</code> service, which exposes the traffic to public ...
<p>As soon as the <em>NodePort</em> service is bound to specified ports on all cluster nodes, you just need to deliver traffic to any of these nodes, or to all of them. Sometimes it could lead to additional delay, but from the connectivity perspective, it should work fine.</p> <p>You can configure <em>Load Balancer</e...
<p>Running e2e-test on the local cluster kubernetes, with command:</p> <pre><code>go run hack/e2e.go -- --provider=local --test --check-version-skew=false --test_args="--host=https://192.168.1.5:6443 --ginkgo.focus=\[Feature:Performance\]" </code></pre> <p>Showing the errors:</p> <pre><code>[Feature:Performance] sho...
<p>According to kubelet <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#options" rel="nofollow noreferrer">documentation</a>: </p> <pre><code>--max-pods int32 Number of Pods that can run on this Kubelet. (default 110) </code></pre> <p>So, 110 should be enough to pass the tests. Bu...
<p>I have a <code>kubernetes</code> cluster working perfectly fine. It has 5 worker nodes. I am using below command to get the status of pods.</p> <pre><code>kubectl get pod -o wide --namespace=machines </code></pre> <p>which shows below results</p> <pre><code>NAME READY STATUS REST...
<p>You can pipe the kubectl command output to sort:</p> <pre><code>kubectl get pods -o wide --namespace=machines | sort -k7 </code></pre> <p>or to omit the first line</p> <pre><code>kubectl get pods -o wide --namespace=machines | sed -n '1!p' | sort -k7 </code></pre> <p>Also, you should be able to do this by <code>...
<p>For my project, I need to send UDP packets to a Kubernetes Pod from an outside cluster. How can I do this?</p> <p>I am using Kubeadm for creating the cluster. I tried to use nodePort but it seems that my requirement cannot be fulfilled with Nodeport.</p>
<p>Actually, <code>NodePort</code> can be used to expose ports within TCP and UDP protocols. What was the problem in your case?</p> <p>You can consider using <code>Nginx Ingress Controller</code> and creating <code>ReplicationController</code> to implement <code>Nginx ingress</code> in order to expose your Pods across...
<p>I have created ingress for some services on minikube (1.8.0):</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingress metadata: name: gateway-ingress namespace: kube-system annotations: ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - backend: serviceName...
<p>I had the same issue. You can solve it by defining new paths in the Ingress resource. </p> <pre><code> rules: - http: paths: - path: /ui backend: serviceName: kubernetes-dashboard servicePort: 80 - path: /* backend: serviceName: kubernetes-dashboard ...
<p>I have a Google Cloud Platform project where I use Kubernetes to deploy my apps, but I have noticed on my billing that Stackdriver Logging costs too much for me and I don't really need logging right now.</p> <p>So, does anyone know how can I disable the Stackdriver Logging API in my clusters?</p>
<p>You can disable logging in several ways:</p> <ul> <li>Disabling like <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/logging#disabling_logging" rel="nofollow noreferrer">in here</a>.</li> <li>Doing this <a href="https://stackoverflow.com/a/42447388/3058302">old workaround</a>.</li> </ul>
<p>I have a K8s cluster created with kubeadm that consists of a master node and two workers.</p> <p>I am following this documentation article regarding the etcd backup: <a href="https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/#backing-up-an-etcd-cluster" rel="noreferrer">https://kubernetes.i...
<p>I managed to make it work adding the certificates info to the command:</p> <pre><code>ETCDCTL_API=3 etcdctl --endpoints https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key /etc/kubernetes/pki/etcd/healthcheck-client.key snapshot save ./snapsho...
<p>I am trying to find a way to determine the status of the "kubectl port-forward" command. There is a way to determine the readiness of a pod, a node...: i.e. "kubectl get pods" etc...</p> <p>Is there a way to determine if the kubectl port-forward command has completed and ready to work?</p> <p>Thank you.</p>
<p>I have the same understanding as you @VKR.</p> <p>The way that I choose to solve this was to have a loop with a curl every second to check the status of the forwarded port. It works but I had hoped for a prebaked solution to this.</p> <pre><code>do curl:6379 timer=0 while curl is false and timer &lt;100 timer++ ...
<p>How can I enable feature gates for my cluster in Rancher 2.0? I am in need of enabling the <code>--feature-gates MountPropagation=true</code>. This will enable me to use storage solutions like StorageOS, CephFS, etc</p> <p>There are 2 use cases here : </p> <ol> <li>If the Rancher is setup already and running?</li...
<p>Hello and hope this helps someone, After much googling and help from awesome people at Rancher I got the solution for this. Here is what you can do to set the feature gates flags for the Kubernetes engine RKE.</p> <p>step 1: Open Rancher2.0 UI</p> <p>step 2: View cluster in API</p> <p><a href="https://i.stack.img...
<p>Using GKE</p> <p>Trying to deploy a yml that has a docker image that contains <code>gcr.io/myproject-101/pyftp</code>. I have not had a problem with pulling this image at all until just recently. And from the looks of it it just started happening after my trial ran out. I've tried recreating my cluster and directly...
<p>Using default settings, builds are required to be tagged as latest. Using default auto-build settings for container builder, it lets the tag as the commit's hash rather than the <code>latest</code> tag. </p>
<p>I am running a few kubernetes pods in my a cluster (10 node). Each pod contains only one container which hosts one working process. I have specified the CPU "limits" and "requests" for the container . The following is a description of one pod that is running on a node (crypt12). </p> <pre><code>Name: alex...
<p>I found a github issue discussion where I found the answer of my question: the cpu percentage from "kubectl describe node" is "CPU-limits/# of Cores". Since I set CPU-limit to 0.8, 10% is the result of 0.8/8.<br> Here is link: <a href="https://github.com/kubernetes/kubernetes/issues/24925" rel="nofollow noreferrer"...
<p>Is there a way to populate the serviceaccount secrets content to an environment variable?</p> <p>Example: when a pod is started, it contains a <code>/var/run/secrets/kubernetes.io/secrets/serviceaccount/</code> folder that contains <code>token</code>, <code>ca.crt</code>... and other that is the result to map the <...
<p>You can create a secret annotated with <code>kubernetes.io/service-account.name</code> annotation.</p> <p>This annotation provides related service account information to current secret.</p> <pre><code>apiVersion: v1 kind: Secret metadata: name: vault-auth-secret annotations: kubernetes.io/service-account.n...
<p>I’m trying to get <code>traefik</code> running in GKE, following the user guide (<a href="https://docs.traefik.io/user-guide/kubernetes/" rel="nofollow noreferrer">https://docs.traefik.io/user-guide/kubernetes/</a>). </p> <p>Instead of seeing the dashboard, I get a <code>404</code>. I guess there’s a problem with ...
<p>Since the namespace "kube-system" is handled by the Master node, you will not be able to deploy anything on that specific namespace. The Master node within GKE is a managed service and is not accessible to users at this time.</p> <p>If you would like to have this functionality, then the only suggestion I can provid...
<p>I want to use Kafka to "divide the work". I want to publish instances of work to a topic, and run a cloud of identical consumers to process them. As each consumer finishes its work, it will pluck the next work from the topic. Each work should only be processed once by one consumer. Processing work is expensive, s...
<p>The pattern you found is accurate. Note that topics can also be created using the <a href="http://kafka.apache.org/11/javadoc/org/apache/kafka/clients/admin/AdminClient.html#createTopics-java.util.Collection-" rel="nofollow noreferrer">Kafka Admin API</a> and <a href="http://kafka.apache.org/documentation/#basic_ops...
<p>I have an application that is internal and exposed only to other application on the cluster by a service with cluster IP. Other services are accessing this application via it's DNS (<code>serviceName-namespace.svc.cluster.local</code>). This application handles sensitive data, so although all the communication is in...
<p>I just found that Kubernetes API can be used to generate a certificate that will be trusted by all the pods running on the cluster. This option might be simpler than the alternatives. You can find the documentation <a href="https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/" rel="noreferrer">here</a>, i...
<p>We have a kubernetes cluster with Debezium running as a source task from a Postgresql and writing to kafka. Debezium, postgres and kafka are all running in separate pods. When the postgres pod is deleted and kubernetes re-creates the pod, debezium pod fails to re-connect. Logs from debezium pod:</p> <pre><code> ...
<p>Looks like this is a common issue and has open feature requests in both debezium and kafka</p> <p><a href="https://issues.jboss.org/browse/DBZ-248" rel="nofollow noreferrer">https://issues.jboss.org/browse/DBZ-248</a></p> <p><a href="https://issues.apache.org/jira/browse/KAFKA-5352" rel="nofollow noreferrer">https...
<p>I install kube1.10.3 in two virtualbox(centos 7.4) in my win10 machine. I use git clone to get prometheus yaml files. </p> <pre><code>git clone https://github.com/kubernetes/kubernetes </code></pre> <p>Then I enter kubernetes/cluster/addons/prometheus annd follow this order to create pods:</p> <pre><code>alertman...
<p>This log entry:</p> <pre><code>Error from server (BadRequest): a container name must be specified for pod alertmanager-6bd9584b85-j4h5m, choose one of: [prometheus-alertmanager prometheus-alertmanager-configmap-reload] </code></pre> <p>means <code>Pod</code> <code>alertmanager-6bd9584b85-j4h5m</code> consists of ...
<p>I have a Kubernetes cluster running several different applications... one of my PHP applications is calling an external service that requires that the caller's IP address is whitelisted with the service. Since this is a Kubernetes cluster and the IP address can change, I could have the IP address that is currently ...
<p>To achieve this, you need to add IP addresses of your Kubernetes nodes to the whitelist of your external services. When you call something external from pod, your request goes through the node interface and has node’s external IP. In case your nodes have no external IPs and stay behind a router you need to add IP ad...
<p>I am trying to start up the kubelet service on a worker node (the 3rd worker node)... at the moment, I can't quite tell what the error is here.. I do however, see <code>F0716 16:42:20.047413 556 server.go:155] unknown command: $KUBELET_EXTRA_ARGS</code> in the output given by <code>sudo systemctl status kubelet ...
<p>Currently, in <code>systemd</code> a bit different approach is used. All options are put to separate file and systemd config script refers to that file.</p> <p>In your case, it would be something like this:</p> <pre><code>/etc/sysconfig/kubelet ---------------------- KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=...
<p>I have installed a Kubernetes cluster using kubeadm. It works fine. But accidentally I restarted my host machine where master was up. After the restart the kubelet was not running . I had to do </p> <blockquote> <p>Kubeadm reset</p> </blockquote> <p>And</p> <blockquote> <p>Kubeadm init</p> </blockquote> <p>...
<p>There is no need to do <code>kubeadm reset</code> and <code>kubeadm init</code> in such cases. To start <code>kubelet</code> service during the current session use: </p> <pre><code>systemctl start kubelet </code></pre> <p>To start service automatically during the boot, you must enable it using:</p> <pre><code>sy...
<p>The Istio ingress gateway exposes the following ports by default:</p> <pre><code>80:31380/TCP,443:31390/TCP,31400:31400/TCP </code></pre> <p>Why does it expose 31400 and map it to 31400? I can't find an explanation of this in the docs or elsewhere.</p> <p><strong>Background:</strong> I'm following the <a href="ht...
<p><a href="https://github.com/istio/istio/commit/a4b6cc55dd2066f6c2bbe8fdf6d39657f44f444e" rel="noreferrer">Commit a4b6cc5</a> mentions:</p> <blockquote> <p>Adding the 31400 port back because of testdata dependency</p> </blockquote> <p>This is part of <a href="https://github.com/istio/istio/pull/6350" rel="norefer...
<p>I successfully deployed helm chart <a href="https://github.com/coreos/prometheus-operator/tree/master/helm/prometheus-operator" rel="nofollow noreferrer">prometheus operator</a>, <a href="https://github.com/coreos/prometheus-operator/tree/master/helm/kube-prometheus" rel="nofollow noreferrer">kube-prometheus</a> an...
<p>Just realised the owner of <code>jmx-exporter</code> mentioned in README:</p> <blockquote> <p>This exporter is <code>intended to be run as a Java Agent</code>, exposing a HTTP server and serving metrics of the local JVM. It can be also run as an independent HTTP server and scrape remote JMX targets, <code>but thi...
<p>I am attempting to get Istio setup on Kubernetes as an ingress controller. The problem is that my two applications seem to be accessible from the Istio ingress controllers node port (E.g., <a href="http://[host]:31380/application1" rel="nofollow noreferrer">http://[host]:31380/application1</a> and <a href="http://...
<p>If routing to your application is required to run on 443/80, your Kubernetes cluster must have an external load balancer deployed. If one is not present, the traffic will be routed to the ingress node port. </p> <p>Refer to - <a href="https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-i...
<p>We have a Rancher Kubernetes cluster where sometimes the pods get stuck in <code>terminating</code> status when we try to delete the corresponding deployment, as shown below.</p> <pre><code>$ kubectl get deployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE ... storage-manag...
<p>Check the pod spec for an array: 'finalizers'</p> <pre><code>finalizers: - cattle-system </code></pre> <p>If this exists, remove it, and the pod will terminate.</p>
<p>I have 2 vms that run a kubernetes master and a slave node that i have setup locally. Till now everything was working fine but suddenly it started giving errors when I try to start the master with kubeadm init command.I have cpppied the error below.</p> <pre><code>shayeeb@ubuntu:~$ sudo kubeadm init [init] using Ku...
<p>You can also run following command rather than writing the yaml,</p> <pre><code>kubeadm init --kubernetes-version=1.11.0 --apiserver-advertise-address=&lt;public_ip&gt; --apiserver-cert-extra-sans=&lt;private_ip&gt; </code></pre> <p>If you are using flannel network run following commad,</p> <pre><code>kubeadm ini...
<p>I have a project with N git repos, each representing a static website (N varies). For every git repo there exists a build definition that creates an nginx docker image on Azure Container Registry. These N build definitions are linked to N release defenitions that deploy each image to k8s (also on Azure). Overall, CI...
<p>VSTS has not the feature "stop environment" (auto delete the deployed things on the environment) in release management. But you can achieve the same thing in <a href="https://learn.microsoft.com/en-us/vsts/pipelines/build/yaml?view=vsts" rel="nofollow noreferrer"><strong>VSTS YAML build</strong></a>.</p> <p>So exce...
<p>I am in the process of learning Kubernetes with a view to setting up a simple cluster with Citus DB and I'm having a little trouble with getting things going, so would be grateful for any help.</p> <p>I have a docker image containing my base debian image configured for Citus for the project, and I want to set it up...
<p>You are looking for a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">StatefulSet</a>. That lets you have a known number of pod replicas; with attached storage (PersistentVolumes); and consistent DNS names. In the pod spec I would launch only a single copy...
<p>I am unable to connect to an exposed IP for a docker container deployed on Google Could Kubernetes. I have been roughly following <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app" rel="noreferrer">this tutorial</a> but using my own application.</p> <p>The deployment seems to work fine, e...
<p>As per the comments the target port should be 80 since that is what the application is set to listen on. Glad I could help. Picked it up from the documentation a month or so ago.</p> <p><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noreferrer">https://kubernetes.io/docs/concepts/se...
<p>What happened: Installed kubctl-cli throgh brew. At the time on my pc kubectl version version was 1.11.0 and the server was 1.9.3. While I was working on my cluster I tried to delete a pod named X, the command got stuck so I had to stop it (ctrl+c) and pod X got stuck in a Termination state. I tried to SSH into the ...
<p>I provided <a href="https://stackoverflow.com/a/51138459/9485673">the answer</a> to same problem:</p> <blockquote> <p>From <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#supported-releases-and-component-skew" rel="nofollow noreferrer">documentation...
<p>I configured kubernetes cluster with one master and one node, the machines that run master and node aren't in the same network. For networking I installed calico and all the pods are running. For testing the cluster I used <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-containe...
<p>Before checking your status on Master .Please verify below things.</p> <p>Please run below commands to check cluster info :</p> <pre><code>setenforce 0 firewall-cmd --permanent --add-port=6443/tcp firewall-cmd --permanent --add-port=2379-2380/tcp firewall-cmd --permanent --add-port=10250/tcp firewall-cmd --permane...
<p>I'm moving an Apache Mesos application, where my configurations are based in JSON, to Kubernetes, where my configurations are based in YAML. Would the JSON configuration files work as a YAML file since YAML is a superset of JSON, or would I need to write a new YAML file?</p>
<p>Yes, JSON works as well, it's just more pain than YAML to write it, manually. Also, you may be able to use <a href="https://github.com/micahhausler/container-transform" rel="nofollow noreferrer">micahhausler/container-transform</a> to convert your Marathon specs to Kubernetes specs.</p>
<p>I have Kubernetes cluster, hosted on Google cloud platform, that running two deployments: <code>app1</code> and <code>app2</code>.</p> <p>My cluster have two Node-Pools: <code>pool1</code> and <code>pool2</code>. </p> <p>Deploying pods, from yaml file, like this: </p> <pre><code>kubectl apply -f ./app1.yaml kubec...
<p>You need to have labels differentiating the nodes in each pool. Then look at pod affinity to bind pods to nodes with certain labels. If you have to have this off the command line I believe it would be possible via overrides it won't look nearly as pretty as your desired line</p>
<p>I am running a jobs with a kubernetes POD and I need to measure the execution time for each job .</p> <p>I want to get it through some api.</p> <p>Does anyone know how can I get it ?</p>
<p>A job has a property denominated <code>status</code> of type <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#jobstatus-v1-batch" rel="nofollow noreferrer">JobStatus</a>. </p> <p>The properties which you are looking for in the <code>JobStatus</code> type is the <code>startTime</code> an...
<p>How do I restore kubernetes cluster using kops? I've kubernetes state files in my s3 bucket.</p> <p>Is there a way to restore kubernetes cluster using kops?</p>
<p>As you mention, kops stores the state of the cluster in an S3 bucket. If you run <code>kops create cluster</code> with the same state file, it will recreate the cluster as it was before, with the same instancegroups and master configuration. This assumes the cluster has been deleted, if not, you'll need to use the <...
<p>I've launched kubernetes cluster using kops. It was working find and I started facing the following problem:</p> <pre><code>kubectl get pods The connection to the server localhost:8080 was refused - did you specify the right host or port? </code></pre> <p>How do i solve this? It looks like kubernetes-apiserver is ...
<p>Kubernetes uses a <code>$KUBECONFIG</code> file for connecting to clusters. It may be when provisioning your kops cluster, it didn't write the file correctly. I can't be sure as you haven't provided enough info.</p> <p>Assuming this is the issue, and you only have a single cluster, it can be resolved like so:</p> ...
<p>Unable to start minikube in my Mac machine. Information about the kubernetes, minikube versions as well as the error is given in detail below.</p> <pre><code>kubernetes-cli version kubernetes-cli 1.11.0 minikube version minikube version: v0.28.0 minikube start Starting local Kubernetes v1.10.0 cluster... Starting...
<p>Minikube should work "outside of the box" according to the documentation. Are you using VirtualBox or native hypervisor? There might be an issue with not enough resources so please check that. By default minikube uses 2 CPU's and 2048 megabytes of RAM as specified <a href="https://github.com/kubernetes/minikube/blob...
<p>I am configuring a StatefulSet where I want the number of replicas (<strong>spec.replicas</strong> as shown below) available to somehow pass as a parameter into the application instance. My application needs <strong>spec.replicas</strong> to determine the numer of replicas so it knows what rows to load from a MySQL...
<p>Normally you would use the downward api for this kind of thing. <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/</a></p> <p>How...
<p>I understand with Prometheus we can set up alerting rules which can detect and raise an alert if a pod crashes. </p> <p>I want to understand how does Prometheus itself know when a pod crashed or is stuck in pending state.</p> <ul> <li>Does it know this when it is trying to scrape metrics from pod's http endpoint p...
<p>The common way for prometheus to extract metrics and health is by the use of scraping (thru an http endpoint is the most common). Since pods can have multiple containers, it is best to scrape an http endpoint of your running container.</p> <p>If prometheus didnt receive a good response from this endpoint, it can d...
<p>I have a single node kubernetes deployment running on a home server, on which I have several services running. Since it's a small local network, I wanted to block off a portion of the local address range that the rest of my devices use for pod ips, and then route to them directly.</p> <p>For example, if I have a we...
<p>I believe the answer to your question is to use the <a href="https://github.com/containernetworking/plugins#ipam-ip-address-allocation" rel="nofollow noreferrer">dhcp IPAM</a> plugin to <a href="https://github.com/containernetworking/cni#readme" rel="nofollow noreferrer">CNI</a>, but being mindful about Pod address ...
<p>I want to deploy kafka on kubernetes.</p> <p>Because I will be streaming with high bandwidth from the internet to kafka I want to use the hostport and advertise the hosts "dnsName:hostPort" to zookeeper so that all traffic goes directly to the kafka broker (as opposed to using nodeport and a loadbalancer where traf...
<blockquote> <p>How can I pass that information to the container? Ideally I could do this from the deployment yaml but I'm also open to other solutions.</p> </blockquote> <p>The first thing I would try is <code>envFrom: fieldRef:</code> and see if it will let you reach into the <code>PodSpec</code>'s <code>status:</...
<p>I have kubernetes cluster. I have started mysql from kubectl. I have a image of spring boot application. I am confused with the JDBC url to be used in application.yml. I have tried multiple IP addresses by describing pods, services etc. It is getting errored out with "<strong>communication Link failure</strong>"</p>...
<p>Your K8S service should expose port and targetPort 3306 and in your JDBC URL use the name of that service: <code>jdbc:mysql://mysql/database</code></p> <p>If your MySQL is a backend service only for apps running in K8S you don't need nodePort in the service manifest.</p> <p>If you get a <code>SQLException: Connect...
<p>I'm having an issue logging to Stackdriver from my golang api. My configuration:</p> <ul> <li>GKE cluster running on three compute engine instances</li> <li>Logging and monitoring enabled on GKE container cluster</li> <li>Go service behind ESP</li> <li>There are three nodes in the kube-system namespace running the ...
<p>Log entries created with the Stackdriver logging client does not seem to be categorized under any of the predefined categories, making it very difficult to find in Logs Viewer's basic mode.</p> <p>Try to access Logs Viewer "advanced filter interface" by converting the query to a <a href="https://cloud.google.com/lo...
<p>The <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/secret" rel="noreferrer">docs states</a> that </p> <blockquote> <p>To create a Secret from one or more files, use --from-file. You specify files in any plaintext format, such as .txt or .env, as long as the files contain key-value pairs.</p...
<p>Yes, use the option --from-env-file</p> <pre><code>kubectl create secret generic person --from-env-file=.test-secret </code></pre> <p>To consume the secrets from the initial .env file in a pod, you can use the following :</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: some-meta spec: containers: - nam...
<p>I have Kubernetes cluster, hosted on Google cloud platform, that running two deployments: <code>app1</code> and <code>app2</code>.</p> <p>My cluster have two Node-Pools: <code>pool1</code> and <code>pool2</code>. </p> <p>Deploying pods, from yaml file, like this: </p> <pre><code>kubectl apply -f ./app1.yaml kubec...
<p>You can have two .yaml files for two deployments and you can select the node pool as follows.</p> <pre><code>nodeSelector: nodeclass: pool1 </code></pre> <p>Add the above code to your yaml file.</p>
<p>I'm trying to accomplish a VERY common task for an application: </p> <p>Assign a certificate and secure it with TLS/HTTPS.</p> <p>I've spent nearly a day scouring thru documentation and trying multiple different tactics to get this working but nothing is working for me.</p> <p>Initially I setup nginx-ingress on E...
<p>I've replicated every step necessary to get up and running on EKS with a secure ingress. I hope this helps anybody else that wants to get their application on EKS quickly and securely.</p> <p>To get up and running on EKS:</p> <ol> <li><p>Deploy EKS using the CloudFormation template <a href="https://gist.github.com...
<p>According to the <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable" rel="nofollow noreferrer">documentation</a>, Kubernetes reserves a significant amount of resources on the nodes in the cluster in order to run itself. Are the numbers in the documentation correct...
<p>Yes, kubernetes reserves a significant amount of resources on the nodes. So better consider that before renting the machine. </p> <p>You can deploy custom machines in GCP. For the pricing you can use <a href="https://cloud.google.com/products/calculator/" rel="nofollow noreferrer">this</a> calculator by Google</p>
<p>I want to create and remove a job using Google Cloud Builder. Here's my configuration which builds my Docker image and pushes to GCR.</p> <pre><code># cloudbuild.yaml steps: - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/xyz/abc:latest','-f','Dockerfile.ng-unit','.'] - name: 'gcr.io/cloud-bu...
<p>I wasn't able to connect and get cluster credentials. Here's what I did</p> <blockquote> <p>Go to IAM, add another Role to xyz@cloudbuild.gserviceaccount.com. I used Project Editor. </p> <p>Wrote this on cloudbuild.yaml <code>name: 'gcr.io/cloud-builders/kubectl' args: ['create', '-R', '-f','./dockertest...
<p>How do I know the list of all possible statuses and reasons in Kubernetes?</p> <p>Right now, I'm working with Kubernetes events. Based on certain unusual events, I will be reacting to it. For example, if a pod is backed off or pending, will receive such events and get notified via Email (custom code). Necessary act...
<p>If you need to have a complete list of <code>events</code> in Kubernetes, you should take a look directly to the <code>Kubernetes</code> project on github.</p> <p><a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/events/event.go" rel="noreferrer">Here</a> the link to the <code>event.go</code...
<p>Hello StackOverflow users,</p> <p>I've started working in the Kubernetes space recently and saw that <a href="https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/" rel="noreferrer">Custom Resource Definitions(CRDs) types are not namespaced and are available to to all ...
<p>See <a href="https://github.com/kubernetes/kubernetes/issues/65551#issuecomment-400909534" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/65551#issuecomment-400909534</a> for a discussion of this issue.</p> <p>A particular CRD can define a custom resource that is namespaced or cluster-wide, but th...
<p>So I have an interesting use case. I am running multiple micro-services on my Kubernetes cluster. My applications use NextJS which make internal calls to _next routes.</p> <p>My issue came from the fact that I needed a way to differentiate between services and their requests to the _next files. So I implemented Nex...
<p>You are using built-in NGINX Ingress Controller that, unfortunately, has no such functionality.</p> <p>My advice is to use <a href="https://github.com/nginxinc/kubernetes-ingress" rel="nofollow noreferrer">NGINX Plus Ingress Controller</a> annotation functionality if you can afford it.</p> <p>You can find <a href=...
<p>I am having an issue configuring GCR with ImagePullSecrets in my deployment.yaml file. It cannot download the container due to permission </p> <pre><code>Failed to pull image "us.gcr.io/optimal-jigsaw-185903/syncope-deb": rpc error: code = Unknown desc = Error response from daemon: denied: Permission denied for "l...
<p>The issue is most likely caused by you using a secret of type <code>dockerconfigjson</code> and having valid <code>dockercfg</code> in it. The <code>kubectl</code> command changed at some point that causes this.</p> <p>Can you check what it is marked as <code>dockercfg</code> or <code>dockerconfigjson</code> and th...
<p>Is this possible inside the kubernetes cluster?</p> <p>All examples I've found are copying from a local disk to a pod or vice versa, or is the only option to copy from node to node, for example over SSH, SCP or with other utilities?</p>
<p>It's not possible to do cluster to cluster copying. You'd need to use <code>kubectl cp</code> to copy it locally, then copy the file back:</p> <pre><code>kubectl cp &lt;pod&gt;:/tmp/test /tmp/test kubectl cp /tmp/test &lt;pod&gt;:/tmp/test </code></pre> <p>If you are trying to share files between pods, and only one ...
<p>I have a bare-metal kubernetes (<code>v1.11.0</code>) cluster created with kubeadm and working fine without any issues. Network with calico and made it a single node cluster using kubectl taint nodes command. (single node is a requirement).</p> <p>I need to run mydockerhub/sampleweb static website image on host port...
<p>I recently used <a href="https://traefik.io/" rel="noreferrer">traefik.io</a> to configure a project with similar requirements to yours.</p> <p>So I'll show a basic solution with <code>traefik</code> and ingresses.</p> <p>I dedicated a whole namespace (you can use <code>kube-system</code>), called <code>traefik</c...
<p>I am running a managed kubernetes cluster on Google Cloud Platform with a single node for development.</p> <p>However when I update Pod images too frequently, the ImagePull step fails due to insufficient disk space in the boot disk.</p> <p>I noticed that images should be auto GC-ed according to documentation, but ...
<p>Since Garbage Collector is an automated service, there are no kubectl commands or any other commands within GCP to manually trigger Garbage Collector.</p> <p>In regards to your second inquiry, Garbage Collector is handled by the Master node. The Master node is not accessible to users since it is a managed service. ...
<p>We have a number of different REST-based services running in Azure within a Kubernetes (version 1.9.6) cluster. </p> <p>Two of the services, let's say A and B needs to communicate with each other using REST-calls. Typically, something like the following:</p> <pre><code>Client calls A (original request) A calls B...
<p>Finally figured this out.</p> <blockquote> <p>Azure Load Balancers / Public IP addresses have a default 4 minute idle connection timeout.</p> </blockquote> <p>Essentially anything running through a Load Balancer (whether created by an Azure AKS Kubernetes Ingress or otherwise) has to abide by this. While you CA...
<p>I am setting an IP whitelist in my kubernetes ingress config via the annotation <code>ingress.kubernetes.io/whitelist-source-range</code>. But, I have different whitelists to apply for different environments (<code>dev</code>, <code>staging</code>, <code>production</code>, etc.) Therefore, I have a placeholder varia...
<p>Yes, it will give you error reading according to the <a href="https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/annotations/ipwhitelist/main_test.go" rel="nofollow noreferrer">ingress annotations ip whitelist</a>. It suspecting a IP range or Multiple IP ranges, even you didn't put a value, you...
<p>I am encountering an ENOTFOUND error within a multi-container Kubernetes pod. MongoDB is in one Docker container and appears to be fully operational, and a Node.js application is in another container (see its error below).</p> <pre>/opt/systran/apps-node/enterprise-server/node_modules/mongoose/node_modules/mongodb...
<p>According to the error output, your NodeJS application tries to connect to MongoDB database via <code>mongodb:27017</code>.</p> <p>As both NodeJS application and MongoDB database are containers of the same pod, NodeJS application should be connected to MongoDB database via <code>localhost:27017</code> instead, beca...
<p>I have developed a spring boot based REST API service and enabled https on it by using a self signed cert keystore (to test locally), and it works well.</p> <pre><code>server.ssl.key-store=classpath:certs/keystore.jks server.ssl.key-store-password=keystore server.ssl.key-store-type=PKCS12 server.ssl.key-alias=tomca...
<p>Well it depends on the way you want to expose your service. Basically you have either an ingress, an external load balancer (only in certain cloud evironments available) or a Service thats routed to a Port (either via NodePort or HostPort) as options. </p> <p><strong>Attention:</strong> Our K8S Cluster is self host...
<p>I have a working Cluster with services that all respond behind a helm installed Ingress nGinx running on Azure AKS. <strong><em>This ended up being Azure specific.</em></strong></p> <blockquote> <p>My question is: Why does my connection to the services / pods in this cluster periodically get severed (apparentl...
<h2>Short Answer:</h2> <blockquote> <p>Azure AKS automatically deploys an Azure Load Balancer (with public IP address) when you add a new ingress (nGinx / Traefik... ANY Ingress) — that Load Balancer has its settings configured as a 'Basic' Azure LB which has a 4 minute idle connection timeout.</p> </blockquote> <p>Tha...
<p>I have setup cluster with kubeadm its working fine and 6443 port is up. but after reboot my system cluster is not getting up. </p> <p>What should I do?</p> <p>please find the logs</p> <pre><code>node@node1:~$ sudo kubeadm init [init] using Kubernetes version: v1.11.1 ...... node@node1:~$ node@node1:~$ mkdir -p...
<p>Your <code>kubelet</code> service is not running. Try to view its logs:</p> <pre><code>$ journalctl -u kubelet </code></pre> <p>To start the service:</p> <pre><code>$ sudo systemctl start kubelet </code></pre> <p>If you want to make <code>kubelet</code> running during the boot you'll need to enbale it. First of ...
<p>An ingress controller is a Layer 7 construct. Does it bypass the Service (VIP) and Layer 4 kube proxy?</p>
<p>In a nutshell: Ingress deals with North-South traffic (bringing traffic from the outside world into the cluster), a service acts a load balancer, routing the traffic to one of its pods. So, if I understand your question correctly, the answer is no: Ingress and services work together to get traffic from a client outs...
<p>We currently have 2 Kubernetes clusters:</p> <ul> <li><p>One setup with Kops running on AWS</p></li> <li><p>One setup with Kubeadm running on our own hardware</p></li> </ul> <p>We want to combine them to only have a single cluster to manage. </p> <p>The master could end up being on AWS or on our servers, both are...
<p>You can join the nodes manually, but this is really not a recommend way of doing things.</p> <p>If you're using kubeadm, you probably already have all the relevant components installed on the workers to have them join in a valid way. What I'd say the process to follow is:</p> <p>run <code>kubeadm reset</code> on t...
<p>How can I rename route that has been created via web console? I go to <code>Applications&gt;Routes</code>, selected route name, then <code>Action&gt;Edit YAML</code> and I want to achieve the following change, from <code>test.site</code> into <code>old.test.site</code></p> <p><strong>Current route yml config</stron...
<p>As <a href="https://stackoverflow.com/users/128141/graham-dumpleton">Graham Dumpleton</a> wrote:</p> <p>As far as I know you can't edit the host in place for an existing route. From the command line try </p> <pre><code>oc get route test -o yaml &gt; route.yaml </code></pre> <p>Then edit the <code>route.yaml</cod...
<p>Setup: Kubernetes cluster on AKS with nginx-kubernetes ingress. Azure Application Gateway routing domain with SSL certificate to nginx-kubernetes.</p> <p>No problems serving everything in Kubernetes.</p> <p>Now I moved static content to Azure Blob Storage. There's an option to use a custom domain, which works fine...
<p>Not exactly the answer to the question, but the answer to the problem. Unfortunately this isn't documented very well. The solution is to create a service with a type of "ExternalName". According to <a href="https://akomljen.com/kubernetes-tips-part-1/" rel="noreferrer">https://akomljen.com/kubernetes-tips-part-1/</a...
<p>I'm creating a Kubernetes PVC and a Deploy that uses it.</p> <p>In the yaml it is specified that uid and gid must be 1000.</p> <p>But when deployed the volume is mounted with different IDs so I have no write access on it.</p> <p>How can I specify effectively uid and gid for a PVC?</p> <p>PVC yaml:</p> <pre cl...
<p>After some experiments, finally, I can provide an answer. </p> <p>There are several ways to run processes in a Container from specific UID and GID:</p> <ol> <li><p><code>runAsUser</code> field in <code>securityContext</code> in a Pod definition specifies a user ID for the first process runs in Containers in the Po...
<p>To make ingress work <a href="https://medium.com/google-cloud/understanding-kubernetes-networking-ingress-1bc341c84078" rel="nofollow noreferrer">as far as I understand it</a> you need to create all services (that are using ingress controllers) as type NodePort.</p> <p>Therefore is 2768 the service limit for ingres...
<p>You're understanding isn't necessarily correct.</p> <p>It depends on your environment, cloud provider, ingress controller etc. Because the ingress controller is provisioned inside the cluster, all services that requires an ingress can use ClusterIP, and the ingress controller will route traffic to it.</p> <p>Again...
<p>Is it possible to use the Ingress Controller function in Kubernetes without a load balancer (in Digital Ocean). </p> <p>Is there any other mechanism to allow a domain name to map to a Kubernetes service; for instance if I host two WordPress sites on a Kubernetes cluster:</p> <p>==> WP Site 1: Node Port 80 ==> WP S...
<p>DNS doesn't support adding port numbers, you need an ingress controller (which essentially acts like a reverse proxy) to do this.</p> <p>If you install the <a href="https://github.com/digitalocean/digitalocean-cloud-controller-manager" rel="noreferrer">digital ocean cloud controller manager</a> you'll be able to pr...
<p>I'm using <a href="https://kubernetes.io/docs/setup/minikube/" rel="nofollow noreferrer">minikube</a> to test out a local Kubernetes scenario. I have 2 <a href="http://flask.pocoo.org/" rel="nofollow noreferrer">Python Flask</a> applications named 'frontend.py' and 'interceptor.py'. Basically I want to do a GET to...
<p>As long as you have the <code>kube-dns</code> add-on enabled in <code>minikube</code> you should be able to perform DNS-based service discovery. I would say that this is the recommended way of getting hold of the IP addresses of your resources.</p> <p>To double check that you have <code>kube-dns</code> enabled run ...
<p>I came across an open source Kubernetes project <a href="https://github.com/kubernetes/kops" rel="noreferrer">KOPS</a> and AWS Kubernetes service EKS. Both these products allow installation of a Kubernetes cluster. However, I wonder why one would pick EKS over KOPS or vice versa if one has not run any of them earlie...
<p>The two are largely the same, at the time of writing, the following are the differences I'm aware of between the 2 offerings</p> <p>EKS:</p> <ul> <li>Fully managed control plane from AWS - you have no control over the masters</li> <li><a href="https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html" re...
<p>Please help me. I'm following this guide: <a href="https://pleasereleaseme.net/deploy-a-dockerized-asp-net-core-application-to-kubernetes-on-azure-using-a-vsts-ci-cd-pipeline-part-1/" rel="nofollow noreferrer">https://pleasereleaseme.net/deploy-a-dockerized-asp-net-core-application-to-kubernetes-on-azure-using-a-vst...
<p>The reason they are in Pending state is described in the message at the bottom of the <code>describe pod</code> output: <code>MatchNodeSelector</code>. That means Kubernetes didn't find a Node in your cluster that was able to fulfill the Node selection criteria specified in the PodSpec.</p> <p>Specifically, it's ve...
<p>I am trying to enable some admission controllers on EKS. How do you see the existing admission controllers and enable new ones?</p>
<p>I don't believe this is possible at this time. The control plane is managed by Amazon, and it's not possible to modify it.</p> <p>If you need a Kubernetes cluster in AWS with these kind of options, use <a href="https://github.com/kubernetes/kops" rel="noreferrer">kops</a></p>
<p>I'm trying to deploy my Dockerized React app to Kubernetes. I believe I've dockerized it correctly, but i'm having trouble accessing the exposed pod.</p> <p>I don't have experience in Docker or Kubernetes, so any help would be appreciated.</p> <p>My React app is just static files (from npm run build) being served ...
<p>The short version is that the Service is listening on the same TCP/IP port on every Node in your cluster (<code>34604</code>) as is shown in the output of <code>describe service</code>:</p> <pre><code>NodePort: &lt;unset&gt; 34604 </code></pre> <p>If you wish to access the application through a "n...
<p>With a Kubernetes cluster up and running and the ability to go to the master over ssh with ssh-keys and run kubectl commands there; I want to run kubectl commands on my local machine. So I try to setup the configuration, following the <a href="https://kubernetes-v1-4.github.io/docs/user-guide/kubectl/kubectl_config_...
<p>Unfortunately, above <code>kubectl</code> config file is incorrect. It seems an error appeared due to manual formatting or something else. </p> <p>New line is missing in this part (<code>name: mykubecontexts:</code>):</p> <pre><code>clusters: - cluster: server: https://&lt;master-ip&gt;:6443 name: mykubecont...
<p>I am trying to install Minikube on a GCP VM. I am running into an issue where the OS is complaining that VT-X/AMD-v needs to be enabled. Are there any specific instructions for setting this up on GCP?</p>
<p><a href="https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances" rel="nofollow noreferrer">Nested Virtualization</a> is supported on GCP and I can confirm the documentation I've linked is up to date and workable.</p> <p>Quoting the 3 basic points here that you need:</p> <ul> <li>...
<p>I am working with Minikube and I have alpine pod with one container.<br> When I run:<br> <code>kubectl exec -it -v=6 alpinec1-7c65db48b4-v2gpc /bin/sh</code> </p> <p>I receive a shell and I can run any command (<code>ifconfig</code>, etc.) inside it. </p> <p>But when I tried to run <code>sh</code> with <code>-c<...
<p>kubectl interprets the <code>-c</code> flag not as a flag for <code>ifconfig</code>, but as a flag for the <code>kubectl exec</code> command itself -- which specifies the exact container of a Pod in which the command should be executed; this is also the reason that <code>kubectl</code> looks for a <em>container</em>...
<p>I run my application in one pod and the Mongo database in other pod. For my application successful startup, it needs to know the IP address where the Mongo is running.</p> <p>I have questions below:</p> <ol> <li>How do I get to know the the Mongo pod IP address so that I can configure this in my application.</li> ...
<p>You need to expose mongodb using Kubernetes Services. With the help of Services there is no need for an application to know the actual IP address of the Pod, you can use the service name to resolve mongodb.</p> <p>Reference: <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow no...