prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>We had a system outage, service was unresponsive and I restarted the service with <code>kubectl rollout restart sts myservice</code> and it worked. However, I want to look at the logs to see a cause of the problem. When I try <code>kubect logs --previous myservice-0</code> it says 'previous terminated container &quo... | <p>I suggest the following reading: <a href="https://sematext.com/guides/kubernetes-logging/" rel="noreferrer">The Complete Guide to Kubernetes Logging</a>:</p>
<blockquote>
<p>In Kubernetes, when pods are evicted, crashed, deleted, or scheduled
on a different node, <strong>the logs from the containers are gone</strong... |
<p>I am trying to run keycloak on kubernetes so I follow <a href="https://www.keycloak.org/getting-started/getting-started-kube" rel="nofollow noreferrer">this</a> example on my kubernetes cluster. But when I run command:</p>
<pre><code>kubectl create -f https://raw.githubusercontent.com/keycloak/keycloak-quickstarts/l... | <p>your error is clearly informing keylock is trying to connect with the database but can't get it there might be an issue with your configuration file or environment you are passing.</p>
<p>You can try this out : <a href="https://github.com/harsh4870/Keycloack-postgres-kubernetes-deployment" rel="nofollow noreferrer">... |
<p>I am trying to deploy a "Hello World" application on an EKS cluster I created using eksctl. I have the cluster running with 2 pods and am following a tutorial located at <a href="https://shahbhargav.medium.com/hello-world-on-kubernetes-cluster-6bec6f4b1bfd" rel="nofollow noreferrer">https://shahbhargav.med... | <p>As you mention, the problem is that you are trying to access to your local machine at port 30081 but the pods that you have created are in your EKS cluster in the cloud. If you want to try out that the application is working you can SSH into the worker node as you have done and use the <a href="https://linux.die.net... |
<p>I have HA proxy ingress installed on Kubernetes AKS. I installed it using:</p>
<pre><code>helm install ingress haproxy-ingress/haproxy-ingress
</code></pre>
<p>My ingress is this:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ravendb
namespace: default
labels:
app: ra... | <p>I finally figured out what I was missing. I added <code>kubernetes.io/ingress.class: haproxy</code> annotation and problem solved:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ravendb
namespace: default
labels:
app: ravendb
annotations:
ingress.kubernetes.io/ss... |
<p>I'm currently building a backend, that among other things, involves sending RabbitMQ messages from localhost into a K8s cluster where containers can run and pickup specific messages.</p>
<p>So far I've been using Minikube to carry out all of my Docker and K8s development but have ran into a problem when trying to in... | <p>According to the command you used to start minikube, the error is because you don't have enough resources assigned to your cluster.<br />
According to the source code from the rabbitmq cluster operator, it seems that it needs 2CPUs.</p>
<p>You need to adjust the number of CPUs (and probably the memory also) when you... |
<p>Sorry if it's a naive question. Please correct me if my understanding is wrong.</p>
<p>Created POD using this command:</p>
<pre><code>kubectl run nginx --image=nginx --port=8888
</code></pre>
<p>My understand of this command, nginx (application) container will be exposed/available at port 8888</p>
<pre><code>kubectl... | <p>By default, <code>nginx</code> server listen to the port 80. You can see it in their docker image <a href="https://hub.docker.com/layers/nginx/library/nginx/1.18.0-alpine/images/sha256-d7038eae37cfa36cd8e286f6d6daf0df7a445a2da327517b3cde4ba1833adc0c?context=explore" rel="nofollow noreferrer">ref</a>.</p>
<p>With <co... |
<p>I have set up a local kubernetes cluster using <a href="https://kind.sigs.k8s.io" rel="nofollow noreferrer">kind</a> on WSL2 (Ubuntu distro). I managed to create a cluster successfully. Then I try to install istio using helm following the <a href="https://istio.io/latest/docs/setup/install/helm/" rel="nofollow noref... | <p>Managed to figure out the problem thanks to this <a href="https://github.com/kubeflow/manifests/issues/959" rel="nofollow noreferrer">GitHub issue</a>. I needed to enable <a href="https://github.com/kubeflow/manifests/issues/959" rel="nofollow noreferrer">service account token volume projection</a>.</p>
<p>The exact... |
<pre><code>$ kubectl version --short
Client Version: v1.20.2
Server Version: v1.19.6-eks-49a6c0
</code></pre>
<p>I have the following Deployment manifest</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: stats-service
namespace: my-system
labels:
app: stats-service
spec:
selector:
matc... | <p>You are using the wrong notations for your resources. As per <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes" rel="nofollow noreferrer">Meaning of memory</a>:</p>
<blockquote>
<p>Limits and requests for memory are measured in bytes. You can express... |
<p>I am having problems when populate magnum database, please help me.</p>
<p>I have followed the docs.</p>
<p><a href="https://docs.openstack.org/magnum/train/install/install-rdo.html" rel="nofollow noreferrer">https://docs.openstack.org/magnum/train/install/install-rdo.html</a></p>
<pre><code>sudo su -s /bin/sh -c &q... | <p>This is a <a href="https://github.com/sqlalchemy/alembic/issues/699" rel="nofollow noreferrer">bug</a> when running Magnum on MySQL 8.0. This bug was just recently fixed.
<a href="https://github.com/openstack/magnum/commit/8dcf91b2d3f04b7b5cb0e7711d82438b69f975a1" rel="nofollow noreferrer">https://github.com/opensta... |
<p>I'm using an AWS NLB to expose my Kubernetes pods to the internet. The NLB is currently using <code>instance</code> target types but I noticed there are also <code>IP</code> target types. What are the differences between an <code>instance</code> target type vs an <code>IP</code> target type from a practical point of... | <p>The three key use-cases for using <strong>IP target type</strong>:</p>
<ul>
<li>your target does not have to be an instance - anything with private IP address will work, including internal load balance, VPC private service, Fargate containers, databases, on-premise servers through VPN.</li>
<li>your target can be in... |
<p>How do you architecture a Kubernetes application so that a logged-in user is always served back session information stored inside the correct Redis replica?</p>
<p>I've got a working Apollo/GraphQL application written in Typescript which logs users in and stores their session information in Redis. I'm not sure how t... | <p>Looks like you are running single master node Redis . if you are running the multiple Redis replicas then they must be running in sync or i think in cluster mode.</p>
<p>In cluster mode, Redis will clone the data across the multiple replicas.</p>
<p>you can read at : <a href="https://redis.io/topics/cluster-tutorial... |
<p>I am using the promtail helm chart to connect to a Loki server running on a different stack. I have Loki behind an Nginx ingress secured with basic auth.</p>
<p>I can't find any documentation on this, and it's very possible it's just my admittedly limited understanding of helm.</p>
<p>I'm simply trying to use basic ... | <p>To give a bit of background to anyone new to Loki, as stated in the <a href="https://grafana.com/docs/loki/latest/operations/authentication/" rel="nofollow noreferrer">documentation</a>: <em>Loki does not come with any included authentication layer. Operators are expected to run an authenticating reverse proxy in fr... |
<p>I have implemented a simple website where user can log in/register via some existing service (e.g Google). After log in a user can manage his Jupyter notebook - open/delete. Basically a user has an account where he can access his notebook. The website and Jupyter notebook are containerized by Docker and organized by... | <p>I found a working solution to my problem.</p>
<p>I generated my own token with python library secrets. This token I passed as environment variable to container with Jupyter notebook (JUPYTER_TOKEN). So the Jupyter notebook uses this token as it's default. Now I can redirect user from website to Jupyter notebook usin... |
<p>I've created a deployment which exposes a custom metric through an endpoint and an APIService that registers this custom metric, so I can use it in an HPA to autoscale the deployment. To achieve this, I've followed <a href="https://medium.com/swlh/building-your-own-custom-metrics-api-for-kubernetes-horizontal-pod-au... | <p>According to <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/#apiservice-v122" rel="nofollow noreferrer">APIService 1.22</a> documentation you can find information:</p>
<blockquote>
<ul>
<li>Migrate manifests and API clients to use the apiregistration.k8s.io/v1 API version, available since ... |
<p>What are the main differences between running multiple deployments (X,Y,Z) interconnecting using services and a single deployment/pod with multiple containers (X,Y,Z) running inside it? Specifically in terms of performance.</p>
| <p><strong>Multi-container POD :</strong></p>
<p>You are running multiple containers inside a single POD. All can connect each other over the Localhost. All POD running multiple containers.</p>
<p><strong>Multiple Pods:</strong></p>
<p>Different containers running on different PODs. Each POD containing one or more cont... |
<p>Not sure if such if there was such a question, so pardon me if I couldn't find such.</p>
<p>I have a cluster based on 3 nodes, my application consists of a frontend and a backend with each running 2 replicas:</p>
<ul>
<li>front1 - running on <code>node1</code></li>
<li>front2 - running on <code>node2</code></li>
<li... | <p>This is a community wiki answer. Feel free to expand it.</p>
<p>As already mentioned by @TomerLeibovich the main issue here was due to the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes" rel="nofollow noreferrer">Probes Configuration</a... |
<p>I have a standalone Kuberenets cluster installed on some physical RHEL machine.</p>
<p>I'm experiencing recurring crashes of <code>etcd</code> and <code>kube-apiserver</code> containers. From their logs, I managed to guess that I need to tune etcd to better perform in this environment.</p>
<p>The following guide ref... | <p>Indeed, you will get the YAML of the <code>Deployment</code>, and make the changes.</p>
<p>If you installed the cluster with <code>kubeadm</code>, the file will be under <code>/etc/kubernetes/manifests/</code>, and once you make the changes, it will automatically be re-deployed.</p>
|
<p>I have below ingress-nginx configuration file.</p>
<p>It rewrites request for <code>one.example.com</code>. I have added another domain, but I don't want rewrite to happen for other domain.</p>
<p>I went through doc, but there is now rewrite example for multiple host setup.</p>
<pre><code>apiVersion: networking.k8s.... | <p>You can create two separate ingress.</p>
<p>In that case, nothing will change your ingress <strong>controller IP</strong> would be same only for DNS.</p>
<blockquote>
<p>What will happen in that case it will create two load balancers with
different dns?</p>
</blockquote>
<p>No, it won't create two load balancers.</p... |
<p>We have the following configuration for our service that's deployed to EKS but it causes downtime for about 120s whenever we make a deployment.</p>
<p>I can successfully make requests to the new pod when I port forward to it directly, so the pod itself seems fine. It seems to be either the AWS NLB that's not routing... | <p>This is most likely caused by NLB not reacting quickly enough to the target changes which is related directly to your <code>externalTrafficPolicy</code> settings.</p>
<p>If your application does not make any use of client IP you can set the <code>externalTrafficPolicy</code> to <code>ClusterIP</code> or leave it to ... |
<p>I have a template and a deployment in it, One of my deployment's env variables is a value from a secret that contains the name of the namespace that just used the template.
The secret must contain the name of the namespace, I can't change it.</p>
<p>I know that it is possible to use env variables as value of differe... | <p>The <code>secretKeyRef:</code> secret name must be a fixed string. Variable expansion only happens in a couple of places in the pod spec (in <code>env:</code> values, <code>command:</code>, and <code>args:</code>, but nowhere else).</p>
<p>For your immediate problem, it may help to recognize that a Pod and any matc... |
<p>I succeeded in setup a control-plane,master node in my vm. Then I copied the vm, trying to join the copied vm to the existed kubernete cluster.</p>
<p>Problem is that the original vm(node)'s name is new-master-1, and the copied node has the same name. Even after I <code>vi /etc/hostname</code> and change the copied ... | <p><strong>TL;DR:</strong></p>
<p>Run: <code>kubeadm join</code> - adjust this command based on the output from <code>kubeadm token create</code> and add flags like <code>--control-plane</code> and <code>--node-name</code> if needed. Take a look at the <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/k... |
<p>I'm trying to copy a local Python file to a running container on Kubernetes and it fails:</p>
<pre><code>$ kubectl cp /path/to/file.py namespace/pod:/path/in/container/file.py
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
command terminated with exit code 2
</cod... | <p>Problem is solved by updating EKS AMI version.</p>
<p>Please install new release: <a href="https://github.com/awslabs/amazon-eks-ami/releases" rel="nofollow noreferrer">eks-ami-releases</a>.</p>
<p>See: <a href="https://github.com/awslabs/amazon-eks-ami/issues/453" rel="nofollow noreferrer">eks-ami-kubectl</a>.</p>... |
<p>We have a docker image repository on GitLab which is hosted on the internal network ( repo.mycomapanydomain.io).</p>
<p>My K8 deployment is failing with Name not resolved error for repo.mycomapanydomain.io</p>
<p>I tried updating the kube-dns config as below. But I still have the same error.</p>
<pre><code>apiVersio... | <p>Editing <code>/etc/resolv.conf</code> either manually or automatically is discouraged as for:</p>
<blockquote>
<h3>Internal DNS and resolv.conf</h3>
<p>By default, most Linux distributions store DHCP information in <a href="http://man7.org/linux/man-pages/man5/resolv.conf.5.html" rel="nofollow noreferrer"><code>reso... |
<p>My goal is to setup configmap and then use the config file in the spark application. Here are the details:</p>
<p>I have a config file (test_config.cfg) that looks like this:</p>
<pre><code>[test_tracker]
url = http://localhost:8080/testsomething/
username = TEST
password = SECRET
</code></pre>
<p>I created the conf... | <p>Not sure if this issue was solved in Spark v3.0.0 (that you seem to be using), but there was a bug in Spark on Kubernetes that was preventing ConfigMaps from mounting properly. See this discussion: <a href="https://stackoverflow.com/a/58508313/8570169">https://stackoverflow.com/a/58508313/8570169</a></p>
|
<p>I know this comes up often, but I've tried the usual remedies:</p>
<ul>
<li><code>"homepage": "/admin/v2"</code> in the <code>package.json</code></li>
<li><code><base href="%PUBLIC_URL%/"></code> in the <code>index.html</code></li>
<li><code><BrowserRouter basename='/admin/v2'&... | <p>Ok, figured it out... the problem was in the <code>nginx.conf</code>:</p>
<pre><code>server {
listen 4001;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
rewrite ^/admin/v2/?(.*) /$1 break;
}
}
</code></pre>
|
<p>I'm a little confused, I've been ramping up on Kubernetes and I've been reading about all the different objects <code>ReplicaSet</code>, <code>Deployment</code>, <code>Service</code>, <code>Pods</code> etc.</p>
<p>In the documentation it mentions that the <code>kubelet</code> manages liveness and readiness checks wh... | <p>Basically <code>kubelet</code> is called "node agent" that runs on each node. It get notified through kube apiserver, then it start the container through container runtime, it works in terms of Pod Spec. It ensures the containers described in the Pod Specs are running and healthy.</p>
<p>The flow of <code>... |
<p>Following this <a href="https://kubernetes.github.io/ingress-nginx/deploy/#using-helm" rel="nofollow noreferrer">guide</a>, I created an ingress controller on my local kubernetes server, the only difference is that it is created as a NodePort.</p>
<p>I have done some test deployments, with respective services and ev... | <p>As far the doc: This annotation is of the form <code>nginx.ingress.kubernetes.io/default-backend: <svc name></code> to specify a custom default backend. This <code><svc name></code> is a reference to a service inside of the same namespace in which you are applying this annotation. This annotation overrid... |
<p>I'm trying to wrap my head around the flow of traffic for a k8s cluster which is deployed on AWS as a k8s cluster and has a Nginx load balancer through K8s ingress. Specifically what I'm trying to understand is, what role the external load balancer (in this case aws) plays, and how it in turn routes traffic to the ... | <p>Traffic flows if you are using the ingress</p>
<pre><code>Internet > ingress > Kubernetes service > Workload PODs
</code></pre>
<p>Ingress controller will be managing SSL/TLS certs & configuration and refreshing the changes as per requirement.</p>
<p>in more details</p>
<pre><code> Internet > LB >... |
<p>I follow <a href="https://www.keycloak.org/docs/latest/server_installation/#_external_database" rel="nofollow noreferrer">this</a> but it is not working.</p>
<p>I created a custom secret:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: keycloak-db-secret
data:
POSTGRES_DATABASE: ...
POSTGRES_E... | <p>To connect with service in another namespace you can use.</p>
<pre><code><servicename>.<namespace>.svc.cluster.local
</code></pre>
<p>suppose your Postgres deployment and service running in <strong>test</strong> namespace it will go like</p>
<pre><code>postgres.test.svc.cluster.local
</code></pre>
<p>thi... |
<p><strong>Issue itself</strong></p>
<p>Got an <strong>Azure Container registry</strong> as both image and chart storage. Assume it <code>myacr.azurecr.io</code> with 8 different charts pushed. As far as I read before Azure ACR is capable of storing charts and compatible with <strong>Helm 3</strong> (<strong>version 3.... | <blockquote>
<p>Is Azure ACR fully compatible with Helm 3?</p>
</blockquote>
<p>Yes, it's fully compatible with Helm 3.</p>
<blockquote>
<p>Is there any specific workaround to make it compatible with Helm 3?</p>
</blockquote>
<p>Nothing needs to be done because the first question is yes.</p>
<blockquote>
<p>Does search... |
<p>I'm trying to use <code>Kubernetes</code> with <code>Docker</code>. My image runs with Docker. I have one master-node and two worker-nodes. I also created a local registry like this <code>$ docker run -d -p 5000:5000 --restart=always --name registry registry:2</code> and pushed my image into it. Everything worked fi... | <blockquote>
<p>Kubernetes: Failed to pull image. Server gave HTTP response to HTTPS client.</p>
</blockquote>
<pre><code>{ "insecure-registries":["xxx.xxx.xxx.xxx:5000"] }
</code></pre>
<p>to the <code>daemon.json</code> file at <code>/etc/docker</code>.</p>
<p>I solved this problem by configuring ... |
<p>Is it possible to add a custom DNS entry (type A) inside Kubernetes 1.19? I'd like to be able to do:</p>
<pre><code>kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools
host custom-dns-entry.example.com
custom-dns-entry.example.com has address 10.0.0.72
</code></pre>
<p>with <code>custom-dn... | <p>CoreDNS would be the place to do this. You can also do similar-ish things using ExternalName-type Services but that wouldn't give you full control over the hostname (it would be a Service name like anything else).</p>
|
<p>How to get access-logs from openshift router (HAproxy).</p>
<p>I tried to use this command:</p>
<pre><code>$ oc project default
$ oc logs router-1-g...
</code></pre>
<p>I got output:</p>
<pre><code>I0129 09:47:17.125616 1 router.go:554] Router reloaded:
- Checking http://localhost:80 ...
- Health check ... | <p>On Openshift >=4.5 you can do it this way by edititing your ingresscontroller and add the following .spec.logging (see below, log format example included):</p>
<pre><code>apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
name: default
namespace: openshift-ingress-operator
spec:
logging:... |
<p>We have a Flask application that is served via gunicorn, using the eventlet worker. We're deploying the application in a kubernetes pod, with the idea of scaling the number of pods depending on workload.</p>
<p>The recommended settings for the number of workers in gunicorn is <code>2 - 4 x $NUM_CPUS</code>. See <a ... | <p>For better visibility of the final solution chosen by original author of this question as of 2019 year</p>
<blockquote>
<p>Set the number of gunicorn works to 1 (-w 1), and scale horizontally
by increasing the number of pods (using Kubernetes HPA).</p>
</blockquote>
<p>and the fact it might be not applicable in the ... |
<p>I am trying to understand the Istio traffic routing. I installed Istio in demo mode and got to playing around with the samples. The samples have you install a few gateways (I did <code>bookinfo-gateway</code> and <code>httpbin-gateway</code>.</p>
<p>But it seems all my traffic goes through the "http2" po... | <blockquote>
<p>Is there a difference between a service and a gateway?</p>
</blockquote>
<p>Yes.</p>
<ul>
<li>The <code>istio-ingressgateway</code> is a kubernetes service of type <code>LoadBalancer</code> (or <code>NodePort</code>, depending on your setup) that serves as the entry point into your cluster. The ingressg... |
<p>In my 1 node AKS, I deploy multiple job resources (kind:jobs) that are terminated after the task is completed. I have enabled Cluster Autoscaler to add a second node when too many jobs are consuming the first node memory, however it scales out after a job/pod is unable to be created due to lack of memory.</p>
<p>In ... | <p>In Kubernetes you can find 3 Autoscaling Mechanisms: <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="noreferrer">Horizontal Pod Autoscaler</a>, <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/verticalpodautoscaler" rel="noreferrer">Vertical Pod Autoscaler</... |
<p>My platform version:</p>
<ul>
<li>AWS EKS 1.18</li>
<li>istio 1.7.3</li>
</ul>
<p>Hi, I have a problem when requesting via https.
When I try to connect to "https://kinesis.ap-northeast-2.amazonaws.com" on ssl, I get ssl3_get_record:wrong version number error.
However, SSL requests to "https://www.amaz... | <p>I created another EKS cluster to test this error.
So, I figured out the problem was in this istio config.</p>
<pre><code>spec:
values:
global:
podDNSSearchNamespaces:
- global
</code></pre>
<p>After I deleted "podDNSSearchNamespaces" key, https worked.</p>
|
<p>Assuming the following JSON:</p>
<pre class="lang-json prettyprint-override"><code>{
"A":{
"A_KEY":"%PLACEHOLDER_1%",
"B_KEY":"%PLACEHOLDER_2%"
}
}
</code></pre>
<p>And, the following values.yaml:</p>
<pre class="lang-yaml prettyprint-override"><cod... | <p>Here is what I have come up with:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: config
data:
config.json: |-
{{- $file := .Files.Get "config.json" }}
{{- range $k, $v := .Values.placeholders }}
{{- $file = regexReplaceAll (printf "%%%s%%" $k) $file $v }}
{{-... |
<p>I have installed rabbitmq using helm chart on a kubernetes cluster. The rabbitmq pod keeps restarting. On inspecting the pod logs I get the below error</p>
<pre><code>2020-02-26 04:42:31.582 [warning] <0.314.0> Error while waiting for Mnesia tables: {timeout_waiting_for_tables,[rabbit_durable_queue]}
2020-02-... | <p><strong>TLDR</strong></p>
<p><code>helm upgrade rabbitmq --set clustering.forceBoot=true</code></p>
<p><strong>Problem</strong></p>
<p>The problem happens for the following reason:</p>
<ul>
<li>All RMQ pods are terminated at the same time due to some reason (maybe because you explicitly set the StatefulSet replicas ... |
<p>I have implemented HPA for all the pods based on CPU and it was working as expected. But when we did a maintenance of worker nodes, it seems tha HPA's got messed up as it failed to identify it. Do I need to disable HPA temporarily during maintenance and bring it up once the maitenance is over.</p>
<p>Please suggest<... | <p>There is a <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#implicit-maintenance-mode-deactivation" rel="nofollow noreferrer">maintenance-mode</a> solution which says:</p>
<blockquote>
<p>You can implicitly deactivate the HPA for a target without the need to
change the HPA configur... |
<p>I am trying to host the below (deployment <strong>frontend</strong>) Kubernetes deployment in the AWS EKS cluster, after deploying deployment and created service and ingress, everything gets successfully deployed and created but when i try to access the Load Balancer DNS from outside then this LoadBalancer is not a... | <p>In your original question (without edits and additional information), in <code>frontend</code> deployment you have <code>port</code> values misconfigured.</p>
<ul>
<li><strong>Port</strong> exposes the Kubernetes service on the specified port within the cluster. Other pods within the cluster can communicate with thi... |
<p>I'm currently attempting to look into whether it's possible to prevent a Kubernetes user from creating privileged containers via RBAC. I'm aware that as of Kubernetes 1.1, privileged containers are enabled by default to support underlying Docker requirements. This is fine, I'm not looking to block <em>everybody</em>... | <p>There are several ways to achieve this and I'd like to start with the first, official one: <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/" rel="noreferrer">Pod Security Policy</a>.</p>
<p>The policy you want to implement is the following: <a href="https://kubernetes.io/docs/concepts/policy/... |
<p>I am using <a href="https://github.com/kubernetes/ingress-nginx/" rel="noreferrer">this ingress controller</a> and would like to setup a s3 proxy to some bucket. If I call in a browser the url </p>
<pre><code>https://my-kube-server.org/img/dog.jpg
</code></pre>
<p>I expect to see/download the image at </p>
<pre>... | <p>If you need to use the <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#server-snippet" rel="noreferrer">server-snippet</a> solution. Something similar to the following will add a custom <code>location</code> block to the Nginx ingress config. This i... |
<h1>TLDR;</h1>
<p>How to configure Apache Beam pipelines options with "environment_type" = EXTERNAL or PROCESS?</p>
<h1>Description</h1>
<p>Currently, we have a standalone spark cluster inside Kubernetes, following <a href="https://stackoverflow.com/questions/66320831/its-possible-to-configure-the-beam-portab... | <ol>
<li>Using "External" - this definitely seems like a bug in Beam. The worker endpoints are supposed to be set up to use localhost; I don't think it is possible to configure them. I'm not sure why they would be missing; one educated guess is that the servers silently fail to start, leaving the endpoints em... |
<p>This question might seem like a duplicate of <a href="https://stackoverflow.com/questions/57851158/how-do-i-run-beam-python-pipelines-using-flink-deployed-on-kubernetes">this</a>.</p>
<p>I am trying to run Apache Beam python pipeline using flink on an offline instance of Kubernetes. However, since I have user code ... | <p>(You said in a comment that the answer to the referenced post is valid, so I'll just address the specific error you ran into in case someone else hits it.)</p>
<p>Your understanding is correct; the logging, artifact, etc. endpoints are essentially hardcoded to use localhost. These endpoints are meant to be only used... |
<p>A bit inexperienced at this, so looking for some help on how I can do this! Sorry if it is unclear of what I'm looking to do.</p>
<h1>Objective</h1>
<p>I have an Angular front-end that is location based. I am hoping to be able to use the users public IP by taking it and using a geolocation service to give me the cit... | <p>Spring boot contains a filter to integrate with reverse proxies out of the box and sets the remote address on the request appropriately.
You may need to configure the allowed IPs to accept the header.</p>
<p>Here is an example:</p>
<pre><code>server:
forward-headers-strategy: native
tomcat:
remoteip:
r... |
<p>I'm getting a <code>directory index of "/src/" is forbidden</code> error when setting up Docker Nginx configuration within Kubernetes. Here is the error from the Kubernetes logs.</p>
<pre><code>/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoi... | <p>In Dockerfile copy line, you are copying conf.d to nginx folder, try to change that</p>
<pre><code>FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx/conf.d /etc/nginx/conf.d
COPY dist /src
RUN ls /src
</code></pre>
|
<p>I am trying to install Kube Prometheus Stack using helm.</p>
<p>I have already setup ingress, so it needs to be running behind a proxy.</p>
<p>For that I have updated values of the chart by using below command.</p>
<pre><code>helm show values prometheus-com/kube-prometheus-stack > values.yaml
</code></pre>
<p>I ... | <p>Your helm command should be something like this:</p>
<pre><code>$ helm install <release-name> <registry-name>/<chart-name> --values ./values.yaml -n monitoring
</code></pre>
|
<p>Hello all i am trying to create a <code>StatefulSet</code> which has a PVC and StorageClass as Azurefileshare.
when i have created this my PVC is in pending state:</p>
<pre><code>Events:
Type Reason Age From Message
---- ------ ---- ... | <p>As @<strong>mmiking</strong> pointed out in the comments section, you've reached the max number of storage accounts in a single subscription but <strong>only</strong> in the <code>westeurope</code> location.</p>
<p>You can see in the <a href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-quo... |
<p>I am setting up a secret containing the certificate for ingress controller but getting the below error when I check the ingress logs</p>
<p>Ingress logs:</p>
<pre><code>W0304 05:47:32.020497 7 controller.go:1153] Error getting SSL certificate "default/auth-tls": local SSL certificate default/auth-tls... | <p>Both the <code>Ingress</code> and the <code>Secret</code> are namespaced resources. You can check yourself with:</p>
<pre><code>$ kubectl api-resources --namespaced=true
NAME SHORTNAMES APIGROUP NAMESPACED KIND
...
secrets ... |
<p>I am currently trying to setup keycloak with a postgres database on minikube. The problem is that keycloak cant connect to my postgres db and ends in a crashloopbackerror.</p>
<p>Here my configuration:</p>
<p>Postgres-deployment.yaml</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-vol... | <p>You can please this out files</p>
<p>i have tested and working for me <a href="https://github.com/harsh4870/Keycloack-postgres-kubernetes-deployment" rel="nofollow noreferrer">https://github.com/harsh4870/Keycloack-postgres-kubernetes-deployment</a></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
na... |
<p>I have a wehook running in my cluster.</p>
<p>I created a certificate and signed it successfully.</p>
<p>certificate configuration:</p>
<pre><code>cat > csr.conf <<EOF
[req]
req_extensions = v3_req
distinguished_name = req_distinguished_name
[req_distinguished_name]
[ v3_req ]
basicConstraints = CA:FALSE
ke... | <p>I haven't managed to create a <code>CertificateSigningRequest</code> as I wished, <strong>HOWEVER</strong> I bypassed the issue by create my own CA as following:</p>
<p>First, I edited my certificate configurations file so it will include a <code>commonName</code> and currect <code>extendedKeyUsage </code>:</p>
<pre... |
<p>I'm planning to use the distroless base image to run container applications.</p>
<p>Since I'm using envoy in the k8s sidecar, when I stop the application container, I use the sleep command in preStop before safely stopping the pod.</p>
<pre><code>lifecycle
preStop:
exec:
command:
- sleep
- "40
... | <p>The "distoless" images really only make sense when your image consists of <em>only</em> the application you're trying to run, and absolutely nothing else. This is often a good practice, but trying to bring in the additional <strong>sleep</strong>(1) command isn't quite compatible with it.</p>
<p>I can sug... |
<p>I have a question regarding support of AWS <code>gp3</code> on Kubernetes.</p>
<p>AWS announced <code>gp3</code> EBS volume type which shows better performance than existing <code>gp2</code>: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html" rel="nofollow noreferrer">https://docs.aw... | <p>The question refers to the EBS in-tree storage plugin, <code>kubernetes.io/aws-ebs</code>, not the CSI one, <code>ebs.csi.aws.com</code>, which already supports gp3 volumes.</p>
<p>According to <a href="https://github.com/aws/containers-roadmap/issues/1187" rel="noreferrer">this</a>, gp3 support will not be backport... |
<p>There is a AKS running that is connected to Log Analytics in Azure.
I'm trying to view logs of named PODs using the following query snippet:</p>
<pre><code>let KubePodLogs = (clustername:string, podnameprefix:string) {
let ContainerIdList = KubePodInventory
| where ClusterName =~ clustername
| where Name... | <p>A changed query seems to produce the results I would expect:</p>
<p>I exchanged the <code>join</code> with a <code>lookup</code> and used more columns to distinct the <code>KubePodInventory</code> results.</p>
<pre><code>let KubePodLogs = (clustername:string, podnameprefix:string) {
let ContainerIdList = KubePod... |
<p>I have kubernetes cluster on bare-metal, and I want to have logical separation of nodes where
DEV environment will be on less power machines while the production environment will be on most powerful machines. I implemented PodNodeSelector of Admission controller. It works well on newly created namespace but on exist... | <p>You cannot. This is how it works at the moment. Once a pod is scheduled on a node it stays on a node.</p>
<p>Same applies to affinity/antiaffinity.</p>
<p>But in <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity" rel="nofollow noreferrer">k8s docs</a> you can read:</p>
<... |
<p>It is a common issue still seems unresolved:</p>
<pre><code>ElasticsearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes];
Likely root cause: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes
</code></pre>
<p>I am trying to run it on a clu... | <p>Pasting here the answer I gave at <a href="https://github.com/elastic/helm-charts/issues/258" rel="nofollow noreferrer">https://github.com/elastic/helm-charts/issues/258</a></p>
<p>Basically, I've fixed this issue by grabbing the values.yaml from the helm chart and adding a securityContext. The configure-sysctl init... |
<p>I need help understanding how Kubernetes handles requests upon a pod restart.</p>
<p>If I have two pods running on a Kubernetes cluster and one dies or restarts midway, does the current request that the first pod is handling get transferred to the second pod or does the current request fail?</p>
| <p>Kubernetes sends traffic only when the pod is running perfectly, now if in the mean time of serving the request pod dies then that traffic will fail.</p>
|
<p>I'm learning Kubernetes and there is something I don't get well.
There are 3 ways of setting up static storage:</p>
<ul>
<li>Pods with volumes you attach diretctly the storage to</li>
<li>Pods with a PVC attached to its volume</li>
<li>StatefulSets with also PVC inside</li>
</ul>
<p>I can understand the power of PVC... | <p>Extracted from <a href="https://kubernetes.io/blog/2019/04/04/kubernetes-1.14-local-persistent-volumes-ga/#how-is-it-different-from-a-hostpath-volume" rel="nofollow noreferrer">this blog</a>:</p>
<blockquote>
<p>The biggest difference is that the Kubernetes scheduler understands
which node a Local Persistent Volume ... |
<p>I'm trying to run Ceph on (micro)K8s which running on my Ubuntu WSL distory.</p>
<p>OSD pods are not being created because there is no supported device is available (see logs below).</p>
<p>Ceph is configured to <a href="https://rook.io/docs/rook/v1.5/ceph-common-issues.html#osd-pods-are-not-created-on-my-devices" r... | <p>Took me a couple days to sort out but, to get this working you need to:</p>
<ul>
<li>Get the developer preview of Windows 10 so you have the --mount option for WSL</li>
<li>Create a VHDX on your Windows Host. You can do this through your Disk Manager and creating a dynamic VHDX under the actions menu.</li>
<li>Mount... |
<p>I am watching a Pluralsight video on the Istio service mesh. One part of the presentation says this:</p>
<blockquote>
<p>The VirtualService uses the Kubernetes service to find the IP addresses of all the pods. The VirtualService doesn't route any traffic through the [Kubernetes] service, but it just uses it to get... | <p>When creating a VitualService you define which service to find in <code>route.destination</code> section</p>
<p><code>port</code> : service running on port</p>
<p><code>host</code> : name of the service</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: test
spec:
hosts:... |
<p>How can I check for <code>exec</code> authorization using <code>kubectl auth can-i ...</code>?</p>
<p>While <code>get</code>, <code>create</code>, <code>delete</code>, etc. are considered verbs, <code>exec</code> is not, as shown below:</p>
<pre><code>$ kubectl --kubeconfig=config-prod.yml auth can-i exec po
Warning... | <p>Usually when someone is creating <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="noreferrer">RBAC</a> rules and wants to check which <code>verbs</code> are available for resource using:</p>
<pre><code>$ kubectl api-resources -o wide | grep pods
pods po ... |
<p>I have a deployment yaml file that looks like this:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-kubernetes
spec:
replicas: 1
selector:
matchLabels:
app: hello-kubernetes
template:
metadata:
labels:
app: hello-kubernetes
spec:
setHostnameAsFQ... | <p>You showed <code>kubectl</code> version. Your kubernetes version also need to be v1.20. Make sure you are using kubernetes version v1.20.</p>
<p>Use <code>kubectl version</code> for seeing both client and server version. Where client version refers to <code>kubectl</code> version and server version refers to <code>... |
<p>I'm getting a <code>directory index of "/src/" is forbidden</code> error when setting up Docker Nginx configuration within Kubernetes. Here is the error from the Kubernetes logs.</p>
<pre><code>/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoi... | <p>I solved my error by changing my Angular <code>build</code> <code>outputPath</code> to <code>"dist"</code> rather than the default <code>"dist/my-project"</code> that was configured with the Angular installation.</p>
<pre><code>"architect": {
"build": {
"... |
<p>How to deploy an Echo app with HTTPS in GKE?</p>
<p>Using <a href="https://echo.labstack.com/" rel="nofollow noreferrer">Echo</a> framework developed a web app. Set <code>https://<DOMAIN></code> feature with its <a href="https://echo.labstack.com/cookbook/auto-tls" rel="nofollow noreferrer">Auto TLS</a>.</p>
<... | <p>If you are just starting with GKE I recommend you to just create the service and deployment and use the UI to create the ingress and the managed certs</p>
<p>I created and deploy a sample application:</p>
<p>Code in main.go</p>
<pre><code>package main
import (
"log"
"net/http"
)
func ma... |
<p>I have self hosted a .NET framework 4.x version of WCF with net.tcp binding console app, which is running in Azure k8s contianer, as a selfhosted wcf service</p>
<p>exposed as <a href="http://net.tcp://CONTAINERIP:5000/WCFServiceName" rel="nofollow noreferrer">net.tcp://CONTAINERIP:5000/WCFServiceName</a></p>
<p>and... | <p>Guys thanks for the inputs,</p>
<p>Found the reason for the issue, since the app is deployed using the LoadBalancer type service, its not required to provide APP Name in the URL.</p>
<p>when the outside world access the service :</p>
<p><a href="http://net.tcp://LoadBalancerIP:5000/containerAppName/WCFServiceName" r... |
<p>I am trying to build an AWS EKS Cluster with AWS cdk in Java.</p>
<p>We have an existing VPC and subnets which need to get some Kubernetes tags like <strong>kubernetes.io/role/internal-elb=1</strong> etc.</p>
<p>I can get the ISubnets by getting the vpc with:</p>
<pre class="lang-java prettyprint-override"><code>... | <p>You can do it automatically using lambda-supported custom resources.</p>
|
<p>I have configured nginx-ingress-controller in kubernetes and I am trying to achieve method based routing from kubernetes.</p>
<p>This is my ingress.yaml file below:</p>
<pre><code>kind: Ingress
metadata:
name: cafe-ingress-with-annotations
annotations:
kubernetes.io/ingress.class: "nginx"
#ngin... | <p>As you can read in <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet" rel="nofollow noreferrer">here</a>, the <code>configuration-snippet</code> annotation is used for adding an additional configuration to the NGINX location.</p>
<p>If you want to a... |
<p>I have a Java <a href="https://github.com/kahootali/SpringJavaMonitoringApp" rel="nofollow noreferrer">Spring Boot Application</a> and I have configured the server to run on SSL and it is mandatory.</p>
<pre><code>server:
port: 8443
ssl:
enabled: true
key-store-type: pkcs12
key-store: ${KEYSTORE}
... | <p><em>I'm posting my comment as an answer for better visibility:</em></p>
<p>As per <a href="https://kubernetes.github.io/ingress-nginx/user-guide/tls/#ssl-passthrough" rel="nofollow noreferrer">the docs</a> <strong>SSL Passthrough</strong> feature is disabled by default. In order to enable it you need to start you... |
<p>How to set basic auth to Kubernetes' readinessProbe correctly?</p>
<p>If set this config for Kubernetes' <code>readinessProbe</code> in deployment kind.</p>
<pre><code>readinessProbe:
httpGet:
path: /healthcheck
port: 8080
httpHeaders:
- name: Authorization
value: Basic <real base64 encode... | <p>According to kubernetes doc:</p>
<blockquote>
<p>If the process in your container is able to crash on its own whenever it encounters an issue or becomes unhealthy, you do not necessarily need a liveness probe; the kubelet will automatically perform the correct action in accordance with the Pod's restartPolicy. If yo... |
<p>Scenario: A K8S pod has more than one container and liveness/readiness probes are configured for each of the containers. Now if the liveness probe is succeeding on some containers and failing on few containers, what will k8s do.</p>
<ol>
<li>will it restart only the failing containers<br />
OR</li>
<li>will it resta... | <blockquote>
<p>if the liveness probe is succeeding on some containers and failing on few containers, what will k8s do?</p>
</blockquote>
<p><strong>It will restart only the failing containers.</strong></p>
<p>In <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes" rel="noreferre... |
<p>as a preparation I'll tell what I know</p>
<p>When I run <code>kubectl logs --previous <pod_name></code> I'll get last 20lines of logs before restart and timestamp when than happened, but I wanted to have that timestamp displayed when I run <code>kubectl get pods</code> as an additional column.</p>
<p>The kube... | <p>You can use <code>kubectl get pod -o yaml</code> to view your POD resource in the YAML format (or <code>-o json</code> if you prefer).</p>
<p>In this format, you can see the <code>metadata</code> keys and values. e.g.:</p>
<pre><code>$ kubectl get po -o yaml my-nginx-5b56ccd65f-4vmms | head -n 5
apiVersion: v1
kind:... |
<p>I have one node pool named "<strong>application pool</strong>" which contains node vm size of <strong>Standard_D2a_v4</strong>. This node pool is set to "<strong>Autoscaling</strong>".
Is there in solution, where I taint the whole node pool in azure? to restrict the pods to schedule on that node ... | <p>Taints can be setup with the <code>[--node-taints]</code> flag only when you are adding a node pool with <a href="https://learn.microsoft.com/en-us/cli/azure/ext/aks-preview/aks/nodepool?view=azure-cli-latest#ext_aks_preview_az_aks_nodepool_add" rel="nofollow noreferrer">az aks nodepool add</a> command:</p>
<blockqu... |
<p>when i run this code
public class test2 {</p>
<pre><code>public static void main(String[] args) {
// TODO Auto-generated method stub
String podName = "xrdpprocan";
String namespace = "default";
String master = "https://my_ip_adress";
Config config = new ConfigBuilder().withMasterUrl(... | <p><strong>Where is the problem:</strong> The current type of your client configuration is incomplete, you are missing the client authentication settings/data part.</p>
<p>Please be aware, when you are running your code from outside the cluster
(this type of client configuration is called <strong>out-of-cluster client ... |
<p>I’m trying to setup ingress using ambassador for my local cluster and working off this guide here <a href="https://kind.sigs.k8s.io/docs/user/ingress" rel="nofollow noreferrer">https://kind.sigs.k8s.io/docs/user/ingress</a></p>
<p>but I receive an rpc and timeout error. Some things i’ve attempted in trying to fix in... | <p>I figured this out. I'd previously disabled docker bridge0 using this entry under
/etc/docker/daemon.json</p>
<pre><code>{
"iptables": false,
"bridge": "none"
}
</code></pre>
<p>To fixed i simply deleted and restarted docker:
systemctl restart docker</p>
|
<p><a href="https://github.com/kubernetes-sigs/kustomize/blob/master/examples/helloWorld/README.md" rel="nofollow noreferrer">kustomize</a>'s docs provides a nice one-liner that compares two different overlays...</p>
<pre><code>diff \
<(kustomize build $OVERLAYS/staging) \
<(kustomize build $OVERLAYS/product... | <pre><code>kustomize build ./ | kubectl diff -f -
</code></pre>
<p>In Kustomize version 4.x.x</p>
|
<p>I'm trying to create AWS ALB-Ingress through EKS following the steps in the document <a href="https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html</a></p>
<p>I was successful till the step 7 in creating the cont... | <p>From the <a href="https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.1.3/docs/install/v2_1_3_full.yaml" rel="nofollow noreferrer">current LB conntroller manifest</a> I found out that LB controller Pod specification doesn't have <code>Readiness probe</code>, only <code>Liveness probe</c... |
<p>I had run the following command <code>poetry install</code> when following instruction on <a href="https://docs.wire.com/how-to/install/kubernetes.html#ansible-kubernetes" rel="nofollow noreferrer">this page</a>.</p>
<p>I had received an <code>RuntimeError</code>, does any one know how to solve it?</p>
<pre><code>Ru... | <p>It looks as if those instructions are out-of-date; looking at the repository history, the use of poetry was removed in January in commit <a href="https://github.com/wireapp/wire-server-deploy/commit/567dcce8f66769ff5fec802e34015a0053c5cef7" rel="nofollow noreferrer">567dcce</a>. The commit message reads (partially):... |
<p>I’’m wondering “How to append Nginx IP to X-Forwarded-For”</p>
<p>I added snippet in Ingress annotation.</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ing
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header X-Forwarded-For "$remote_a... | <p>The accepted answer <strong>is not working</strong> for me. You just need to add the below <strong>annotation</strong> to the <strong>ingress</strong> object;</p>
<pre><code>nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "X-Forwarded-For $http_x_forwarded_for";
</code></pre>
<p... |
<p>I am using a command for pod creation plus node selection</p>
<pre><code>kubectl run newpod --image image1 --command run over --overrides='{ "apiVersion": "v1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "on... | <p>You can't do it with <code>nodeSelector</code>, because you would need to pass two key-values, with the same key. Something like this:</p>
<pre><code>kubectl run newpod --image image1 --overrides='{ "apiVersion": "v1", "spec": { "nodeSelector": { "kubernetes.io/hostname&q... |
<p>I've installed the minikube instance on my local computer (--driver=docker). The minikube ip is 192.168.49.2. When I start minikube (minikube start --memory 7168) I get no errors on console. But trying to ping the minikube ip fails. What I do wrong?</p>
<pre><code>$ kubectl get nodes -o wide
NAME STATUS ROLE... | <p>Recall that minikube is local Kubernetes - it runs a single-node Kubernetes cluster on your personal computer so that you can try out Kubernetes. Now, it doesn't run the Kubernetes cluster in your local box, it runs it inside a VM.</p>
<p>That is why you can't simply access Node IP from your local. Another way to se... |
<p>Suppose I have created a Pod having 1 container, now I want to add a second container to it, how can I do that?</p>
| <p>In general, the answer is "no". Once you have created a Pod, you cannot add a new Container to it. <a href="https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/" rel="nofollow noreferrer">Read the official note</a>:</p>
<blockquote>
<p>Since Pods are intended to be disposable and replac... |
<p>I have a minikube cluster running locally and a pod, cluster ip <code>172.17.0.8</code>.</p>
<p>I am using <a href="https://github.com/eldadru/ksniff" rel="nofollow noreferrer">ksniff</a> to sniff traffic on that pod.</p>
<p>In the pod when I <code>ping www.google.com</code>. I can see, in the wireshark capture, ICM... | <p>I haven't used minikube nor a macbook so your mileage may vary, but let's try figuring this out.</p>
<p>From what I've seen, pods are typically provided with a default gateway by the host. In other words, the host serves as a <em>router</em> for the pods it hosts. How do we know that? When running an Ubuntu image on... |
<p>I am very new to docker Kubernetes. I have made my cluster of 3 nodes now I am creating a YAML file for pod creation. I have taken the image from <a href="https://github.com/utkudarilmaz/docker-hping3" rel="nofollow noreferrer">https://github.com/utkudarilmaz/docker-hping3</a> the image name is utkudarilmaz/hping3. ... | <p>First of all, you don't need to specify <code>containerPort</code> here as there is nothing listening on any tcp port in your <code>hping3</code> container:</p>
<pre><code>$ kubectl exec -ti second -- /bin/sh
/ # netstat -ntlp
Active Inte... |
<p>I need to complete one of the kubeadm installation steps which include the following commands on a centos machine</p>
<pre><code>yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
</code></pre>
<p>I need to perform this via an Ansible automation script and I have not been able to figure out which wa... | <p>I solved it like this:</p>
<pre><code>- name: Setup for the Kubernetes's Environment
hosts: kube-master
gather_facts: yes
tasks:
- name: Add Kubernetes yum repository
become: yes
when: ansible_os_family == "RedHat"
yum_repository:
name: Kubernetes
description: Ku... |
<p>Variable substitution in Gitlab only seem to work inside the <code>gitlab-ci.yml</code> file.</p>
<p>However I have a configuration file (k8s secret) where I would like to set different values depending if I'm in a staging or a production environment.</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: tls-... | <p>You could use an editor like <code>sed</code></p>
<p>For example, if you had the file like:</p>
<pre class="lang-yaml prettyprint-override"><code>data:
tls.crt: |
#TLS_CRT#
tls.key: |
#TLS_KEY#
</code></pre>
<p>You could use <code>sed</code> like this as part of your GitLab job to replace its contents:<... |
<p>Could someone explain what is openshift <strong>imagestream</strong> and how it differs from the regular docker image.</p>
<p>I have gone through this (<a href="https://docs.openshift.com/container-platform/4.1/openshift_images/images-understand.html" rel="nofollow noreferrer">Understanding containers, images, and i... | <p>Like a lot of (all?) kinds in Kubernetes, an <code>ImageStream</code> is an abstraction. If you can imagine a <code>Pod</code> being an abstraction of the idea of a running container(s), you could imagine an <code>ImageStream</code> being an abstraction of the idea of a repository in an image registry (such as quay.... |
<p>I'm trying to create a cluster via eksctl, using defaults options, and AMI user with "AdministratorAccess", I get stuck at "waiting for CloudFormation stack"</p>
<pre><code> > eksctl create cluster --name dev
[ℹ] eksctl version 0.36.0
[ℹ] using region us-west-2
[ℹ] setting availability zone... | <p>It takes almost 20 minutes to create the stacks in Cloudformation. When you create the cluster, check the progress of the stack in Cloudformation console: <a href="https://console.aws.amazon.com/cloudformation/home" rel="noreferrer">https://console.aws.amazon.com/cloudformation/home</a>.</p>
|
<p>In kubernetes, if I desired to have pods for a specific task not always required is it possible to have the system spin pods up for a given task when needed? Can this be managed through the backend code (in my instance python)? Do services need to be defined in a certain way in advance?</p>
<p>I found an api for doc... | <p>If i have understood correctly you want to run the PODs when required not all the time.</p>
<p>in that case you can use the python client library of Kubernetes and manage the PODs or replicas of deployment.</p>
<p>you can deploy your service with replica count zero and once required you can scale up the pods using t... |
<p>I installed first ectd, kubeapiserver and kubelet using systemd service. The services are running fine and listening to all required ports.</p>
<p>When I run kubectl cluster-info , I get below output</p>
<pre><code>Kubernetes master is running at http://localhost:8080
</code></pre>
<p>When I run kubectl get compo... | <p>For the message:</p>
<pre><code>:~# k get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial t... |
<p>In kubernetes, if I desired to have pods for a specific task not always required is it possible to have the system spin pods up for a given task when needed? Can this be managed through the backend code (in my instance python)? Do services need to be defined in a certain way in advance?</p>
<p>I found an api for doc... | <p>I don't know exactly what you want to achieve because you are not giving enough information. Here are some tools you migh want to check:</p>
<p><a href="http://keda.sh" rel="nofollow noreferrer">keda</a> - event driven autoscaler, can scale down to zero</p>
<p><a href="https://kubernetes.io/docs/concepts/workloads/c... |
<p>Here is my persistent volume definition</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
</code></pre>
<p>Here i... | <p>While defining <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">Persistent Volume</a> you are using <code>type: local</code> . This means that you want to create directory in <code>/mnt</code>. Local do not support <a href="https://kubernetes.io/docs/concepts/... |
<p>Actually I'm using the <strong>jib-maven-plugin</strong> to create Docker container for my application. Then I'm going to deploy it to Google servers where we have a <strong>Kubernetes</strong> environment.</p>
<p>Actually we are playing with the java env. variables from the <strong>jib-maven-plugin</strong>'s confi... | <p>The problem is that you're setting <code>JAVA_OPTS</code> and not <code>JDK_JAVA_OPTIONS</code>.
<code>JAVA_OPTS</code> is used by some application servers like Tomcat, but <a href="https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE" rel="nofollow noreferrer">the JDK ... |
<p>That's what I do:</p>
<ol>
<li>Deploy a stateful set. The pod will always exit with an error to provoke a failing pod in status <code>CrashLoopBackOff</code>: <code>kubectl apply -f error.yaml</code></li>
<li>Change error.yaml (<code>echo a</code> => <code>echo b</code>) and redeploy stateful set: <code>kubectl a... | <p>You could set <code>spec.podManagementPolicy: "Parallel"</code></p>
<blockquote>
<p><a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#parallel-pod-management" rel="nofollow noreferrer">Parallel pod management</a> tells the StatefulSet controller to launch or terminate all Pods... |
<p>I've been creating new microservices every roughly 2 months for past year, every time the same process.</p>
<p>Reserving private IP</p>
<pre class="lang-sh prettyprint-override"><code>gcloud compute addresses create my-internal-lb \
--region europe-west3 \
... | <p>What do you see for kubectl describe svc <app_name_lb>? There should be an error.</p>
<p>Please note that if you are using the version 1.17+, it is now <code>networking.gke.io/load-balancer-type: "Internal"</code> instead of <code>cloud.google.com/load-balancer-type: "Internal"</code></p>
<... |
<p>I am trying to understand the Access Modes of Kubernetes <code>PersistentVolumes</code>.</p>
<p>As per the Kubernetes docs, the access modes are:</p>
<pre><code>ReadWriteOnce -- the volume can be mounted as read-write by a single node
ReadOnlyMany -- the volume can be mounted read-only by many nodes
ReadWriteMany --... | <ol>
<li><p>please note that you should not run pods on control plane, so you should replace <code>nodeName: controlplane</code> with <code>nodeName: worker2</code> in you yaml file. Usually you need to use <code>toleration</code> to run pod on control plane, because it has a taint preventing to run regular pod on it..... |
<p>I have read about k8s resource management but things are still not very clear to me. Lets say we have 2 k8s nodes each with 22 mb memory.
Lets say Pod A has request 10mb and limit 15mb(but lets say actual usage is 5mb). so this pod is scheduled on node 1. So node1 has 22 mb memory, 5 is used by Pod A but another 17... | <p>Answering question from the post:</p>
<blockquote>
<p>Lets say Pod A has request 10mb and limit 15mb(but lets say actual usage is 5mb). so this pod is scheduled on node 1. So node1 has 22 mb memory, 5 is used by Pod A but another 17mb is available if more memory is needed by Pod A. Pod B has request 10 and limit 15(... |
<p>I'm new to kubernetes and nginx, and am having trouble understanding how to implement Ingress (nginx-ingress) for my particular use case.</p>
<p>I want to expose the pgadmin PostgreSQL admin tool from my cluster.</p>
<p>I have other applications exposed via nginx-ingress from my cluster and I like each to hang off i... | <p>It's worth mentioning that exposing many different services using the same domain name may not be the best idea in terms of security. Many web security mechanisms rely on the domain name to determine what's trusted and what isn't. So if one of your containers is breached, other services sharing the same domain name ... |
<p>I installed Minikube v1.3.1 on my RedHat EC2 instance for some tests. </p>
<p><strong><em>Since the ports that the nginx-ingress-controller uses by default are already in use, I am trying to change them in the deployment but without result. Could please somebody advise how to do it?</em></strong></p>
<p><strong>Ho... | <p>Please note that <strong>minikube</strong> ships with <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/addon-manager" rel="nofollow noreferrer"><strong>addon-manager</strong></a>, which role is to keep an eye on specific addon template files (default location: <code>/etc/kubernetes/addons... |
<p>I have application that have some user settings and it runs on kubernetes cluster.
I would like the user settings to survive application crash/pod restart.</p>
<p>I was thinking first about having a DB instance for keeping it outside of kubernetes. Then I thought, maybe I could just abuse etcd to store small amount ... | <p>If you want to use etcd, a Kubernetes built-in database, it's not really suited for this purpose and shouldn't be used in practice. App shouldn't know about Kubernetes. You need to use DB or PVC to store app related objects in a disk (for example json, yaml or other files).</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.