prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I am trying to use Microk8s storage addon but my PVC and pod are stuck at pending and I don't know what is wrong. I am also using the "registry" addon which uses the storage and that one works without a problem.</p>
<p>FYI:
I already restarted the microk8s multiple times and even totally deleted and reinst... | <p>I found the problem. Since the "host-provisioner" takes care of creating PV we should not pass the <code>volumeName</code> in our PVC yaml file. When I removed that field the provisioner could make a PV and bound my PVC to it and now my pod has started.</p>
<p>Now my PVC is:</p>
<pre class="lang-yaml prett... |
<p>when implementing canary deployment using istio, I want to create secondary(for canary) deployment and svc while modifying the virtualservice’s destination rule traffic.
However, if I change the destination rule and create canary svc & deployment at the same time, traffic will go to non-ready canary deployment.
... | <p>With the case of heath checks Istio does not support active health check by its own but instead rely on Kubernetes liveness and readiness probes. However remember that with mutualTLS enabled the https request probe won't work and you'll need special annotation that will make the sidecar agent to pick up the request.... |
<p>Consider a the following <code>docker</code> command, which builds an image from a Dockerfile:</p>
<p><code>docker image build --network host -t test -f Dockerfile .</code></p>
<p>Is it possible to specify options of <code>docker image build</code> in the Dockerfile instead of the command-line (in this case <code>--... | <p>In general, no.</p>
<p>In this particular case (network access): kinda, actually, using BuildKit, a new build system for Docker.</p>
<p>If you're using BuildKit (<code>export DOCKER_BUILDKIT=1</code>) you can add a comment at the top of the Dockerfile to enable newer syntax. And you can specify different versions of... |
<p>Our system has EKS kubernetes clusters. We manage them from EC2 instance "bastion hosts" where we ssh in, configure our credentials, and use kubectl to manage the cluster.</p>
<p>We do <em>not</em> want to continue having to manually configure our credentials on the EC2 host.</p>
<p>So, I am trying to asso... | <p>Thanks to @jordanm for pointing out that EKS uses a configmap to handle authorization.</p>
<p>I was able to edit the configmap, adding an entry to map the EC2 instance profile's IAM role, <code>arn:aws:iam::111111111111:role/eks_management_host_jw_jw</code>, to the kubernetes <code>system:masters</code> group (admin... |
<p>Firstly I succesfully mounted, my Linux path on Pod.
I used azure file share and mounted folders appear on File Share.</p>
<pre><code> volumeMounts:
- name: ads-filesharevolume
mountPath: /opt/front/arena/host
volumes:
- name: ads-filesharevolume
azureFile:
secretName: fa-fileshare-sec... | <p>According to the following thread, wsl2 doesn't yet support hostPath volumes.</p>
<p>Thread Source: <a href="https://github.com/docker/for-win/issues/5325" rel="nofollow noreferrer">https://github.com/docker/for-win/issues/5325</a>
Look at this comment: <a href="https://github.com/docker/for-win/issues/5325#issueco... |
<p>When curl is made inside pod on port 80, response is fine.
Calling curl outside container via Kubernetes service on machines IP and port 30803, sporadically "Connection refused" appears.</p>
<p>nginx app config:</p>
<pre><code>server {
listen 80;
server_name 127.0.0.1;
access_log ... | <p>The issue was that 2 services in selector was using same label value - 'environment: dev' , and I assume this random connection was provoked, because it was balancing between one pod to another. Fixed labels values, now works perfectly.</p>
|
<p>I want to use Kong’s Capturing Group in Ingress k8s object to perform an uri rewriting.
I want to implement the following logic:
https://kong_host:30000/service/audits/health -> (rewrite) https://kong_host:30000/service/audit/v1/health</p>
<p>Ingress resource:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: I... | <p>As pointed in documentation you are not able to use <code>v1beat1</code> ingress API version to capture groups in paths.</p>
<p><a href="https://docs.konghq.com/hub/kong-inc/request-transformer/#examples" rel="nofollow noreferrer">https://docs.konghq.com/hub/kong-inc/request-transformer/#examples</a></p>
<p>You need... |
<p>I have a Java application running inside tomcat server (which is inside a pod), which is configured to work with https.
I am using nginx ingress. The problem is, the nginx ingress is terminating the SSL and forwarding only plain http to the tomcat server (to the pod actually). Since the tomcat server is configured t... | <p>Finally I have found the answer:</p>
<p>I have to add the following 2 lines:</p>
<pre><code>nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
</code></pre>
<p>So the ingress is like this (I have also added some comment to describe and als... |
<p>im new to kubernetes and after researching a long time it seems im running out of resources so I'd be more than glad if somebody could help me.</p>
<h3>What I currently have</h3>
<ul>
<li>One Node that i am connecting to via SSH, bare-metal kubernetes setup (Notice that im <strong>not</strong> running k8s in the clo... | <p>Please run nginx ingress controller in hostNetwork Mode <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network</a></p>
<pre><code>template:
spec:
hostNetwork: true
</... |
<p>In Kubernetes, is it possible to display a column using a fraction format (i.e. X/Y) using the "additionalPrinterColumns" field of a CRD?</p>
<p>More precisely, I would like <code>kubectl</code> to display the description of a CR field using the same format than the READY field below:</p>
<pre><code>kubect... | <p>Unfortunately additionalPrinterColumns only supports Simple JsonPath and so we cannot use .status.readyReplicas/.status.replicas in JsonPath and the GET Operation is handled by kube-apiserver so there is no involvement of Operator in GET Operation. So, easiest way I would recommend is to create a new Field in .statu... |
<p>I am configuring readiness and liveness probes for my kuberenetes deployment.</p>
<p>Here is how i added it:</p>
<pre><code> ports:
- name: http
containerPort: {{ .Values.service.internalPort }}
protocol: TCP
livenessProbe:
tcpSocket:
port: http
readinessProbe:
tcpSocket:
po... | <p>if you are looking forward to send to the HTTPS request to the service you have to change the <code>scheme</code>.</p>
<pre><code>livenessProbe:
httpGet:
path: /
port: 443
scheme: HTTPS
readinessProbe:
httpGet:
path: /
port: 443
scheme: HTTPS
</code></pre>
<p>you can check more at : <a hr... |
<p>I have a Jenkins build process that deploys our code to several Kubernetes environments. Currently, it works fantastic with known/core branches (develop, release, master) and such, BUT we would like to make all of our feature branches and bug fix branches as well. In order to do this, we currently have it deploying ... | <p>As far as I know Ingress objects don't allow what you're trying to do. But there could be a workaround if you can modify the Ingress object every time you deploy a new branch.<br />
Whenever a new branch is deployed update your "dynamic_ingress" to include an extra path for the new branch. This can be achi... |
<p>I'm using Shedlock version 4.22.0 with JDBC integration.
I have one configuration class</p>
<pre><code>@Configuration
@EnableScheduling
@EnableSchedulerLock(defaultLockAtMostFor = "PT30S")
public class ShedLockConfiguration {
@Bean
public LockProvider lockProvider(DataSource dataSource) {
ret... | <p>I solved issue. The problem was with timezone on server. Task was locked 1h ahead because of diffrent timezone on my local PC. I removed all rows from shedlock table</p>
|
<p>While I developed an API server, I needed to give some account information to API server, which should not be shown to anyone.
K8s recommends secret for this kind of situation, so I used.</p>
<p>But I wonder if the secret is really secret.
Secret is just base 64 "encoded" text, not "encrypted".</... | <p>From <a href="https://kubernetes.io/docs/concepts/configuration/secret/#risks" rel="nofollow noreferrer">Kubernetes Secrets documentation</a>:</p>
<p><strong>Risks</strong></p>
<ul>
<li>In the API server, secret data is stored in etcd(<strong>by default, etcd data is not encrypted</strong>); therefore:
<ol>
<li><str... |
<p>I want to react to certain Kubernetes/Openshift events,
therefor I need a list of all possible (Kubernetes) events with their type (normal vs. warning).</p>
<p><a href="https://docs.openshift.com/container-platform/3.11/dev_guide/events.html#events-reference" rel="nofollow noreferrer">Openshift event list (but witho... | <p>Posting this answer as a community wiki to give more of a baseline to the question than the actual solution. Feel free to expand it.</p>
<p>I haven't found the Kubernetes equivalent of the OpenShift documentation like used in the question:</p>
<ul>
<li><em><a href="https://docs.openshift.com/container-platform/3.11/... |
<p>I would like to calculate the total number of bytes allocated by the persistent volumes (PVs) in a cluster. Using the following:</p>
<pre><code>$ kubectl get pv -A -o json
</code></pre>
<p>I can get a JSON list of all the cluster's PVs and for each PV in the <code>items[]</code> list one can read the <code>spec.capa... | <p>I haven't found a way to transform a value in <code>.spec.capacity.storage</code> using purely <code>kubectl</code>.</p>
<hr />
<p>I've managed to create a code with Python and it's Kubernetes library to extract the data and calculate the size of all used <code>PV</code>'s. Please treat this code as an example and n... |
<p>I am trying to access a host that sits in another server (but on my network) from inside the pod of deployment and I am using <code>microk8s</code>.</p>
<p>The thing is that on the server where I have <code>microk8s</code> installed I can easily ping it by <code>ping my-network-host.qa.local</code>. But when I go in... | <p>Based on <a href="https://stackoverflow.com/a/62678275/11338984">another answer</a> that I found on StackOverflow, i managed to fixed it.</p>
<p>There were 2 changes needed to make it work:</p>
<p>Update <strong>kubelet configuration</strong> to use <code>resolv-conf</code>:</p>
<pre><code>sudo echo "--resolv-c... |
<p>I need to monitor my container memory usage running on kubernetes cluster. After read some articles there're two recommendations: "container_memory_rss", "container_memory_working_set_bytes"</p>
<p>The definitions of both metrics are said (from the cAdvisor code)</p>
<ul>
<li>"container_mem... | <p>You are right. I will try to address your questions in more detail.</p>
<blockquote>
<p>What is the difference between two metrics?</p>
</blockquote>
<p><code>container_memory_rss</code> equals to the value of <code>total_rss</code> from <code>/sys/fs/cgroups/memory/memory.status</code> file:</p>
<pre><code>// The a... |
<p>I'm new to Kubernetes and I'm trying to get a deploy running.</p>
<p>After I pushed the deploy config the replica set is created and that one will create the pod. But the pod stays in the <code>Pending</code> state.</p>
<p>The pod has an event listed that it can't be scheduled because there are no nodes available. O... | <blockquote>
<p>But the pod stays in the Pending state.</p>
</blockquote>
<blockquote>
<p>The pod has an event listed that it can't be scheduled because there are no nodes available.</p>
</blockquote>
<p>This is as expected if you have reached your capacity. You can check the capacity of any node with:</p>
<pre><code>k... |
<p>Use case: I have values.yaml where I have a field <code>mode</code>.</p>
<p>Values.yaml</p>
<pre><code>mode: start
</code></pre>
<p>or user can enter a value for the field <code>mode</code> in any of the below mentioned ways:</p>
<pre><code>mode: STart or START or sTart
</code></pre>
<p>Now, I have a file where I am... | <p><a href="https://helm.sh/docs/chart_template_guide/function_list/#lower" rel="noreferrer"><code>lower</code></a> is a function handed to you in the templates. It has a return value, which you wish to compare to another value.</p>
<p>Simply group the function call of <code>lower</code> with parenthesis:</p>
<pre><cod... |
<p>I'm think I'm about to reinvent the wheel here. I have all the parts but am thinking: Somebody must have done this (properly) before me.</p>
<p>We have a a jenkins CI job that builds <code>image-name:${BRANCH_NAME}</code> and pushes it to a registry. We want to create a CD job that deploys this <code>image-name:${BR... | <p><code>kbld</code> can also be used "fully" with helm...</p>
<p>Yes, the <a href="https://carvel.dev/kbld/" rel="nofollow noreferrer">docs</a> suggest:</p>
<pre><code>$ helm template my-chart --values my-vals.yml | kbld -f - | kubectl apply -f -
</code></pre>
<p>But this also works:</p>
<pre><code>$ cat kbl... |
<p>I have a simple working NetworkPolicy looking like this</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: monitoring-network-policy-prometheus-jbn
namespace: monitoring
spec:
podSelector:
matchLabels:
app: prometheus
policyTypes:
- Egress
egress:
- to:
... | <p>This is happening because you omit placing the <code>namespaceSelector</code> in your manifest and by default when <code>namespaceSelector</code> is not preset the system will select the Pods matching <code>PodSelector</code> in the policy's own namespace.</p>
<p>See here:</p>
<blockquote>
<p><strong>podSelector</st... |
<p>Usecase:
I have a Docker desktop and kubernetes enabled within it. From the kubernetes node, I want to connect to a database running on my laptop without using my laptop's ip address.</p>
<p>I want to refer to the Windows Host machine from within Kuberntes Endpoint without using the dynamic IP of the host. In docker... | <p>Use <code>host.docker.internal</code>.</p>
<p>I've tested on Mac, but it should work the same for Windows.</p>
<ol>
<li><p>Spin up an alpine pod (deployment yaml <a href="https://github.com/infrabricks/kubernetes-standalone/blob/master/examples/alpine.yml" rel="nofollow noreferrer">borrowed from rossbackp</a>).</p>
... |
<p>A company would like to scale their microservice application using namespaces, namespace represents a separate application per each client. The application consists of 22 microservices, the company has 80 clients, hence there will be 22 * 80 = 1760 pods in the cluster. The diagram is given below.</p>
<p>It was initi... | <p>This is something we intend to solve with an upcoming new version of the VPC CNI plugin. There is work being done to increase the number of VPC IP addresses available to pods on any given worker node. You can track this roadmap item <a href="https://github.com/aws/containers-roadmap/issues/138" rel="nofollow norefer... |
<p>I have to check is any EnvoyFilter is deployed in kubernetes with istio, how can we find it in kubernetes dashboard or using kubectl command.</p>
| <p>This should work
<code>kubectl get envoyfilter</code></p>
|
<p>I have several namespaces in my cluster and would like a log like:</p>
<pre><code>NAMESPACE NAME PODS
MY_NAMESPACE my_ns6446f67599-25g7f 10
</code></pre>
| <p>You can also try this one liner:</p>
<pre><code>kubectl get pods --all-namespaces | awk '{print $1}' | sort | uniq -c | sort -k1 -n -r
</code></pre>
<p>Which will yield:</p>
<pre><code>136 some-ns
133 kube-system
119 other-ns
</code></pre>
<p>Explaining a bit:</p>
<ul>
<li><code>kubectl get pods --all-namespaces</co... |
<p>I wanted to know how to implement inheritance in Go. After reading I understood that I must think about struct embedding. As I am a Kubernetes developer, I jump into the Kubernetes source code and start reading the PodSpec in which the <strong>volumes</strong> field is closer to what I am looking for.</p>
<p>When I ... | <p>there's no such thing to limit a structs field values in the <a href="https://golang.org/ref/spec#Struct_types" rel="nofollow noreferrer">language spec</a>. However, I have a good feeling that since all fields are pointers, a method of volume source checks for all fields and expects only one field to be non-nil.</p>... |
<p>I'm trying to replace the in-memory storage of <code>Grafana</code> deployment with <code>persistent storage</code> using <code>kustomize</code>. What I'm trying to do is that I'm removing the <code>in-memory storage</code> and then mapping <code>persistent storage</code>. But When I'm deploying it then it is giving... | <p>The <code>$patch: delete</code> doesn't seem to work as I would expect.</p>
<p>It may be nice to open an issue on kustomize github: <a href="https://github.com/kubernetes-sigs/kustomize/issues" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kustomize/issues</a> and ask developers about it.</p>
<hr />
<... |
<ol>
<li>I have 5 microservices in 5 pods and have deployed each service using specific port using NODE PORT service.</li>
<li>I have a UI app as one service inside another pod which is also exposed using node port service.</li>
</ol>
<p>Since I can't use pod IP to access urls in UI app as pods live and die so deployed... | <ol>
<li>Yes, you can connect to those Node port services seamlessly.</li>
</ol>
<p>But remember, you may need higher network bandwidth card and connection (to master nodes) if you get too much traffic to these services.</p>
<p>Also if you have a few master nodes, you can try dedicated master node-ip and nodeport for a... |
<h2>Problem</h2>
<p>I am trying to implement a Horizontal Pod Autoscaler (HPA) on my AKS cluster. However, I'm unable to retrieve the GPU metrics (auto-generated by Azure) that my HPA requires to scale.</p>
<h2>Example</h2>
<p>As a reference, see <a href="https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-... | <p>I managed to do this recently (just this week). I'll outline my solution and all the gotchas, in case that helps.</p>
<p>Starting with an AKS cluster, I installed the following components in order to harvest the GPU metrics:</p>
<ol>
<li>nvidia-device-plugin - to make GPU metrics collectable</li>
<li>dcgm-exporter -... |
<p>I am trying to upgrade one of my chart. But the changes which I have made in the "deployment.yaml" template in the chart is not there after the upgrade. I added the following lines in the spec of my kubernetes deployment.yaml file</p>
<pre><code>spec:
containers:
- env:
- name: LOGBACK_DB_ACQUIRE_INCREMENT
... | <p>(If the problem is not with indents - adding an answer that also matches the title in general).</p>
<hr />
<p>A few points to consider when you upgrade your helm charts:</p>
<p>1 ) Add the <code>--debug</code> to the <code>helm upgrade</code> command.</p>
<p>2 ) Check the current values of the specific resource - fo... |
<p>I've installed fresh rancher on microk8s using helm3 and there are helm operations failing periodically. I am rather clueless as where to have a look for what. Could you please point me in the right direction?</p>
<pre><code>Waiting for Kubernetes API to be available
helm upgrade --history-max=5 --install=true --nam... | <p>I think I found a solution for this (at least the Fleet part, but this approach might help you solve the rancher-operator part).</p>
<p><strong>Basically:</strong></p>
<ul>
<li>In the cluster explorer I selected all namespaces.</li>
<li>I went to <a href="https://rancher.my.org/dashboard/c/local/explorer/apiextensio... |
<p>I'd like to set a Persistent Volume (pv and pvc), shared by pods in <a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">Kind cluster</a>. But I need to keep the data persisted in my laptop (host server) as well, so the volume's path should be something in my laptop, which I can directly access it.</p>
<p>I... | <p>I would like to add that to minimise the specific configuration to <code>Kind</code> you should use <code>pv / pvc</code> this way the configuration on a real cluster will only differ in the definition of pv.</p>
<p>So if you configure extraMounts on your Kind cluster:</p>
<pre><code>apiVersion: kind.x-k8s.io/v1alph... |
<p>I recently installed k3s on debian 10 and I am having problems connecting to the internet from inside the pods. Ping, DNS, HTTP, works but TLS is having problems with the Handshake. I made a tcpdump and see ClientHello's and then immediatly a response from the server with internal error SSL error 80. On the VM where... | <blockquote>
<ul>
<li>error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error</li>
</ul>
</blockquote>
<p>openssl error code contains 3 parts.<br></p>
<ul>
<li>First 8 bits is module serial number. 14(HEX) means ssl module which has serial number 20.</li>
<li>The next 12 bits is function SN. 094(HEX) is ... |
<p>We are running a .NET Core 3.1 application in a Kubernetes cluster. The application connects to an Azure SQL Database using EF Core 3.1.7, with Microsoft.Data.SqlClient 1.1.3.</p>
<p>At seemingly random times, we would receive the following error.</p>
<pre><code> ---> System.Data.SqlClient.SqlException (0x8013190... | <p>The problem was an infrastructure issue at <a href="https://github.com/Azure/aks-engine/issues/4341" rel="noreferrer">Azure</a>.</p>
<blockquote>
<p>There is a known issue within Azure Network where the dhcp lease is
lost whenever a disk attach/detach happens on some VM fleets. There is
a fix rolling out at the mome... |
<p>According to the <a href="https://docs.docker.com/network/iptables/" rel="nofollow noreferrer">docker docs</a> (emphasis mine):</p>
<blockquote>
<p>On Linux, Docker manipulates iptables rules to provide network isolation. While this is an implementation detail (...) <em>you should not modify</em> the rules Docker in... | <p>I decided to answer part of the question related to Kubernetes.<br />
Typical Kubernetes network setup relies on third-party tools (<a href="https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/" rel="nofollow noreferrer">CNI plugins</a>) that comply with the <a href="https://git... |
<p>I have a kubernetes cluster v 1.19.4 set up with several nodes and services. Some of these services need to access an external resource residing outside the cluster. I have understood that this external resource can be defined by a service without label selector and then manually creating an Endpoints object to set ... | <p>services are a virtual thing, there is pod backing them per se so no nodes. However you can run the pod using nodeSelectors and providing hostname IP. Then you can have service communicating to that pod (and specific node) using labels</p>
|
<p>I have some average yaml file defining some average role resource, all yaml should reflect my resource's desired state.</p>
<p>To get new average role into cluster I usually run <code>kubectl apply -f my-new-role.yaml</code>
but now I see this (recommended!?) alternative <code>kubectl auth reconcile -f my-new-role.y... | <p>The <code>kubectl auth reconcile</code> command-line utility has been added in Kubernetes <code>v1.8</code>.<br />
Properly applying RBAC permissions is a complex task because you need to compute logical covers operations between rule sets.</p>
<p>As you can see in the <a href="https://github.com/kubernetes/kubernet... |
<p>I have a kubernetes manifest file which has 2 containers. Main container is collecting data at a certain time period and other (logstash) container reading logs for the main container and shipping it to the ELK stack.
Once the main container completed its job, what is the best way to gracefully signal or shutdown th... | <p>Currently, there is no way to explicitly mark a container as "Sidecar" (though there is a <a href="https://github.com/kubernetes/enhancements/blob/e0fc0e7eab51078b5b7bd0730cf48f550bc91d1e/keps/sig-apps/sidecarcontainers.md" rel="nofollow noreferrer">long-lasting KEP</a> to implement it).</p>
<p>It means th... |
<p>My setup is a bare metal cluster running Kubernetes 1.17. I'm using Traefik 2(.3.2) as a reverse proxy and to get failover for my machines I use <code>kube-keepalive-vip</code> [1].</p>
<pre class="lang-yaml prettyprint-override"><code>---
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-keepalived-vip-config
... | <p>For everyone stumbling upon this, I managed to fix my problem in the meantime.</p>
<p>The main problem is <code>kube-proxy</code>. By default all services are routed through it. And, depending on your CNI provider (I use <code>flannel</code>), the information of your calling client is lost there.</p>
<p>K8s provides... |
<p>I'm trying to deploy Grafana using Helm Chart and dependencies but the values don't get passed down to the Grafana chart.</p>
<p>Chart.yaml</p>
<pre><code>apiVersion: v2
appVersion: 7.4.5
name: grafana
dependencies:
- name: grafana
version: "6.6.4"
repository: "https://grafana.github.io/helm-chart... | <p>Please Change below in your values yaml</p>
<p>From</p>
<pre><code>grafana:
persistence.enabled: true
persistence.size: 5Gi
</code></pre>
<p>To</p>
<pre><code>grafana:
persistence:
enabled: true
size: 5Gi
</code></pre>
<p>Please always use the default values yaml from helm chart <a href="https://github... |
<p>I have an EKS cluster with two worker nodes. I would like to "switch off" the nodes or do something to reduce costs of my cluster outside working hours. Is there any way to turn off the nodes at night and turn on again at morning?</p>
<p>Thanks a lot.</p>
| <p>This is a very common concern with anyone using managed K8s cluster. There might be different approaches people might be taking for this. What works best for us is a combination of <code>kube-downscaler</code> and <code>cluster-autoscaler</code>.</p>
<p><a href="https://codeberg.org/hjacobs/kube-downscaler" rel="nof... |
<p>I'm using a k8s HPA template for CPU and memory like below:</p>
<pre><code>---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{.Chart.Name}}-cpu
labels:
app: {{.Chart.Name}}
chart: {{.Chart.Name}}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{... | <p>As per the suggestion in comments, using a single HPA solved my issue. I just had to move CPU HPA to same apiVersion as memory HPA.</p>
|
<p>I have a use case that I need to expose</p>
<p>/swagger-ui.html without authentication and</p>
<p>/apis/* with authentication</p>
<p>I created 2 ingress files in helm chart</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.ku... | <p>Please try changing the Ingress name for both templates to be unique. Currently I see both are set to below</p>
<pre><code>name: {{ .Chart.Name }}
</code></pre>
<p>I just changed apiVersion from extensions/v1beta1 to networking.k8s.io/v1beta1 and added below yaml files to my kubernetes cluster</p>
<pre><code>---
api... |
<p>I've created a secret and when I deploy an application intended to read the secret, the application complains that the secret is a directory.</p>
<p>What am I doing wrong? The file is intended to be read as, well, a file.</p>
<pre><code>kc logs <pod>
(error) /var/config/my-file.yaml: is a directory.
</code></p... | <p>You are using <code>subPath</code> in the volume mount section. According to Kubernetes <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="nofollow noreferrer">volume doc</a>, when you need same volume for different purpose in the same pod then you should use <code>subPath</code>.</p>
... |
<p>I have two nodepools on GKE for CI runners, the workers nodepool is set to autoscale between 0-40 nodes. Up until yesterday this has been working perfectly for ~6months but now I am getting an inconsistent error around <code>nap</code> being disabled.</p>
<p>Pods scheduling fine this morning:</p>
<pre><code>decision... | <p>Creating a new node pool and destroying the old one seems to have fixed this, unfortunately no more insight than that</p>
|
<p>First of all to put some context on that question.</p>
<ul>
<li>I have an <code>EKS</code> cluster with version >= <code>1.15</code></li>
<li>The <code>EFS</code> - <code>EKS</code> <code>security group</code> / <code>mount target</code> etc. are working properly</li>
<li>The <code>CSI</code> driver for <code>EFS</... | <p>There's now documentation available: <a href="https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/access_points/README.md#create-access-points-in-efs" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/access_points/README... |
<p>So i have set up an AWS EKS cluster (using fargate), and intend to use it for gitlab CI/CD integration</p>
<p>Then tried to set up the base domain based on <a href="https://docs.gitlab.com/ee/topics/autodevops/quick_start_guide.html#install-ingress" rel="nofollow noreferrer">this doc</a></p>
<pre><code>helm repo add... | <p>As @rockn-rolla mentioned in the comments, an Elastic Load Balancer provisioned through nginx-ingress on EKS returns is exposed by a hostname. The Load Balancer does have IP addresses tied to the subnets that it's deployed into (Elastic Network Interfaces), but its possible that they change. If you have a domain nam... |
<p>I want to use the same hostname let's say <code>example.com</code> with multiple Ingress resources running in different namespaces i.e <code>monitoring</code> and <code>myapp</code>. I'm using <strong>Kubernetes nginx-ingress</strong> controller.</p>
<p><strong>haproxy-ingress.yaml</strong></p>
<pre><code>apiVersion... | <p>Yes it is possible.</p>
<p>There can be two issues in your case.</p>
<p>One is you don't need the regex path for grafana ingress. Simple <code>/grafana</code> path will be fine with path type <code>Prefix</code> as with path type <code>Prefix</code> any <code>/grafana/...</code> will be redirected associated service... |
<p>We're running several clusters with AWS's EKS.</p>
<p>Currently all the clusters are already on 1.19 but the NodeGroups are still running on 1.18. The last update of the NodeGroups was in December and there everything works well. The aws-auth ConfigMap wasn't modified since this moment of time.</p>
<p>Now we want to... | <p>It turns out that <a href="https://aws.amazon.com/blogs/opensource/integrating-ldap-ad-users-kubernetes-rbac-aws-iam-authenticator-project/" rel="nofollow noreferrer">the proposed way by the AWS documentation to integrate SSO users into the clusters</a> is not compatible with the latest version of EKS.</p>
<p>The pl... |
<p>I have been following a guide on how to setup AWS EKS using terraform. <a href="https://learn.hashicorp.com/tutorials/terraform/eks" rel="nofollow noreferrer">https://learn.hashicorp.com/tutorials/terraform/eks</a></p>
<p>I am on the section where i need to authenticate the dashboard. <a href="https://learn.hashicor... | <p>The following will log you in as an <code>admin-user</code>, which seems to be the behavior you're looking for.</p>
<pre class="lang-sh prettyprint-override"><code>$ ADMIN_USER_TOKEN_NAME=$(kubectl -n kube-system get secret | grep admin-user-token | cut -d' ' -f1)
$ echo $ADMIN_USER_TOKEN_NAME
admin-user-token-k4s7... |
<p>on my Cluster, I'm trying to upload a big file but when I try, I get the <code>413 Error</code></p>
<pre><code>error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<b... | <p>For future searchs, It works for me:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600&qu... |
<p>A colleague created a K8s cluster for me. I can run services in that cluster without any problem. However, I cannot run services that depend on an image from Amazon ECR, which I really do not understand. Probably, I made a small mistake in my deployment file and thus caused this problem.</p>
<p>Here is my deployment... | <p>You should create and use secretes for the ECR authorization.</p>
<p>This is what you need to do.</p>
<ol>
<li>Create a secrete for the Kubernetes cluster, execute the below-given shell script from a machine from where you can access the AWS account in which ECR registry is hosted. Please change the placeholders as ... |
<p>I tried to deploy 'deployments' in kubernetes which is pull docker image from private registry (I don't know who did this setup) but during "docker pull images" through kubernetes i'm getting following error</p>
<pre><code>node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age ... | <p>As your <code>dockerconfigjson</code> is not working properly. Try this method :</p>
<p><code>kubectl create secret docker-registry regcred --docker-server=10.105.168.81:5000 --docker-username=<your-name> --docker-password=<your-pword></code></p>
<p>And in Kubernetes manifest :</p>
<pre><code>apiVersion:... |
<p>I tried to deploy 'deployments' in kubernetes which is pull docker image from private registry (I don't know who did this setup) but during "docker pull images" through kubernetes i'm getting following error</p>
<pre><code>node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age ... | <p>If you use docker as container engine in your k8s, AFAIK it's the same with <a href="https://docs.docker.com/engine/security/certificates/#understand-the-configuration" rel="nofollow noreferrer">Understand the configuration</a>. Because the image pulling is conducted by the container engine and it depends the propri... |
<p>I wanna use <code>kubectl wait</code> command to wait until a pvc is bound.</p>
<p>I tried <code>kubectl wait --for=condition=bound pvc/my-pvc-claim --timeout=2s</code> with a pvc which is already bound, but it doesn't seem to work. This is the output <code>error: timed out waiting for the condition on persistentvol... | <p>You can use the following command:</p>
<pre><code>while [[ $(kubectl get pvc myclaim -o 'jsonpath={..status.phase}') != "Bound" ]]; do echo "waiting for PVC status" && sleep 1; done
</code></pre>
|
<p>Edit - this is on OSX
Also, I've tried running <code>minikube service <service-name></code>, that's shown below and when it tries to open it in a browser I get a "connection refused" signal because the port is closed.</p>
<p>I have a kubernetes deployment that works fine when using <code>--driver=virtualbox</... | <p><code>$ minikube service <service-name></code>
this will open up a tunnel to connect to the service, make sure the service is a NodePort service.</p>
<p>If it opens a browser and you get a <code>404</code> this is because the url in the address bar doesn't exist within your api. Changing the URL PATH to correc... |
<p>I deployed a MongoDB replica set in my Kubernetes cluster. The <strong>MongoDB replica set can be easily connected with the help of internal ClusterIP</strong> within the cluster. I even connect it to my mongo-express client.</p>
<pre><code>//Successfull and working fine internally
mongodb://db-mongodb-0.mycompany-m... | <p>If I understood correctly, you want to expose your MongoDB replicaset to a <strong>remote</strong> connection.</p>
<p>I am actively working with the Bitnami MongoDB helm chart and I can easly connect <strong>locally</strong> to the helm chart using your first attempt:</p>
<ol>
<li>I port-forward the headless service... |
<p>I have an ASP.NET Core app that I want to configure with HTTPS in my local kubernetes clustur using minikube.</p>
<p>The deployment yaml file is:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-volume
labels:
app: kube-volume-app
spec:
replicas: 1
selector:
matchLabels:
... | <p>I think your approach does not fit well with the architecture of Kubernetes. A TLS certificate (for https) is coupled to a hostname.</p>
<p>I would recommend one of two different approaches:</p>
<ul>
<li>Expose your app with a Service of <code>type: LoadBalancer</code></li>
<li>Expose your app with an <a href="https... |
<p>I have a very simple kustomization.yaml:</p>
<pre><code>configMapGenerator:
- name: icecast-conifg
files:
- icecast.xml
</code></pre>
<p>When I run <code>kubectl kustomize .</code> it spits out a generated configMap properly, but how do I actually load it into my cluster? I'm missing some fundamental s... | <p>With Kustomize you can use the <code>-k</code> (or <code>--kustomize</code>) flag instead of <code>-f</code> when using <code>kubectl apply</code>. Example:</p>
<pre><code>kubectl apply -k <my-folder-or-file>
</code></pre>
<p>See <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization... |
<p>Good day, i'm newby in kubernetes and try to setup my first environment.
I want to following scheme:</p>
<ul>
<li>My organization has public IP (x.x.x.x)</li>
<li>This IP routed to server in private LAN (i.e. <code>192.168.0.10</code>) with win server + IIS. On IIS i have URL rewrite module and it's act as reverse ... | <p>In your <code>traefik.toml</code> ConfigMap you're redirecting to HTTPS:</p>
<pre><code>[entryPoints.http.redirect]
regex = "^http://(.*)"
replacement = "https://$1"
</code></pre>
<p>Remove that replacement using <code>kubectl edit configmap -n kube-system traefik</code>, save the changes then re... |
<p>Having difficulty getting a certificate installed in a local development environment that is isolated to WSL2. I've done the exact same steps in macOS and Linux, and have had zero issues.</p>
<p>The steps are the following:</p>
<pre><code># Download and install mkcert
if [[ `uname` = "Darwin" ]] then
b... | <p>Ok, got this figured out with some help:</p>
<ul>
<li><a href="https://github.com/Microsoft/WSL/issues/3161#issuecomment-451863149" rel="noreferrer">https://github.com/Microsoft/WSL/issues/3161#issuecomment-451863149</a></li>
<li><a href="https://ddev.readthedocs.io/en/latest/#installation-or-upgrade-windows-wsl2" r... |
<p>I am creating kubernetes secrets using the below command</p>
<pre class="lang-sh prettyprint-override"><code>kubectl create secret generic test-secret --save-config --dry-run=client --from-literal=a=data1 --from-literal=a=data2 -o yaml | kubectl apply -f -
</code></pre>
<p>Now, I need to add new literals using kubec... | <blockquote>
<p>add new literals using kubectl imperative command</p>
</blockquote>
<p>When working with <em>imperative commands</em> it typically means that you don't save the change in a place outside the cluster. You can <strong>edit</strong> a Secret in the cluster directly:</p>
<pre><code>kubectl edit secret test-... |
<p>i would like to list all pods of a specific namespace but only those that are controlled by deployment
i have tried this but didn't succeed:
<code>kubectl get pods --all-namespaces -o json | jq -r '.items | map(select(.metadata.ownerReferences == deployment ) | .metadata.name) | .[]'</code></p>
<p>I use this command... | <p>You can use the <code>--custom-columns</code> to find out which pods are controlled, and which kind of controller is the owner. Example:</p>
<pre><code>$ kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,CONTROLLER:.metadata.ownerReferences[].kind,NAMESPACE:.metadata.namespace
NAME ... |
<p>i have a list of customer ids that i want to pass to the values.yml in the helm chart , and then for each customer create a deployment is that possible? this is what i want to pass in values.yml:</p>
<pre class="lang-yaml prettyprint-override"><code>customer:
- 62
- 63
</code></pre>
<p>and this is my deployment ... | <p>Ok , so i found a solution to to why helm is only creating a deployment for my last item in the list , helm uses "---" as a seprator between the specification of your yaml. so now my template looks like this and it works :)</p>
<pre><code> {{ range .Values.customer.id }}
apiVersion: apps/v1
kind: Deplo... |
<p>I am new to Terraform and Google Cloud.</p>
<p>I am trying to create a K8 cluster where pods inside the cluster could communicate with a Postgres server I have within the same VPC.</p>
<p>However, when I try to connect to the server using a <code>psql</code> client within a ubuntu pod inside the cluster using <code>... | <p>I am not aware of how GKE setup works but I can give u some pointers based on my understanding of similar setup in AWS.</p>
<p>Your cluster pod will be one on of the NODES, this node will be part of some subnet and also will have some security group (type of firewall) attached to it.</p>
<p>Similarly postgres DB is ... |
<p>I have two <code>ConfigMap</code> files. One is supposed to be "secret" values and the other has regular values and should import the secrets.</p>
<p>Here's the sample secret <code>ConfigMap</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>kind: ConfigMap
metadata:
name: secret-cm
data:
MY... | <p>You did not explain why you want to define two configmap (one getting value from another) but I am assuming that you want the env parameter name define in confgimap be independent of paramter name used by your container in pod. If that is the case then create your configmap
<code>kind: ConfigMap metadata: name: secr... |
<p>I'm trying to find out and understand how OOM-killer works on the container.</p>
<p>To figuring it out, I've read lots of articles and I found out that OOM-killer kills container based on the <code>oom_score</code>. And <code>oom_score</code> is determined by <code>oom_score_adj</code> and memory usage of that proc... | <p>As you already know, <code>container_memory_working_set_bytes</code> is:</p>
<blockquote>
<p>the amount of working set memory and it includes recently accessed
memory, dirty memory, and kernel memory. Therefore, Working set is
(lesser than or equal to) </= "usage".</p>
</blockquote>
<p>The <code>contain... |
<p>I have a deployment with 2 replicas. I would like to specify that, when possible, pods should be load balanced between as many nodes/hostnames. So far, I have the following spec:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: topspin-apollo-backend-staging-dep
labels:
app: topspin-apollo... | <p>I think you need to use <a href="https://github.com/kubernetes-sigs/descheduler" rel="nofollow noreferrer">descheduler</a>. Along with few other use cases, one thing which it helps with is scenarios where pod/node affinity requirements are not satisfied anymore due to changes in the cluster.</p>
<p>The descheduler c... |
<p>According to the <a href="https://minikube.sigs.k8s.io/docs/handbook/config/" rel="nofollow noreferrer">minikube handbook</a> the configuration commands are used to "Configure your cluster". But what does that mean?</p>
<p>If I set cpus and memory then are these the max values the cluster as a whole can ev... | <p>Answering the question:</p>
<blockquote>
<p>If I set cpus and memory then are these the max values the cluster as a whole can ever consume?</p>
</blockquote>
<p>In short. It will be a limit for the whole resource (either a <code>VM</code>, a container, etc. depending on a <code>--driver</code> used). It will be used... |
<p>I know this is topic that comes up every once in a while. I did read many of the existing posts and answers, bit wasn't able to figure it out.</p>
<p>What I need is nginx-ingress to redirect from <code>www.foo.bar</code> to just <code>foo.bar</code>. I set up a test environment on Minikube by installing the nginx in... | <p>The reason this is happening is that you've deploy different version of the nginx ingress controller called <code>nginxinc</code>into your GKE cluster. This is very common mistake made especially if you use helm you don't really check which you are deploying.</p>
<p>So <a href="https://github.com/kubernetes/ingress-... |
<p>I have been looking into managed identity and AKS cluster and this is my understanding:</p>
<ul>
<li>I can assign only a single user managed identity to the AKS cluster.</li>
<li>I have to do the relevant role assignments to the identity for getting access.</li>
</ul>
<p>Now my question is, let's say I have two diff... | <p>Regarding the managed identities in AKS there are two things they are uses for. The AKS cluster itself and its pods.</p>
<p>Regarding the managed identity for the cluster, that one is used to access several azure resources as described in <a href="https://learn.microsoft.com/en-us/azure/aks/use-managed-identity" rel... |
<p>I am using golang lib <a href="https://github.com/kubernetes/client-go" rel="noreferrer">client-go</a> to connect to a running local kubrenets. To start with I took code from the example: <a href="https://github.com/kubernetes/client-go/tree/master/examples/out-of-cluster-client-configuration" rel="noreferrer">out-o... | <p>This answer could be a little outdated but I will try to give more perspective/baseline for future readers that encounter the same/similar problem.</p>
<p><strong>TL;DR</strong></p>
<p>The following error:</p>
<pre class="lang-golang prettyprint-override"><code>panic: open /var/run/secrets/kubernetes.io/serviceaccou... |
<p>I am trying to interpret the metrics fetched using Telegraf with the Kubernetes plugins on the k3s cluster. I see the results are reporting the CPU in terms of nanoseconds and memory and disk in terms of bytes. More importantly, I like to understand how the CPU usage shows in ns can be converted into <code>%</code>?... | <p>If you have a running total of the number of (nano)seconds, you can look at the derivative to figure out percentages.</p>
<p>Example:</p>
<ul>
<li>At time <code>00:00:00</code> the cpu usage counter was at <code>1,000,000,000ns</code></li>
<li>At time <code>00:00:10</code> the cpu usage counter was at <code>3,000,00... |
<p>I have set up my K8s pods in such a way that the replicas get created on multiple nodes. So no node has 2 pods running the same application. HPA pods will be created on separate nodes too. Is the PDB required in this scenario?</p>
| <p>No, <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets" rel="noreferrer">Pod Disruption Budget (PDB)</a> is not a requirement when deploying pods on multiple nodes.</p>
<p>It is primarily to handle disruptions due to the dynamic nature of Kubernetes. A PDB limits the numb... |
<p>Is there a way to configure kube-proxy in GKE?</p>
<p>I can see the pods creating from the daemonset, but I cannot see the daemonset itself.</p>
<p>Thanks for your help.</p>
| <p>kube-proxy pod in k8s (not only in GKE) is created as <a href="https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/" rel="nofollow noreferrer">Static Pod</a>.</p>
<p>Kubelet automatically creates so-called mirror pod on Kubernetes API server for each static pod, so the pods are visible there, but the... |
<p>I set up a trivial kubernetes yaml file (below) to test the nginx ingress. Nginx works as expected inside the cluster but isn't visible outside the cluster.</p>
<p>I'm running <code>minikube</code> with <code>minikube tunnel</code> and <code>minikube addons enable ingress</code>. When I <code>kubectl exec</code> int... | <p>From within cluster this link should work - http://.:port
in your case it will be - <a href="http://cheese-svc.default:80" rel="nofollow noreferrer">http://cheese-svc.default:80</a></p>
<p>To access it from outside, the service is accessible on nodePort 30635
<a href="http://10.106.203.73:30635" rel="nofollow norefe... |
<p>I set up a trivial kubernetes yaml file (below) to test the nginx ingress. Nginx works as expected inside the cluster but isn't visible outside the cluster.</p>
<p>I'm running <code>minikube</code> with <code>minikube tunnel</code> and <code>minikube addons enable ingress</code>. When I <code>kubectl exec</code> int... | <p>As you are using minikube, get the IP of your one node minikube cluster using <code>minikube ip</code>.</p>
<p>And then <code>curl http://<minikube_ip>:<nodePort></code></p>
|
<p>We are trying integrate our workflow service with SSO(using OKTA for OIDC). now I got Okta ClientID and Secret key. Need to update the workflow configmap with K8 secrets.</p>
<p>I created K8 secrets with the below commands but my configmap is not picking up them. Can you please point me what I am missing?</p>
<pre><... | <p>Looks like you are trying to call secret inside the config map.
You can not do so. In Kubernetes world, both are separate objects and you have to use them in pod/deployment etc definition.</p>
<p>In your above scenario, mount/use the secrets in the deployment/pod and have some script to read those inside pods and po... |
<p>I am running a Kuberentes cluster in dev environment. I executed deployment files for metrics server, my pod is up and running without any error message. See the output here:</p>
<pre><code>root@master:~/pre-release# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP ... | <p>Following container arguments work for me in our development cluster</p>
<pre><code>containers:
- args:
- /metrics-server
- --cert-dir=/tmp
- --secure-port=443
- --kubelet-preferred-address-types=InternalIP
- --kubelet-insecure-tls
</code></pre>
<p>Result of <code>kubectl describe apiservice v1beta1.metric... |
<p>I have loaded Grafana as an add-on from the Istio docs, i put it behind a sub domain for the main site.</p>
<p>But i need to build a custom load balancer for it, so that the sub domain can point to that.</p>
<p>This is what i have:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: grafana-ingressgateway
... | <p>From what I see it's not working because creation of a service is not enough to create a custom load balancer in Istio.</p>
<hr />
<p>If you want to create a custom gateway, then please refer to the following <a href="https://stackoverflow.com/questions/51835752/how-to-create-custom-istio-ingress-gateway-controller... |
<p><strong>My set up</strong></p>
<p>I have one physical node K8s cluster where I taint master node so it can also act a worker. the node has Centos7 with total of 512 GB memory. I am limiting my experiments to one node cluster; once a solution is found, I will test it on my small scale k8s cluster where master and wor... | <ul>
<li><p><strong>Why it takes around a minute for <code>kubectl top pods</code> to update resource utilization numbers?</strong></p>
<p>It's because metric server's default resolution which is set to 60s.</p>
</li>
<li><p><strong>How can I reduce this interval and have frequent updates?</strong></p>
<p>You can chang... |
<p>I am using Kubernetes yaml to mount a volume.
I know I can set the mount folder to be for a specific group using this configuration:</p>
<pre><code> securityContext:
fsGroup: 999
</code></pre>
<p>but no where I can find a way to also set user ownership and not just the group.</p>
<p>When I access the container ... | <p>There is no way to set the <code>UID</code> using the definition of Pod but you can use an <code>initContainer</code> with the same <code>volumeMount</code> as the main container to set the required permissions.</p>
<p>It is handy in cases like yours where user ownership needs to be set to a non root value.</p>
<p>H... |
<p>My certificates were expired:</p>
<pre><code>root@ubuntu:~# kubectl get pods
Unable to connect to the server: x509: certificate has expired or is not yet valid
</... | <p>The <code>~/.kube/config</code> wasn't updated with the changes.</p>
<p>I ran:</p>
<pre><code>mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
</code></pre>
<p>and it fixed it.</p>
|
<p>I am trying to use KubeVirt with GKE cluster. </p>
<p>I found I am able to create a nested virtualization enabled GCP VM, but I didn't find a way to achieve the same thing for GKE cluster node.</p>
<p>If I cannot enable nested virtualization for GKE cluster node, I can only use the kubevirt with debug.useEmulation... | <p>Yes you can -- it isn't even hard to do, it just isn't very intuitive.</p>
<ol>
<li><p>Start a GKE cluster with ubuntu/containerd, n1-standard nodes and minimum cpu of Haswell. I think you also need to enable "Basic Authorization" to get virtctl working (sorry).</p>
</li>
<li><p>Find the template used for... |
<p>Tring to install kubernetes cluster with kubeadm, and faced issue with installing kube packages.
I continue getting error:</p>
<pre><code>https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes
</code></pre>
<p>Repo c... | <p>You can see very similar issue <a href="https://github.com/kubernetes/kubernetes/issues/60134" rel="noreferrer">here</a>.</p>
<p>As a <strong>quick workaround</strong>, you can simply disable <strong>GPG checking</strong> by setting <code>repo_gpgcheck=0</code> in <code>/etc/yum.repos.d/kubernetes.repo</code> but th... |
<p>I have many services. In a day, a few services are busy for about ten hours, while most other services are idle or use a small amount of cpu.</p>
<p>In the past, I put all services in a virtual machine with two cpus, and scale by cpu usage, there are two virtual machine at the busiest time, but most of the time ther... | <blockquote>
<p>I put all services in a virtual machine with two cpus, and scale by cpu usage, there are two virtual machine at the busiest time, but most of the time there is only one.</p>
</blockquote>
<p>First, if you have any availability requirements, I would recommend to always have at least <strong>two</strong> ... |
<p>I'm trying to deploy Postgresql on Azure Kubernetes with data persistency. So I'm using PVC.
I searched lots of posts on here, most of them offered yaml files like below, but it's giving the error below;</p>
<pre><code>chmod: changing permissions of '/var/lib/postgresql/data/pgdata': Operation not permitted
The file... | <p>One thing you could try is to change <code>uid=1000,gid=1000</code> in mount options to 999 since this is the uid of postgres user in postgres conatiner (I didn't test this).</p>
<hr />
<p>Another solution that will for certain solve this issue involves init conatainers.</p>
<p>Postgres container requires to start a... |
<p>I’ve a go program which need to access to config map, when using the following clusterRole we got error forbidden</p>
<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: s-access
labels:
app.kubernetes.io/instance: te-mger
rules:
- verbs:
- get
- watch
- list
- upd... | <p>Each Kubernetes resource is part of some API group. The API group defines the path on which these resources are available. You can find them for example in the Kubernetes API reference (for each resource you have the group, version and kind).</p>
<p>As you can see <a href="https://kubernetes.io/docs/reference/gener... |
<p>I have installed kube-prometheus-stack as a <strong>dependency</strong> in my helm chart on a local docker for Mac Kubernetes cluster v1.19.7. I can view the default prometheus targets provided by the kube-prometheus-stack.</p>
<p>I have a python flask service that provides metrics which I can view successfully in t... | <p>Prometheus custom resource definition has a field called <code>serviceMonitorSelector</code>. Prometheus only listens to those matched serviceMonitor. In case of helm deployment it is your release name.</p>
<pre><code>release: {{ $.Release.Name | quote }}
</code></pre>
<p>So adding this field in your serviceMonitor ... |
<p>I am trying to determine a reliable setup to use with K8S to scale one of my deployments using an HPA and an autoscaler. I want to minimize the amount of resources overcommitted but allow it to scale up as needed.</p>
<p>I have a deployment that is managing a REST API service. Most of the time the service will hav... | <p>Sounds like you need a Scheduler that take actual CPU utilization into account. This is not supported yet.</p>
<p>There seem to be work on a this feature: <strong><a href="https://github.com/kubernetes-sigs/scheduler-plugins/tree/6b7e77af527d8db82afb5060e5474ed524bdc0d6/kep/61-Trimaran-real-load-aware-scheduling" re... |
<p>I have seen in many Helm Chart's Chart.yaml where developers provide keywords, as for example</p>
<pre><code>keywords:
- "http"
- "https"
- "web server"
</code></pre>
<p>What is the significance of providing these? Are these getting validated by something in Helm?
I tried to look ... | <p>The <code>keywords</code> field specifies a list of keywords about the project. It helps user search charts based on keywords. For example, <code>helm search repo database</code> will bring up the charts which contain the <code>database</code> keyword such as <code>postgres</code>, <code>mariadb</code>, etc.</p>
<p>... |
<p>I'm trying to grant the default service account in my namespace the ability to read ingress resources. I want to be able to read all ingress resources for the cluster, would that necessitate a ClusterRole? This is the role and binding I've been trying.
The kubectl command <code>kubectl auth can-i list ingress -n my-... | <h3>your <code>Role rules</code> is using incorrect api-resources that is <code>resources: ["ingress"]</code>, it must be <code>resources: ["ingresses"]</code></h3>
<pre><code>apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: my-namespace
name: my-ingress-reader
rules:
- ... |
<p>I am trying to create a Kubernetes cluster, this cluster will contain 3 nodes<br />
Master Nodes, where I Installed and configured kubeadm , kubelete, and installed my system there (which is web application developed by laravel ),
the worker nodes is joined to the master without any problem ,
and I deployed my sys... | <p>actually the problem was with flannel network , it was not able to make connection between nodes , so I solved it by installing weave plugin which is working fine now
by applying this command</p>
<pre><code>kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')... |
<p>I have managed to run one grpc service in a root path. But I tried to add more grpc service by adding custom path route in virtual service which doesn't work. Any help would be highly appreciated.</p>
<p>This is the gateway:</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: my... | <p>Here are some tips when working with grpc and istio (tested with istio 1.9.2).</p>
<p>1.Set protocol in service:</p>
<pre><code>kind: Service
metadata:
name: my-grpc-service
spec:
ports:
- number: 9009
appProtocol: grpc
</code></pre>
<p>2.set protocol in gateway:</p>
<pre><code>apiVersion: networking.istio... |
<p>I have microservice for email sending in cloud function on some GCP project. On different GCP project i have Ecommerce application deployed with kubernetes. I want to send mails after some activity on ecommerce via my microservice i use pub/sub for communication. I have problem with publishing messages in celery tas... | <p>Ok, problem was with that publisher PublisherClient creating multi threads and celery don't work correct with threads.</p>
|
<p>If a Helm deployment's status is <code>failed</code>, what can I do to determine what made it fail?</p>
| <p><strong>Helm chart deployment can fail because of the below 3 reasons.</strong></p>
<ol>
<li>Chart is incorrect</li>
<li>Deployment configurations are incorrect.</li>
<li>Problem in Scheduling the containers and service due to some issue(image pull issue, resource quota)</li>
</ol>
<p>The following steps can be perf... |
<p>I have ran a pod on the control plane called kube-nginx, and forward port. And I am a freshman in kubernetes.</p>
<pre><code>[root@k8smaster ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aaf... | <p>To listen on port 10086 on all addresses, forwarding to 80 in the pod</p>
<pre><code>kubectl port-forward --address 0.0.0.0 pod/kube-nginx 10086:80
</code></pre>
|
<p>I am new to Kubernetes. I have set up 3 Ubuntu 20.04.2 LTS VMs on Oracle Virtualbox Manager.</p>
<p>I have installed docker, kubelet, kubeadm, and kubectl in all 3 VMs according to the following documentation.<br />
<a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel... | <p>I have found out the issue. Thanks to: <a href="https://medium.com/@anilkreddyr/kubernetes-with-flannel-understanding-the-networking-part-1-7e1fe51820e4" rel="nofollow noreferrer">Kubernetes with Flannel — Understanding the Networking — Part 1 (Setup the demo)</a> I have copied the excerpts that helped to resolve ... |
<p>I am trying to get mongo to be scheduled to a given node in my cluster (qatar).</p>
<p>I see the following error message in the pod description:</p>
<pre><code> Warning FailedScheduling 58m default-scheduler 0/7 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't to... | <p>I made the boneheaded assumption that if the PVC had claimed a size I'd see that in the output of the <em><strong>describe</strong></em> command. I had to get the yaml for the PVC spec to see that it requested more than the PV had allocated</p>
<p>I've now successfully bound</p>
<pre><code>[dsargrad@malta cfg]$ kube... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.