prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>It may be a vague question but I couldn't find any documentation regarding the same. Does Google cloud platform have provision to integrate with OpsGenie?</p>
<p>Basically we have set up few alerts in GCP for our <code>Kubernetes Cluster monitoring</code> and we want them to be feeded to <code>OpsGenie</code> for Au... | <p>Recapping for better visibility:</p>
<p>OpsGenie supports multiple <a href="https://www.atlassian.com/software/opsgenie/integrations" rel="nofollow noreferrer">tools</a>, including Google Stackdriver.<br />
Instruction on how to integrate it with Stackdriver webhooks can be found <a href="https://support.atlassian.c... |
<p>I want to use the atomix framework using the java API in my application.</p>
<p>The application should be deployed and scaled via kubernetes. And every Pod should be "connected" with all Pods of the same kubernetes deployment.</p>
<p>I have seen in the documentation that there are different ways how to set up clus... | <p>You can use DNS provided you configure a service specifically for this task. In k8s, every pod can be a member of an arbitrary number of services (because a service is just a load-balancer). So you could define a service for this purpose</p>
<pre class="lang-yaml prettyprint-override"><code>---
apiVersion: v1
kind: ... |
<p><strong>Problem</strong></p>
<p>We are trying to create an inference API that load PyTorch ResNet-101 model on AWS EKS. Apparently, it always killed OOM due to high CPU and Memory usage. Our log shows we need around 900m CPU resources limit. Note that we only tested it using <strong>one</strong> 1.8Mb image. Our Dev... | <p>Have you tried limiting the CPU available to the pods?</p>
<pre class="lang-yaml prettyprint-override"><code> - name: pytorch-ml-model
image: pytorch-cpu-hog-model-haha
resources:
limits:
memory: "128Mi"
cpu: "1000m" # Replace this with CPU amount your devops guys w... |
<p>We are having a problem with installing CronJob using Helm chart on GKE <strong>Autopilot</strong> cluster.
(when we installing the same Helm chart on Standard GKE cluster with the same GKE version installation works perfectly )</p>
<p><strong>GKE version- 1.21.5-gke.1302</strong></p>
<p>My CronJob.yaml:</p>
<pre><c... | <p>Sorry about this. This issue has been fixed in <strong>GKE version- 1.21.9-gke.300</strong> which is currently available in the RAPID and REGULAR channels and will eventually be available in the STABLE channel. Clusters should start being upgraded over the next few weeks.</p>
<p>You can check both the default vers... |
<p>I'm using busybox image in my pod. I'm trying to curl another pod, but "curl is not found". How to fix it?</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
labels:
app: front
name: front
spec:
containers:
- image: busybox
name: front
command:
- /bin/sh
- -c
- sleep 1d
</cod... | <p><code>busybox</code> is a single binary program which you can't install additional program to it. You can either use <code>wget</code> or you can use a different variant of busybox like <a href="https://github.com/progrium/busybox" rel="nofollow noreferrer">progrium</a> which come with a package manager that allows ... |
<p>I'm using busybox image in my pod. I'm trying to curl another pod, but "curl is not found". How to fix it?</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
labels:
app: front
name: front
spec:
containers:
- image: busybox
name: front
command:
- /bin/sh
- -c
- sleep 1d
</cod... | <p>Additional to @gohm'c's answer, you could also try uusing Alpine Linux and either make your own image that has curl installed, or use <code>apk add curl</code> in the pod to install it.</p>
<p>Example pod with alpine:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
labels:
... |
<p>I am a junior developer studying eks.</p>
<p>When you create eks, you can see that the IAM user used to create it is granted as system:master.</p>
<p>I can't find how system:master is specified</p>
<p>I can't see the contents of IAM in the generated aws-auth configmap of Kubernetes.</p>
<p>Can you find out which par... | <p><code>I can't find how system:master is specified</code></p>
<p>system:masters is a logical group <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/rbac/escalation_check.go#L38" rel="nofollow noreferrer">defined</a> in kubernetes source. This is not something created by EKS or yourself.</p>
... |
<p><strong>Traefik version 2.5.6</strong></p>
<p>I have the following ingress settings:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/app-root: /users
traefik.ingress.kubernetes.io/rule-type: PathPrefixStrip
name: user... | <p>Try to use <a href="https://doc.traefik.io/traefik/v2.5/user-guides/crd-acme/#traefik-routers" rel="nofollow noreferrer">Traefik Routers</a> as in the example below:</p>
<pre><code>apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: users
namespace: default
spec:
entryPoints:
- web
... |
<p>I have a problem with helm chart that I would like to use to deploy multiple instances of my app in many namespaces. Let's say it would be ns1, ns2 and ns3.</p>
<p>I run helm upgrade with --install option and it goes well for ns1 but when I want to run it second time for ns2 I get an error:</p>
<pre><code>Error: ren... | <p>Found out the solution. The easiest way is to add lookup block into your templates:</p>
<pre><code>{{- if not (lookup "policy/v1beta1" "PodSecurityPolicy" "" "my-psp") }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: my-psp
...
{{- end }}
</code></pre>
<... |
<p>Do I still need to expose pod via <code>clusterip</code> service?</p>
<p>There are 3 pods - main, front, api. I need to allow ingress+egress connection to main pod only from the pods- api and frontend. I also created service-main - service that exposes main pod on <code>port:80</code>.</p>
<p>I don't know how to tes... | <p>Network policies and services are two different and independent Kubernetes resources.</p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service is</a>:</p>
<blockquote>
<p>An abstract way to expose an application running on a set of <a href="https://kubernete... |
<p>I have a sidecar container in a MySQL Pod which will use the MySQL socket file in order to access the database.</p>
<p>I would like to be sure MySQL has successfully started and therefore have created the socket file before than this sidecar container starts.</p>
<p>I tried to add a <code>readiness</code> probe with... | <p>Try:</p>
<pre><code>...
readinessProbe:
exec:
command:
- sh
- -c
- test -S /var/run/mysqld/mysqld.sock
</code></pre>
|
<p>There is a container in my Kubernetes cluster which I want to debug.</p>
<p>But there is no<code>netstat</code>, no <code>ip</code> and no <code>apk</code>.</p>
<p>Is there a way to upgrade this image, so that the common tools are installed?</p>
<p>In this case it is the nginx container image in a K8s 1.23 cluster.<... | <p>Alpine is a stripped-down version of the image to reduce the footprint. So the absence of those tools is expected. Although since <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-running-pod/#debugging-using-a-copy-of-the-pod" rel="nofollow noreferrer">Kubernetes</a> <code>1.23</code>, you c... |
<p>I have a service running in Kubernetes and currently, there are two ways of making GET requests to the REST API.</p>
<p>The first is</p>
<pre><code>kubectl port-forward --namespace test service/test-svc 9090
</code></pre>
<p>and then running</p>
<pre><code>curl http://localhost:9090/sub/path \
-d param1=abcd \
-d pa... | <p>This should be something which uses:</p>
<pre><code>from kubernetes.stream import portforward
</code></pre>
<p>To find which command maps to an API call in Python, you can used</p>
<pre><code>kubectl -v 10 ...
</code></pre>
<p>For example:</p>
<pre><code>k -v 10 port-forward --namespace znc service/znc 1666
</code><... |
<p>I'm trying to set up a OKE Cluster on OCI, deploy a Ghost container in it for blogging, then expose it to the internet.
I've successfully done it with a load balancer service in my YAML and my blog is visible to the internet:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: blog
annotations:
servi... | <p>I am part of the product team for OKE.
OKE does not support OCI Network Load Balancer (NLB) yet. However, we are working on it.
For the time being, you can provision an NLB manually and load balance across worker nodes as the article mentioned above describes.</p>
|
<p>What am I going wrong in the below query?</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /nginx
backend:
... | <p>Ingress spec has changed since updated to v1. Try:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /nginx
pathType: ImplementationSpecific
... |
<p>I have a private docker registry hosted on gitlab and I would like to use this repository to pull images for my local kubernetes cluster:</p>
<pre><code>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 68m
</code></p... | <p>I managed to solve the issue by editing the default <code>config.json</code> produced by <code>$ docker login</code>:</p>
<pre><code>{
"auths": {
"registry.gitlab.com": {}
},
"credsStore": "osxkeychain"
}
</code></pre>
<p>becomes</p>
<pre><code>{
"... |
<p>I have an application running on kubernetes (It is a cluster running on cloud) and want to setup monitoring and logging for that application. There are various possibilities for the setup. What would be the best practices of doing that, like recommended method or industrial standard?</p>
<ul>
<li>A <strong>prometheu... | <p>It all depends on how many clusters you have. If you have one cluster, the application you want to monitor on it will be the best choice option 1:</p>
<blockquote>
<ul>
<li>A <strong>prometheus monitoring setup inside kubernetes cluster</strong> : prometheus-operator helm chart installed inside the cluster that ca... |
<p>We have a K8 EKS cluster with ALB ingress controller and behind that, we have a graphql gateway. On the cluster there are two node groups, one microservices the other the remaining monolith. We have not fully completed pulling out all the services. We get some pretty high volume workloads and I need to scale up the ... | <p>When your K8s-based application uses <code>services</code>, the traffic is load-balanced between the active pods of the target deployment. Kubernetes services are themselves the crudest form of load balancing traffic. In Kubernetes the most basic type of load balancing is load distribution. Kubernetes uses two metho... |
<p>we have 9 microservices in our application. In this all the services have same yaml manifest file(deployment, service and configmap(to supply environment variable to containers)).</p>
<p>But when we try to get it as helm template. We couldn't able to pass different environment variable for different services.</p>
<p... | <p>a helm chart acts as a collection of templates, which you can (re-)use to deploy multiple services, especially in a microservices context.</p>
<p>you configure different deployments (and therefore different environments) with the same helm chart by providing values-files during installation, which contain the config... |
<p>I have a Go application running in a Kubernetes cluster which needs to read files from a large MapR cluster. The two clusters are separate and the Kubernetes cluster does not permit us to use the CSI driver. All I can do is run userspace apps in Docker containers inside Kubernetes pods and I am given <code>maprticke... | <p>This is a good question because it highlights the way that some environments impose limits that violate the assumptions external software may hold.</p>
<p>And just for reference, MapR was acquired by HPE so a MapR cluster is now an HPE Ezmeral Data Fabric cluster. I am still training myself to say that.</p>
<p>Anywa... |
<p>I'm using minikube version: v1.25.1, win10, k8s version 1.22</p>
<p>There is 1 node, 2 pods on it: <code>main</code> and <code>front</code>, 1 service - <code>svc-main</code>.</p>
<p>I'm trying to exec into front and call main thru service and see some msg confirming connection is ok.</p>
<p>main.yaml:</p>
<pre><cod... | <p>The problem is when you are creating a Kubernetes pod using your yaml file, you are overwriting the default Entrypoint and Cmd defined in nginx docker image with your custom command and args:</p>
<pre class="lang-yaml prettyprint-override"><code>command: ["/bin/sh","-c"]
args: ["while true; ... |
<p>We are enabling Google Cloud Groups RBAC in our existing GKE clusters.</p>
<p>For that, we first created all the groups in Workspace, and also the required "gke-security-groups@ourdomain.com" according to documentation.</p>
<p>Those groups are created in Workspace with an integration with Active Directory ... | <p>It turned out to be an issue about case-sensitive strings and nothing related with the actual rules defined in the RBACs, which were working as expected.</p>
<p>The names of the groups were created in Azure AD with a camel case model. These group names where then showed in Google Workspace all lowercase.</p>
<p><str... |
<p>I thought I understood how kubernetes services work, and have always seen them like a way to "group" several pods, in order to make it able to contact the service instead of the single pods. However, it seems like I am wrong. I created a mysql deployment (with only one pod) and a service in order to reach ... | <p>There is a label mismatch between the Service and the Pod:</p>
<pre class="lang-yaml prettyprint-override"><code># service
spec:
selector:
run: mysql # <- this
</code></pre>
<p>vs</p>
<pre class="lang-yaml prettyprint-override"><code># deployment
spec:
template:
metadata:
labels:
app: m... |
<p>Hope all is well. I am stuck with this Pod executing a shell script, using the BusyBox image. The one below works,</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: loop
name: busybox-loop
spec:
containers:
- args:
- /bin/sh
- -c
- |-
for i in 1 2 ... | <p><code>...But this one doesn't works as I am using "- >" as the operator...</code></p>
<p>You don't need '-' after '>' in this case, try:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: busybox
labels:
run: busybox
spec:
containers:
- name: busybox
image: busybox
args:
... |
<p>I have a config map that looks like this:</p>
<pre><code>kubectl describe configmap example-config --namespace kube-system
Name: example-config
Namespace: kube-system
Labels: <none>
Annotations: <none>
Data
====
mapRoles:
----
- rolearn: arn:aws:iam::0123456789012:role/user-role-1
us... | <p>According to kubernetes official docs:
<a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/</a></p>
<p>There is not such syntax in <code>kubectl patch... |
<p>This is my current setup:</p>
<pre><code>os1@os1:/usr/local/bin$ minikube update-check
CurrentVersion: v1.20.0
LatestVersion: v1.25.1
os1@os1:/usr/local/bin$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
</code></pre>
<p>What should be the steps to upgrade the minikube?</p>
| <p><a href="https://minikube.sigs.k8s.io/docs/" rel="nofollow noreferrer">Minikube</a> is an executable, in this case you would need to <code>re-install</code> the <code>minikube</code> with the desired version. There is no command to upgrade the running <code>Minikube</code>.</p>
<p>You would need to:</p>
<pre><code>s... |
<p>I have used the following configurations to deploy an app on minikube.</p>
<p><strong>Deployment</strong>:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: angular-app
spec:
replicas: 2
selector:
matchLabels:
run: angular-app
template:
metadata:
labels:
run: ang... | <p>The answer from ~al-waleed-shihadeh is correct, but I want to give some additional info.</p>
<ul>
<li><p>You should be able to access the service via the NodePort, too, without needing the <code>minikube service</code> command: <a href="http://192.168.49.2:31503" rel="nofollow noreferrer">http://192.168.49.2:31503</... |
<p>I've googled few days and haven't found any decisions.
I've tried to update k8s from 1.19.0 to 1.19.6 In Ubuntu-20.
(cluster manually installed k81 - master and k82 - worker node)</p>
<pre><code># kubeadm upgrade plan
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration ... | <p>The solution for the issue is to <a href="https://v1-19.docs.kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-kubeconfig" rel="nofollow noreferrer">regenerate the kubeconfig file for the admin</a>:</p>
<pre class="lang-sh prettyprint-override"><code>sudo kubeadm init phase kubeconfig ad... |
<p>I am debuggin a problem with pod eviction in Kubernetes.</p>
<p>It looks like it is related to a configuration in PHP FPM children processes quantity.</p>
<p>I assigned a minimum memory of 128 MB and Kubernetes is evicting my pod apparently when exceeds 10x that amount (<code>The node was low on resource: memory. Co... | <p>Requested memory is not "the minimum", it is what it is called - the amount of memory <em>requested</em> by pod. When kubernetes schedules pod, it uses request as a guidance to choose a node which can accommodate this workload, but it doesn't guarantee that pod won't be killed if node is short on memory.</... |
<p>I know that the moment the pod receives a deletion request, it is deleted from the service endpoint and no longer receives the request. However, I'm not sure if the pod can return a response to a request it received just before it was deleted from the service endpoint.
If the pod IP is missing from the service's end... | <p>There are many reasons why Kubernetes might terminate a healthy container (for example, node drain, termination due to lack of resources on the node, rolling update).</p>
<h4>Once Kubernetes has decided to terminate a Pod, a series of events takes place:</h4>
<h4>1 - Pod is set to the “Terminating” State and removed... |
<p>I've Two workflowTemplates <code>generate-output</code>, <code>lib-read-outputs</code> and One workflow <code>output-paramter</code> as follows</p>
<ol>
<li><code>generate-output.yaml</code></li>
</ol>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: generate-output
spec:
entryp... | <h1>DAG and steps templates don't produce outputs by default</h1>
<p>DAG and steps templates do not automatically produce their child templates' outputs, even if there is only one child template.</p>
<p>For example, the <code>no-parameters</code> template here does not produce an output, even though it invokes a templa... |
<p>Akka app on Kubernetes is facing delayed heartbeats, even when there is no load. </p>
<p>There is also constantly the following warning: </p>
<pre><code>heartbeat interval is growing too large for address ...
</code></pre>
<p>I tried to add a custom dispatcher for the cluster, even for every specific actor but di... | <p>I was also having same issue of growing heartbeat intervals but in my case it was once I started using the cluster though the load was not high, I was trying only 2tps.</p>
<p>Going through the Akka documentation I found Akka discourages using <code>resources.limits.cpu</code>. I removed it from my deployment manife... |
<p>We are using <code>jetstack/cert-manager</code> to automate certificate management in a k8s environment.</p>
<p>Applying a Certificate with <code>kubectl apply -f cert.yaml</code> works just fine:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name:... | <p>Try to inspect you Certificate object wiht <code>kubectl -n default describe certificate test-cert</code> and post here if you don't find any issues with it.</p>
<p>your Certificate Object should be like the following:</p>
<pre class="lang-yaml prettyprint-override"><code>Name: test-cert
Namespace: defaul... |
<p>There is a folder name "data-persistent" in the running container that the code reads and writes from, I want to save the changes made in that folder. when I use persistent volume, it removes/hides the data from that folder and the code gives an error. So what should be my approach.</p>
<pre><code>FROM pyt... | <p>First , k8s volume mounting point overwrite the original file system /data-persistent/</p>
<p>To solve such a case you have many options</p>
<p><strong>Solution 1</strong></p>
<ul>
<li>edit your docker file to copy local data to /tmp-data-persistent</li>
<li>then add "init container" that copy content of /... |
<p>I am trying to get / print the name of my current <code>kubernetes</code> context as it is configured in <code>~/.kube/config</code> using <code>client-go</code></p>
<p>I hava managed to authenticate and get the <code>*rest.Config</code> object</p>
<pre class="lang-golang prettyprint-override"><code> config, err ... | <p>The function <code>ClientConfig()</code> returns the Kubernetes API client config, so it has no information about your config file.</p>
<p>To get the current context, you need to call <code>RawConfig()</code>, then there is a field called <code>CurrentContext</code>.</p>
<p>The following code should work.</p>
<pre c... |
<p>I use the helm-chart ingress-nginx (4.0.x) to create the ingress-controller and use it to direkt tcp traffic via a node-port to my deployment (which works perfectly). But I see that the ingress-controller constantly opens and closes tcp connection to the pod of my deployment.
Does anybody know why this happens or ho... | <p>I believe this is due to automated health probes coming from Azure's load balancer. There is a GitHub issue requesting an annotation to control this behavior, but no solution from Microsoft as of yet.</p>
<p>See:
<a href="https://github.com/Azure/AKS/issues/1394" rel="nofollow noreferrer">https://github.com/Azure/AK... |
<p>I have helm 3 template created using <code>helm create microservice</code> command. it has below files.</p>
<pre><code>/Chart.yaml
./values.yaml
./.helmignore
./templates/ingress.yaml
./templates/deployment.yaml
./templates/service.yaml
./templates/serviceaccount.yaml
./templates/hpa.yaml
./templates/NOTES.txt
./tem... | <p>I copied the <code>ingress.yaml</code> file to, chart created older version helm. this value was missing in <code>_helpers.tpl</code> file. Now I copied new version of hellpers.tpl file. deployment works now.</p>
|
<p>I have the following pods,</p>
<pre><code>root@sea:scripts# kubectl get pods -l app=mubu7 -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
mubu71 2/2 Running 0 51m 10.244.1.215 spring <none> <none>
mubu72 2/2 ... | <p>Following code would iterate over all the pods with the label <code>app=mubu7</code>. Later it would grab their pod name and all the container's name. The list of container names is converted into an array and iterated for each pod. So it does not matter how many containers are in the pod(Eg:1,2,3..etc) this code wo... |
<p>I have started learning Kuberenetes for some time (not pro yet). I am using docker-desktop on Windows 11 with Kubernetes all works fine. But at some point I added AKS (Azure Kubernetes) cluster to my test lab and the AKS is deleted at later point from Azure Portal.</p>
<p>So when I run <code>kubectl config view</cod... | <p><code>kubectl config view</code> shows you your whole configuration under <em>.kube/config</em></p>
<p><code>kubectl config get-contexts</code> will give you an output about your contexts. A context is the allocation between cluster and user.</p>
<p>Since you only have deleted the allocation (context) you still have... |
<p>I have a kube-prometheus deployed to multiple environments using kustomize.</p>
<p>kube-prometheus is a base and each environment is an overlay.
Let's say I want to deploy dashboards to overlays, which means I need to deploy the same ConfigMaps and the same patch to each overlay.</p>
<p>Ideally, I want to avoid chan... | <p>The proper way to do this is using <strong>components</strong>.</p>
<p>Components can encapsulate both resources and patches together.
In my case, I wanted to add ConfigMaps (resource) and mount this ConfigMaps to my Deployment (patch) without repeating the patches.</p>
<p>So my overlay would look like this:</p>
<pr... |
<p>I am trying to understand how we can create circuit breakers for cloud run services,Unlike in GKE we are using istio kind of service mesh how we implement same thing cloud Run ?</p>
| <p>On GKE you'd <a href="https://cloud.google.com/traffic-director/docs/configure-advanced-traffic-management#circuit-breaking" rel="nofollow noreferrer">set up a circuit breaker</a> to prevent overloading your legacy backend systems from a surge in requests.</p>
<p>To accomplish the same on Cloud Run or Cloud Function... |
<p>I have used the following configurations to deploy an app on minikube.</p>
<p><strong>Deployment</strong>:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: angular-app
spec:
replicas: 2
selector:
matchLabels:
run: angular-app
template:
metadata:
labels:
run: ang... | <ul>
<li><p>The endpoints provided in the service description are the endpoints for each of the pods <code>172.17.0.3:80,172.17.0.4:80</code>, when you deploy more replicas you will have more endpoints.</p>
</li>
<li><p>The angular-app service is bonded to port number <code>31503</code> and you can access your service ... |
<p>What might be root cause that I got nothing from below command?</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl get --raw '/apis/custom.metrics.k8s.io/v1beta1/namespace/default/pods/*/' | jq
Error from server (NotFound): the server could not find the requested resource
</code></pre>
<p>I checked the '/... | <pre><code>kubectl get --raw '/apis/custom.metrics.k8s.io/v1beta1/namespaces/*/metrics/nginx_vts_server_requests_per_second' | jq
</code></pre>
<p>Did you try the namespace metric <code>nginx_vts_server_requests_per_second</code> you pasted from the kubernetes discovery information?</p>
<p>You may need to change the pr... |
<p>Using Calico as CNI and CRI-O. DNS settings properly configured. Installed NGINX ingress controller via official documentation page of NGINX using helm. Set <code>replicaset</code> to 2 when installing.</p>
<p>After that used this file for creating 3 objects: <code>Deployment</code>, <code>Service</code> for exposin... | <p>This problem should be resolved by adding</p>
<pre><code>spec:
template:
spec:
hostNetwork: true
</code></pre>
<p>to the ingress controller yaml manifest. For more please check <a href="https://github.com/kubernetes/ingress-nginx/issues/4799" rel="nofollow noreferrer">this github issue</a> and <a href="... |
<p>I obtained Intermediate SSL certificate from SSL.com recently. I'm running some services in AKS (Azure Kubernetes Service) Earlier I was using Let's Encrypt as the CertManager, but I want to use SSL.com as the CA going forward. So basically, I obtained chained.crt and the private.key</p>
<p>The chained.crt consists ... | <p>Perfect! After spending more time on this, I was lucky enough to make this work. So in this case, you don't need to create an Issuer or ClusterIssuer.</p>
<p>First, create a TLS secret by specifying your private.key and the certificate.crt.</p>
<pre><code>kubectl create secret tls ssl-secret --key private.key --cert... |
<p>Is there a way to execute some code in pod containers when config maps are updated via helm. Preferrably without a custom sidecar doing constant file watching?</p>
<p>I am thinking along the lines of postStart and preExit lifecycle events of Kubernetes, but in my case a "postPatch".</p>
| <p>This might be something a <code>post-install</code> or <code>post-upgrade</code> hook would be perfect for:</p>
<p><a href="https://helm.sh/docs/topics/charts_hooks/" rel="nofollow noreferrer">https://helm.sh/docs/topics/charts_hooks/</a></p>
<p>You can trigger these jobs to start after an install (<code>post-instal... |
<p>I need to take daily backup for cockroachdb and push to S3 , its running under EKS cluster with statefulset, So can anyone suggest the best method to do this please.</p>
<p>Thanks.</p>
| <p>the best way is to use the CockroachDB for backup.</p>
<pre><code>CREATE SCHEDULE schedule_label
FOR BACKUP INTO 's3://test/backups/schedule_test?AWS_ACCESS_KEY_ID=x&AWS_SECRET_ACCESS_KEY=x'
WITH revision_history
RECURRING '@daily';
</code></pre>
<p>you can schedule the exact run time using the RECURRI... |
<p>I have a <strong>multistage</strong> <code>dockerfile</code> which I'm deploying in k8s with script as <code>ENTRYPOINT ["./entrypoint.sh"]</code>.</p>
<p>Deployment is done though helm and env is Azure.
While creating the container it errors out <strong>"./entrypoint.sh": permission denied: unkn... | <p>Use <code>bash</code> (or your preferred shell if not <code>bash</code>) in the entrypoint:</p>
<pre><code>ENTRYPOINT [ "bash", "-c", "./entrypoint.sh" ]
</code></pre>
<p>This will run the entrypoint script even if you haven't set the script as executable (which I see you have)</p>
<p>Y... |
<p>Im running:</p>
<pre><code>:~$ minikube version
minikube version: v1.20.0
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.6", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:28:42Z"... | <p>You can start <code>minikube</code> with a <code>k8s</code> version of your choice</p>
<pre><code>▶ minikube start --kubernetes-version=1.22.1
😄 minikube v1.23.0 on Darwin 11.6.1
✨ Using the virtualbox driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🎉 minikube 1.25.... |
<p>I'm using the kubernetes go api. I have the IP of a pod, and I want to find the v1.pod object (or just name and namespace) of the pod that has that IP. How can I go about this?</p>
| <p>Turns out you need to use a FieldSelector. The field in this case is <code>status.podIP</code>.</p>
<pre class="lang-golang prettyprint-override"><code>import (
[...]
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
[...]
)
[...]
pods, err := clientset.CoreV1().Pods("").List(context.Ba... |
<p>How to fix this? I am trying to get the version of kubectl but says server not found. I have already installed kubernetes in my PC.</p>
<p><a href="https://i.stack.imgur.com/LjtYv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LjtYv.png" alt="enter image description here" /></a></p>
| <p>If you are using minikube - just start minikube that will sort this problem</p>
<p>'minikube start --memory=4096'</p>
|
<p>I have several k8s clusters and I would like to monitor pods metrics (cpu/memory mainly). For that, I already have one central instance of prometheus/grafana and I want to use it to monitor pods metrics from all my podsk8s clusters.</p>
<p>Sorry if the question was already asked by I already read lots of tutorials b... | <p>Posting the answer as a community wiki, feel free to edit and expand.</p>
<hr />
<p>You need to use <code>federation</code> for prometheus for this purpose.</p>
<blockquote>
<p>Federation allows a Prometheus server to scrape selected time series
from another Prometheus server.</p>
</blockquote>
<p>Main idea of using... |
<p>I'm trying to set up the use of dotnet-monitor in a windows pod. But if I understand correctly, there are no images for use on Windows nodes <a href="https://hub.docker.com/_/microsoft-dotnet-monitor" rel="nofollow noreferrer">https://hub.docker.com/_/microsoft-dotnet-monitor</a>. Is there any way to install dotnet-... | <p>The side car approach for setting up Dotnet Monitor in a Windows Container to get the diagnostics logs of a different container is currently not supported as mentioned by <em><strong>Jander-MSFT</strong></em> in this <em><strong><a href="https://github.com/dotnet/dotnet-monitor/issues/1160" rel="nofollow noreferrer"... |
<p>I'm running my Backend on <strong>Kubernetes</strong> on around <strong>250</strong> pods under <strong>15</strong> deployments, backend in written in <strong>NODEJS</strong>.</p>
<p>Sometimes after X number of hours (5<X<30) I'm getting <code>ENOTFOUND</code> in one of the PODS, as follows:</p>
<pre><code>{
... | <p>Already saw your <a href="https://github.com/kubernetes/kubernetes/issues/107866" rel="nofollow noreferrer">same question on github</a> and reference to <a href="https://github.com/external-secrets/kubernetes-external-secrets/issues/860" rel="nofollow noreferrer">getaddrinfo ENOTFOUND with newest versions</a>.</p>
<... |
<p>I've been trying to get over this but I'm out of ideas for now hence I'm posting the question here.</p>
<p>I'm experimenting with the Oracle Cloud Infrastructure (OCI) and I wanted to create a Kubernetes cluster which exposes some service.</p>
<p><strong>The goal is:</strong></p>
<ul>
<li>A running managed Kubernete... | <p>Might not be the ideal fix, but can you try changing the externalTrafficPolicy to Local. This would prevent the health check on the nodes which don't run the application to fail. This way the traffic will only be forwarded to the node where the application is . Setting externalTrafficPolicy to local is also a requir... |
<p>I am using Kubernetes deployment. I wish to start the pods one by one. Not all at once. Is there any way. I do not want to use statefulSet.</p>
<pre><code>kind: Deployment
metadata:
name: my-deployment
labels:
app: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
meta... | <blockquote>
<p>I wish to start the pods one by one. Not all at once. Is there any way. I do not want to use statefulSet.</p>
</blockquote>
<p>Unfortunately you are trying to accomplish something with <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer"><code>Deploym... |
<p>I deploy my App into the Kubernetes cluster using Helm. App works with database, so i have to run db migrations before installing new version of the app. I run migrations with Kubernetes Job object using Helm "pre-upgrade" hook.</p>
<p>The problem is when the migration job starts old version pods are still... | <p>There are two ways I can see that you can do this.</p>
<p>First option is to scale down the pods before the deployment (for example, via Jenkins, CircleCI, GitLab CI, etc)</p>
<pre><code>kubectl scale --replicas=0 -n {namespace} {deployment-name}
helm install .....
</code></pre>
<p>The second option (which might be ... |
<p>I am new to the argo universe and was trying to set up Argo Workflows <a href="https://github.com/argoproj/argo-workflows/blob/master/docs/quick-start.md#install-argo-workflows" rel="nofollow noreferrer">https://github.com/argoproj/argo-workflows/blob/master/docs/quick-start.md#install-argo-workflows</a> .</p>
<p>I ... | <p>The <code>argo</code> CLI <a href="https://github.com/argoproj/argo-workflows/blob/877d6569754be94f032e1c48d1f7226a83adfbec/cmd/argo/commands/get.go#L73-L74" rel="noreferrer">manages two API clients</a>. The first client connects to the <a href="https://argoproj.github.io/argo-workflows/rest-api/" rel="noreferrer">A... |
<p>On an Azure AKS cluster with the Calico network policies plugin enabled, I want to:</p>
<ol>
<li>by default block all incoming traffic.</li>
<li>allow all traffic within a namespace (from a pod in a namespace, to another pod in the <strong>same</strong> namespace.</li>
</ol>
<p>I tried something like:</p>
<pre><code... | <p>After investigation it turned out that:</p>
<ol>
<li>I used terraform to create a k8s cluster with two node pools. System, and worker. (Note: that this is (not yet) possible in the GUI).</li>
<li>Both node pools are in different subnets (system subnet, and worker subnet).</li>
<li>AKS configures kubeproxy to masquer... |
<p>I have a cluster with Nginx ingress. I receive an API request, for example:</p>
<pre><code>/api/v1/user?json={query}
</code></pre>
<p>I want to redirect this request with ingress to my service. I want to modify it like this:</p>
<pre><code>/api/v2/user/{query}
</code></pre>
| <p>Assuming your domain name is <code>example.com,</code> and you have a service called <code>example-service</code> exposing port <code>80</code>, you can achieve this task by defining the following ingress rule.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.k... |
<p>Using <code>crictl an </code>containerd<code>, is there an easy way to find to which pod/container belongs a given process, using it's </code>PID` on the host machine?</p>
<p>For example, how can I retrieve the name of the pod which runs the process below (<code>1747</code>):</p>
<pre><code>root@k8s-worker-node:/# p... | <p>Assuming that you're looking at the primary process in a pod, you could do something like this:</p>
<pre><code>crictl ps -q | while read cid; do
if crictl inspect -o go-template --template '{{ .info.pid }}' $cid | grep -q $target_pid; then
echo $cid
fi
done
</code></pre>
<p>This walks through all the... |
<p>I have a backup job running, scheduled to run every 24 hours. I have the concurrency policy set to "Forbid." I am testing my backup, and I create jobs manually for testing, but these tests are not forbidding concurrent runs. I use:</p>
<pre><code>kubectl create job --from=cronjob/my-backup manual-backup-(t... | <p><code>...Does the concurrency policy only apply to jobs created by the Cron job scheduler?</code></p>
<p><code>concurrencyPolicy</code> applies to <code>CronJob</code> as it influences how <code>CronJob</code> start job. It is part of <code>CronJob</code> spec and not the <code>Job</code> spec.</p>
<p><code>...Does ... |
<p>I want to connect GKE (Google Kubernetes Engine) cluster to MongoDB Atlas. But I need to green the IP of my nodes (allow them). But sometimes I have 3 nodes, sometimes I have 10 and sometimes nodes are falling down and re-creating - constant changing means no single IP.</p>
<p>I have tried to create NAT on the GCP f... | <p>Private GKE cluster means the nodes do not have public IP addresses but you mentioned</p>
<blockquote>
<p>the actual outbound transfer goes from the node's IP instead of
the NAT's</p>
</blockquote>
<p>Looks like you have a public cluster of GKE, you have to use the same NAT option to get outbound egress <strong>sing... |
<p>With kubectl, I know i can run below command if I want to see specific resources YAML file</p>
<pre><code>kubectl -n <some namespace> get <some resource> <some resource name> -o yaml
</code></pre>
<p>How would I get this same data using python's kubernetes-client ?
Everything I've found so far only... | <p>If you take a look at the methods available on an object, e.g.:</p>
<pre><code>>>> import kubernetes.config
>>> client = kubernetes.config.new_client_from_config()
>>> core = kubernetes.client.CoreV1Api(client)
>>> res = core.read_namespace('kube-system')
>>> dir(res)
['_... |
<p>We recently updated the deployment of a dropwizard service deployed using Docker and Kubernetes.</p>
<p>It was working correctly before, the readiness probe was yielding a healthcheck ping to internal cluster IP getting 200s. Since we updated the healthcheck pings are resulting in a 301 and the service is considered... | <p>Issue is now resolved. After GKE version was updated it is now creating a NEG healthcheck by default. We disabled this by adding below annotation to service deployment file.</p>
<p><code>metadata: annotations: cloud.google.com/neg: '{"ingress":false}'</code></p>
|
<p>what is python kubernetes client equivalent for</p>
<pre><code>kubectl get deploy -o yaml
</code></pre>
<p><a href="https://github.com/kubernetes-client/python/blob/master/examples/deployment_crud.py" rel="noreferrer">CRUD python Client example</a></p>
<p>i referred this example for getting python deployment
but th... | <p><code>read_namespaced_deployment()</code> does the thing:</p>
<pre class="lang-py prettyprint-override"><code>from kubernetes import client, config
config.load_kube_config()
api = client.AppsV1Api()
deployment = api.read_namespaced_deployment(name='foo', namespace='bar')
</code></pre>
|
<p>I would like to catch the Client IP Address inside my .NET application running behind GKE Ingress Controller to ensure that the client is permitted.</p>
<pre><code>var requestIpAddress = request.HttpContext.Connection.RemoteIpAddress.MapToIPv4();
</code></pre>
<p>Instead of getting Client IP Address I get my GKE Ing... | <p>Posted community wiki for better visibility. Feel free to expand it.</p>
<hr />
<p>Currently the only way to get the client source IP address in GKE Ingress is to <a href="https://cloud.google.com/load-balancing/docs/features#ip_addresses" rel="nofollow noreferrer">use <code>X-Forwarded-For</code> header. It's known... |
<p>I have an interesting problem, maybe you could help me out.</p>
<p>There are given <em>two spring applications</em>, called app1 and app2. There is plenty of REST calls are happening to both of the services. I need to implement a <em>security solution</em> where both of them can communicate with each other on REST b... | <p>Mikolaj has probably covered everything but still let me add my cent</p>
<p>i don't have much experience working with <strong>Istio</strong>, however i would also suggest checking out the <strong>Linkerd</strong> <a href="https://linkerd.io/" rel="nofollow noreferrer">service mesh</a>.</p>
<p>Step 1.</p>
<p>Consider... |
<p>After updating onprem kubernetes from 1.18 to 1.22.5, I had to switch the ingress api versions from <code>v1beta1</code> to <code>v1</code>, and selected <code>ImplementationSpecific</code> as the new, required <code>pathType</code>.</p>
<pre><code>kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: wx-... | <p>What you are descibing is expected behavior according to the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#hostname-wildcards" rel="nofollow noreferrer">official kubernetes ingress documentation</a>.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Host</th>
<t... |
<p>I have a kubernetes cluster that's running datadog and some microservices. Each microservice makes healthchecks every 5 seconds to make sure the service is up and running. I want to exclude these healthcheck logs from being ingested into Datadog.</p>
<p>I think I need to use <code>log_processing_rules</code> and I'v... | <p>All of these answers are correct in their own ways, but my specific issue was that the Datadog annotations for the <code>source</code> and <code>service</code> were not properly quoted:</p>
<pre><code> ad.datadoghq.com/my-service.logs: |
[{
"source": "my-service", ... |
<p>Our pipeline by default tries to use a container that matches the name of the current stage.
If this container doesn't exist, the container 'default' is used.
This functionality works but the problem is that when the container that matches the name of the stage doesn't exist, a ProtocolException occurs, which isn't ... | <p>You can run a pre stage in order to get the current running container by exec kubectl command to server. The tricky point is that kubectl does not exist on worker - so in that case:</p>
<ol>
<li>pull an image of kubectl on worker.</li>
<li>Add a stage for getting the running container - use a label or timestamp to g... |
<p>I logged into the Linux bastion host where <code>kubectl</code> is installed for connecting to the Kubernetes cluster.</p>
<p>On the Bastion host when I run any kubectl command like the one below:</p>
<pre><code>kubectl get pods
</code></pre>
<p>I get the error below:</p>
<pre><code>fatal error: runtime: out of memo... | <p>I was able to fix the issue, it was due to insufficient memory on the bastion host.</p>
<p><strong>Here's how I fixed it</strong>:</p>
<p>First I ran the command below to check the memory utilization:</p>
<pre><code>free -m
</code></pre>
<p>which gave me the following output which confirmed that the insufficient mem... |
<p>I'm using kubectl to deploy ASP.Net core apps to K8S cluster.
At the current moment I hardcode container PORTs and ConnectionString for DataBase like this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: mydeploy
spec:
replicas: 1
selector:
matchLabels:
app: mydeploy
template:
... | <p>You can use following command to create configmap and then mount it to your contianer</p>
<pre><code>kubectl create configmap appsettings --from-file=appsettings.json --dry-run -o yaml
</code></pre>
<p>For mounting you should add a volume to your deployment or sts like this:</p>
<pre><code> volumes:
- name: con... |
<p>I faced this problem since yesterday, no problems before.<br />
My environment is</p>
<ul>
<li>Windows 11</li>
<li>Docker Desktop 4.4.4</li>
<li>minikube 1.25.1</li>
<li>kubernetes-cli 1.23.3</li>
</ul>
<h1>Reproduce</h1>
<h2>1. Start minikube and create cluster</h2>
<pre><code>minikube start
</code></pre>
<h2>2. Ch... | <p>This seems to be a bug introduced with 1.25.0 version of minikube: <a href="https://github.com/kubernetes/minikube/issues/13503" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/issues/13503</a> .
A PR to revert the changes introducing the bug is already open: <a href="https://github.com/kubernetes/m... |
<p>I was trying to implement the pdb in kubernetes for our application. but I am confused with How the PDB and HPA are together related or If rolling update strategy is defined is there any dependency with PDB ?</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: pdbtest
namespace: test-fix
labels... | <p>If you read the <a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/" rel="nofollow noreferrer">documentation</a>, you find a disclaimer that is applicable to your test scenario.</p>
<blockquote>
<p><strong>Caution</strong>: Not all voluntary disruptions are constrained by Pod Disruption Budgets.... |
<p>I have been working on creating a application which can perform verification test on the deployed istio components in the kube-cluster. The constraint in my case is that I have run this application as a pod inside the kubernetes and I cannot provide cluster-admin role to the pod of the application so that it can do ... | <p>As OP mentioned in the comment problem is resolved after my suggestion:</p>
<blockquote>
<p>Please run the command <code>kubectl auth can-i list pods --namespace istio-system --as system:serviceaccount:istio-system:istio-deployment-verification-sa</code> and attach result to the question. Look also <a href="https://... |
<p>I have a Kubernetes cluster of 3 nodes in Amazon EKS. It's running 3 pods of Cockroachdb in a StatefulSet. Now I want to use another instance type for all nodes of my cluster.
So my plan was this:</p>
<ol>
<li>Add 1 new node to the cluster, increase replicas in my StatefulSet to 4 and wait for the new Cockroachdb po... | <p>You can consider make a copy of your ASG current launch template -> upgrade the instance type of the copied template -> point your ASG to use this new launch template -> perform ASG instance refresh. Cluster of 3 nodes with minimum 90% of healthy % ensure only 1 instance will be replace at a time. Affected ... |
<p>I just installed redis (actually a reinstall and upgrade) on GKE via helm. It was a pretty standard install and nothing too out of the norm. Unfortunately my "redis-master" container logs are showing sync errors over and over again:</p>
<pre><code>Info 2022-02-01 12:58:22.733 MST redis1:M 01 Feb 2022 19... | <p>i know it late to the party but to add more if any of get stuck into the same scenario and <strong>can't</strong> delete the <strong>PVC</strong> they can increase <strong>size of the PVC</strong> in <strong>GKE</strong>.</p>
<p>Check <strong>storageclass</strong> :</p>
<pre><code>apiVersion: storage.k8s.io/v1
kind:... |
<pre><code>from kubernetes import client, config
config.load_kube_config()
api = client.AppsV1Api()
deployment = api.read_namespaced_deployment(name='foo', namespace='bar')
</code></pre>
<p>i tried to add affinity object to deployment spec i got this error</p>
<pre><code>deployment.spec.affinity.nodeAffinity.required... | <p>You're looking at the wrong place. Affinity belongs to pod template spec (<code>deployment.spec.template.spec.affinity</code>) while you're looking at deployment spec (<code>deployment.spec.affinity</code>).</p>
<p>Here's how to completely replace existing affinity (even if it's None):</p>
<pre class="lang-py pretty... |
<p>In Azure K8s service, you can scale up the node pool but only we define the min and max nodes.
When i check the node pool scale set scale settings, i found it set to manual.
So i assume that the Node Pool auto scale does't rely on the belonging scale set, but i wonder, can we just rely on the scale set auto scale wi... | <p>The AKS autoscaling works slightly different as the VMSS autoscaling.</p>
<p>From the <a href="https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler" rel="nofollow noreferrer">official docs</a>:</p>
<blockquote>
<p>The cluster autoscaler watches for pods that can't be scheduled on
nodes because of resource ... |
<p>I'm new to k8s. I deployed an ingress on minikube, and I found out its address to be <code>localhost</code> which it shouldn't be, I guess. For this, I don't know how to continue, for I should edit <code>/etc/hosts/</code> to add dns item, but no I could not.<br />
<a href="https://i.stack.imgur.com/UPwcf.png" rel="... | <p>I was butting heads with this for a while and just got it working, so I'll add color to the other answers.</p>
<p>First of all, as pointed out in <a href="https://serverfault.com/questions/1052349/unable-to-connect-to-minikube-ingress-via-minikube-ip">this related question</a>, when you intially run <code>minikube a... |
<p>I want to delete single pod of kubernetes permanently but it will recreate that pod</p>
<p>i have tried many commands but it doesn't help me.</p>
<pre><code>1. kubectl delete pod <pod-name>
</code></pre>
<p>2nd</p>
<pre><code>kubectl get deployments
kubectl delete deployments <deployments- name>
</code>... | <p><code>my replica count is 0</code></p>
<p><code>...it will successfully delete the pod but then after it will restart</code></p>
<p>Try:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: ...
spec:
restartPolicy: Never # <-- add this
containers:
- name: ...
</code></pre>
<p>If the pod still restart,... |
<p>I have a OpenShift/Kubernetes new cluster and I need to create multiple ResourceQuota(s) and apply them to existing projects.</p>
<p>Every ResourceQuota should be applied to a given namespace and should contain a specific number of requests and limits.
I would like to generate all the needed ResourceQuota YAMs and d... | <blockquote>
<p>it seems like I am missing out some helm fundamentals here</p>
</blockquote>
<p>True, As mentioned in error there is an issue at line 84</p>
<pre><code>84 namespace: "123-testnamespace"
85 requests:
86 cpu: "2"
87 memory: "1Gi"
88 limits:
89 cpu: "2&quo... |
<p>I want to delete the single node of cluster</p>
<p>here is my problem i am create the node where 2 nodes are running only
but for sometime i need more nodes for few minutes only then after using scaling down i want delete the drain node only from cluster.
i do scaling up/down manually<br />
here is the step i follow... | <p>One option is using a separate node group for the transient load, use taints/tolerations for laod to be scheduled on that node group, drain/delete that particular node group if not needed.</p>
<p>Do you manually scale up/down nodes? If you are using something like cluster auto scaler, there will be variables like <c... |
<p>which service assigns nameservers under /etc/resolv.conf of pods , generally it should pickup from host /etc/resolv.conf , i'm seeing different nameservers under /etc/resolv.conf of pods, is there is any configuration on kbernetes(kubedns) which i can configure so that pods /etc/resolv.conf have 8.8.8.8</p>
| <p>I had the same issue over Jenkins deployed on Kubernetes. If you don't mention a nameserver then <em>/etc/resolv.conf</em> shows the default nameserver (ip of k8s).
I solved this by modifying the deploy file with</p>
<pre><code> dnsPolicy: "None"
dnsConfig:
nameservers:
- 8.8.8... |
<p>We are using envoy access logs
<a href="https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage" rel="nofollow noreferrer">https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage</a> , does envoy validate the fields that are passed to the access logs,... | <p>I'm not sure I understand the question. Envoy doesn't have to validate anything as it is generating those logs. Envoy is HTTP proxy who receives the request and does some routing/rewriting/auth/drop/.. actions based on the configuration (configured by virtualservice / destinationrule / envoyfilter if we're talking a... |
<p>I've recently started using KOPS as a tool to provision Kubernetes clusters and from what I've seen so far, it stores it's CA key and certificates in its S3 bucket, which is fine.</p>
<p>But out curiosity, would it be possible to store these in Hashicorp Vault instead, as opposed to s3?</p>
| <blockquote>
<p>But out curiosity, would it be possible to store these in Hashicorp Vault instead, as opposed to s3?</p>
</blockquote>
<p>Yes. User <a href="https://stackoverflow.com/users/5343387/matt-schuchard" title="16,592 reputation">Matt Schuchard</a> has mentioned in the comment:</p>
<blockquote>
<p>Yes you can ... |
<p>I have an EKS cluster and a nodegroup running 6 nodes. For some reson nodes get marked as <code>unschedulable</code> randomly, once a week or two and they stay that way. When I notice that I uncordon them manually and everything works fine.</p>
<p>Why does this happen and how can I debug it, prevent it or configure ... | <p>In my case the problem was <code>AWS Termination Handler</code> daemonset that was running. It was outdated and not really used in the cluster and after removing it, problems with nodes getting marked Unschedulable just went away.</p>
|
<p>I am trying to extract podname using the below jq query.</p>
<pre class="lang-sh prettyprint-override"><code>❯ kubectl get pods -l app=mssql-primary --output jsonpath='{.items[0].metadata.name}'
mssqlag-primary-deployment-77b8974bb9-dbltl% ... | <p>I'm guessing <code>zsh</code> is your shell. The <code>%</code> is an indicator output by your shell to say that the last line output by <code>kubectl</code> had no newline character at the end. So it's not <em>extra</em> output, it's actually an indicator that the raw <code>kubectl</code> command outputs <em>less</... |
<p>I have configured a spring-boot pod and configured the <code>liveness</code> and <code>readiness</code> probes.
When I start the pod, the <code>describe</code> command is showing the below output.</p>
<pre><code>Events:
Type Reason Age From Message
---- ------ ---- ... | <p>When you limit the container / spring application to 0.5 cores (500 millicores) the startup probably takes longer than the given liveness probe thresholds.</p>
<p>You can either increase them, or use a startupProbe with more relaxed settings (f.e. failureThreshold 10). You can reduce the period for the liveness prob... |
<p>I have installed RabbitMQ to my Kubernetes Cluster via Google Cloud Platform's marketplace.</p>
<p>I can connect to it fine in my other applications hosted in the Kubernetes Cluster, I can create queues and setup consumers from them without any problems too.</p>
<p>I can temporarily port forward port 15672 so that... | <p>This is because the default virtual-host is '/'. RabbitMQ admin uses this in the URL when you access the exchanges/queues pages. URL encoded it becomes '%2F'. However, the Ingress Controller (in my case nginx) converts that back to '/' so the admin app can't find that URL (hence the 404).</p>
<p>The work-around I ca... |
<p>I need to run a python script from a KubernetesPodOperator, so I want to mount the python file into the Python docker Image. Reading some posts</p>
<ul>
<li><a href="https://stackoverflow.com/questions/57754521/how-to-mount-volume-of-airflow-worker-to-airflow-kubernetes-pod-operator">How to mount volume of airflow w... | <p>The error means that the names don't match.
you defined <code>name='test_volume'</code> for <code>V1VolumeMount</code> and <code>name='test-volume</code> for <code>V1Volume</code>.</p>
<p>To solve your issue names should be identical.</p>
<pre><code>vol1 = k8s.V1VolumeMount(
name='test-volume', mount_path='/opt/... |
<p>I've been using a kubernetes ingress config file to assign a static external ip address created by GCP.
The ingress and the deployment are managed by GKE.</p>
<p>ingress.yaml</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
kubernetes.io/ingress.glo... | <p>As @MattBrowne said in the comments, needs to be global IP and not regional. This also fixed for me.</p>
|
<p>I'm running a google cloud composer GKE cluster. I have a default node pool of 3 normal CPU nodes and one nodepool with a GPU node. The GPU nodepool has autoscaling activated.</p>
<p>I want to run a script inside a docker container on that GPU node.</p>
<p>For the GPU operating system I decided to go with cos_contai... | <blockquote>
<p>Can i do that with kubectl apply ? Ideally I would like to only run
that yaml code onto the GPU node. How can I achieve that?</p>
</blockquote>
<p>Yes, You can run the Deamon set on each node which will run the command on Nodes.</p>
<p>As you are on GKE and Daemon set will also run the command or script... |
<p>I'm trying to deploy a cluster with self managed node groups. No matter what config options I use, I always come up with the following error:</p>
<p><strong>Error: Post "</strong><a href="http://localhost/api/v1/namespaces/kube-system/configmaps" rel="noreferrer"><strong>http://localhost/api/v1/namespaces/kube-... | <p>Based on the example provided in the Github repo [1], my guess is that the <code>provider</code> configuration blocks are missing for this to work as expected. Looking at the code provided in the question, it seems that the following needs to be added:</p>
<pre><code>data "aws_region" "current" {... |
<p>i have created a deployment on gke!!</p>
<p>When i run <code>kubectl get pods</code> from my local machine, it returns me the existing pods and the deployment is running,
but if i run on worker node via ssh <code>docker ps</code>, it doesn't return any container..</p>
<p>i used cos_containered.
I have one node in my... | <p>GKE is moving away from <code>docker</code> however it is still available on the node, but it is not used.</p>
<p>To list the containers use the below command:</p>
<pre><code>crictl ps
</code></pre>
<p>For the complete reference: <a href="https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md" rel="... |
<p>I'm working on a microservice feature from scratch and have to make some design choices.</p>
<p>My needs are :</p>
<ul>
<li>be able to periodically run a batch job (CronJob) that aggregates data</li>
<li>then send the data set to a service for processing</li>
<li>have resiliency over service failure (pod rescheduled... | <p>Easy to maintain/manage if you <strong>HTTP</strong> service (API) running in a different pod and your consumer as different service pod</p>
<p>OOM killing not affecting each other (if both running in different pods, considering memory leak scenario)</p>
<p>Things might get weird when you scale your system</p>
<p>C... |
<p>I have created a service account SA1 in namespace NS1 and set a full configuration for SA1 (workload identity in GCP).
I need to use the service account SA1 in pods from different namespaces.
for now I have the pods in namespace NS1 using the SA1</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: my-pod
nam... | <p>ServiceAccount is a namespaced resource in Kubernetes, meaning that it can only be referenced from pods deployed in the same namespace.</p>
<p>This is by design, Namespaces act as logical containers on which you apply access policies and a pod in one namespace should not be able to "steal" the serviceaccou... |
<p>I want to edit my <code>Nginx.conf</code> file present inside Nginx controller pod in AKS, but the edit command is not working using the exec command, is there any way else I could edit my <code>nginx.conf</code>.</p>
<p>the command which I tried:</p>
<pre><code>kubectl exec -it nginx-nginx-ingress-controller -n ngi... | <p>As mentioned by CrowDev, it's not good practice to update the config of Nginx controller like that.</p>
<p>Nginx controller is the backend of the <strong>ingress</strong> you can use the <strong>config map</strong> to update the configuration of the Nginx controller and redeploy the pod of the controller.</p>
<p>Som... |
<p>Don't know if this is an error from AWS or something. I created an IAM user and gave it full admin policies. I then used this user to create an EKS cluster using the <code>eksctl</code> CLI but when I logging to AWS console with the <strong>root user</strong> I got the below error while trying to access the cluster ... | <p>If you're logged in with the root user and get this error, run the below command to edit the <code>aws-auth</code> configMap:</p>
<pre><code>kubectl edit configmap aws-auth -n kube-system
</code></pre>
<p>Then go down to <code>mapUsers</code> and add the following (replace <code>[account_id]</code> with your Account... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.