Question
stringlengths
65
39.6k
QuestionAuthor
stringlengths
3
30
Answer
stringlengths
38
29.1k
AnswerAuthor
stringlengths
3
30
<p>I am running <code>awx-operator</code> on a k3 cluster. I have a role, <code>update_host_group</code>, that tries to use the AWX REST API to manipulate Ansible groups.</p> <pre><code>--- - name: Update Ansible Tower inventory uri: url: https://awx.example.com/api/v2/groups/36/hosts user: &quot;{{ admin_use...
Red Cricket
<p>This is more sort of a workaround. I am sure there is probably a better solution. I read the documentation here: <a href="https://docs.ansible.com/automation-controller/latest/html/administration/containers_instance_groups.html#customize-the-pod-spec" rel="nofollow noreferrer">https://docs.ansible.com/automation-co...
Red Cricket
<p>I am trying to run a nextflow pipeline but the output file is not created.</p> <p>The main.nf file looks like this:</p> <pre><code>#!/usr/bin/env nextflow nextflow.enable.dsl=2 process my_script { &quot;&quot;&quot; Rscript script.R &quot;&quot;&quot; } workflow { my_script } </code></pre> <p>In m...
Denisa Buzan
<p>Nextflow processes are run independently and isolated from each other from inside the working directory. For your script to be able to find the required input files, these must be localized inside the process working directory. This should be done by defining an <a href="https://www.nextflow.io/docs/latest/process.h...
Steve
<p>Our service is running in kubernetes cluster. I'm trying to make our service to be secured by SSL. </p> <p>For that purpose I added to application.properties:</p> <pre><code>security.require-ssl=true server.ssl.key-store-type=JKS server.ssl.key-store=serviceCertificates.jks server.ssl.key-store-password=${KEYST...
Tantre
<p>I think there is typo or hidden character in your secret descriptor. You can exec into the pod , verify the system property and also try decrypting the password using command line tools. </p>
Raj
<p>I'm having an issue where because an application was originally configured to execute on docker-compose. I managed to port and rewrite the .yaml deployment files to Kubernetes, however, the issue lies within the communication of the pods. </p> <p>The frontend communicates with the backend to access the services, an...
user3653379
<p>Yes, you just add entries to the <code>containers</code> section in your yaml file, example:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: two-containers spec: restartPolicy: Never containers: - name: nginx-container image: nginx - name: debian-container image: debian </code></pre>...
Chris Johnson
<p>I am doing getting started with AWS-EKS demo on my machine. I created a EKS cluster, Worker nodes and then attached those nodes to the Cluster and deployed nginx service over the nodes. In first attempt, I could do this demo successful, and I was able to access the Load balancer url, having nginx service deployed on...
Jagdish0886
<p>You say you deleted the nodes with the <code>kubectl delete node &lt;node-name&gt;</code> command. I don't think you wanted to do that. You deleted the nodes from Kubernetes, but the two EC2 instances are still running. Kubernetes is not able to schedule pods to run on the EC2 instances that were deleted from the cl...
dlaidlaw
<h2>Context</h2> <p>Maybe there is unnecessary redundancy in the <code>iptables</code> rules generated by <code>kubeadm init</code> for <code>kube-proxy</code>:</p> <pre><code>iptables -t filter -S </code></pre> <p>output:</p> <pre><code>-P INPUT ACCEPT -P FORWARD DROP -P OUTPUT ACCEPT -N KUBE-EXTERNAL-SERVICES -N KUBE...
atevm
<p>This duplication is there, because the default FORWARD policy can be disabled for some reason, and Kubernetes still wants to forward packets that either:</p> <ol> <li>Are marked with "masqueradeMark" (those can start new connections)</li> <li>Are part of already established connection</li> </ol> <p>You can try rea...
Maciek
<p>I'd like to run the kubernetes cluster autoscaler so that unneeded nodes will be removed automatically, but I don't want the autoscaler to add nodes automatically. I prefer to handle scaling up myself. Is this possible?</p> <p>I found maxNodesTotal, but I worry the semantics of setting this to 0 might mean all my n...
Jesse Shieh
<p>Since you tagged this question with EKS, I will assume you are on AWS. On AWS the ASG (Auto Scaling Group) for each NodeGroup has a Max setting that is honoured by the cluster autoscaler. You can set this to prevent scaling above the set number of nodes. If the Min and Max on the ASG are the same value, then the aut...
dlaidlaw
<p>I have some dotnet core applications running as microservices into GKE (google kubernetes engine).</p> <p>Usually everything work right, but sometimes, if my microservice isn't in use, something happen that my application shutdown (same behavior as CTRL + C on terminal).</p> <p>I know that it is a behavior of kube...
Rodrigo Celebrone
<p>The key to what's happening is this logged error:</p> <pre><code>TNS: Connect timeout occured ---&gt; OracleInternal.Network.... </code></pre> <p>Since your application is not used, the Oracle database just shuts down it's idle connection. To solve this problem, you can do two things:</p> <ol> <li>Handle the disc...
Maciek
<p>It's been taught that there are 3 patterns in multi-containers pod design.</p> <ul> <li>sidecar</li> <li>adapter</li> <li>ambassador</li> </ul> <p>For separation concerns, is it possible to implement more than 1 pattern in pod design,</p> <p>ie</p> <p>can is it possible to have sidecar and adapter patterns implement...
chz
<p>There is no restriction to implement only 1 pattern, it totally depends on your design/application requirements.</p> <p>Each pattern has its own use-case. For e.g. if the application needs a side-car for logging purpose, needs adapter for modifying/converting data and needs a ambassador to provide external access, y...
Abdullah Shaikh
<p>I'm fiddling around with my RPI cluster that I've setup using <code>Kubeadm</code> and I want to make LoadBalancers able to work on the cluster. The IPs for the nodes are static and set to the range of <code>192.168.1.100-192.168.1.103</code> for the master and worker nodes.</p> <p>I've installed the Metallb using ...
Gurkang
<p>MetalLB layer2 mode doesn't receive broadcast packets unless promiscuous mode is enabled.</p> <p>Try below</p> <pre><code>sudo ifconfig wlan0 promisc </code></pre> <p>Add a Crontab to run each start up so you will not lose this change on restart.</p> <pre><code> 1. sudo crontab -e 2. Add this line at the end ...
marvelTracker
<p>I have deployed my application on Google <code>gcloud</code> container engine. My application required <code>MySQL</code>. Application is running fine and connecting to <code>MySQL</code> correctly. But I want to connect <code>MySQL</code> database from my local machine using <code>MySQL</code> Client (<code>Workben...
Anchit Pancholi
<p>Try the <code>kubectl port-forward</code> command.</p> <p>In your case; <code>kubectl port-forward app-mysql-3323704556-nce3w 3306:3306</code></p> <p>See <a href="https://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward" rel="noreferrer">The documentation</a> for all available options.</p>
Tim
<p>I keep getting this error when I try to setup liveness &amp; readiness prob for my awx_web container</p> <pre><code>Liveness probe failed: Get http://POD_IP:8052/: dial tcp POD_IP:8052: connect: connection refused </code></pre> <p>Liveness &amp; Readiness section in my deployment for the container awx_web</p> <pre><...
Abderrahmane
<p>In my case this issue has occurred because I've configured the backend application host as <code>localhost</code>. The issue is resolved when I changed the host value to <code>0.0.0.0</code> inside my app properties.</p> <p>Use the latest built docker image after making this change.</p>
Vivek
<p>Hava a Java client application that can connect to a Kubernetes cluster over SSL using <code>io.kubernetes.client.ApiClient</code> okay on its own. The same Java client application can also connect to an MQ cluster over SSL on its own. The same application however cannot connect to both Kubernetes cluster over SSL a...
Going Bananas
<p>The <a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">Kubernetes java client API code</a> seems to force adding the certificate referenced in <code>.kube/config</code> to a new truststore that it creates new each time before adding the certificate to it.</p> <p>This seems to take place i...
Going Bananas
<p>I am trying to send some metrics to a datadog agent in kube. I also need to have one agent per cluster. How would I specify the address of the DD agent for other pods? It seems like it should be doable using downward API, but it doesnt seem to work. I already have a DD agent defined</p> <pre><code>.... containers:...
kot
<p>Assuming you’ve a service for datadog, just use its dns name to forward all requests to it. If you don’t already have a datadog service, you’ll need to create one with its backend selector equal to the datadog-agent. The format of the dns name varies depending on whether the service you’re referring to is in the sam...
Abhijit Sarkar
<p>When I access my Kubeflow endpoint to upload and run a pipeline using a cloned TFX, the process starts hanging at the first step producing this message:</p> <p>"This step is in Pending state with this message: ImagePullBackOff: Back-off pulling image "tensorflow/tfx:0.14.0dev", which is the same image used in the c...
ronbor
<p>TFX doesn't have a nightly image build as yet. Currently, it defaults to using the image tagged with the version of the library you use to build the pipeline, hence the reason the tag is <code>0.14dev0</code>. This is the current version at HEAD, see here: <a href="https://github.com/tensorflow/tfx/blob/a1f43af5e66f...
ajay
<p>The next version of CloudFoundry / Diego will offer native support for Docker containers which will be orchestrated across multible hosts [<a href="http://thenewstack.io/docker-on-diego-cloud-foundrys-new-elastic-runtime/" rel="noreferrer">link</a>]. This sounds very similar to Kubernetes.</p> <p>Of course, the pro...
Jonny
<p>As both a CloudFoundry (past) and Kubernetes (present) commiter, I'm probably uniquely qualified to answer this one.</p> <h2>PaaS-like</h2> <p>I like to call CloudFoundry an "Application PaaS" and Kubernetes a "Container PaaS", but the distinction is fairly subtle and fluid, given that both projects change over ti...
KarlKFI
<p>I try to gather containers' logs that kubernetes produced and in /var/lib/containers the logs are as follow</p> <pre><code>2023-04-09T10:54:20.639820293+03:30 stdout F &lt;service log&gt; </code></pre> <p>I don't know what is that F character after stdout does anybody know about that character?</p>
amir.m ghazanfari
<p>That's the <code>tags</code> field of the log line. Taken from the <a href="https://github.com/kubernetes/design-proposals-archive/blob/main/node/kubelet-cri-logging.md#proposed-solution" rel="nofollow noreferrer">docs</a></p> <blockquote> <p>The tags fields can support multiple tags, delimited by :. Currently, only...
Chen A.
<p>I have a same <a href="https://github.com/k3s-io/k3s/discussions/4488" rel="nofollow noreferrer">discussion</a> in k3s github repository, but no one reply. Hope someone can give an answer here.</p> <p>There are articles talking about the embedded etcd HA solution of k3s like <a href="https://blog.alexellis.io/bare-m...
aisensiy
<p>I got a response from the k3s discussion:</p> <p><a href="https://github.com/k3s-io/k3s/discussions/4488#discussioncomment-1719009" rel="nofollow noreferrer">https://github.com/k3s-io/k3s/discussions/4488#discussioncomment-1719009</a></p> <blockquote> <p>Our documentation lists a requirement for a &quot;fixed regist...
aisensiy
<p>On doing K8s updates on GCP we lose the link between the nodes and their external IPs. That causes some issues afterwards on K8s apps communicating with other clouds secured by firewalls. </p> <p>I have to assign them manually afterwards again. Why is this? Can I prevent this somehow? </p>
Hubert Ströbitzer
<p>First of all, ensure you have set your IP to static in the cloud console -> Networking -> External IP addresses.</p> <p>Once it's set to static you can assign your Service to the static IP using the <code>loadBalancerIP</code> property. Note that your Service should be a LoadBalancer type. See <a href="https://kube...
Tim
<p>I would like to install Kubernetes on Alpine Linux which runs on a Raspberry Pi (ARM architecture). So far I've only found K8s packages for x86_64 but nothing for armhf... Any ideas/workarounds would be very much appreciated.</p> <p>Thank you!</p>
Cur10usMind
<p>Since <a href="https://github.com/kubernetes/kubernetes/issues/17981" rel="nofollow noreferrer">April/2016</a> Kubernetes on ARM archtectures is native.</p> <p>And there is an <a href="https://pkgs.alpinelinux.org/package/edge/testing/x86_64/kubernetes" rel="nofollow noreferrer">official package</a> in Alpine repos...
Mauro Baraldi
<p>I'm trying to use the <a href="https://github.com/kubernetes/client-go" rel="nofollow noreferrer">K8S Go client</a> to list the <code>ClusterServiceVersion</code>s. It could be enough to have the raw response body.</p> <p>I've tried this:</p> <pre class="lang-golang prettyprint-override"><code>data, err := clientset...
xonya
<p>It is possible to do a raw request using the <code>AbsPath()</code> method.</p> <pre class="lang-golang prettyprint-override"><code>path := fmt.Sprintf(&quot;/apis/operators.coreos.com/v1alpha1/namespaces/%s/clusterserviceversions&quot;, namespace) data, err := clientset.RESTClient().Get(). AbsPath(path). D...
xonya
<p>I deployed a kubernetes cluster (v1.11) in a hybrid environment connected by aws direct connect service. There are 3 ec2 nodes in one vpc and another bare metal server.</p> <p>Every thing works will except the bad network. I have some java web services running in kubernetes and I set <code>nodeSelector</code> to ma...
aisensiy
<p>Switch cni plugin from flannel to calico solved this problem.</p>
aisensiy
<p>I am very new to NodeJS and trying to develop an application which acts as a scheduler that tries to fetch data from ELK and sends the processed data to another ELK. I am able to achieve the expected behaviour but after completing all the processes, scheduler job does not exists and wait for another scheduler job to...
Vishnu Chaturvedi
<p>When all your work is done, you can call <code>process.exit()</code> to cause your application to exit.</p> <p>In this particular code, you may need to know when <code>reports.sendData()</code> is actually done before exiting. We would have to know what that code is and/or see the code to know how to know when it i...
jfriend00
<p>I am trying to Terraform an Azure Kubernetes Service cluster (AKS) with a <strong>Windows node pool</strong> but I get the following error:</p> <blockquote> <p>Error: creating Managed Kubernetes Cluster &quot;example-aks1&quot; (Resource Group &quot;test-aks-resource&quot;): containerservice.ManagedClustersClient#Cr...
Milad Ghafoori
<p>Turned out I had to include a network adapter in &quot;azurerm_kubernetes_cluster&quot;:</p> <pre><code>network_profile { network_plugin = &quot;azure&quot; } </code></pre> <p>More details:</p> <blockquote> <p><a href="https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_clust...
Milad Ghafoori
<p>We have a Gitlab CI/CD to deploy pod via Kubernetes. However, the updated pod is always pending and the deleted pod is always stuck at terminating. <a href="https://i.stack.imgur.com/qmlKn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qmlKn.png" alt="enter image description here" /></a></p> <p>T...
angelokh
<p>Okay, it turns out we used to have an NFS server as PVC. But we have moved to AWS EKS recently, thus cleaning the NFS servers. Maybe there are some resources from nodes that are still on the NFS server. Once we temporarily roll back the NFS server, the pods start to move to RUNNING state.</p> <p>The issue was discus...
angelokh
<p>Environment: MacBook Pro - Chip: Apple M1 Pro, macOS Monterey 12.2.1</p> <p><strong>How do I run a docker MS SQL (any version) on Mac M1 and connect from Azure Data Studio?</strong></p> <p>I was able to create a docker image of azure-sql-edge. Pod is running OK.</p> <p>INFO: Connection opened from 127.0.0.1:57588 to...
alwisr
<p>The following link should help on dockerizing SQLServer on Mac Arm-based machine.</p> <pre><code>docker pull mcr.microsoft.com/azure-sql-edge </code></pre> <p>This would install SQLServer on Linux. From there you can try to access the database using Azure Data Studio.</p> <p>Details are in the url below. <a href="ht...
Ham Dong Kyun
<p>I want to maintain different configuration for each pod, so planning to fetch properties from spring cloud config based on pod name.</p> <p>Ex: Properties in cloud</p> <p>PodName1.property1 = "xxx" PodName2.property1 ="yyy";</p> <p>Property value will be different for each pod. Planning to fetch properties fr...
SRAVAN KUMAR
<p>You can use <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">statefulsets</a> if you want fixed pod names for your application. e.g. </p> <pre><code>apiVersion: apps/v1 kind: StatefulSet metadata: name: web # this will be used as prefix in pod name spec: ...
Raghwendra Singh
<p>I'm currently working on a project which runs with .NET Core 2.1 on Kubernetes. My application reading configuration values from <code>appsettings.json</code> files and Environment variables.</p> <p>Problem is when I tried the read configuration from <code>IConfiguration</code> interface, &quot;most of the time&quot...
sinanyil
<p>After long and difficult debugging session. I can finally pinpoint the problem.</p> <p>.Net Core uses <code>:</code> as Configuration key separator but Kubernetes configuration files doesn't support such character when naming environment variables. <code>EnvironmentVariablesConfigurationProvider</code> solve this by...
sinanyil
<p>I am debugging DNS using <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">dnsutils</a></p> <p>I have created a dnsutils pod and I can see it running</p> <pre><code>$ kubectl get pods dnsutils -n infrastructure NAME READY STATUS RESTARTS ...
Bob
<p>I have found out that I had some <code>calico-node</code> pods in <code>Running</code> state, but <code>1/2</code>, which I haven't noticed before. I had to kill these pods and also <code>calico-kube-controllers</code> several times, before they were recreated successfully. Then I killed <code>kube-dns</code> pods a...
Bob
<p>I have ingress controller nginx with basic_auth</p> <p>In my yaml I have:</p> <pre><code> annotations: nginx.ingress.kubernetes.io/auth-type: basic nginx.ingress.kubernetes.io/auth-secret: basic-auth nginx.ingress.kubernetes.io/auth-realm: "Authentication Required" </code></pre> <p>Everything works f...
ksmar
<p>You want to use custom server snippet and use allow/deny. I find it more elegant solution then the <code>if</code> recommentation in the comment above.</p> <pre><code> annotations: nginx.ingress.kubernetes.io/server-snippet: | satisfy any; allow 66.220.144.0/20; deny all; </code></pre> <p>T...
graywolf
<p>I often run tasks like:</p> <ul> <li>Read the log of the service <code>X</code> or</li> <li>Attach a shell inside the service <code>Y</code></li> </ul> <p>I always use something in my history like:</p> <pre><code>kubectl logs `kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep &lt;partial_n...
ProvoPropoli
<p>added to my <code>.zshconfig</code></p> <pre><code>sshpod () { kubectl exec --stdin --tty `kubectl get pods --no-headers -o custom-columns=&quot;:metadata.name&quot; | grep ${1} | head -n 1` -- /bin/bash } </code></pre> <p>usage</p> <p><code>sshpod podname</code></p> <p>this</p> <ol> <li>finds all pods</li> <li>gr...
Nahum
<p>I am currently using EKS private cluster with a public API server endpoint in order to use Azure DevOps environments(with Kubernetes service connection).</p> <p>I have a requirement to make everything private in EKS.</p> <p>Once EKS becomes private, it breaks everything in Azure DevOps as it is not able to reach the...
Jesus Vidal
<p>If you're trying to target the cluster for deployment, you need a self-hosted agent that has a network route to your cluster.</p> <p>The other capabilities exposed by the environment feature of Azure DevOps (i.e. monitoring the state of the cluster via the environment view) will not work -- they require a public-fac...
Daniel Mann
<p>I'm trying to migrate a django app to google kubernetes engine and can't get it to work. </p> <p>The response from the app is: Exception Value:<br> (1045, "Access denied for user 'root'@'cloudsqlproxy~[cloudsql instance ip]' (using password: NO)")</p> <p>If I fire up a bash shell into the running container in whic...
Benca Lucian
<p>mistery solved, the docker image that the deployment was based on, had an entrypoint script that started the webserver, the env variables specified in the deployment.yaml were set after the entry point script started so django didn't know about them.</p>
Benca Lucian
<p>We have three node Cassandra cluster spinned up in Kubernetes.</p> <pre><code>$ kubectlget pods NAME READY STATUS RESTARTS AGE k8-cluster-0 1/1 Running 0 6d4h k8-cluster-1 1/1 Running 0 6d4h k8-cluster-2 1/1 Running 0 ...
user12189187
<p>You can use kubectl port-forward command to expose it your localhost.</p> <p>Checkout <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel="nofollow noreferrer">this link</a></p> <p>You can expose it via pod or service name ...</p>
Luffy
<p>does AWS cloudformation supports creation of Kubernetes pods, services, replica controllers etc or setting up the EKS clusters and worker nodes and using Kubectl to create the resources are the only way?</p>
mygitrepo
<p>Not out of the box, but you can if you use a custom resource type backed by a lambda function in CloudFormation.</p> <p>The <a href="https://github.com/aws-quickstart/quickstart-amazon-eks/blob/6b19bff660e055aba47cb08eb2e18f22d0e87655/templates/amazon-eks-master-existing-cluster.template.yaml" rel="nofollow norefer...
Dylan
<p>Velero is installed in the cluster. At the installation velero was given credentials to s3 provider with <code>--secret-file</code> parameter and everything works fine. </p> <p>Now I would like to create a new backup-location which will use buckets from a different s3 provider. When creating a backup location I pas...
BanzaiTokyo
<p>As the <a href="https://velero.io/docs/v1.2.0/locations/" rel="nofollow noreferrer">documentation</a> says:</p> <blockquote> <p>Velero only supports a single set of credentials per provider. It's not yet possible to use different credentials for different locations, if they're for the same provider.</p> </blo...
BanzaiTokyo
<p>I am trying to do a helm upgrade dry run.</p> <p>1.</p> <pre class="lang-sh prettyprint-override"><code>helm upgrade -i $xyz-abc-ms xyz-abc-exe/target/classes/helm/xyz-abc \ --set jobs.helmServiceAccount=jenkins,csbEnabledLocal=false,jacoco.enabled=true,containerinfo.imageTag=${DOCKER_BUILD_NUMBER},pki.sslenabled=fa...
Anjana Ouseph
<p>Yeah tiller is not even used by Helm 3.</p> <p><a href="https://betterprogramming.pub/why-is-tiller-missing-in-helm-3-2347c446714" rel="nofollow noreferrer">This article</a> talks about why it was needed in Helm 2 and why they eventually removed it but if you want a very short summary, here it is:</p> <p>Helm takes ...
Peyman
<p>I have a micro-services based JHipster app and have generated a Kubernetes deployment script using the <code>kubernetes</code> sub-generator.</p> <p>I have deployed the app to Azure AKS and have it running smoothly. The current profile it is running with is 'prod'. How can I change the active profile the 'dev' in o...
Omtara
<p>I managed to get the swagger API functional by adding swagger to the <code>SPRING_PROFILES_ACTIVE</code> environment variable for all containers' deployment file.</p> <pre><code>spec: ... containers: - name: core-app image: myrepo.azurecr.io/core env: - name: SPRING_PROFILES_ACTIVE ...
Omtara
<p>I have an existing github project. I want to create/add a <code>helm</code> folder to the project to store the helm yaml files. I want to reference this github project/folder to act like a helm repo in my local/dev environment. I know I can add the charts to my local/default helm repo. The use case is if another dev...
alltej
<p>Unfortunately, I wasn't able to find a way to publish helm charts via GitHub using private repositories. On a theoretical level, it might work using GitHub token and 2nd (raw URLs method), but I haven't tried it. Since you're using docker registry anyway, it might be worth trying using OCI (docker) registry to store...
KarolisL
<p>I'm still getting this privacy error I'm still getting this privacy error <a href="https://i.stack.imgur.com/JyWML.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JyWML.png" alt="enter image description here" /></a></p> <p>the <code>issuer</code> generate a certificate and all things is good</p> <...
Abd allah Khateeb
<p>It appears you are using <a href="https://cert-manager.io/docs/" rel="nofollow noreferrer">cert-manager</a> to generate CA signed certificates. The certificate status appears to be <code>True</code> which means cert-manager has successfully provisioned the certificate.</p> <p>From the naming convention, I'm assuming...
Raghwendra Singh
<p>I have a working mutating admission hook for kubernetes. It is called when I first deploy and app using helm. But it is not called when I update using helm. It will in fact call it if I change the version number for the deployment. But if only the content changed, then it skips calling the hook. </p> <p>How can I m...
Jerico Sandhorn
<p>Turns out I had a typo in my mutator config for "pod" instead of "pods". Plus, I was misunderstanding and expecting to see "deployments" updates since I was actually changing the "Deployment" kind yaml. Its just "pods" that I needed. </p> <p>Here is the correction:</p> <pre><code>resources: ["pods","deployments","...
Jerico Sandhorn
<p>When I use Terraform to create a cluster in GKE everything works fine and as expected.</p> <p>After the cluster is created, I want to then use Terraform to deploy a workload. </p> <p>My issue is, how to be able to point at the correct cluster, but I'm not sure I understand the best way of achieving this. </p> <p...
nmh
<p>Actually, there is another way to access to fresh created gke.</p> <pre><code>data "google_client_config" "client" {} provider "kubernetes" { load_config_file = false host = google_container_cluster.main.endpoint cluster_ca_certificate = base64decode(google_container_cluster.main.master_auth.0.cluster_ca_cer...
a0s
<p>I have two services running on k8s and I am using an ingress to access my services. One of the service requires access to another view env but I added the cluster IP and the port of the required service but it seems to be unaccessible.</p> <p>User Deployment yaml</p> <pre><code>... - name: WALLET_SERVICE_UR...
King
<ol> <li><p>Use <code>ClusterIP</code> for <code>wallet-service</code>. There's no reason to use <code>NodePort</code> -- the ingress controller will handle routing to the internal IP.</p> </li> <li><p>Your value for the <code>WALLET_SERVICE_URL</code> should be pointing to your service <em>by DNS name</em>, using the ...
Daniel Mann
<p>I want to get Secret object from k8s cluster using go-client API</p> <p>I have function that looks like that</p> <pre><code>func GetSecret( version string) (retVal interface{}, err error){ clientset := GetClientOutOfCluster() labelSelector := metav1.LabelSelector{MatchLabels: map[string]string{"version":ve...
AlexS
<p>You can use the k8s provided function to do the toString operation</p> <pre><code>import "k8s.io/apimachinery/pkg/labels" ... func GetSecret(version string) (retVal interface{}, err error){ clientset := GetClientOutOfCluster() labelSelector := metav1.LabelSelector{MatchLabels: map[string]string{"version":versi...
larry.li
<p>I'm checking on a scaling issue and we are suspecting it has something to do with the memory, but after running a load testing on local machine it doesn't seems to have memory leak. We are hosting the .net core application in Kubernetes, with resources setting 800mi request memory without limit. And as per describe ...
ragk
<p>Yes that's exactly what can happen, both with .NET and other pods.</p> <p>Always set memory and CPU limits as this may have impact on other pods or <a href="https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/" rel="nofollow noreferrer">Configure Default Memory Requests and...
Martin Ullrich
<p>For testing purposes, I want to set up the kubernetes master to be only accessible from the local machine and not the outside. Ultimately I am going to run a proxy server docker container on the machine that is opened up to the outside. This is all inside a minikube VM.</p> <p>I figure configuring kube-proxy is the...
Shorin
<p>you could limit it via the local network configuration. (Firewall, Routes) As far as I know, the API needs to be accessible, at least via the local network where the other nodes reside in. Except you want to have a single node "cluster".</p> <p>So, when you do not have a different network card, where you could adve...
wuerzelchen
<p>I am using <code>Firebase</code> in my <code>GoLang</code> project hosted on <code>Google Kubernetes Engine</code>.</p> <p>Steps I followed:</p> <ol> <li><p>Enable firebase admin SDK on the firebase account. It generated a service account <code>JSON</code> for me. This also created a service account under my Google ...
Amit Pal
<p>Finally, I figure out how to copy it and use the environment variable. Here is. the updated <code>YAML</code>file</p> <pre><code>apiVersion: apps/v1beta1 kind: Deployment metadata: name: my-app spec: template: spec: volumes: - name: google-cloud-keys secret: secretName: gac-keys...
Amit Pal
<p>I created a pod (an Alpine &quot;BusyBox&quot; to run commands in) which then gets the <code>default</code> service account associated with it. I then created a <code>RoleBinding</code> <em>(and later <code>ClusterRoleBinding</code> when the first didn't work)</em> but it still won't let me call the K8s API.</p> <p>...
Don Rhummy
<p>You can only have one <code>ServiceAccount</code> per pod and once you've assigned an account to that pod, the <code>default</code> account no longer applies. I was trying to bind the role to the <code>default</code> account, but passing the token of another account I'd created for the pod.</p>
Don Rhummy
<p>I want to change the base url of my JupyterHub, how can I do this with the <a href="https://zero-to-jupyterhub.readthedocs.io/en/latest/index.html#" rel="nofollow noreferrer">Zero to Jupyterhub with Kubernetes project</a>?</p> <p>I know it is possible to change the hub's base url, it is stated on the bottom of this...
Stanko
<p>you can put in config.yaml of helm:</p> <pre><code>hub: baseUrl: /jupyter </code></pre>
ilya
<p>I am running into an CORS issue with an Angular front-end and a C# REST layer running in k8s. I have a general understanding in CORS and understand the error message below means. I need help fixing it.</p> <p>Error from the UI.</p> <blockquote> <p>Cross-Origin Request Blocked: The Same Origin Policy disallows re...
Nick Orlowski
<p>When putting an app together in kubernetes, you would typicall try to make all services available on the same domain using <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a> definitions.</p> <p>For example, if you have a backend service + deployment for ...
Martin Ullrich
<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>...
UDIT JOSHI
<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 ...
Chen A.
<p>We're trying to use Red Hat Data Grid (RHDG)/Infinispan in our OCP (4.5.36) cluster. We have the latest official RHDG Operator installed and a Cache type cluster defined. (Which is apparently a k8s StatefulSet.)</p> <p>I've then configured a WebSphere Liberty container/Deployment to try to use that Infinispan cluste...
dbreaux
<p>Working through this on <a href="https://infinispan.zulipchat.com/#narrow/stream/118645-infinispan/topic/RHDG.20OCP.20Liberty.20failure" rel="nofollow noreferrer">the Infinispan chat service</a>, it does appear that there's incorrect or incomplete setup of SSL/TLS.</p> <p>I had attempted to remove encryption in the ...
dbreaux
<p>How do I do this but in terraform using <code>kubernetes</code> provider??</p> <pre><code>kubectl apply -k &quot;github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.4&quot; </code></pre> <p>I have searched for a few, but none mention applying a direct yaml file.</p>
bonijad383
<p>You can achieve that differently; if that works for you. You want to execute <code>kubectl</code> from Terraform, not communicating directly with the Kubernetes API.</p> <p>I think this method has more advantages than what you originally asking for, because it removes an external dependency.</p> <p>There's a <a href...
Chen A.
<p>I created a startup probe and made it so it would <em>always</em> fail. It should result in the pod getting killed and restarting, but it doesn't. I see one event of the startup probe failing <em>(and no events after that)</em>, but the pods show as <code>1/1 Running</code>. And when I run my Helm test, it passes!</...
Don Rhummy
<p>It wasn't failing because it turns out the <code>ping</code> command returns a <code>0</code> status even if the user/pass is wrong, as long as it can reach the server.</p> <p><a href="https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html" rel="nofollow noreferrer">MySql ping command</a></p> <blockquote> <p>Check ...
Don Rhummy
<p>Running 'minikube' on <code>windows 10</code>, why <code>minikube kubectl create -h</code> doesn' work but <code>minikube kubectl -- create -h</code> does (w.r.t. showing help for <code>create</code>)</p>
Manu Chadha
<p>This is the way minikube works:</p> <p>Minikube has a subcommand <code>kubectl</code> that will exectute the <code>kubectl</code> bundled with minikube (because you can also have one installed outside of minikube, on your plain system).</p> <p>Minikube has to know the exact command to pass to its <code>kubectl</code...
smaftoul
<p>I have a Vault deployment in my cluster that I use to store secrets. Additionally, I have created <code>roles</code>, <code>policies</code>, and a <code>ServiceAccount</code>. My applications will retrieve secrets from Vault using this service account. However, I am concerned that another application could use the s...
Anirudh Ramesh
<p>Using the <code>kubernetes</code> auth method, this is how it works. You don't need to do anything else. Assuming you are using the default behavior of kubernetes where it creates a service account per app, you're good.</p> <p>When an app logins to Vault using a ServiceAccount, it provides its token and authenticate...
Chen A.
<p>I want to be able to take multiple sub-properties from a <code>values.yaml</code> property and put them all under a property in a template. For example:</p> <p><strong>values.yaml</strong></p> <pre class="lang-yaml prettyprint-override"><code>selectors: propA: valueA propB: valueB propC: valueC </code></pre> <...
Don Rhummy
<p>It's turns out not to be super simple. It depends (from what I can tell) on which type of thing is underneath.</p> <p><strong>Simple name:value pairs</strong></p> <p>You can use the <code>range</code> function which acts a lot like a for-each loop. The</p> <pre class="lang-golang prettyprint-override"><code>{{- rang...
Don Rhummy
<p>How can I list all Kubernetes services along with the number of active pods associated with each service?</p> <p>Currently, I can list all services with: <code>kubectl get services</code></p> <p>I would like to add one additional column to the output, which lists active pod count for each service.</p>
MTS
<p>A service is basically a load balancer over a deployment (and a deployment is a replica set of multiple pods). So, chances are you want to be listing the deployments instead of the services in this case. Services and deployments are loosely coupled via tags, so there probably isn't a great way to go from services ...
John Humphreys
<p>I am using the following job template:</p> <pre><code> apiVersion: batch/v1 kind: Job metadata: name: rotatedevcreds2 spec: template: metadata: name: rotatedevcreds2 spec: containers: - name: shell image: akanksha/dsserver:v7 env: - name: DEMO value: "Hello ...
codec
<p>It is likely your <code>PATH</code> is not set correctly, a quick fix is to define the absolute path of aws-cli like <code>/usr/local/bin/aws</code> in <code>/root/rotateCreds.sh</code> script</p>
maaz
<p>I am using the Gitlab Auto DevOps CI pipeline and I want to remove a deployment using helm.</p> <p>I try to connect to tiller like this <code>helm init --client-only --tiller-namespace=gitlab-managed-apps</code> which results in </p> <p><code>$HELM_HOME has been configured at /Users/marvin/.helm. Not installing Ti...
mrvnklm
<p>I had the same problem. I've found the solution to list releases here : <a href="https://forum.gitlab.com/t/orphaned-apps-in-gitlab-managed-apps-namespace/22717/9" rel="nofollow noreferrer">https://forum.gitlab.com/t/orphaned-apps-in-gitlab-managed-apps-namespace/22717/9</a></p> <pre><code>export TILLER_NAMESPACE="...
chok
<p>I am trying to apply below deployment, but I get below error</p> <p>The Deployment "example" is invalid: spec.template.spec.containers[0].env[0].valueFrom.fieldRef.fieldPath: Invalid value: "spec.template.metadata.annotations.configHash": error converting fieldPath: field label not supported: spec.template.metadata...
Sushrismita Mishra
<p>Just use:</p> <pre><code>env: - name: CONFIG_HASH valueFrom: fieldRef: fieldPath: metadata.annotations['configHash'] </code></pre> <p>Instead of spec.template.metadata.annotations.configHash</p>
Luffy
<p>I have integration test, where i start StatefulSet, wait untill ready and then do some asserts.</p> <p>My problem that if Application fails - it try to restart too fast. And I can't get logs from failed pod.</p> <p>SO my question how can i increase time between Restart of pod in StatefulSet? Because K8s controller...
Grigoriev Nick
<p>If all you want is to view the logs of the terminated pod, you can do </p> <p><code>kubectl log &lt;pod_name&gt; --previous</code></p>
redgetan
<p>I have created an instance of Azure Kubernetes Service (AKS) and have discovered that apart from the resource group I created the AKS instance in, one more resource group is created for me.</p> <p>Eg:</p> <p>My AKS Resource Group: Production_MyAKSInstance Additional Resource Group: MC_MyResourceGroup-Production_MyAK...
One Developer
<p>You can't rename it however you can specify a name when you create the cluster.</p> <p><a href="https://learn.microsoft.com/en-us/azure/aks/faq" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/faq</a></p> <blockquote> <p>By default, AKS will name the node resource group MC_resourcegroupname_clu...
CSharpRocks
<p>I created a k3d cluster like this:</p> <pre class="lang-sh prettyprint-override"><code># Create 3 server nodes and only allow control plane stuff on there (and things with tolerations) # Pretty print: # k3d cluster create dev # --api-port 6551 # --port &quot;8081:80@loadbalancer&quot; # --servers 3 # --k...
Don Rhummy
<p>The problem is two things:</p> <ol> <li>The <code>Service</code> and other K8s objects installed via Traefik's Helm chart that aren't in the <code>Deployment</code> do not have sections to pull in the <code>tolerations</code> from the <code>values.yaml</code></li> <li>I only had tainted nodes running, so the Traefik...
Don Rhummy
<p>I am running Celery in Kubernetes pod. It can't find the server:</p> <blockquote> <p>ERROR/MainProcess] consumer: Cannot connect to redis://:**@redis-master:6379/1: Error -3 connecting to redis-master:6379. Lookup timed out.. Trying again in 4.00 seconds... (1/100)</p> </blockquote> <p>If I connect to the very same ...
Michael A.
<p>Answering myself:</p> <p>This is a dnspython bug. Solution:</p> <pre><code>pip install dnspython==1.16.0 </code></pre>
Michael A.
<p>I recently switched from AWS to Azure and i'm having issues with getting the docker to run in my daemonset.</p> <p>On AWS I was pulling an image of a Pod and doing docker diff to compare that image with the original one.</p> <p>But on Azure now i cannot access the docker and can't seem to find a way to get the origi...
Celestial
<p>What version of Kubernetes are you running in AKS? Kubernetes has deprecated Docker as a container runtime after v1.20 so you can't run DOCKER DIFF on a node anymore.</p> <p>Ref: <a href="https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/" rel="nofollow noreferrer">https://kubernetes.io/blog/20...
CSharpRocks
<p>I have two deployments (A and B), each one exposing ClusterIP Service. Before deploying Istio, I was able to communicate from pod A to any of B pods via its Service (e.g. <a href="http://B.default.svc.cluster.local/dosomecrazystuff" rel="nofollow noreferrer">http://B.default.svc.cluster.local/dosomecrazystuff</a>)</...
Illidan
<p>Well, it seems like some local issue I having on my MicroK8s deployment. On EKS and another MicroK8s I able to communicate as desired without anything special.</p> <p>So, the answer is: no special configuration required to make it work, it supposed to be able to communicate just as is.</p>
Illidan
<p>I have a cluster running on GCP that currently consists entirely of preemtible nodes. We're experiencing issues where kube-dns becomes unavailable (presumably because a node has been preempted). We'd like to improve the resilience of DNS by moving <code>kube-dns</code> pods to more stable nodes.</p> <p>Is it possib...
Faun
<p>The solution was to use taints and tolerations in conjunction with node affinity. We created a second node pool, and added a taint to the preemptible pool.</p> <p>Terraform config:</p> <pre><code>resource "google_container_node_pool" "preemptible_worker_pool" { node_config { ... preemptible = true ...
Faun
<p>I am trying to install the ingress on a new azure kuberenetes cluster but it is giving following error:-</p> <pre><code>helm install germanyingress ingress-nginx --namespace test --set controller.replicaCount=2 --set controller.scope.enabled=true --set controller.service.loadBalancerIP=&quot;*******&quot; --set con...
rahul patwa
<p>The warning message is very clear, you're using a Helm repo that is deprecated.</p> <p>Remove it using</p> <pre><code>helm repo remove germanyingress </code></pre> <p>Add the Kubernetes one</p> <pre><code>helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update </code></pre> <p>or the ...
CSharpRocks
<p>I have the below Horizontal Pod Autoscaller configuration on Google Kubernetes Engine to scale a deployment by a custom metric - <code>RabbitMQ messages ready count</code> for a specific queue: <code>foo-queue</code>.</p> <p>It picks up the metric value correctly.</p> <p>When inserting 2 messages it scales the deplo...
Erez Ben Harush
<p>I think you did a great job <a href="https://stackoverflow.com/a/57889681/868533">explaining how <code>targetValue</code> works</a> with HorizontalPodAutoscalers. However, based on your question, I think you're looking for <code>targetAverageValue</code> instead of <code>targetValue</code>. </p> <p>In <a href="http...
supersam654
<p>What specific changes need to be made to the <code>yaml</code> below in order to get the <code>PersistentVolumeClaim</code> to bind to the <code>PersistentVolume</code>?</p> <p>An EC2 instance in the same VPC subnet as the Kubernetes worker nodes has an ip of 10.0.0.112 and and has been configured to act as an NFS ...
CodeMed
<p>I diagnosed the problem by typing <code>kubectl describe pvc my-pv-claim</code> and looking in the Events section of the results.</p> <p>Then, based on the reported Events, I was able to fix this by changing <code>storageClassName: manual</code> to <code>storageClassName: slow</code>. </p> <p>The problem was that...
CodeMed
<p>Is it possible to "unify" the endpoints of single services running in kubernetes? For example I've two services:</p> <ol> <li>User</li> <li>Post</li> </ol> <p>Both services are exposed using it's own port. E.g.: <code>http://localhost:30888/api/user</code> and <code>http://localhost:30884/api/post</code>.</p> <p>...
BendEg
<p>It sounds like you're looking to add an <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a> on top of your Services. Ingresses can do a bunch of things including send traffic to different Services based on paths.</p> <p>An Ingress to get you started might...
supersam654
<p>Use <a href="https://docs.gitlab.com/ce/install/kubernetes/gitlab_omnibus.html#configuring-and-installing-gitlab" rel="nofollow noreferrer">https://docs.gitlab.com/ce/install/kubernetes/gitlab_omnibus.html#configuring-and-installing-gitlab</a> for install GitLab. But I have a problem.</p> <p>I see in describe gitla...
Ivan
<p>Couple of times we had this issue. Instead of health check, we started to use login page where it sends 200. Use the context path below</p> <ul> <li>/users/sign_in</li> </ul>
Pamir Erdem
<p>I am trying to create a cluster in AWS us-east-1 region for a user account of my root account.But while trying to create the same i am getting the following issues</p> <pre><code> [ℹ] eksctl version 0.22.0 [ℹ] using region us-east-1 [ℹ] subnets for us-east-1a - public:192.168.0.0/19 private:192.168.64.0/19 ...
Mandrek
<p>This line from your logs</p> <pre><code>[✖] AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – &quot;User: arn:aws:iam::750121092648:user/HR is not authorized to perform: eks:CreateCluster on resource: arn:aws:eks:us-east-1:750121092648:cluster/in28minutes-cluster (Service: AmazonEKS; Status Code: 403; Error Code: Acc...
Blaz
<p>I'm trying to 'push' entries into a containers /etc/hosts file by using the 'hostAliases' element of a Pod when defining a Replication Controller.</p> <p>This is the Replication Controller definition:</p> <pre><code>{ "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "my-test", ...
KennetRunner
<p>I hope this is the solution, as I quickly verified it and it worked. I created a simple nginx deployment and then edited it to add the <code>hostAliases</code> entry:</p> <p>With below snippet, I was getting an error and could not save the deployment</p> <pre><code>"hostAliases": [ { "ip": "1...
Vishal Biyani
<p>I am fairly new to this, I don't know if I am heading in the right direction or not. I have a custom nginx.conf that works fine, I am now trying to build a docker image with it so that I can run it as a container in kuberentes. </p> <p>Here is my nginx.conf</p> <pre><code>user nginx; worker_processes auto; error_l...
alexv9
<p>You must publish the port at runtime like this: <code>docker run -p 8000:8000 image-id</code>.</p>
smaftoul
<p>I am trying to set up a bare metal Kubernetes server including the metallb <code>LoadBalancer</code>. Therefore, I followed the instructions published on the website of the kind project <code>https://kind.sigs.k8s.io/docs/user/loadbalancer/</code>. To test my installation I tried to deploy the default <code>nginx</c...
Patrick
<p>The problem concern about MetalLB controller. I have face this issue as well for my action reintall MetalLB again. refer: <a href="https://github.com/metallb/metallb/issues/673" rel="nofollow noreferrer">https://github.com/metallb/metallb/issues/673</a></p> <p>Remove</p> <pre><code>kubectl delete -f https://raw.gith...
6LYTH3
<p>I have the following deployment and a load balancer service to connect to it:</p> <pre><code>apiVersion: apps/v1beta1 kind: Deployment metadata: name: slave spec: replicas: 2 template: metadata: labels: app: slave spec: containers: - name: slave envFrom: - con...
Ziad Halabi
<p>To me, this smells like a faulty design and you should fix it. In your slaves, after the pod is done processing the file - it is holding it locally - which is state being held locally and not a good idea. </p> <p>After the processing of the job is done, you should store the file in something external - say S3 or an...
Vishal Biyani
<h1>Gist</h1> <p>I have a <code>ConfigMap</code> which provides necessary environment variables to my pods:</p> <pre><code>apiVersion: v1 kind: ConfigMap metadata: name: global-config data: NODE_ENV: prod LEVEL: info # I need to set API_URL to the public IP address of the Load Balancer API_URL: http://&lt;...
Florian Ludewig
<p>I know this isn't the exact approach you were going for, but I've found that <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/configuring-domain-name-static-ip#step_2a_using_a_service" rel="nofollow noreferrer">creating a static IP address and explicitly passing it in</a> tends to be easier to work...
supersam654
<p>We have a SpringBoot Web app docker container deployed in Kubernetes with 3 replicas. when the controller redirects to a different url within the same controller, we pass an object via the flashAttributes. When we run 1 pod, everything works. But when I scale to 3 pods, the object comes with all internal attributes ...
Sreeni
<p>Kubernetes can send multiple requests from a session to different pod within a deployment. That's why the data is lost because the data might in memory for one pod but another pod will not have that data at all. </p> <p>To avoid this - you can either maintain the session cache in an external store like Redis or use...
Vishal Biyani
<p>I have a template that renders a secret containing the credentials to log in to my server. There is a deployment configuration in which this is done insecurely, in which case I don't want to render the secret. Normally my values.yaml contains auth.myapp.username, and auth.myapp.password, however when the deploymen...
Andy
<p>Use haskey function:</p> <pre><code>{{ if haskey .Values &quot;auth&quot; }} apiVersion: v1 kind: Secret metadata: name: myapp-credentials-secret type: Opaque data: USERNAME: {{ .Values.auth.myapp.username | b64enc }} PASSWORD: {{ .Values.auth.myapp.password | b64enc }} {{ end }} </code></pre> <p>The <code>has...
Oliver
<p>I am new to SNS. I am basically publishing a message on an SNS topic. Now I have 3 Kubernetes pods in my application.</p> <p>I would like each of these pods to consume the message published on the topic. Being new to SNS, I don't have any idea if it is possible to make 3 individual pods consume the same message publ...
Joy
<p>You would need to create an SQS queue for each of your pods and subscribe the SQS queues to the SNS topic. Then you would get the messages in each pod on its own queue.</p>
smaftoul
<p>I have added several <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="noreferrer">Horizontal Pod Autoscalers</a> (HPAs) to a Kubernetes cluster. I want to monitor the number of replicas of each pod over time.</p> <p>Does <a href="https://cloud.google.com/stackdriver/" rel="n...
MAcabot
<p>I don't think you can count pods, but you can count containers. With a constant number of containers inside the replicated Pods and proper filtering, you'll get what you need.</p> <p>While in Stackdriver go to Dashboard -> Create dashboard. Select the following settings:</p> <pre><code>Resource type: GKE Container...
Maciek
<p>I can log into a <em>work terminal</em> via a public IP, and list all the <code>nodes</code> by </p> <pre><code>kubectl get nodes # only gives me internal IPs </code></pre> <p>and also be able to check the basic info by </p> <pre><code>kubectl cluster-info </code></pre> <p>and the basic IP info for the current i...
Hearen
<p>Some of these commands might show different output based on your Kubernetes cluster, I am showing examples from GKE here.</p> <p>You can use <code>-owide</code> option to get some additional information:</p> <pre><code>$kubectl get nodes -owide NAME STATUS ROLES AGE VERSION ...
Vishal Biyani
<p>I want to give my application limited access to get the replicas of different statefulsets (and maybe deployment) and if necessary scale them up or down.</p> <p>I have created ServiceAccount, Rolebinding and Role for this but I can't find the complete list of rule verbs ("get", "watch", "list", "update") and what a...
AVarf
<p>You can get quite a bit of info via this:</p> <pre><code>kubectl api-resources --sort-by name -o wide </code></pre> <p>The above <code>api-resources</code> command is explicit and easy to grep. The complete list of possible verbs can be obtained thus:</p> <pre><code>$ kubectl api-resources --no-headers --sort-by nam...
Oliver
<p>I have a monorepo of 2 packages:</p> <ol> <li>produces a docker-image</li> <li>has tests that deploy (locally) to k8s the image from package-1</li> </ol> <p>to make sure that k8s will talk to the local docker deamon and take the image from there, in my local machine, I run: </p> <ol> <li>eval $(minikube docker-en...
Stav Alfi
<p>After some time I created a working solution for this problem. I'm not sure why I got that error but here is a working solution:</p> <p>github actions configuraiton file:</p> <pre><code>name: Node.js CI on: [pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: ...
Stav Alfi
<p>I am running Kubernetes using OKD 4.11 (running on vSphere) and have validated the basic functionality (including dyn. volume provisioning) using applications (like nginx).</p> <p>I also applied</p> <p><code>oc adm policy add-scc-to-group anyuid system:authenticated</code></p> <p>to allow authenticated users to use ...
sprockets
<p>For posterity, the ECK starts an init container that <em>should</em> take care of the <code>chown</code> on the data volume, but can only do so if it is running as root.</p> <p>The resolution for me was documented here: <a href="https://repo1.dso.mil/dsop/elastic/elasticsearch/elasticsearch/-/issues/7" rel="nofollow...
sprockets
<p>I created a Azure file share and I am able to connect to it using map network drive in my laptop having windows 10. I created a hello-world spring boot application with volume mount configurations for azure file share and trying to deploy in Kubernetes in docker-desktop. But my pod doesn't starts -</p> <pre><code>he...
Saurabh
<p>You likely need to install a package that knows how to mount that file system. For NFS this may be nfs-common with Debian/Ubuntu.</p> <p><code>sudo apt update &amp;&amp; sudo apt install nfs-common -y</code></p>
smoe
<p>I have an application running on my home cluster.<br> My cluster is running K3S.<br> The cluster exists of 5 Raspberry Pi's 3B and 1 Ubuntu VM.<br> One of my deployments is Domoticz.<br> This uses a SQLite database to store data.<br> I'm using this as a StorageClass. <a href="https://github.com/kubernetes-sigs/nfs-s...
Geert
<p>I fixed this by using longhorn instead of NFS. Thanks Andrew Skorkin for the tip</p>
Geert
<p>I am trying to replicate the Azure Batch API within Kubernetes, I have a web api that runs as a service and that in turn uses the Kubernetes API to create batch jobs dynamically.</p> <p>So far so good.</p> <p>Where i am coming unstuck is typically each task in these jobs is some pretty hard hitting TensorFlow deep...
user1371314
<p>You can use pod affinity/anti-affinity rules to ensure that once a pod of a specific application is scheduled on one node, then no other pod of the same application is scheduled on that node.</p> <p>Copying the example deployment of Redis <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#m...
Vishal Biyani
<p>I'm trying to use the <strong>MinIO operator</strong> on a minikube (1 node) deployed in an EC2 machine. The operator is deployed correctly and the same is for the tenant creation and it seems all good until I try to make a connection to the created tenant. In this case I receive a <strong>500</strong> internal serv...
Salvatore Coluccia
<p>The first <code>mc</code> command that you are running shows there is something listening on port <code>9000</code> of your <code>localhost</code>, however you are getting a TLS verification error because MinIO by default is using a certificate issued by the local kubernetes certificate authority, also the returned ...
Alevsk
<p>If I have the following Kubernetes objects:</p> <ul> <li><code>Deployment</code> with <code>rollingUpdate.maxUnavailable</code> set to <code>1</code>.</li> <li><code>PodDisruptionBudget</code> with <code>maxUnavailable</code> set to <code>1</code>.</li> <li><code>HorizontalPodAutoscaler</code> setup to allow auto s...
Muhammad Rehan Saeed
<ol> <li>As in <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#how-disruption-budgets-work" rel="nofollow noreferrer">documentation</a>:</li> </ol> <blockquote> <p>Pods which are deleted or unavailable due to a rolling upgrade to an application do count against the disruption budget, but con...
Maciek
<p>I have a AWS EKS cluster 1.12 version for my applications, We have deployed 6 apps in the cluster everything is working fine, while creating nodes I have added an autoscaling node group which spans across availability zones with minimum 3 and max 6 nodes, so desired 3 nodes are running fine.</p> <p>I have scenario ...
Lakshmi Reddy
<p>You should create one node group for every AZ. So if your cluster size is 6 nodes then create 2 instance node groups in one AZ each. You can also spread the pods across AZ for High Availability. If you look at cluster <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/...
Vishal Biyani
<p>I brought my Kubernetes 1.18 on Centos 7. We are also using customized CIDR using </p> <p>kubectl apply -f "<a href="https://cloud.weave.works/k8s/net?k8s-version=" rel="nofollow noreferrer">https://cloud.weave.works/k8s/net?k8s-version=</a>$(kubectl version | base64 | tr -d '\n')&amp;env.IPALLOC_RANGE=IPALLOC</p> ...
user872274
<p>I got the solution, it looks like deleted docker images somehow didn't clean up properly.No idea about this. But below solution worked for me</p> <pre><code>docker system prune systemctl stop kubelet systemctl stop docker systemctl start docker systemctl start kubelet </code></pre>
user872274
<p>I have a single-threaded, web-based, CPU intensive workload implemented as a Node.js server (express) and being deployed on Kubernetes with no CPU requests/limits (best effort). This workload, on average, takes ~700-800ms to execute on a quad-core physical machine. The server is behind an Nginx load-balancer (all wi...
Michel Gokan Khan
<blockquote> <p>I was expecting that the node.js server receives all requests at the same time and handles them in different threads (by generating new threads), but it seems it's not the case. How can I make node.js handle requests in parallel, and utilize all the cores it has?</p> </blockquote> <p>By design, node.js ...
jfriend00
<p>When I create an EKS cluster I see that worker nodes have two ENIs, eth0 and eth1.</p> <p>Does EKS require two ENIs for its functionality ? Or two ENIs are added to provide more IPs for the pods (using default AWS CNI) ?</p>
Manohar
<p>By default EKS uses <code>aws-vpc-cni-k8s</code> to allocate IP addresses for pods. The default settings for the CNI plugin is <code>WARM_ENI_TARGET=1</code> which will ensure you have an additional ENI available for future assignment. Your addresses will be assigned to the first ENI until the max IPs per ENI for ...
Steve Buzonas
<p>Currently I am trying to implement demo for CI/CD pipeline using SVN , Kubernetes and Jenkins. For kubernetes deployment, I created deployment and services.And for making deployment I am using <code>kubectl apply -f</code> command for both deployment inside my Jenkins deployment step. </p> <p>Like the following ,</...
Mr.DevEng
<p>You can use the Kubectl apply command as long as the name of resources in the deployment and service file has not changed. From the <a href="https://kubectl.docs.kubernetes.io/pages/app_management/apply.html" rel="nofollow noreferrer">Kubernetes book</a>,</p> <blockquote> <p>Apply is a command that will update a ...
Vishal Biyani
<p>I have setup the Kubernetes cluster in my cloud. When it setup complete I install kong-ingress-controller in my master node. I'm using:</p> <pre><code>kubectl apply -f https://bit.ly/ kong-ingress </code></pre> <p>Now my container status is still init. I want debug init container. So I used:</p> <pre><code> kubec...
Akashii
<p>If you look at the raw file on <a href="https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-postgres.yaml" rel="nofollow noreferrer">that URL</a> you will notice that the deployments and as a result pods are in namespace kong</p> <pre><code> namespace: kong </code><...
Vishal Biyani
<p>I have a k8s yaml file with below block</p> <pre><code>spec: replicas: 1 strategy: type: Recreate </code></pre> <p>and I want to add below block after "spec:"</p> <pre><code>selector: matchLabels: app: test-app </code></pre> <p>The file is huge and has many "spec:" fields, so it should be added at ...
karthik101
<p>Here you go</p> <pre><code>$ yq --yaml-output '.spec |= ({selector: {matchLabels: {app: "test-app"}}} + .)' &lt;/tmp/your-yaml-file.yaml spec: selector: matchLabels: app: test-app replicas: 1 strategy: type: Recreate </code></pre> <p>Since you mentioned you have hundreds of files and each has...
Bean Taxi
<p>on kubernetes, one can blindly create a resource (such as deployment, service, pods, etc.). the resouce will be created only if there are enough system resources on the kubernetes nodes\cluster.</p> <ol> <li>how does one check that there are enough node resources before creating kubernetes resources (check whether ...
Mr.
<p>What you are looking for in (1) is possible with a <a href="https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/" rel="nofollow noreferrer">custom admission controller</a> - but I personally think that is too complex and not a great idea from the user experience point of view. </...
Vishal Biyani