prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I have a link to a public URL in the format of <code>https://storage.googleapis.com/companyname/foldername/.another-folder/file.txt</code></p> <p>I want to create an ingress rule to create a path to this public file, so that whoever open a specific URL, e.g., <a href="https://myapp.mydomain.com/.another-folder/myfil...
<p>Think that you should be able to do it via Cloud External Load Balancer:</p> <p>Here is some information about that:</p> <p><a href="https://cloud.google.com/load-balancing/docs/https/ext-load-balancer-backend-buckets" rel="nofollow noreferrer">https://cloud.google.com/load-balancing/docs/https/ext-load-balancer-bac...
<p>When trying to deploy Clickhouse operator on Kubernetes, by default access_management is commented out in users.xml file. Is there a way to uncomment it when installing kubernetes operator?</p> <p>Clickhouse Operator deployment:</p> <pre><code>kubectl apply -f https://github.com/Altinity/clickhouse-operator/raw/0.18...
<p>look to <code>kubectl explain chi.spec.configuration.files</code> and <code>kubectl explain chi.spec.configuration.users</code></p> <p>try</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: clickhouse.altinity.com/v1 kind: ClickHouseInstallation metadata: name: access-management-example spec: conf...
<p>I have a Terraform config that (among other resources) creates a Google Kubernetes Engine cluster on Google Cloud. I'm using the <code>kubectl</code> provider to add YAML manifests for a ManagedCertificate and a FrontendConfig, since these are not part of the kubernetes or google providers. This works as expected wh...
<p>Fixed the issue by adding <code>load_config_file = false</code> to the <code>kubectl</code> provider config. My provider config now looks like this:</p> <pre><code>data &quot;google_client_config&quot; &quot;default&quot; {} provider &quot;kubernetes&quot; { host = &quot;https://${endpoint from ...
<p>If I do</p> <pre><code>POD=$($KUBECTL get pod -lsvc=app,env=production -o jsonpath=&quot;{.items[0].metadata.name}&quot;) kubectl debug -it --image=mpen/tinker &quot;$POD&quot; -- zsh -i </code></pre> <p>I can get into a shell running inside my pod, but I want access to the filesystem for a container I've called &qu...
<p>Reading through <a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/" rel="nofollow noreferrer">the documentation</a>, using <code>kubectl debug</code> won't give you access to the filesystem in another container.</p> <p>The simplest option may be to use <code>kubectl exec</code> to s...
<p>I learnt that to run a container as rootless, you need to specify either the SecurityContext:runAsUser 1000 or specify the USER directive in the DOCKERFILE.</p> <p>Question on this is that there is no UID 1000 on the Kubernetes/Docker host system itself.</p> <p>I learnt before that Linux User Namespacing allows a us...
<p>Hope this answer helps you</p> <blockquote> <p>I learnt that to run a container as rootless, you need to specify either the SecurityContext:runAsUser 1000 or specify the USER directive in the DOCKERFILE</p> </blockquote> <p>You are correct except in <code>runAsUser: 1000</code>. you can specify any UID, not only <co...
<p>Is there any way to perform an update action on all pods simultaneously?</p> <p>We have a process running in kubernetes as a stateful set where we want to update all the pods at the same time. We cannot seem to find a configuration for that. I am aware of <code>rollingUpdate</code>, which only updates one pod at a t...
<p>There is no native alternative for updating all pods simultaneously when using Statefulsets.</p> <p>The closest thing to it is to use the <a href="https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#parallel-pod-management" rel="nofollow noreferrer">Parallel Pod Management policy</a>, but i...
<p>I want to set some proxy (http, https etc) config on my k8s container. That k8s container will run some user scripts, it may also run some <code>sudo</code> commands in that script.</p> <p>What is the best way to pass this proxy config in my k8s container.</p> <p>One approach I was trying was passing the proxy confi...
<p>Best practice is to run the <code>Init container</code> as <strong>Root</strong>.</p> <p>And further, once you startup script is done with work you can run your container as the Non-root user.</p> <p>Init container : <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferr...
<p>Is there any shorter alias on the kubectl/oc for deployments? In OpenShift you have deployment configurations and you can access them using their alias <code>dc</code>.</p> <p>Writing <code>deployment</code> all the time takes too much time. Any idea how to shorten that without setting a local alias on each machine?...
<p>All of the above answers are correct and I endorse the idea of using aliases: I have several myself. But the question was fundamentally about shortnames of API Resources, like <code>dc</code> for <code>deploymentcontroller</code>.</p> <p>And the answer to that question is to use <code>oc api-resources</code> (or <co...
<p>After I install the promethus using helm in kubernetes cluster, the pod shows error like this:</p> <pre><code>0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports. </code></pre> <p>this is the deployment yaml:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: kube-prometheus-...
<p>When you configure your pod with <code>hostNetwork: true</code>, the containers running in this pod can directly see the network interfaces of the host machine where the pod was started.</p> <p>The container port will be exposed to the external network at :, the hostPort is the port requested by the user in the conf...
<p>Defining the <strong>defaultMode</strong> in a Kubernetes <strong>volume</strong> field within a <strong>deployment</strong> element can become quite tricky.</p> <p>It expects three decimals, corresponding to the binary UNIX permissions.</p> <p>As an example, to mount the ConfigMap with permissions r------, you'd ne...
<p>Use the following table:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>unix decimal</th> <th>unix readable</th> <th>binary equivalent</th> <th>defaultMode</th> </tr> </thead> <tbody> <tr> <td>400</td> <td>r--------</td> <td>100000000</td> <td>256</td> </tr> <tr> <td>440</td> <td>r--r--...
<p>In a container-based environment such as Kubernetes, the UseContainerSupport JVM feature is handy as it allows configuring heap size as a percentage of container memory via options such as XX:MaxRAMPercentage instead of a static value via Xmx. This way you don't have to potentially adjust your JVM options every time...
<p>There's no similar switch for MaxDirectMemorySize as far as I know. But by default (if you don't specify <code>-XX:MaxDirectMemorySize</code>) the limit is same as for <code>MaxHeapSize</code>. That means, if you set <code>-XX:MaxRAMPercentage</code> then the same limit applies to <code>MaxDirectMemory</code>.</p> <...
<p>I am using active FTP to transfer file(via the <strong>PORT</strong> command). I can initiate active FTP sessions using <strong>LoadBalancer IP</strong> and Loadbalancer Service <strong>Target Port</strong>. I tried a similar way to initiate active FTP session using <strong>Node External IP</strong> and <strong>Node...
<p>ok, finally I figured out the solution. I have been using <strong>Azure Kubernetes Service(AKS)</strong>. Need to set the inbound port rule for the appropriate <code>NodePort</code>(under <strong>Virtual machine scale sets</strong>, selecting the right node pools whose public IPs are enabled, and under <strong>Netw...
<p>I found the mention of an agent node in the aks documentation but i'm not finding the defition of it. can anyone please explain it to ? also want to know if is it an azure concept or a kubernetes concept.</p> <p>Regards,</p>
<p>In Kubernetes the term <code>node</code> refers to a compute node. Depending on the role of the node it is usually referred to as <code>control plane node</code> or <code>worker node</code>. From the <a href="https://kubernetes.io/docs/concepts/overview/components/" rel="nofollow noreferrer">docs</a>:</p> <blockquot...
<p>I'm testing a database insert statement similar to the following which works locally but not after deployment to a kubernetes cluster connected to a managed database host:</p> <pre><code>func Insert(w http.ResponseWriter, r *http.Request) { db := dbConn() //If it's a post request, assign a variable to the va...
<blockquote> <p>Am I missing an additional configuration for the encryption and shouldn't setting the sslmode to disabled bypass this?</p> </blockquote> <p>Yes, and that is the problem. The client refuses to use SSL. While the server (configuration not shown, but can be inferred from the error) refuses to proceed <em...
<p>Is it possible write write an existing environment variable into a file from a Kubernetes deployment.yaml file?</p> <p>The background: I've already parsed a json containing secrets. Now, I'd like to store that secret in a local file.</p> <p>So far, I've tried something like this:</p> <pre><code> lifecycle: ...
<p>Rather than using <code>postStart</code> , I'd suggest you use an <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer">init container</a>, the <code>postStart</code> hook doesn't guarantee that it will be executed before the container <code>ENTRYPOINT</code>.</p> <p...
<p>I am trying to run an application locally on k8s but I am not able to reach it.</p> <p>here is my deloyment:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: listings labels: app: listings spec: replicas: 2 selector: matchLabels: app: listings template: metadata: ...
<p>That is because your local and minikube are not in the same network segment, you must do something more to access minikube service on windows.</p> <p>First</p> <pre><code>$ minikube service list </code></pre> <p>That will show your service detail which include name, url, nodePort, targetPort.</p> <p>Then</p> <pre><c...
<p>This is my <code>~/.kube/config</code> file:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 clusters: - cluster: server: https://192.168.10.190:6443 name: cluster-1 - cluster: server: https://192.168.99.101:8443 name: cluster-2 contexts: - context: cluster: cluster-1 user: k...
<p>short answer, you can get all ns across the existing cluster in <code>kubeconfig</code></p> <pre><code>for context in $(kubectl config view -o jsonpath='{.clusters[*].name}'); do kubectl config use-context $context ; kubectl get ns; done #or for context in $(kubectl config view -o jsonpath='{.clusters[*].name}'); d...
<p>I am new to Argo and following the Quickstart templates and would like to deploy the HTTP template as a workflow.</p> <p>I create my cluster as so:</p> <pre class="lang-bash prettyprint-override"><code>minikube start --driver=docker --cpus='2' --memory='8g' kubectl create ns argo kubectl apply -n argo -f https://raw...
<p>It seems your default serviceaccount is missing a credential (kubernetes secret)</p> <p>You can verify the existence of the credential by checking which one it needs by running <code>kubectl get serviceaccount -n default default -o yaml</code></p> <pre><code>kubectl get serviceaccount -n default default -o yaml apiV...
<p>Is it possible write write an existing environment variable into a file from a Kubernetes deployment.yaml file?</p> <p>The background: I've already parsed a json containing secrets. Now, I'd like to store that secret in a local file.</p> <p>So far, I've tried something like this:</p> <pre><code> lifecycle: ...
<p>Usually when we need to read some secrets from a secret manager, we use an init container, and we create an <code>emptyDir</code> shared between the pods to write the secrets and access them from the other containers. In this case you can use a different docker image with secret manager dependencies and creds, witho...
<p>lately I am configuring a k8s cluster composed of 3 nodes(master, worker1 and worker2) that will host an UDP application(8 replicas of it). Everything is done and the cluster is working very well but there is only one problem.</p> <p>Basically there is a Deployment which describes the Pod and it looks like:</p> <pre...
<p>Have you confirmed that the response is not delivered correctly for your second scenario? The source IP address in that case should be the one of the node where the request first arrived.</p> <p>I am under the impression that you are assuming that since the IP address ends in 0 this is necessarily a network address,...
<pre><code>2022-08-17T16:14:15.5682728Z error: error validating &quot;deployment.yml&quot;: error validating data: ValidationError(HorizontalPodAutoscaler.spec.metrics[1].resource.target.averageUtilization): invalid type for io.k8s.api.autoscaling.v2.MetricTarget.averageUtilization: got &quot;string&quot;, expected &qu...
<pre><code>averageUtilization: </code></pre> <p>is represented as a percent of requested memory. So you're wrong with <code>Mi</code>.</p> <p>It should be.</p> <pre><code>averageUtilization: 65 </code></pre> <p>Specify <code>averageUtilization</code> and a target average memory utilization over all the pods, represen...
<p>I want to deploy some pods (from deployment X) only on nodes where pods from deployment Y do not exist. Is there a way to make something like that? First idea is to use node affinity and deploy X on nodes with label X and Y where there is no X, but I would like to avoid that.</p>
<p>You can use <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity" rel="nofollow noreferrer">inter pod affinity and Anti affinity</a>. Here is the relevant snippet from the documentation:</p> <blockquote> <p>Inter-pod affinity and anti-affinity allow y...
<p>I am trying to retrieve the hostname in my Application Load Balancer that I configured as ingress.</p> <p>The scenario currently is: I am deploying a helm chart using terraform, and have configured an ALB as ingress. The ALB and the Helm chart was deployed normally and is working, however, I need to retrieve the hos...
<p>The terraform datasource for Ingress is : kubernetes_ingress_v1. <a href="https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/ingress_v1" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/ingress_v1</a></p> <pre><code>dat...
<p>I am running rancher latest docker image on Mac M1 laptop but the contact failed to start. The command I am using is sudo docker run -d -p 80:80 -p 443:443 --privileged rancher/rancher.</p> <p>Below is the versions for my environment:</p> <p>$ docker --version Docker version 20.10.13, build a224086</p> <p>$ uname -a...
<p>I would recommend trying to run it with a specific tag, i.e. <code>rancher/rancher:v2.6.6</code>.</p> <p>Some other things that may interfere: What size setup are you running on? CPU and minimum memory requirements are currently 2 CPUs and 4gb RAM.</p> <p>Also, you can try their docker install scripts and check out ...
<p>I am installing nginx ingress controller through helm chart and pods are not coming up. Got some issue with the permission.</p> <p>Chart link - <a href="https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx" rel="nofollow noreferrer">https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx</a></p>...
<p>You obviously have permission problem. Looking at the Chart you specified, the are multiple values of <code>runAsUser</code> for different config.</p> <pre><code>controller.image.runAsUser: 101 controller.admissionWebhooks.patch.runAsUser: 2000 defaultBackend.image.runAsUser: 65534 </code></pre> <p>I'm not sure why ...
<p>I have a docker image that I want to run inside my django code. Inside that image there is an executable that I have written using c++ that writes it's output to google cloud storage. Normally when I run the django code like this:</p> <pre><code>container = client.V1Container(name=container_name, command=[&quot;//us...
<p>Apparently for anyone having a similar issue, we fixed it by adding the command we want to run at the end of the <code>Dockerfile</code> instead of passing it as a parameter inside django's container call like this:</p> <pre><code>cmd[&quot;entrypoint.sh&quot;] </code></pre> <p>entrypoint.sh:</p> <pre><code>xvfb-run...
<p>In microservices environment deployed to the Kubernetes cluster, why will we use API gateway (for example Spring cloud gateway) if Kubernetes supplies the same service with Ingress?</p>
<p>Ingress controller makes one Kubernetes service that gets exposed as LoadBalancer.For simple understanding, you can consider ingress as Nginx server which just do the work of forwarding the traffic to services based on the ruleset.ingress don't have much functionality like API gateway. Some of ingress don't support ...
<p>This question has been asked before, ive been trying plenty of examples over the past two days to try and configure with no luck so I am posting my environment for any help.</p> <p><strong>Problem</strong> <br /> Nextjs environment variables are all undefined after deploying to kubernetes using Terraform</p> <p><str...
<p>I wanna start by saying that I am by no means an expert in NextJS. Therefore, I tried approaching your problem under the following assumptions:</p> <ul> <li>the issue is not necessarily related to NextJS, as it appears to be related to Kubernetes resource deployment and management</li> <li>leverage the default <code...
<p>I have two servers with k3s setup. I have install <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/" rel="nofollow noreferrer">k8s-dashboard</a> on server1.</p> <p>I have setup <a href="https://stackoverflow.com/questions/36306904/configure-kubectl-command-to-access-remote-kubern...
<p>First, The Kubernetes dashboard needs to query <a href="https://github.com/kubernetes-sigs/dashboard-metrics-scraper" rel="nofollow noreferrer">dashboard-metrics-scraper</a>, so you will need to install that before linking the dashboard UI with <code>scraper</code>.</p> <p>Second from the code, it does not look like...
<p>I need to create a Kubernetes clientset using a token extracted from JSON service account key file.</p> <p>I explicitly provide this token inside the config, however it still looks for Google Application-Default credentials, and crashes because it cannot find them.</p> <p>Below is my code:</p> <pre><code>package mai...
<p>Here's what worked for me.</p> <p>It is based on this <a href="https://gist.github.com/ahmetb/548059cdbf12fb571e4e2f1e29c48997" rel="nofollow noreferrer">gist</a> and it's exactly what I was looking for. It uses an <code>oauth2.TokenSource</code> object which can be fed with a variety of token types so it's quite fl...
<p>I have been trying to implement istio authorization using Oauth2 and keycloak. I have followed few articles related to this <a href="https://medium.com/@senthilrch/api-authentication-using-istio-ingress-gateway-oauth2-proxy-and-keycloak-part-2-of-2-dbb3fb9cd0d0" rel="nofollow noreferrer">API Authentication: Configur...
<p>The redirection issue solved by updating authorization policy</p> <pre><code>apiVersion: security.istio.io/v1beta1 kind: AuthorizationPolicy metadata: name: example-auth-policy namespace: istio-system spec: action: CUSTOM provider: name: &quot;oauth2-proxy&quot; rules: - to: - operation: ...
<p>I'm trying to implement EFK stack (with Fluent Bit) in my k8s cluster. My log file I would like to parse sometimes is oneline and sometimes multiline:</p> <pre><code>2022-03-13 13:27:04 [-][-][-][error][craft\db\Connection::open] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service no...
<p>Starting from Fluent Bit v1.8, You can use the <code>multiline.parser</code> option as below. docker and cri multiline parsers are predefined in fluent-bit.</p> <pre><code>[INPUT] Name tail Path /var/log/containers/*.log multiline.parser docker, cri Tag kube.* Mem_Buf_Limit 5M...
<p>Having setup Kibana and a fleet server, I now have attempted to add APM. When going through the general setup - I forever get an error no matter what is done:</p> <pre><code>failed to listen:listen tcp *.*.*.*:8200: bind: can't assign requested address </code></pre> <p>This is when following the steps for setup of A...
<p>As it turned out, the general walk through is soon to be depreciated in its current form as is. And setup is far far simpler in a helm file where its actually possible to configure kibana with package ref for your named apm service.</p> <blockquote> <pre><code>xpack.fleet.packages: - name: system version: lat...
<p>We have created kubernetes dashboard using below command.</p> <pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.0/aio/deploy/recommended.yaml kubectl patch svc -n kubernetes-dashboard kubernetes-dashboard --type='json' -p '[{&quot;op&quot;:&quot;replace&quot;,&quot;path&quot;:&...
<p>you can set <code>--duration=0s:</code></p> <pre><code> --duration=0s: Requested lifetime of the issued token. The server may return a token with a longer or shorter lifetime. </code></pre> <p>so this should work</p> <pre><code>kubectl -n kubernetes-dashboard create token admin-user --duration=times </code></...
<p>I am using EKS Fargate and created a fargate profile based on this doc: <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html</a>.</p> <p>In the doc it says Fargate is used to allocate what pods ...
<p>As of Aug 17th 2022, EKS now supports wildcards in Fargate Profile selectors. This means you can now run workloads from various Kubernetes namespaces with a single Fargate Profile. Previously, you would have had to specify every namespace, and were limited to just 5 namespace selectors or label pairs.</p> <p><a hre...
<p>In trying to securely install metrics-server on Kubernetes, I'm having problems.</p> <p>It seems like the metric-server pod is unable to successfully make requests to the Kubelet API on it's <code>10250</code> port.</p> <pre><code>NAME READY UP-TO-DATE AVAILABLE AGE metrics-server 0/1 1 ...
<p>In my case I had the same issue with the metrics-server because of just 1 ocpu on master-node. Use at least 2.</p>
<p>I am using nginx-ingress in my cluster to expose certain services. I have an &quot;auth&quot; service that handles authentication, which I am trying to setup through nginx. Currently the service has a very simple GET endpoint, that always responds with a <code>UserId</code> header and tries to set two cookies:</p> <...
<p>I couldn't find a way to make this work with the <code>Set-Cookie</code> header. Not sure if there is a better way, but here is a workaround:</p> <p>I added a snippet for the <code>location</code> block that converts two headers to cookies:</p> <pre><code>nginx.ingress.kubernetes.io/configuration-snippet: | auth_r...
<p>What do you use instead og kubectl get ComponentStatus?</p> <pre><code>kubectl get cs Warning: v1 ComponentStatus is deprecated in v1.19+ </code></pre>
<p>Yes, this API is deprecated and as it provided status of <code>etcd, kube-scheduler, and kube-controller-manager</code> components, which we can get through kubectl or using <code>/livez</code> endpoint.</p> <p>so you can try</p> <pre><code>kubectl get --raw='/readyz?verbose' #local cluster curl -k https://localhost...
<p>I want to create a replica set of MongoDB pods and after pods are in running state, I want to create a collection on every mongo db instance. Here is the code:</p> <pre><code>metadata: name: mongodb-standalone spec: replicas: 3 selector: matchLabels: app: database template: metadata: labe...
<p>you can use configmap and mount the db creation script to init</p> <blockquote> <p>When a container is started for the first time it will execute files with extensions .sh and .js that are found in <code>/docker-entrypoint-initdb.d.</code> Files will be executed in alphabetical order. .js files will be executed by m...
<p>I tried to run Kafka in Raft mode (zookeeper-less) in Kubernetes and everything worked fine with this configuration:</p> <p>I am curious about how to change the provided configuration to run with a replication factor of 3 for instance?</p> <p>The fruitful topic was <a href="https://github.com/bitnami/bitnami-docker-...
<p>Finally, I deployed Kafka in Kraft mode with a replication factor of 3 in Kubernetes. I used guidelines within this <a href="https://learnk8s.io/kafka-ha-kubernetes#deploying-a-3-node-kafka-cluster-on-kubernetes" rel="nofollow noreferrer">article</a>. There is a very comprehensive description of how this setup works...
<p>In the namespace, I have multiple applications deployed. I would like to rollout the deployment based on selector. Can someone please share how to achieve it?</p> <p>Thanks</p>
<p>You can achieve that by:</p> <pre class="lang-bash prettyprint-override"><code>kubectl rollout status deployment --selector=&quot;key=value&quot; </code></pre> <p>But this argument is added in kubctl <a href="https://github.com/kubernetes/kubernetes/pull/99758" rel="nofollow noreferrer">v1.24</a>, so if you have a l...
<p>In kubernetes (I am using minikube) I have deployed the following deployment using <code>kubectl apply -f nginx-deployment</code>:</p> <pre><code># nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: ...
<p>Since you are using minikube you might need to run <code>minikube service nginx-service --url</code>, this will create a tunnel to the cluster and expose the service.</p>
<p>I have installed k8s 1.24 version and containerd (containerd://1.5.9) is the CR for my setup (ubuntu 20.04).</p> <p>I have also installed docker on my VM and have added my private repository under /etc/docker/daemon.json with the following changes:</p> <pre><code>{ &quot;insecure-registries&quot; : [&quot;myPvtRep...
<p>I got a solution:</p> <pre><code>cd /usr/local/share/ca-certificates/ curl -L --remote-name http://your-artifacts.com/xyz-bundle.crt /usr/sbin/update-ca-certificates </code></pre> <p>This one work for me.</p> <p>Also make sure to update your endpoints under /etc/crictl.yaml</p> <pre><code>runtime-endpoint: unix:///r...
<p>I am using terraform to deploy a kube cluster to Google Kubernetes Engine.</p> <p>Here is my ingress config - both http and https are working but I want http to auto redirect to https</p> <pre><code>resource &quot;kubernetes_ingress_v1&quot; &quot;ingress&quot; { wait_for_load_balancer = true metadata { name...
<p>The following worked for me - I got my hints from <a href="https://github.com/hashicorp/terraform-provider-kubernetes/issues/1326#issuecomment-910374103" rel="nofollow noreferrer">https://github.com/hashicorp/terraform-provider-kubernetes/issues/1326#issuecomment-910374103</a></p> <pre><code> resource &quot;kubectl...
<p>I am using celery with a fastAPI.</p> <p>Getting <strong>Can't decode message body: ContentDisallowed('Refusing to deserialize untrusted content of type json (application/json)')</strong> while running in docker. When running the same in local machine without docker there is not issue.</p> <p>The configuration for t...
<p>Configuring the celery_app with the accept_content type seems to fix the issue:</p> <pre><code>celery_app.conf.accept_content = ['application/json', 'application/x-python-serialize', 'pickle'] </code></pre>
<p>I have some amount of traffic that can boost the cpu usage up to 180%. I tried using a single pod which works fine but the response was extremely slow. When I configured my HPA to cpu=80%, min=1 and max={2 or more} I hit connection refused when HPA was creating more pods. I tried put a large value to min (ie. min = ...
<blockquote> <p>I hit connection refused when HPA was creating more pods</p> </blockquote> <p>Kubernetes uses the readinessProbe, to determine whether to redirect clients to some pods. If the readinessProbe for a Pod is not successful, then Service whose selectors could have matched that Pod would not take it under con...
<p>I have read many links similar to my issue, but none of them were helping me to resolve the issue.</p> <p><strong>Similar Links</strong>:</p> <ol> <li><a href="https://github.com/containerd/containerd/issues/7219" rel="noreferrer">Failed to exec into the container due to permission issue after executing 'systemctl d...
<p>This issue may relate to docker, first drain your node.</p> <pre><code>kubectl drain &lt;node-name&gt; </code></pre> <p>Second, SSH to the node and restart docker service.</p> <pre><code>systemctl restart docker.service </code></pre> <p>At the end try to execute your command.</p>
<p>The grafana helm chart spawns a service on a Classic Load Balancer. I have the AWS load balancer webhook installed, and I'd like to overwrite the annotations on the Grafana service. I'm attempting the following:</p> <pre><code>helm install grafana grafana/grafana \ --namespace grafana \ --set persistence.storageClas...
<p>there is an issue in the annotation, you are missing escape character for <code>beta\.kubernetes</code></p> <p>try this and it should work.</p> <pre><code>--set service.annotations.&quot;service\.beta\.kubernetes\.io/aws-load-balancer-nlb-target-type&quot;=ip \ --set service.annotations.&quot;service\.beta\.kuberne...
<p>I am running 4 replicas of the <em>bf-v</em> instance. I am using <strong>ClientIP</strong> as a sessionAffinity.</p> <p>I want to distribute requests based on the client IP address, but also distribute client IPs evenly (round-robin based) across replicas. I want pods to have the same number of clients. is there an...
<p>Two options:</p> <p>1- Use <strong>IPVS</strong> mode with <strong>ipvs-scheduler=sh</strong> (sh -&gt; source hashing)</p> <p>2- Use <strong>ClientIP</strong> affinity in your svc.yaml with <strong>ipvs-scheduler=rr</strong> (rr -&gt; round robin)</p>
<p>i am confused about <strong>Nginx Ingress</strong> vs <strong>Nginx deployment</strong>(container) in kubernetes since both are controlling incomming requests to the cluster let say i am deploying a web app container and nginx container in one pod and all works perfectly if i deploy an other application and use Ngin...
<p>Let's abstract ourselves from nginx. We should distinguish the webserver running alongside an application, from the reverse proxy routing client requests to that application.</p> <p>In Kubernetes, you may deploy applications based on some Nginx, lighttpd, Apache, ... webserver. Sometimes complex configurations routi...
<p>I'm attempting to configure AKS, and I have the below setup</p> <p><a href="https://i.stack.imgur.com/n6FfO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n6FfO.png" alt="enter image description here" /></a></p> <p>I want to enable HTTPS between Nginx Kubernetes Ingress Controller &amp; Asp.Net C...
<p>Reference <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol" rel="nofollow noreferrer">documentation for annotation</a> to set the ingress backend to <code>HTTPS</code>:</p> <pre><code>nginx.ingress.kubernetes.io/backend-protocol: HTTPS </code></pre> <p>...
<p>In a nutshell, most of our apps are configured with the following <code>strategy</code> in the Deployment - </p> <pre><code> strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate </code></pre> <p>The Horizonatal Pod Autoscaler is configured as so </p> <pre><code>spec:...
<p>In our case we added the <code>replicas</code> field a while ago and forgot to remove it when we added the HPA. The HPA does not play nice with the <code>replicas</code> field during deployments, so if you have a HPA remove the <code>replicas</code> field. See <a href="https://kubernetes.io/docs/tasks/run-applicatio...
<p>In Azure Kubernetes I want have a pod with jenkins in defualt namespace, that needs read secret from my aplication workspace.</p> <p>When I tried I get the next error:</p> <pre><code>Error from server (Forbidden): secrets &quot;myapp-mongodb&quot; is forbidden: User &quot;system:serviceaccount:default:jenkinspod&quo...
<p><code>secret</code> is a namespaced resource and can be accessed via proper rbac permissions. However any improper rbac permissions may lead to leakage.</p> <p>You must <code>role bind</code> the pod's associated service account. Here is a complete example. I have created a new service account for role binding in th...
<p>I have deployed an nginx ingress controller in my eks cluster. I want to add more security to my nginx deployment i.e add <a href="https://content-security-policy.com/examples/nginx/" rel="nofollow noreferrer">content-security-policy</a> header and the below</p> <pre><code>X-Frame-Options: Content-Security-Policy: ...
<p>you can try this</p> <pre><code>ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers &quot;X-Frame-Options: Deny&quot;; more_set_headers &quot;X-Xss-Protection: 1; mode=block&quot;; more_set_...
<p>I am writing an Operator for Kubernetes using the Operator SDK and have a question about logging (I am still rather new to Go).</p> <p>I have setup a logger in my controller that I have attached a UUID to as a Trace ID</p> <pre><code>func (r *MyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resul...
<p>Not at all sure of this answer and I too wonder why logging and logging sinks are built so complex (refer <a href="https://dave.cheney.net/2015/11/05/lets-talk-about-logging" rel="nofollow noreferrer">https://dave.cheney.net/2015/11/05/lets-talk-about-logging</a> which I found reffered in logr <a href="https://pkg.g...
<p>while I try to add my k8s cluster in azure vm, is shows error like error: resource mapping not found for name: &quot;cattle-admin-binding&quot; namespace: &quot;cattle-system&quot; from &quot;STDIN&quot;: no matches for kind &quot;ClusterRoleBinding&quot; in version &quot;rbac.authorization.k8s.io/v1beta1&quot; ensu...
<p>I was also facing the same issue, so I changed the API version for the <code>cattle-admin-binding</code> from beta to stable as below:</p> <p>Old value:</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1 </code></pre> <p>Changed to:</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1 </code></pre> <p>T...
<p>An action item from the <strong>security scan</strong> is to implement <strong>HSTS</strong> header in ASP.Net Core 6.0 WebAPI.</p> <p>A WebAPI application is deployed on AKS using Application Gateway Ingress Controller. SSL termination occurs at the Application Gateway. Application Gateway Ingress Controllers and P...
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security" rel="nofollow noreferrer">HSTS header</a> is a browser only instruction. It informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it using HTTP should automatically b...
<p>I have configured an <a href="https://github.com/elastic/cloud-on-k8s/blob/main/config/recipes/beats/filebeat_autodiscover.yaml" rel="nofollow noreferrer">Elastic ECK Beat with autodiscover</a> enabled for all pod logs, but I need to add logs from a specific pod log file too; from this path <code>/var/log/traefik/ac...
<p>Docker logging is based on the stdout/stderr output of a container. If you only write into a log file inside a container it will never be picked up by Docker logging and can therefore also not be processed by your Filebeat setup.</p> <p>Instead ensure that all logs generated by your containers are sent to stdout. Wh...
<p>We're using Gitlab Runner with Kubernetes executor and we were thinking about what I think is currently not possible. We want to assign the Gitlab Runner daemon's pod to a specific node group's worker with instance type X and the jobs' pods to a different node group Y worker nodes as these usually require more compu...
<p>This problem is solved! After a further investigation I found that Gitlab Runner's Helm chart provide 2 <code>nodeSelector</code> features, to exactly do what I was looking for, 1 for the main pod which represents the Gitlab Runner pod and the other one for the Gitlab Runner's jobs pods. Below I show a sample of the...
<p>I am applying the app-of-apps with Argo CD on my application deployments, where I have a directory with the applications definitions, and then a directory with resource definitions and a <code>kustomization.yaml</code> file. When a new version is released, all I do is run <code>kustomize set image ...</code> in a pi...
<p>In my case, I implemented a simple github action that fix 'yaml' format file in another repo then commit it.</p> <p>I have two kinds of github repositories, the one is for application development and the other for storing k8s manifests which app-of-apps pattern is applied.</p> <p>There is a github action for CI/CD i...
<p>I am trying to run a local cluster on Mac with M1 chip using Minikube (Docker driver). I enabled ingress addon in Minikube, I have a separate terminal in which I'm running <code>minikube tunnel</code> and I enabled Minikube dashboard, which I want to expose using Ingress. This is my configuration file:</p> <pre clas...
<p>I had the same behavior, and apparently what's needed for <code>minikube tunnel</code> to work is to map &quot;127.0.0.1&quot; in <code>/etc/hosts</code>, instead of the output from <code>minikube ip</code> or the ingress description. that fixed it for me</p>
<p>I'm trying to create a ConfigMap with ArgoCD.</p> <p>I've created a <code>volumes.yaml</code> file as such</p> <pre><code>--- apiVersion: v1 kind: ConfigMap metadata: name: persistent-volumes-argo labels: grafana_dashboard: &quot;1&quot; project: &quot;foo&quot; data: kubernetes.json: | {{ .Files.Get &...
<p>To create configmap with argocd and helm</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: {{ include &quot;helm-chart.fullname&quot; . }}-configmap data: config.json : | {{ toJson .Values.configmap | indent 4 }} </code></pre> <p>and the value file should be like this, which is our JSON but convert...
<p>I want to deploy WSO2 API Manager with Kubernetes. Should I use Google Cloud? Is there another way?</p>
<p>The helm charts <a href="https://github.com/wso2/kubernetes-apim" rel="nofollow noreferrer">1</a> for APIM can be deployed on GKE, AKS, EKS, etc. You can even deploy the all-in-one simple deployment pattern <a href="https://github.com/wso2/kubernetes-apim/tree/master/simple/am-single" rel="nofollow noreferrer">2</a>...
<p>I am trying to add livenessprobe for <a href="https://github.com/kubernetes-csi/external-snapshotter/tree/v6.0.1" rel="nofollow noreferrer">snapshot-controller</a>. snapshot-controller deployment mentioned <a href="https://github.com/kubernetes-csi/external-snapshotter/blob/v6.0.1/deploy/kubernetes/snapshot-controll...
<p>In the github repository you shared: <a href="https://github.com/kubernetes-csi/external-snapshotter/tree/v6.0.1#snapshot-controller-command-line-options" rel="nofollow noreferrer">https://github.com/kubernetes-csi/external-snapshotter/tree/v6.0.1#snapshot-controller-command-line-options</a></p> <h4>Important option...
<p>I need a help with EKS managed node group. I've created a cluster with one additional sg. Inside of this cluster I've created managed node group. All code is stocked in terraform. Once managed node group creates new instance, only one security group is attached (SG created by AWS). Is it somehow a way to attach also...
<p>You can create a custom launch template to define your own security group for the node group. You can then reference the launch template in your terraform <code>aws_eks_node_group</code> resource.</p> <pre class="lang-bash prettyprint-override"><code> launch_template { name = aws_launch_template.your_eks_launch_t...
<p>I executing a command that give me cpu limit</p> <pre><code>kubectl get pods -o=jsonpath='{.items[*]..resources.limits.cpu}' -A </code></pre> <p>How can I modify the command to show pod name and the memory limit also</p>
<p>You can format the jsonpath like this.</p> <pre><code>kubectl get pods -Ao jsonpath='{range .items[*]}{&quot;name: &quot;}{@.metadata.name}{&quot; cpu: &quot;}{@..resources.limits.cpu}{&quot; memory: &quot;}{@..resources.limits.memory}{&quot;\n&quot;}{&quot;\n&quot;}{end}' </code></pre>
<p>So I had a ConfigMap with a json configuration file in it, like this:</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1 kind: ConfigMap metadata: name: my-config-map data: config.json: |+ { &quot;some-url&quot;: &quot;{{ .Values.myApp.someUrl }}&quot; } </code></pre> <p>But I've moved ...
<p>At the time of reading the file, its content is a string. It's not evaluated as template, and therefore you cannot use variables like you do.</p> <p>However, helm has a function for this purpose specifically called <a href="https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function" rel="nofollow nore...
<p>Unfortunately I am unable to paste configs or <code>kubectl</code> output, but please bear with me.</p> <p>Using helm to deploy a series of containers to K8s 1.14.6, all containers are deploying successfully <strong>except</strong> for those that have <code>initContainer</code> sections defined within them.</p> <p>I...
<p>When a PVC is &quot;Bound&quot;, this means that you do have a PersistentVolume object in your cluster, whose claimRef refers to that PVC (and usually: that your storage provisioner is done creating the corresponding volume in your storage backend).</p> <p>When a volume is &quot;not bound&quot;, in one of your Pod, ...
<p>I’ve built a service that lives in a Docker container. As part of it’s required behavior, when receiving a gRPC request, it needs to send an email as a side effect. So imagine something like</p> <pre><code>service MyExample { rpc ProcessAndSendEmail(MyData) returns (MyResponse) {} } </code></pre> <p>where there’...
<p>There's several docker mailservers:</p> <ul> <li><a href="https://github.com/docker-mailserver/docker-mailserver" rel="nofollow noreferrer">https://github.com/docker-mailserver/docker-mailserver</a></li> <li><a href="https://github.com/Mailu/Mailu" rel="nofollow noreferrer">https://github.com/Mailu/Mailu</a></li> <l...
<p>I have the following deployments one of Django api and the other of celery, when I run the command to get the resource consumption of the pods, it only return those of celery and not those of the API. What are potential reasons for this? given that the same configuration works well on another cluster</p> <p>Kubernet...
<p>I upgraded my cluster to 1.23.4 and my HPAs to autoscaling/v2 api and now everything works fine, I suppose my problem was related to this <a href="https://github.com/kubernetes/kubernetes/issues/76292" rel="nofollow noreferrer">issue</a> because my api pod had an initContainer.</p>
<p><strong>Scenario:</strong></p> <p>I have a k8s cluster with <code>host01</code>, <code>host02</code> and <code>host03</code>.</p> <p>I'm running master on <code>host01</code> and slaves on <code>host02</code> and <code>host03</code>, and I want to open a port for client connections on master, ie I want to open: <cod...
<p>You can use the <strong>externalIP</strong>,</p> <pre><code>apiVersion: v1 kind: Service metadata: name: my-service spec: selector: app.kubernetes.io/name: MyApp ports: - name: http protocol: TCP port: 80 targetPort: 9376 externalIPs: - HOST-01 IP </code></pre> <p>Ref : <a href=...
<p>I just installed ingress controller in an aks cluster using this deployment resource :</p> <blockquote> <p>kubectl apply -f <a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.0/deploy/static/provider/cloud/deploy.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kuber...
<p>You're seeing this as it is the default out of the box TLS certificate. You should replace this with your own certificate.</p> <p>Here is some information in the <a href="https://github.com/kubernetes/ingress-nginx/blob/c6a8ad9a65485b1c4593266ab067dc33f3140c4f/docs/user-guide/tls.md#default-ssl-certificate" rel="nof...
<p>I want to share multiple volumes using PersistentVolume reqource of kubernetes.</p> <p>I want to share &quot;/opt/*&quot; folders in pod. But not the &quot;/opt&quot;:</p> <pre><code>kind: PersistentVolume apiVersion: v1 metadata: name: demo namespace: demo-namespace labels: app: myApp chart: &quot;my-...
<p>If you want to share a folder among some pods or deployments or statefulsets you should create PersistentVolumeClaim and it's access mode should be ReadeWriteMany.So here is an example of PersistentVolumeClaim which has ReadeWriteMany mode</p> <pre><code>apiVersion: v1 kind: PersistentVolumeClaim metadata: name: ...
<p>How to Stop/Start application deployed in the ArgoCD?</p> <p>I see only <em>Delete</em> or <em>Sync</em> or deploy/redeploy options. I got running server applications and I'd like to stop (shutdown) temporarily their functionality in the cluster. Or I'm missing something in the concept?</p> <p>Do I need to implement...
<p>You can set the replica count to 0 so no pod will be created, without having to update your application code or remove the application from argocd.</p> <p>You need to edit the definition of your deployment, setting the <code>replicas</code> to <code>0</code> like so:</p> <pre><code>apiVersion: ... kind: Deployment s...
<p>I'm attempting to configure AKS, and I've installed <strong>Istio Gateway,</strong> which interns created an Azure Load Balancer, to make the overall traffic flow to be as shown below.</p> <p><a href="https://i.stack.imgur.com/lZdnv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lZdnv.png" alt="e...
<p>From <a href="https://istio.io/latest/docs/reference/config/networking/gateway/" rel="nofollow noreferrer">istio documentation</a> : <code>Gateway describes a load balancer operating at the edge of the mesh [...]</code>, which means it's the point of entry (endpoint) to your mesh network. Even though it's virtual, i...
<p>In the <a href="https://open-vsx.org/extension/ms-kubernetes-tools/vscode-kubernetes-tools" rel="nofollow noreferrer">VS Code Kubernetes Extension</a>, I am getting an error when I try to Access resources in my cluster.</p> <p>I have updated my ~/.kube/config with the correct data and general format</p> <h2>.kube/co...
<p>The solution to add my AWS credential ENV variables:</p> <pre><code>apiVersion: v1 clusters: - cluster: certificate-authority-data: M1ekNDQWMrZ0F3SUJBZ0lCQURB... server: https://{yadayada}.gr7.us-east-1.eks.amazonaws.com name: arn:aws:eks:us-east-1:{yada}:cluster/eventplatform contexts: - context: clus...
<p>I'm facing the below mentioned issue while using DHCP IPAM plugin + Macvlan + Multus for the additional interface creation inside my pod and assigning IP from DHCP server.</p> <p>I actually went through the related issues around this problem and tried all the solutions/different configurations mentioned there. But n...
<p>I started the daemon on the server node with:</p> <pre><code>cd /opt/cni/bin sudo ./dhcp daemon </code></pre> <p>In a couple of seconds my pod received its IP address from my DHCP server.</p>
<p><a href="https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/" rel="nofollow noreferrer">This doc</a> tells about how to run multiple scheduler. But I m not able to understand how does default scheduler is decided? Is it based on <code>--leader-elect</code> option?</p> <p>Can I tell Kube...
<p>If you can't remove/replace the default scheduler in the control plane (e.g. if you are on a managed k8s platform), you can use <a href="https://open-policy-agent.github.io/gatekeeper/website/docs/" rel="nofollow noreferrer">GateKeeper</a> — the replacement for OPA — or another policy agent to write mutations that a...
<p>When we launch the EKS Cluster using the below manifest, it is creating ALB. We have a default ALB that we are using, let's call it EKS-ALB. The Hosted zone is routing traffic to this EKS-ALB. We gave tag <strong>ingress.k8s.aws/resource:LoadBalancer, ingress.k8s.aws/stack:test-alb, elbv2.k8s.aws/cluster: EKS</str...
<p>In order to achieve the existing ALB not being deleted with group.name annotation enabled, we need to meet following conditions:</p> <ol> <li>ALB should be tagged with below 3 tags:</li> </ol> <pre><code>alb.ingress.kubernetes.io/group.name: test-alb alb.ingress.kubernetes.io/scheme: internal alb.ingress.kubernetes....
<p>My goal is to have a kubernetes cluster running with stateless replicas of some kind of frontend which can schedule jobs.</p> <p>Afterwards my plan is to have multiple runners (as pods) which are polling for scheduled jobs. Once they receive job data they should launch job executors (also as a pod) on demand.</p> <p...
<p>Here is a <a href="https://kubernetes.io/docs/reference/using-api/client-libraries/" rel="nofollow noreferrer">list of available kubernetes api clients</a>. You will use a <strong><a href="https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/" rel="nofollow noreferrer">service account</a></...
<p>Is there a way to use Helm to show available chart updates for installed charts?</p> <p>For example I have a "web-app" chart installed as "test" with version 1.2.4, but in my repo 1.2.7 is available:</p> <pre><code># helm ls NAME NAMESPACE REVISION UPDATED STATUS CHART ...
<p>As of August 28th 2022, there is no way of knowing from which repository an already installed helm chart came from.</p> <p>If you want to be able to do some sort of automation, currently you need to track the information of which chart came from which repo externally.<br /> Examples would be: storing configuration i...
<p>community.</p> <p>I have doubts about the use of HorizontalPodAutoscaler (HPA) in Kubernetes, what are the best practices of using HPA, especially in the implementation of MaxReplicate, as an example, If I have a cluster with 3 workers nodes running a single app, and setting up the HPA to scale up to 20 pods, but it...
<p>first of all you need to test your application and decide a reasonable resources per pod &quot;request and limits&quot;</p> <p>After setting the limit per pod then you know how many pods your cluster can maintain. <code>for example if you have total/free 10 cpu and 10 Gi memory over the cluster and you set limit pe...
<p>Im trying to format my yml to be more readable. I have an if statement that is really long with a bunch of and/ors and I would like to be able to spread it across multiple lines So something along the lines of</p> <pre><code>{{-if or (eq 'abc' .values.foo) (eq 'def' . values.bar) }} Def:'works' {{- end}} <...
<p>helm supports direct line breaks without special characters.</p> <p>Missing a space between <code>{{</code> and <code>if</code>.</p> <p>There is an extra space between <code>.</code> and <code>values</code>.</p> <p>String constants require double quotes.</p> <p>demo:</p> <p>values.yaml</p> <pre class="lang-yaml pret...
<p>I use this command to install and enable Kubernetes dashboard on a remote host:</p> <pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml kubectl proxy --address='192.168.1.132' --port=8001 --accept-hosts='^*$' http://192.168.1.132:8001/api/v1/namesp...
<p>From the service definition</p> <pre class="lang-yaml prettyprint-override"><code>kind: Service apiVersion: v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard spec: ports: - port: 443 targetPort: 8443 selector: k8s-app: kubernetes...
<p>I've placed a docker compose file <strong>project.yaml</strong> at the location /etc/project/project.yaml</p> <p>the file and well as the project directory have the same file permission, i.e. -rxwrxxrwx but when I run docker-compose</p> <pre><code>sudo docker-compose -f ./project.yaml up -d </code></pre> <p>if error...
<p>Beside using the full path, as <a href="https://stackoverflow.com/questions/73500671/docker-compose-cannot-find-the-yaml-file#comment129801726_73500671">commented</a> by <a href="https://stackoverflow.com/users/14312225/quoc9x">quoc9x</a>, double-check your current working directory when you call a command with a re...
<p>I want to make a container that is able to transfer files between itself and other containers on the cluster. I have multiple containers that are responsible for executing a task, and they are waiting to get an input file to do so. I want a separate container to be responsible for handling files before and after the...
<p>A simple approach would be to set up the NFS or use the File system like AWS EFS or so.</p> <p>You can mount the File system or NFS directly to POD which will be in <strong>ReadWriteMany</strong> access method.</p> <p><strong>ReadWriteMany</strong> - Multiple POD can access the single file system.</p> <p>If you don'...
<p>I've just migrated to M1 Macbook and tried to deploy couchbase using Couchbase Helm Chart on Kubernetes. <a href="https://docs.couchbase.com/operator/current/helm-setup-guide.html" rel="nofollow noreferrer">https://docs.couchbase.com/operator/current/helm-setup-guide.html</a></p> <p>But, couchbase server pod fails w...
<p>It seems ARM64 version of Couchbase Server for MacOS has become available since Couchbase Server 7.1.1.</p> <p>So, I ran the command below to install couchbase.</p> <pre><code>helm install couchbasev1 --values myvalues.yaml couchbase/couchbase-operator </code></pre> <p>myvalues.yaml:</p> <pre><code>cluster:   image:...
<p>I have created an Openshift cluster where my pods and services are running. Before creating an ingress, i deployed a Kong ingress controller that auto provisioned a Azure load balancer.</p> <p><a href="https://i.stack.imgur.com/wp3Vr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wp3Vr.png" alt="...
<p>You might have deployed the Kong Ingress controller with the service <code>type : LoadBalancer</code></p> <p><strong>LoadBalancer</strong> service type is mainly use to expose the <code>Kubernetes</code> service using LB of <strong>Cloud</strong> provider.</p> <p>ref : <a href="https://kubernetes.io/docs/concepts/se...
<p><strong>I am new to helm and kubernetes.</strong></p> <p>My current requirement is to use setup multiple services using a common helm chart.</p> <p>Here is the scenario.</p> <ol> <li><p>I have a common docker image for all of the services</p> </li> <li><p>for each of the services there are different commands to run....
<p>I can recommend you try a helmfile-based approach. I prefer a 3-file approach. What you'll need :</p> <ul> <li>helmfile-init.yaml: contains YAML instructions that you might need to use for creating and configuring namespaces etc.</li> <li>helmfile-backend.yaml: contains all the releases you need to deploy (service1,...
<p>I have created the below 'pod` in default namespace</p> <pre><code> kubectl run myhttpd --image=&quot;docker.io/library/nginx:latest&quot; --restart=Never -l app=httpd-server --port 80 </code></pre> <p>I was creating another Pod on a different <code>namespace</code> to check the connectivity on <code>port 80</code> ...
<p>In NetworkPolicy, the ipBlock is usually meant to allow communications from outside your SDN.</p> <p>What you want to do is to filter based on pod labels.</p> <p>Having started your test pod, check for its labels</p> <pre><code>kubectl get pods --show-labels </code></pre> <p>Pick one that identify your Pod, while no...
<p>From a certain PVC, I'm trying to get the volume id from the metadata of the PV associated with the PVC using <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Kubernetes Python Api</a>.</p> <p>I'm able to describe PVC with <code>read_namespaced_persistent_volume_claim</code> function a...
<p>While <code>PersistentVolumeClaims</code> are namedspaced, <code>PersistentVolumes</code> are not. Looking at the available methods in the V1 API...</p> <pre><code>&gt;&gt;&gt; v1 = client.CoreV1Api() &gt;&gt;&gt; print('\n'.join([x for x in dir(v1) if x.startswith('read') and 'volume' in x])) read_namespaced_persis...
<p>I am planning to have a Kubernetes cluster for production using Ingress for external requests.</p> <p>I have an elastic database that is not going to be part of the Kubernetes cluster. I have a microservice in the Kubernetes cluster that communicates with the elastic database through HTTP (Get,Post etc).</p> <p>Shou...
<blockquote> <p>Should I create another NodePort Service in order to communicate with the elastic database or should it be through the Ingress controller as it's an HTTP request?</p> </blockquote> <p>There is no requirement of it if your k8s cluster is a public, microservices will be able to send requests to the <stron...
<p>I noticed a strange behavior while experimenting with <code>kubectl run</code> :</p> <ul> <li><p>When the command to be executed is passed as option flag <code>--command -- /bin/sh -c &quot;ls -lah&quot;</code> &gt; <strong>OK</strong></p> <pre><code>kubectl run nodejs --image=node:lts-alpine \ --restart=Never --q...
<p>You can bypass the array format by using the <code>args</code> field:</p> <pre><code>&quot;command&quot;: [ &quot;sh&quot;, &quot;-c&quot; ], &quot;args&quot;: [ &quot;pwd &amp;&amp; id &amp;&amp; node YOUR_COMMAND&quot; ] </code></pre>
<p>Is there a way to assign pods to the nodes in a particular nodegroup without labeling each node in the nodegroup?</p> <p>E.g.:</p> <p>Suppose I have two nodegroup <code>NG1</code> and <code>NG2</code>, and I have two apps <code>A1</code> and <code>A2</code></p> <p>I want to assign pods of app <code>A1</code> to node...
<p>You can use some of the default labels if those are coming and not same across the both Node pools</p> <pre><code>failure-domain.beta.kubernetes.io/zone failure-domain.beta.kubernetes.io/region beta.kubernetes.io/instance-type beta.kubernetes.io/os beta.kubernetes.io/arch </code></pre> <p>For example, if both of you...
<p>I'm using minikube on a Fedora based machine to run a simple mongo-db deployment on my local machine but I'm constantly getting <code>ImagePullBackOff</code> error. Here is the yaml file:</p> <pre><code>apiVersion: apps/v1 kind: Deployment metadata: name: mongodb-deployment labels: app: mongodb spec: replic...
<p>I think your internet connection is slow. The timeout to pull an image is <code>120</code> seconds, so kubectl could not pull the image in under <code>120</code> seconds.</p> <p>First, pull the image via <code>Docker</code></p> <pre class="lang-bash prettyprint-override"><code>docker image pull mongo </code></pre> <...
<p>This is my <code>ClusterRoleBinding</code> and <code>ClusterRole</code> defination</p> <pre class="lang-yaml prettyprint-override"><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: my-namespaces roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: bootstr...
<p>Try this and let me know how it goes.</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: my-namespaces roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: bootstrap subjects: - kind: ServiceAccount name: executors namespace: bootstrap --- api...
<p>Can you please assist when deploying we getting ImagePullBackOff for our pods.</p> <p>running <code>kubectl get &lt;pod-name&gt; -n namespace -o yaml</code> am getting below error.</p> <pre class="lang-yaml prettyprint-override"><code>containerStatuses: - image: mycontainer-registry.io/company/my-app:1.0.0-integra...
<p>There is a known Azure outage multiple regions today. Some DNS issue that also affects image pulls. <a href="https://status.azure.com/en-us/status" rel="noreferrer">https://status.azure.com/en-us/status</a></p>
<p>I'm trying to install Kubernetes with dashboard but I get the following issue:</p> <pre><code>test@ubuntukubernetes1:~$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-flannel kube-flannel-ds-ksc9n ...
<p>I had the same situation on a new deployment today. Turns out, the kube-flannel-rbac.yml file had the wrong namespace. It's now 'kube-flannel', not 'kube-system', so I modified it and re-applied.</p> <p>I also added a 'namespace' entry under each 'name' entry in kube-flannel.yml, except for under the roleRef headi...
<p>Good day!</p> <p>I am facing a strange problem. I have a standard deployment that uses a public image. But when I create it, I get the error <strong>ImagePullBackOff</strong></p> <pre><code>$ kubectl get pods </code></pre> <p>result</p> <pre><code>api-gateway-deployment-74968fbf5c-cvqwj 0/1 ImagePullBackOff ...
<p>I think your internet connection is slow. The timeout to pull an image is <code>120</code> seconds, so kubectl could not pull the image in under <code>120</code> seconds.</p> <p>First, pull the image via <code>Docker</code></p> <pre class="lang-bash prettyprint-override"><code>docker image pull creatorsprodhouse/api...
<p>We are running Grafana on EKS Kubernetes v1.21 as a Helm deployment behind a Traefik reverse proxy.</p> <p>Grafana version: <code>v9.0.3</code></p> <p>Recently, Grafana has been posting this same log message every minute without fail:</p> <pre><code>2022-08-24 15:52:47 logger=context traceID=00000000000000000000000...
<p>The Grafana Live feature is real-time messaging that uses websockets. It is used in Grafana for notifying on events like someone else is editing the same dashboard as you. It can also be used for streaming data directly to Grafana. <a href="https://grafana.com/docs/grafana/latest/setup-grafana/set-up-grafana-live/" ...