prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I'm refactoring a helm chart, and wanted to put some values from <code>deployment.yaml</code> to <code>values.yaml</code> and that value is</p>
<pre><code>hosts:
- {{ include "myApp.externalHostName" . | quote }}
</code></pre>
<p>but it gives me the error</p>
<pre><code>[ERROR] values.yaml: unable to par... | <p>The <code>values.yaml</code> files are not subject to golang interpolation. If you need dynamic content, you'll need to update files inside the <code>templates</code> directory (which are subject to golang interpolation), or generate the <code>values.yaml</code> content using another mechanism</p>
<p>In this specifi... |
<p>According to <a href="https://developers.redhat.com/blog/2020/05/20/getting-started-with-the-fabric8-kubernetes-java-client" rel="nofollow noreferrer">this</a>, I can specify system property <em>KUBECONFIG</em> to tell defaultKubernetesClient to use the specified kubeconfig file instead of the default <code>~/.kube/... | <p>It looks like there is a typo in the blogpost, If I look at Fabric8 code <a href="https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java#L113" rel="nofollow noreferrer">Config.java</a>, property name is <code>kubeconfig</code> not <code>KUB... |
<p>I have this command in a bash script</p>
<pre><code>kubectl get svc --selector='app.kubernetes.io/component=sentinel' --all-namespaces -o json |
jq -r '
.items
| map(
{label:.metadata.name,
sentinels: [{host:(.metadata.name + "." + .metadata.namespace + "." + "svc" + ".&qu... | <p>Assuming for the moment that you want to invoke jq on the sample JSON (local.json) as shown, you could run:</p>
<pre><code>password=mypassword
< local.json jq --arg password "$password" '
.connections[] |= if any(.sentinels[].host; index("Redis2.development.svc.cluster.local"))
... |
<p>I have a Kubernetes cluster and I need to collect the various pod and node event timestamps.</p>
<p>I do that by building a go service that communicates with my Kubernetes cluster via client-go library. The timestamp I get for the subscribed pod and node object shows time only till seconds precision.</p>
<p>Is there... | <p>Welcome to the community @shresthi-garg</p>
<p>First of all, as you correctly found, it's not possible to get precise timestamps from kubernetes components themselves with milliseconds precision. And <a href="https://github.com/kubernetes/kubernetes/issues/81026#issuecomment-832301082" rel="nofollow noreferrer">this... |
<p>Here is the output I am getting:</p>
<pre><code> [root@ip-10-0-3-103 ec2-user]# kubectl get pod --namespace=migration
NAME READY STATUS RESTARTS AGE
clear-nginx-deployment-cc77649fb-j8mzj 0/1 Pending 0 118m
clear-nginx-deployment-te... | <p>This is due to the fact that your Pods have been instructed to claim storage, however, in your case there is storage available.
Check your Pods with <code>kubectl get pods <pod-name> -o yaml</code> and look at the exact yaml that has been applied to the cluster. In there you should be able to see that the Pod ... |
<p>Argo CD shows two items from linkerd (installed by Helm) are being out of sync. The warnings are caused by the optional <code>preserveUnknownFields: false</code> in the <code>spec</code> section:</p>
<p>trafficsplits.split.smi-spec.io
<a href="https://i.stack.imgur.com/nkS1p.png" rel="nofollow noreferrer"><img src="... | <p>As per <a href="https://argoproj.github.io/argo-cd/user-guide/diffing/#application-level-configuration" rel="noreferrer">documentation</a>, I think you have to use <code>apiextensions.k8s.io</code> not <code>apiextensions.k8s.io/v1</code>.</p>
|
<p>I am a newbie to Kubernetes and trying to set up a cluster that runs Cassandra in my local machine. I have used kind to create a cluster that was successful. After that when I try to run <em><code>kubectl cluster-info</code></em>, I am getting the below error:</p>
<p><em><code>Unable to connect to the server: dial t... | <p>Try using this command</p>
<pre><code>minikube start --driver=docker
</code></pre>
|
<p>Currently in my <code>kubernetes-nodes</code> job in Prometheus, The endpoint <code>/api/v1/nodes/gk3-<cluster name>-default-pool-<something arbitrary>/proxy/metrics</code> is being scraped</p>
<p>But the thing is I'm getting a 403 error which says <code>GKEAutopilot authz: cluster scoped resource "... | <p>While the Autopilot docs don't mention the node proxy API specifically, this is in the limitations section:</p>
<blockquote>
<p>Most external monitoring tools require access that is restricted.
Solutions from several Google Cloud partners are available for
use on Autopilot, however not all are supported, and custom
... |
<p>I'm having issues when accessing a service present in another namespace.</p>
<p>I have 2 namespaces (in the same cluster) airflow-dev and dask-dev.</p>
<p><img src="https://i.stack.imgur.com/UrA7u.jpg" alt="enter image description here" /></p>
<p>In dask-dev namespace, I have dask cluster(dask scheduler and workers)... | <p>You can use a local service to reference an external service (a service in a different namespace) using the service <a href="https://kubernetes.io/docs/concepts/services-networking/service/#externalname" rel="nofollow noreferrer">externalName Type</a>.</p>
<p><code>ExternalName</code> services do not have selectors,... |
<p>I deployed a EKS cluster and I'd like to add more IAM users to the role. I read this doc <a href="https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html</a> and it mentioned how to map IAM users or roles to k8... | <p>You can't. You can only map roles and users. Directly from the <a href="https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html" rel="nofollow noreferrer">documentation</a> you linked:</p>
<blockquote>
<ol start="3">
<li>Add your IAM users, roles, or AWS accounts to the configMap. You cannot add IAM gr... |
<p>I'm writing a controller that watches kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">service</a> objects, and creates <a href="https://linkerd.io/2/features/traffic-split/" rel="nofollow noreferrer">trafficsplits</a> if they contain a certain label.</p... | <p>This is definitely possible! You want to use go's struct extension features :)</p>
<p>Bsasically, we create a struct that extends both <code>kubernetes.Clientset</code> and <code>splitClientV1alpha1.SplitV1alpha1Client</code> and initialize it using code very similar to yours above. We can then use methods from eith... |
<p>I'm currently creating a Minikube cluster for the developers, they will each have their own Minikube cluster in their local machine for testing, assuming the developers don't know anything about Kubernetes, is creating a bash script to handle all the installations and the setup of the pod the recommended way? Is it ... | <p>Depending on what your requirements are, choosing <a href="https://github.com/kubernetes/minikube" rel="nofollow noreferrer">Minikube</a> may or may not be the best way to go.
Just to give you some other options you might want to take a look at the following tools when it comes to local enviornments for developers (... |
<p>I deployed a helm chart using <code>helm install</code> and after this I want to see if the pods/services/cms related to just this deployment have come up or failed. Is there a way to see this?</p>
<p>Using <code>kubectl get pods</code> and greping for the name works but it does not show the services and other resou... | <pre><code>helm get manifest RELEASE_NAME
helm get all RELEASE_NAME
</code></pre>
<p><a href="https://helm.sh/docs/helm/helm_get_manifest/" rel="noreferrer">https://helm.sh/docs/helm/helm_get_manifest/</a></p>
|
<p>I found specifying like <code>kubectl --context dev --namespace default {other commands}</code> before kubectl client in many examples. Can I get a clear difference between them in a k8's environment?</p>
| <p>The kubernetes concept (and term) <strong>context</strong> only applies in the kubernetes client-side, i.e. the place where you run the kubectl command, e.g. your command prompt.
The kubernetes server-side doesn't recognise this term 'context'.</p>
<p>As an example, in the command prompt, i.e. as the client:</p>
<ul... |
<p>So I've a cron job like this:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: my-cron-job
spec:
schedule: "0 0 31 2 *"
failedJobsHistoryLimit: 3
successfulJobsHistoryLimit: 1
concurrencyPolicy: "Forbid"
startingDeadlineSeconds: 30
jobTemplate:
spec:
... | <blockquote>
<p>Note that concurrency policy only applies to the jobs created by the same cron job.</p>
</blockquote>
<p>The <code>concurrencyPolicy</code> field only applies to jobs created by the same cron job, as stated in the documentation: <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-job... |
<p>I have a cluster in GKE and it is working, everything seems to be working. If I forward the ports I am able to see that the containers are working.</p>
<p>I am not able to setup a domain I own from namecheap.</p>
<p>These are the steps I followed</p>
<ol>
<li>In Namecheap I setup a custom dns for the domain</li>
</o... | <p>GKE should have created a cloud load balancer for your ingress service. Depending on your config, the LB can be internal or external. You can get your LB information by looking at the services:</p>
<pre><code>kubectl get svc -n ingress-nginx
</code></pre>
<p>Create a CNAME record in your DNS (namecheap) with the LB ... |
<p><code>kubectl get pods --all-namespaces</code> provides the list of all pods. The column <code>RESTARTS</code> shows the number of restarts that a pod has had. How to get the list of all the pods that have had at least one restart? Thanks</p>
| <pre><code>kubectl get pods --all-namespaces | awk '$5>0'
</code></pre>
<p>or simply just</p>
<pre><code>kubectl get po -A | awk '$5>0'
</code></pre>
<p>Use awk to print if column 5 (RESTARTS) > 0</p>
<p>or with the use of an alias</p>
<pre><code>alias k='kubectl'
k get po -A | awk '$5>0'
</code></pre>
|
<p>I am very new to Traefik and Kubernetes. I installed Traefik through helm (repo: <a href="https://traefik.github.io/traefik-helm-chart/" rel="noreferrer">https://traefik.github.io/traefik-helm-chart/</a>, helm version 3.5.2, chart traefik-9.19.1). Then I wanted to get prometheus metrics from it.</p>
<p>Here is an ex... | <p>Try this:</p>
<pre><code>ports:
metrics:
expose: true
port: 3333
exposedPort: 3333
protocol: TCP
env:
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
additionalArguments:
- "--metrics.prometheus=true"
- "--metrics.prometheus.buckets=0.10... |
<p>I exported docker images in .tar format.<br />
Then importing those images using K3S and ctr showed no results :</p>
<pre><code>$ sudo k3s ctr i import myimage.tar
$
</code></pre>
<p>No output from <code>import</code> cmd ?</p>
<pre><code>$ sudo k3s ctr i ls
$
</code></pre>
<p>Nothing there....</p>
| <p>Adding <code>--digest=true</code> worked for me :</p>
<pre><code>$ sudo k3s ctr i import myimage.tar --digests=true
unpacking import-2021-05-19@sha256:f9952729292daa8d099c7bc3275f483fdb11ffa9bb1fc394bc06b44c101047e2 (sha256:f9952729292daa8d099c7bc3275f483fdb11ffa9bb1fc394bc06b44c101047e2)...done
</code></pre>
<p>And... |
<p>I'm migrating Confluence from a VM to an instance of Confluence Server 7.11.1 using the official Atlassian docker image in Kubernetes. I successfully got the application to come up, and was able to get through the set-up screens to start an empty Confluence.</p>
<p>To customize my instance I want to copy over my old... | <p>Apparently, the confluence java process is the "ENTRYPOINT" for the docker container, so when you kill the java process, it kills the container as well.</p>
<p>I would suggest that you create a persistent volume with readWriteMany attribute set and mount it to a temporary pod - say with ubuntu image.</p>
<... |
<p>Kubernetes provides us two deployment strategies. One is <strong><a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment" rel="nofollow noreferrer">Rolling Update</a></strong> and another one is <strong><a href="https://kubernetes.io/docs/concepts/workloads/controller... | <p>There are basically two reasons why one would want/need to use <code>Recreate</code>:</p>
<ul>
<li>Resource issues. Some clusters simply do not have enough resources to be able to schedule additional Pods, which then results in them being stuck and the update procedure with it. This happens especially for local deve... |
<p>I want to mount an Azure Shared Disk to the multiple deployments/nodes based on this:
<a href="https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared</a></p>
<p>So, I created a shared disk in Azure Portal ... | <p><strong><a href="https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-shared-disks-and-new-azure-disk-storage-enhancements/" rel="noreferrer">Yes, you can</a></strong>, and the capability is GA.</p>
<p>An Azure Shared Disk can be mounted as ReadWriteMany, which means you can mount it t... |
<p>I've configured Let's Encrypt using cert-manager in my cluster and it works just fine for most of my use cases. However I have an application which is installed multiple times on the same hostname but with a different path.</p>
<p>My ingress is defined as below</p>
<pre><code>{{- if .Values.ingress.enabled -}}
{{- $... | <p>Error meaning</p>
<pre><code>urn:ietf:params:acme:error:rateLimited: Error creating new order :: too many certificates already issued for exact set of domains: whoami-go.c.dhis2.org:
</code></pre>
<p>we can only request a certain amount of SSL/TLS certificate from the let's encrypt in week.</p>
<p>Read more at : <a ... |
<p>I'm working with Kubeflow pipelines. I would like to access the "Run name" from inside the a task component. For example in the below image the run name is "My first XGBoost run" - as seen in the title.</p>
<p><a href="https://i.stack.imgur.com/RELO4.png" rel="nofollow noreferrer"><img src="https... | <p>You can use <code>{{workflow.annotations.pipelines.kubeflow.org/run_name}}</code> argo variable to get the run_name</p>
<p>For example,</p>
<pre class="lang-py prettyprint-override"><code>@func_to_container_op
def dummy(run_id, run_name) -> str:
return run_id, run_name
@dsl.pipeline(
name='test_pipeline'... |
<p>I'm migrating my cluster to GKE using autpilot mode, and I'm trying to apply fluentbit for logging (to be sent to Elasticsearch and then Kibana to be alerted on a slack channel).</p>
<p>But it seems that GKE Autopilot doesn't want me to do anything on the <code>hostPath</code> other than reading into files inside <c... | <p>Citing the official documentation:</p>
<blockquote>
<h3>External monitoring tools</h3>
<p>Most external monitoring tools require access that is restricted. Solutions from several Google Cloud partners are available for use on Autopilot, however not all are supported, and <strong>custom monitoring tools cannot be ins... |
<p>Hope someone can help me.
To describe the situation in short, I have a self managed k8s cluster, running on 3 machines (1 master, 2 worker nodes). In order to make it HA, I attempted to add a second master to the cluster.
After some failed attempts, I found out that I needed to add <code>controlPlaneEndpoint</code> ... | <p>This is an old, known problem with Kubernetes <code>1.15</code> <sup>[<a href="https://github.com/kubernetes/kubeadm/issues/1712" rel="nofollow noreferrer">1</a>,<a href="https://github.com/kubernetes/website/issues/15637" rel="nofollow noreferrer">2</a>]</sup>.<br />
It is caused by short etcd timeout period. As fa... |
<p>We are migrating our Spark workloads from Cloudera to Kubernetes.</p>
<p>For demo purposes, we wish to run one of our spark jobs within a minikube cluster using spark-submit in cluster mode.</p>
<p>I would like to pass a typesafe config file to my executors using the spark.file conf (I tried --files as well). The co... | <p>I've figured it out. <code>spark-submit</code> sends a request to kubernetes master's api-server to create a driver pod. A configmap volume is mounted to the driver's pod at <code>mountPath: /opt/spark/conf</code>, which overrides my config files located at that path in the docker container.
Workaround : editing /op... |
<p>Kubernetes provides us two deployment strategies. One is <strong><a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment" rel="nofollow noreferrer">Rolling Update</a></strong> and another one is <strong><a href="https://kubernetes.io/docs/concepts/workloads/controller... | <p>+1 to <a href="https://stackoverflow.com/a/67606389/11714114">F1ko's answer</a>, however let me also add a few more details and some real world examples to what was already said.</p>
<p>In a perfect world, where every application could be easily updated with <strong>no downtime</strong> we would be fully satisfied h... |
<p>I have something in a secret template like this:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
# not relevant
type: Opaque
data:
password: {{ randAlphaNum 32 | b64enc | quote }}
</code></pre>
<p>Now, when doing <code>helm upgrade</code>, the secret is recreated, but the pods using this aren't (they also s... | <p>You can use the <strong>look up</strong> <strong>function</strong> in HELM to check the if secret exist or not</p>
<p><a href="https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-lookup-function" rel="noreferrer">https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-lo... |
<p>We are running a Kubernetes cluster for building Jenkins jobs. For the pods we are using the <strong>odavid/jenkins-jnlp-slave</strong> JNLP docker image. I mounted the /var/run/docker.sock to the pod container and added jenkins(uid=1000) user to the docker group on the host systems.</p>
<p>When running a shell scri... | <p>/var/run/docker.sock is just the host socket that allows docker client to run docker commands from the container.</p>
<p><strong>What you are missing is the docker client in your container.</strong></p>
<p>Download the docker client manually and place it on a persistent volume and ensure that he docker client is i... |
<p>I have a configmap <code>my-config</code> in a namespace and need to make a copy (part of some temporary experimentation) but with another name so I end up with :</p>
<pre><code>my-config
my-config-copy
</code></pre>
<p>I can do this with:</p>
<pre><code>kubectl get cm my-config -o yaml > my-config-copy.yaml
</co... | <p>You can achieve this by combining kubectl's <code>patch</code> and <code>apply</code> functions.</p>
<pre><code> kubectl patch cm source-cm -p '{"metadata":{ "name":"target-cm"}}' --dry-run=client -o yaml | kubectl apply -f -
</code></pre>
<p><code>source-cm</code> and <code>target-cm</... |
<p>We have a docker image that is processing some files on a samba share.</p>
<p>For this we created a cifs share which is mounted to /mnt/dfs and files can be accessed in the container with:</p>
<pre><code>docker run -v /mnt/dfs/project1:/workspace image
</code></pre>
<p>Now what I was aked to do is get the container ... | <p>No, that field has no effect on the FlexVol plugin you linked. It doesn't even bother parsing out the size you pass in :)</p>
|
<p>I'm working on migrating our services from eks1.14 to eks1.18 cluster. I see lots of errors on some of our deployments .</p>
<p>Can someone pls let me know , How can I solve this error?</p>
<pre><code>May 19th 2021, 10:56:30.297 io.fabric8.kubernetes.client.KubernetesClientException: too old resource version: 138993... | <p>This is a standard behaviour of Kubernetes. When you ask to see changes for a <code>resourceVersion</code> that is too old - i.e. when it can no longer tell you what has changed since that version, since too many things have changed. So, you should avoid upgrading several versions at once. Try to update your cluster... |
<p>I have a spring boot application, and I created a ConfigMap of my application.proporties. I have some passwords and other sensible date in this file and I would to override some infos there. How can I do for example to override the elasticsearch.url? I would like to override via command line, in the same way to over... | <p>If this configMap is part of your chart your can just put your secret stuff inside {{ .Values.secretStuff }} and then override it with your helm install command.</p>
<p>Example configMap:</p>
<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
name: application
data:
application.properties: |-
server.port = ... |
<p>How do you change ip address of the master or any worker node</p>
<p>I have experimented with:</p>
<pre><code>kubeadm init --control-plane-endpoint=cluster-endpoint --apiserver-advertise-address=<x.x.x.x>
</code></pre>
<p>And then I guess I need the new config with the right certificate:</p>
<pre><code>sudo cp... | <p>The <code> apiserver-advertise-address</code> flag is located in the api-server manifest file and all Kubernetes components manifests are located here <code>/etc/kubernetes/manifest/</code>.Those are realtime updated files so change and save and it will be redeployed instantally :</p>
<pre><code>etcd.yaml
kube-apise... |
<p>I am trying to get kubernetes api server from a pod.</p>
<p>Here is my pod configuration</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: test
spec:
schedule: "*/5 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: test
... | <p>When operating in-cluster you want <code>load_incluster_config()</code> instead.</p>
|
<p>I'm new to kubernetes,</p>
<p>Currently i'm triyng to deploy laravel app on kuberetes. I have setup 1 deployment yaml containing 2 containers (nginx and php-fpm) and a shared volume.</p>
<p>Here's the full yaml:</p>
<pre><code>
apiVersion: v1
kind: Service
metadata:
name: operation-service
labels:
app: opera... | <p>For anyone who is looking for answer, I manage to setup kubernetes for our production server with php-fpm and nginx.</p>
<p>It requires 2 image, 1 contains <code>php-fpm</code> and our code, the other one is <code>nginx</code> image with our conf in it.</p>
<p>Also we have to setup a shared volume between those 2 im... |
<p>We are trying to create namespace with specific node pool. How to achieve that on Azure Kubernetes?</p>
<pre><code>error: Unable to create namespace with specific node pool.
Ex: namespace for user nodepool1
</code></pre>
| <p>Posting this as a community wiki, feel free to edit and expend it.</p>
<p>As <a href="https://stackoverflow.com/users/5951680/luca-ghersi">Luca Ghersi</a> mentioned in comments, it's possible to have namespaces assigned to a specific nodes. For this matter there's an admission controller <code>PodNodeSelector</code>... |
<p>I have a create-react-app with default configurations.
I have some PORT and APIs inside <strong>.env file</strong> configured with</p>
<pre><code>REACT_APP_PORT=3000
</code></pre>
<p>and using inside app with process.env.REACT_APP_PORT.</p>
<p>I have my server deployed on Kubernetes.
Can someone explain how to confi... | <p>Use Pod fields as values for environment variables</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: dapi-envars-fieldref
spec:
containers:
- name: test-container
image: k8s.gcr.io/busybox
command: [ "sh", "-c"]
args:
- while true; do
echo -en '\n';... |
<p>I'm trying to find all the allowed formats used when specifying quotas, but all I can find are examples that may not cover all the cases. For instance</p>
<ul>
<li>CPU limits are expressed in milliCPU ("200m") but it seems plain integer are also acceptable and maybe even decimal numbers.</li>
<li>Storage s... | <p>The <a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes" rel="nofollow noreferrer">Resource units in Kubernetes</a> section of the doc describes the meaning and the allowed values for the CPU and memory resources.</p>
<p>To quote:</p>
<p><strong>Meanin... |
<p>I am <a href="https://piotrminkowski.com/2021/02/18/blue-green-deployment-with-a-database-on-kubernetes/" rel="nofollow noreferrer">reading about blue green deployment with database changes on Kubernetes.</a> It explains very clearly and in detail how the process works:</p>
<ol>
<li>deploy new containers with the n... | <p>Even when doing blue-green for the application servers, you still have to follow normal rules of DB schema compatibility. All schema changes need to be backwards compatible for whatever you consider one full release cycle to be. Both services talk to the same DB during the switchover time but thanks to careful plann... |
<p>I am working on an application that, as I can see is doing multiple health checks?</p>
<ol>
<li>DB readiness probe</li>
<li>Another API dependency readiness probe</li>
</ol>
<p>When I look at cluster logs, I realize that my service, when it fails a DB-check, just throws 500 and goes down. What I am failing to unders... | <p>There are three types of probes that Kubernetes uses to check the health of a <code>Pod</code>:</p>
<ul>
<li><code>Liveness</code>: Tells Kubernetes that something went wrong inside the container, and it's better to restart it to see if Kubernetes can resolve the error.</li>
<li><code>Readiness</code>: Tells Kuberne... |
<p>I have a monolithic application that is being broken down into domains that are microservices. The microservices live inside a kubernetes cluster using the istio service mesh. I'd like to start replacing the service components of the monolith little by little. Given the UI code is also running inside the cluster, mi... | <p>You will have to define a ServiceEntry so Istio will be aware of your external service. That ServiceEntry can be used as a destination in a VirtualService. <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/#Destination" rel="nofollow noreferrer">https://istio.io/latest/docs/reference/... |
<p>After applying these manifests <a href="https://github.com/prometheus-operator/kube-prometheus/blob/main/kustomization.yaml" rel="nofollow noreferrer">https://github.com/prometheus-operator/kube-prometheus/blob/main/kustomization.yaml</a> I want to create <code>AlertManager</code> webhook:</p>
<pre><code>apiVersion:... | <p>The problem is that you are using the configuration reference for the actual AlertManager application and not the one for the Kubernetes Custom Resource provided by the Prometheus Operator.</p>
<p>The Prometheus Operator takes the configuration provided in the form of custom resources like AlertManagerConfig and con... |
<p>For for a StateFul set, I can access its pods via a headless service internally.</p>
<p>I think, it would make sense, to have an easy way to expose also single pods externally (since the pods usually have a state and therefore loadbalancing over them makes no sense). </p>
<p>So far, I found no straight forward way... | <p>You can expose a specific <code>Pod</code> in a <code>StatefulSet</code> externally by matching on the <code>statefulset.kubernetes.io/pod-name</code> label.</p>
<p>For example, if your <code>StatefulSet</code> is named <code>app</code> and you want to expose port 80 from the first <code>Pod</code> as a <code>Servic... |
<p>Installing grafana using helm <a href="https://github.com/grafana/helm-charts" rel="nofollow noreferrer">charts</a>, the deployment goes well and the grafana ui is up, needed to add an existence persistence volume, ran the below cmd:</p>
<pre><code>helm install grafana grafana/grafana -n prometheus --set persistence... | <p>NFS turns on <code>root_squash</code> mode by default which functionally disables uid 0 on clients as a superuser (maps those requests to some other UID/GID, usually 65534). You can disable this in your mount options, or use something other than NFS. I would recommend the latter, NFS is bad.</p>
|
<p>We have two clusters. cluster1 has namespace- test1 and a service running as clusterip
we have to call that service from another cluster(cluster2) from namespace dev1.</p>
<p>I have defined externalname service in cluster2 pointing to another externalname service in cluster1.
And externalname service in cluster1 poi... | <p>This is not what <code>ExternalName</code> services are for.</p>
<p><code>ExternalName</code> services are used to have a cluster internal service name that forwards traffic to another (internal or external) DNS name. In practice what an <code>ExternalName</code> does is create a CNAME record that maps the external ... |
<p>I delete and re-submit a job with the same name, and I often get a 409 HTTP error with a message that says that the object is being deleted -- my submit comes before the job object is removed.</p>
<p>My current solution is to spin-try until I am able to submit a job. I don't like it. This looks quite ugly and I wo... | <p>As you have already mentioned, kubectl delete has the <code>--wait</code> flag that does this exact job and is <code>true</code> by default.</p>
<p>Let's have a look at the code and see how kubectl implements this. <a href="https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/delet... |
<p>I'm using newest springdoc library to create one common endpoint with all Swagger configurations in one place. There're a bunch of microservices deployed in Kubernetes, so having documentation in one place would be convenient. The easiest way to do that is by using sth like this (<a href="https://springdoc.org/faq.h... | <p>The properties <code>springdoc.swagger-ui.urls.*</code>, are suitable to configure external (/v3/api-docs url), for example if you want to agreagte all the endpoints of other services, inside one single application.</p>
<p>It will not inherit the proxy configuration, but it will use servers urls defined in your: ser... |
<p>I'm trying to install Gitlab Runner inside my cluster in Azure Kubernetes Service (AKS), but I have 2 errors:</p>
<ol>
<li><p>Helm Tiller doesn't appear in the application list of Gitlab CI:
Most of tutorials tell that it has to be installed, but today it is not even proposed as you can see here:
<a href="https://i.... | <p>GitLab 13.12 (May 2021) does clearly mention:</p>
<blockquote>
<h2><a href="https://about.gitlab.com/releases/2021/05/22/gitlab-13-12-released/#helm-v2-support" rel="nofollow noreferrer">Helm v2 support</a></h2>
</blockquote>
<blockquote>
<p>Helm v2 was <a href="https://helm.sh/blog/helm-v2-deprecation-timeline/" re... |
<p>I am looking to spin up a specific number of pods that are independent and not load balanced. (The intent is to use these to send and receive certain traffic to and from some external endpoint.) The way I am planning to do this is to create the pods explicitly (yaml snippet as below)</p>
<pre><code> apiVersion: ... | <p>I think you are using StatefulSet for controlling Pods.
If so, you can use label <code>statefulset.kubernetes.io/pod-name</code> to select pods in a service.</p>
<p>For illustration:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
name: generator-agent-service-1
label... |
<p>Is there a way to find the history of commands applied to the kubernetes cluster by kubectl?
For example, I want to know the last applied command was</p>
<pre><code>kubectl apply -f x.yaml
</code></pre>
<p>or</p>
<pre><code>kubectl apply -f y.yaml
</code></pre>
| <p>You can use <code>kubectl apply view-last-applied</code> command to find the last applied configuration:</p>
<pre><code>β ~ kubectl apply view-last-applied --help
View the latest last-applied-configuration annotations by type/name or file.
The default output will be printed to stdout in YAML format. One can use ... |
<p>I am new to the writing a custom controllers for the kubernetes and trying to understand this. I have started referring the sample-controller <a href="https://github.com/kubernetes/sample-controller" rel="nofollow noreferrer">https://github.com/kubernetes/sample-controller</a>.</p>
<p>I want to extend the sample-con... | <p>Start from <a href="https://book.kubebuilder.io/" rel="nofollow noreferrer">https://book.kubebuilder.io/</a> instead. It's a much better jumping off point than sample-controller.</p>
|
<p>Am new to trino. Tried installing trino on kubernetes using the helm chart available under trinodb/charts.</p>
<p>Coordinator and worker pods come up fine, but am unable to find catalog location. Checked the helm chart and it seems to not have it defined anywhere either.</p>
<p>How did others who used the helm chart... | <p>They added catalogs in their chart, have a look at this pull request <a href="https://github.com/trinodb/charts/pull/1" rel="nofollow noreferrer">https://github.com/trinodb/charts/pull/1</a></p>
|
<p>I just want to list pods with their <code>.status.podIP</code> as an extra column.
It seems that as soon as I specify <code>-o=custom-colums=</code> the default columns <code>NAME, READY, STATUS, RESTARTS, AGE</code> will disappear.</p>
<p>The closest I was able to get is</p>
<pre><code>kubectl get pod -o wide -o=c... | <p>I checked the differences between in API requests between the <code>kubectl get pods</code> and <code>kubectl -o custom columns</code>:</p>
<ul>
<li>With aggregation:</li>
</ul>
<pre class="lang-json prettyprint-override"><code>curl -k -v -XGET -H Accept: application/json;as=Table;v=v1;g=meta.k8s.io,application/json... |
<p>We have setup Prometheus in a kubernetes cluster using PrometheusOperator. We are trying to configure AlertManager using the AlertManagerConfig custom resource. We tried creating an alert route which maps to a webhook receiver and then triggering a test alert. The alert seems to be caught by AlertManager but it is n... | <p>I was able to find the root cause of the issue. actually root causes. There were two problems:</p>
<ol>
<li><p>I was using webhook to integrate with a Discord channel, which I later learned is not straightforward. A middle layer is required to parse and forward webhook alerts to Discord in a compatible template. A g... |
<p>when using k3sup to setup k3s with raspbian buster on raspberrypi 4b it works (armv7 architecture; with reference below). with an exact similar similar setup procedure of agent nodes on pi zeros, and running raspi-config, it errors with the following failures:</p>
<pre><code>- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG... | <p>Unfortunately, k3s can't run on Pi Zero because Pi zero is based on ARMv6 and K3S only support ARM starting ARMv7. (see this Github issue : <a href="https://github.com/k3s-io/k3s/issues/2699" rel="nofollow noreferrer">https://github.com/k3s-io/k3s/issues/2699</a>).</p>
<p>If you want a Raspberry Pi to run K3s, use a... |
<p>I'm trying to create a PostgreSQL database in a Kubernetes cluster on Digital Ocean. To do so, I've created a <code>StatefulSet</code> and a <code>Service</code>. And to set up a volume in order to persist data, I took a look at the <a href="https://docs.digitalocean.com/products/kubernetes/how-to/add-volumes/" rel... | <p>I managed to fix my problem by adding the pvc first instead of using volumeClaimTemplates</p>
|
<p>I'm trying to remove a key/value pair from an existing deployment's <code>spec.selector.matchLabels</code> config. For example, I'm trying to remove the <code>some.old.label: blah</code> label from <code>spec.selector.matchLabels</code> and <code>spec.template.metadata.labels</code>. So this is an excerpt of what I'... | <p>When the error message says "field is immutable", it means you can't change it once it's been set. You need to delete and recreate the Deployment with the label selector you want (which will also temporarily delete all of the matching Pods).</p>
<pre class="lang-sh prettyprint-override"><code>kubectl dele... |
<h2>Question</h2>
<p>I am trying to learn Istio and I am setting up my Istio Ingress-Gateway. When I set that up, there are the following port options (<a href="https://istio.io/latest/docs/reference/config/istio.operator.v1alpha1/#ServicePort" rel="nofollow noreferrer">as indicated here</a>):</p>
<ul>
<li>Port</li>
<... | <p>Port, Nodeport and TargetPort are not Istio concepts, but Kubernetes ones, more specifically of Kubernetes Services, which is why there is no detailed description of that in the Istio Operator API.</p>
<p>The Istio Operator API exposes the options to configure the (Kubernetes) Service of the Ingress Gateway.</p>
<p>... |
<p>To use storage inside Kubernetes PODs I can use <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="noreferrer">volumes</a> and <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="noreferrer">persistent volumes</a>. While the volumes like <code>emptyDir</code> are ephemera... | <p>It is very important to understand the main differences between <code>Volumes</code> and <code>PersistentVolumes</code>. Both <code>Volumes</code> and <code>PersistentVolumes</code> are Kubernetes resources which provides an abstraction of a data storage facility.</p>
<ul>
<li><p><code>Volumes</code>: let your pod w... |
<ol>
<li>How many CRs of a certain CRD can a k8s cluster handle?</li>
<li>How many CRs can a certain controller (or Operator) reconcile?</li>
</ol>
<p>Thanks!</p>
| <p><strong>1. How many CRs of a certain CRD can a k8s cluster handle?</strong></p>
<p>As many as your API server's <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#storage" rel="nofollow noreferrer">storage space allows</a>:</p>
<blockquote>
<p>Custom resources consume stor... |
<p>I deployed a kubernetes cluster on Google Cloud using VMs and <a href="https://github.com/kubernetes-sigs/kubespray/blob/master/docs/setting-up-your-first-cluster.md" rel="nofollow noreferrer">Kubespray</a>.</p>
<p>Right now, I am looking to expose a simple node app to external IP using <a href="https://cloud.googl... | <p>Let me start of by summarizing the problem we are trying to solve here.</p>
<p>The problem is that you have self-hosted kubernetes cluster and you want to be able to create a service of type=LoadBalancer and you want k8s to create a LB for you with externlIP and in fully automated way, just like it would if you used... |
<h1>What I wanna accomplish</h1>
<p>I'm trying to connect an external HTTPS (L7) load balancer with an NGINX Ingress exposed as a zonal Network Endpoint Group (NEG). My Kubernetes cluster (in GKE) contains a couple of web application deployments that I've exposed as a ClusterIP service.</p>
<p>I know that the NGINX Ing... | <p>As per my understanding, your issue is - βwhen an external load balancer is set up, GCP creates a new endpoint under one of the zonal NEGs and it shows "Unhealthy" and requests to the external HTTPS load balancer which return a 502 errorβ.</p>
<p>Essentially, the Service's annotation, cloud.google.com/neg... |
<p>I have a mysql instance running inside a digitalocean droplet. Originally, we also had a laravel application running inside that droplet with the mysql instance but now we want to move our application to kubernetes.</p>
<p>The application has been deployed to kubernetes and we are trying to connect the laravel appli... | <p>You need to allow access.
may this one help you.
<a href="https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql</a></p>
|
<p>I have an application that needs to know it's assigned NodePort. Unfortunately it is not possible to write a file to a mountable volume and then read that file in the main container. Therefore, i'm looking for a way to either have the initContainer set an environment variable that gets passed to the main container o... | <p>There's no direct way so you have to get creative. For example you can make a shared emptyDir mount that both containers can access, have the initContainer write <code>export FOO=bar</code> to that file, and then change the main container command to something like <code>[bash, -c, "source /thatfile && e... |
<p>I have three service that I need to expose via istio ingress gateway, i have setup those services dns records to point to the ingress gateway load balancer but i have not succeded to make it work.</p>
<p>The gateway and virtual service config file :</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gate... | <p>I guess the URI part of the <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPMatchRequest" rel="nofollow noreferrer">HttpMatchRequest</a> does not work that way. Try to add VirtualServices for each subdomain, i.e. something like.</p>
<pre><code>apiVersion: networking.istio.io/v1... |
<p>I tried with this <code>Gateway</code>, and <code>VirtualService</code>, didn't work.</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: stomp
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: stomp
protocol: TCP
hosts:
- ... | <p>Use <code>tcp.match</code>, not <code>http.match</code>. Here is the example I have found in <a href="https://istio.io/latest/docs/reference/config/networking/gateway/" rel="nofollow noreferrer">istio gateway docs</a> and in <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/#TCPRoute"... |
<p>I have a 3 node K3s cluster with Linkerd and NGINX Ingress Controller. I installed Linkerd with a default configuration:</p>
<pre><code>linkerd install | kubectl apply -f -
</code></pre>
<p>Then to install the NGINX Ingress Controller I used helm with a default configuration as well:</p>
<pre><code>helm repo add ing... | <p>It's never going to like the path. It needs to serve on the root of the url. So change path to '/' and it should work fine. I'm happy to try it out locally if that doesn't work.</p>
|
<p>I am getting issue while terminating the namesapce in the cluster, It's showing many parameters inside the namespace JSON. I followed this link <a href="https://medium.com/@craignewtondev/how-to-fix-kubernetes-namespace-deleting-stuck-in-terminating-state-5ed75792647e" rel="noreferrer">https://medium.com/@craignewto... | <p>I have found the answer to terminate the stuck namespace.</p>
<pre class="lang-sh prettyprint-override"><code>for ns in $(kubectl get ns --field-selector status.phase=Terminating -o jsonpath='{.items[*].metadata.name}')
do
kubectl get ns $ns -ojson | jq '.spec.finalizers = []' | kubectl replace --raw "/api/v1... |
<p>I am <a href="https://piotrminkowski.com/2021/02/18/blue-green-deployment-with-a-database-on-kubernetes/" rel="nofollow noreferrer">reading about blue green deployment with database changes on Kubernetes.</a> It explains very clearly and in detail how the process works:</p>
<ol>
<li>deploy new containers with the n... | <blockquote>
<p>I am reading about blue green deployment with database changes on Kubernetes. It explains very clearly and in detail how the process works</p>
</blockquote>
<p>It's an interesting article. But I would not do database migration as described there. And Blue-Green deployment does not make this much easier,... |
<p>kubectl top nodes<br>
NAME ββ β β β β β β β β β CPU(cores) β CPU%β MEMORY(bytes)β MEMORY%<br>β<br />
gsdjsgfhdsgfz-12345665-jisj000000 934m β β β 24% β β 10439Mi β β β 82%<br>
gsdjsgfhdsgfz-12345665-jisj000001 717m β β β 18% β β 9132Mi β β β Β ... | <p>I had to implement this same feature recently, unfortunately I didn't find a way to get the percentages just by using the <code>top()</code> API alone, I had to perform two calls, one to <code>nodes()</code> in order to retrieve total capacity and another one to <code>top()</code> to retrieve used capacity. Then it ... |
<p>I'm building Istio/K8s-based platform for controlling traffic routing with NodeJS. I need to be able to programmatically modify Custom Resources and I'd like to use the <a href="https://github.com/kubernetes-client/javascript" rel="nofollow noreferrer">@kubernetes/node-client</a> for that. I wasn't able to find the ... | <p>I was using the wrong type for the <code>body</code> object in that method. I got it to work following <a href="https://github.com/kubernetes-client/javascript/blob/master/examples/patch-example.js" rel="nofollow noreferrer">this example</a>.</p>
<pre class="lang-js prettyprint-override"><code>const patch = [
{
... |
<p>According to <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">the documentation</a>:</p>
<blockquote>
<p>A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned ... It is a resource in the cluster just like a node is a cluster resource... | <blockquote>
<p>Can a new PV be created so it's 1:1 replicated between 2+ nodes on the cluster?</p>
</blockquote>
<p>None of the standard volume types are replicated at all. If you can use a volume type that supports <code>ReadWriteMany</code> access (most readily NFS) then multiple pods can use it simultaneously, but... |
<p>I'm using docker for windows on my local laptop, and I'm trying to mimic a dev installation of kubernetes by using the "run kubernetes' setting on the same laptop. One thing that's awkward is the docker registry. I have a docker registry container running in-cluster that I can push to no problem from the lapt... | <p>You would use the internal cluster DNS, as managed by the Service object you probably created for the registry. All Services are available inside the cluster via <code>$name.$namespace.svc.cluster.local</code> (technically <code>cluster.local</code> is the cluster domain however this is the default and most common v... |
<p>I was investigating certain things things about <code>cert-manager</code>.</p>
<p><code>TLS certificates</code> are automatically recreated by cert-manager.</p>
<p>I need to somehow <strong>deregister a domain / certificate</strong> from being regenerated. I guess I would need to tell cert-manager not to take care a... | <p><code>cert-manager</code> is an application implemented using the <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/" rel="nofollow noreferrer">operator pattern</a>.</p>
<p>In one sentence, it watches for a <code>Custom Resource</code> (<code>CR</code> for short) named <code>Certificate</code> ... |
<p>I am trying to set up a Knative eventing pipeline, where exists a container that accepts external gRPC requests and fires events into a broker for further processing.</p>
<p>In my toy example, I am failing to use SinkBinding to inject <code>K_SINK</code> environment variable. This is the relevant section of my confi... | <p>The <code>SinkBinding</code> object has a subject configured using a label selector:</p>
<pre class="lang-yaml prettyprint-override"><code>subject:
apiVersion: apps/v1
kind: Deployment
selector:
matchLabels:
app: ease-pipeline-server
</code></pre>
<p>However, there is no such label set on the <code>D... |
<p>I have a Kafka wrapper library that uses transactions on the produce side only. The library does not cover the consumer. The producer publishes to multiple topics. The goal is to achieve transactionality. So the produce should either succeed which means there should be exactly once copy of the message written in eac... | <p>UUID can be used in your library to generate transaction id for your producers. I am not really sure what you mean by: <em>That way, if a producer gets terminated due to pod restart, the consumers don't get locked on the transaction forever</em>.</p>
<p>Consumer is never really "stuck". Say the producer go... |
<p>I have an Nginx ingress controller running on one k8s namespace,
and on another k8s namespace, I defined a pod, a service, and an ingress resource.
this is the ingress resource definition:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-app-ingress
annotations:
nginx.ing... | <p>Thanks to my co-worker, we found a solution for the problem:</p>
<p>The solution is to add these annotations to the ingess resource:</p>
<pre><code>nginx.ingress.kubernetes.io/proxy-redirect-from: /
nginx.ingress.kubernetes.io/proxy-redirect-to: /my-app/
</code></pre>
<p>meaning:</p>
<pre><code>apiVersion: networkin... |
<p>I need to update a file in a container running in k8s using my local editor and save back the updates to the original file in the container <em>without</em> restarting/redeploying the container.</p>
<p>Right now I do:</p>
<pre><code>$ kubectl exec tmp-shell -- cat /root/motd > motd && vi motd && k... | <p>One option that might be available is <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-running-pod/#ephemeral-container" rel="nofollow noreferrer">ephemeral debug containers</a> however they are an alpha feature so probably not enabled for you at time of writing. Barring that, yeah what you ... |
<p>I am still learning about microservices architecture and can't get a clear idea how to tackle a given problem.</p>
<p>Let's say I have a k8s cluster with some BE microservices, FE app or any other services deployed into it. I have also an ingress controller that does consumes traffic and route to services.</p>
<p>So... | <p>The second and third solution usually works best. The Ingress doesn't loadbalance, it's the service objects that configure the loadbalancing rules.</p>
<p>If you can manage to use an Api Gateway as Ingress Controller, like ambassador, or Istio (those are the ones I know about), that would be even better. You will re... |
<p>I'm running an eks cluster, installed k8s dashboard etc. All works fine, I can login in the UI in</p>
<pre><code>http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
</code></pre>
<p>Is there a way for me to pass the token via the url so I won't need a human... | <p>Based on <a href="https://github.com/kubernetes/dashboard/blob/v2.0.0/docs/user/access-control/README.md#access-control" rel="nofollow noreferrer">official documentation</a> it is impossible to put your authentication token in URL.</p>
<blockquote>
<p>As of release 1.7 Dashboard supports user authentication based on... |
<p>I am trying to program the patching/rolling upgrade of k8s apps by taking deployment snippets as input. I use <code>patch()</code> method to apply the snippet onto an existing deployment as part of rollingupdate using <a href="https://github.com/fabric8io/kubernetes-client" rel="nofollow noreferrer">fabric8io's k8s ... | <p>With latest improvements in Fabric8 Kubernetes Client, you can do it both via <code>patch()</code> and <code>rolling()</code> API apart from using <code>createOrReplace()</code> which is mentioned in older answer.</p>
<h2>Patching JSON/Yaml String using <code>patch()</code> call:</h2>
<p>As per latest release v5.4.0... |
<p>Is it possible to avoid specifying namespace if I'd like to run e.g. <code>kubectl describe deployment <deployment_name></code> for a deployment that is unique? Or is namespace argument is always mandatory?</p>
| <p>To list such resources, you can use <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/" rel="nofollow noreferrer">Field Selector</a> on name:</p>
<p><code>kubectl get deployments --all-namespaces --field-selector='metadata.name=<deployment_name>'</code></p>
<p>To descri... |
<p>How to set Node label to Pod environment variable? I need to know the label <code>topology.kubernetes.io/zone</code> value inside the pod.</p>
| <p>The <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="nofollow noreferrer">Downward API</a> currently does not support exposing node labels to pods/containers. There is an <a href="https://github.com/kubernetes/kubernetes/issues/40610" rel="nofollow ... |
<p>I'm running into a missing resources issue when submitting a <code>Workflow</code>. The Kubernetes namespace <code>my-namespace</code> has a quota enabled, and for whatever reason the pods being created after submitting the workflow are failing with:</p>
<pre><code>pods "hello" is forbidden: failed quota: ... | <p>try deploying the workflow on another namespace if you can, and verify if it's working or not.</p>
<p>if you can try with removing the quota for respective namespace.</p>
<p>instead of quota you can also use the</p>
<pre><code>apiVersion: v1
kind: LimitRange
metadata:
name: default-limit-range
spec:
limits:
- ... |
<p>What is a recommended way to have the <code>gcloud</code> available from <strong>within</strong> a running App Engine web application?</p>
<p><strong>Background:</strong><br />
The <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Kubernetes Python Client</a> is using <code>subprocess</... | <p>IIUC the Python client for Kubernetes requires a Kubernetes config and you're using <code>gcloud container clusters get-credentials</code> to automatically create the config; The Python client for Kubernetes does not require <code>gcloud</code>.</p>
<p>I recommend a different approach that uses Google's API Client L... |
<p>I'm not sure if I ask this question here, but I need some clarification I have a Kubernetes cluster and I am wondering since the frontend runs on the client's web browser. Am I able to only expose the API internally and still make HTTP requests to it from the client or am I only able to expose the service using the ... | <p>You can expose it to the frontend via an ingress and also (at the same time) internally for other services/pods/containers you have running inside the cluster, it all depends on how you configure it.</p>
<p>Assuming you only want it to run internally, all you have to do is not create an ingress. If you want to expos... |
<p>I was using fabric8io to write a service function, relevant code is as below</p>
<pre><code>KubernetesClient fabricClient = new DefaultKubernetesClient();
fabricClient.pods().inNamespace("xxxnamespace").withLabel("somekey", somevalue).list().getItems()
</code></pre>
<p>It was working fine when I'... | <p>Fabric8 uses Kubernetes REST API to perform their operations, by default their HTTP client is assuming that it's running inside kubernetes cluster which is why it's trying to reach <code>kubernetes.default.svc</code></p>
<p>Since you're calling it outside the cluster then you must tell Fabric8 the address of your cl... |
<p>I am new to ceph and using rook to install ceph in k8s cluster. I see that pod rook-ceph-osd-prepare is in Running status forever and stuck on below line:</p>
<pre><code>2020-06-15 20:09:02.260379 D | exec: Running command: ceph auth get-or-create-key
client.bootstrap-osd mon allow profile bootstrap-osd --connect-... | <p>In my case, one of my nodes system clock not synchronized with hardware so there was a time gap between nodes.</p>
<p>maybe you should check output of timedatectl command.</p>
|
<p>I'm running Flink 1.11 on k8s cluster and getting the following error when trying to update the log4j-console.properties file:</p>
<pre><code>Starting Task Manager
Enabling required built-in plugins
Linking flink-s3-fs-hadoop-1.11.1.jar to plugin directory
Successfully enabled flink-s3-fs-hadoop-1.11.1.jar
sed: coul... | <p>I too suffered from this bug. The issue here is that when the task manager and job managers start they are running with a modified classpath, not the JAR that you've built via your build system.</p>
<p>See the <code>constructFlinkClassPath</code> in the <a href="https://github.com/apache/flink/blob/af681c63821c027bc... |
<p>Currently running a fresh "all in one VM" (stacked master/worker approach) kubernetes <code>v1.21.1-00</code> on Ubuntu Server 20 LTS, using</p>
<ul>
<li>cri-o as container runtime interface</li>
<li>calico for networking/security</li>
</ul>
<p>also installed the kubernetes-dashboard (but I guess that's no... | <p>Answer is pretty much here: <a href="https://serverfault.com/questions/1064313/ambassador-service-stays-pending">https://serverfault.com/questions/1064313/ambassador-service-stays-pending</a> . After installing a <code>load balancer</code> the whole setup worked. I decided to go with <code>metallb</code> (<a href="h... |
<p>At first i have delployed cloud sql with postgresql. and then i deployed gke with documents: <a href="https://cloud.google.com/support-hub#section-2" rel="nofollow noreferrer">https://cloud.google.com/support-hub#section-2</a>
i used gcloud tool. and i made gke cluster using auto pilot mode. and made deployment with... | <p>For accessing the Cloud SQL instance from an application running in Google Kubernetes Engine, you can use either the Cloud SQL Auth proxy (with public or private IP), or connect directly using a private IP address. The Cloud SQL Auth proxy is the recommended way to connect to Cloud SQL, even when using private IP.</... |
<p>I have been asked to modify a Helm template to accommodate a few changes to check if a value is empty or not as in the code snippet below. I need to check <code>$var.alias</code> inside the <code>printf</code> in the code snippet and write custom logic to print a custom value. Any pointers around the same would be g... | <p>I decided to test what madniel wrote in his comment. Here are my files:</p>
<p>values.yaml</p>
<pre><code>someString: abcdef
emptyString: ""
# nilString:
</code></pre>
<p>templates/test.yaml</p>
<pre><code>{{ printf "someEmptyString=%q)" .Values.someString }}
{{ printf "emptyString=%q)"... |
<p>I created a kubernetes cluster on my debian 9 machine using <a href="https://kind.sigs.k8s.io/" rel="nofollow noreferrer">kind</a>.<br>
Which apparently works because I can run <code>kubectl cluster-info</code> with valid output.</p>
<p>Now I wanted to fool around with the tutorial on <a href="https://kubernetes.io... | <p>Try add :8080 after the <strong>$POD_NAME</strong></p>
<pre><code> curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME:8080/proxy/
</code></pre>
|
<p>I wanted to know what's the difference of the <code>reclaimPolicy</code> in <code>StorageClass</code> vs. <code>PersistentVolume</code>.</p>
<p>Currently we created multiple <code>PersistentVolume</code> with a <code>StorageClass</code> that has a <code>reclaimPolicy</code> of <code>Delete</code>, however we changed... | <blockquote>
<p>I wanted to know what's the difference of the reclaimPolicy in StorageClass vs. PersistentVolume.</p>
</blockquote>
<p>They mean the same thing, the difference is that the one in <code>StorageClass</code> is used for <a href="https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/" rel="norefe... |
<p>i can to connect to API kube with kubectl and file config (library is @kubernetes/client-node).
i want to run my application in conteiner without kubectl. How i may connect to API kube with server account without file config?</p>
| <p>if you are running your code inside the container you can directly use the default config using</p>
<pre><code>const kc = new k8s.KubeConfig();
kc.loadFromDefault();
</code></pre>
<p>with this method, there is no requirement to pass the config and inside container, it will auto adjust the config you can use the API ... |
<p>Basically I'm trying to create a pipeline on my local Jenkins, create an image and then send to Docker Hub. Then I'll deploy this image on our local Kubernetes(Server IP:10.10.10.4).</p>
<p>So Jenkins pipeline script is below;</p>
<pre><code>docker build -t test123/demo:$BUILD_NUMBER .
docker login --username=testu... | <p>you create your pipeline something like</p>
<p>if you <strong>deployment.yaml</strong> file is like</p>
<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: test-image
labels:
app: test-image
spec:
selector:
matchLabels:
app: test-image
tier: frontend
strategy:
type: R... |
<p>I have a Kubernetes cluster and do all my deployments in a declarative manner, by executing the "apply" command in CI/CD pipeline.</p>
<p>"Apply" works in such a way that it merges the state of an object with the manifest that came with the command. As the result, you may make manual changes - fo... | <p><strong><a href="https://github.com/weaveworks/kubediff" rel="nofollow noreferrer">kubediff</a></strong> is what you are looking for.</p>
<p>You can run it as a command-line tool e.g.:</p>
<pre><code>$ ./kubediff k8s
Checking ReplicationController 'kubediff'
*** .spec.template.spec.containers[0].args[0]: '-repo=htt... |
<p>I am looking to find out if there is a way I can assign a specific Deployment to a specific node pool.</p>
<p>I am planning to deploy a big-size application using kubernetes. I am wondering if there is a way we can assign deployments to specific node pools. In other words, we have 3 types of services:</p>
<ul>
<li>G... | <p>Another way (in addition to what YayotrΓ³n proposed) would be to work with NodeAffinity and AntiAffinity. For more information check the official documentation here: <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/schedul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.