prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>Is there any CLI tools or libraries that allow to update container images (and other parameters) in K8S YAML/JSON configuration files?</p>
<p>For example, I have this YAML:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
<...>
spec:
template:
spec:
containers:
- name: dmp-reports
... | <p>We have the same issue on the <a href="https://jenkins-x.io/" rel="nofollow noreferrer">Jenkins X</a> project where we have many git repositories and as we change things like libraries or base docker images we need to change lots of versions in <code>pom.xml, package.json, Dockerfiles, helm charts</code> etc.</p>
<... |
<p>I am facing a problem with kubernetes nodes deployed on AWS.
(Cluster with 3 nodes and 1 master running on m3.large instances with each about 25GB)</p>
<p>After (about 3 days) there is 0KB left on disk and the cluster get stuck.</p>
<p>All the storage (more or less) is used by /var/lib/docker/overlay/.
Inside this... | <p>I was able to resolve a similar issue with recurring high IO on the nodes due to <code>du -s /var/lib/docker/overlay/</code> by editing <code>kops cluster.spec</code> with <code>kops edit cluster [cluster_name]</code>.
I added the following under specs:</p>
<pre><code>docker:
logDriver: json-file
logLevel: ... |
<p>Prometheus.</p>
<p>Any hint about how to collect the total required memory specified in the deployments? I mean the memory you specify as limit or required in the deployments.</p>
<p>I can do it using heapster and influxdb but I have not found how to do it with Prometheus and metric server, I do not find any metri... | <p>You can do it with <a href="https://github.com/kubernetes/kube-state-metrics" rel="nofollow noreferrer">Kube State Metrics</a>. Just deploy it in your cluster and scrape its metrics with Prometheus.</p>
<p>These metrics give what you are finding:</p>
<ul>
<li>kube_pod_container_resource_requests_memory_bytes</li>
... |
<p>I am attempting to create a HA Kubernetes cluster in Azure using <code>kubeadm</code> as documented here <code>https://kubernetes.io/docs/setup/independent/high-availability/</code></p>
<p>I have everything working when using only 1 master node but when changing to 3 master nodes kube-dns keeps crashing with apiser... | <p>I eventually got to the bottom of this. I had not copied the same Service Account signing keys onto each master node (<code>sa.key</code>, <code>sa.pub</code>).</p>
<p>These keys are documented here: <a href="https://github.com/kubernetes/kubeadm/blob/master/docs/design/design_v1.7.md" rel="nofollow noreferrer">htt... |
<p>We are developing a CI/CD pipeline leveraging Docker/Kubernetes in AWS. This topic is touched in <a href="https://stackoverflow.com/questions/46036853/kubernetes-ci-cd-pipeline">Kubernetes CI/CD pipeline</a>.</p>
<p>We want to create (and destroy) a new environment for each SCM branch, since a Git pull request unti... | <p>We're working on an open source project called <a href="https://jenkins-x.io/" rel="nofollow noreferrer">Jenkins X</a> which is a proposed sub project of the Jenkins foundation aimed at automating CI/CD on Kubernetes using Jenkins and GitOps for promotion.</p>
<p>When you submit a Pull Request we automatically crea... |
<p>I'm trying get a Kubernetes cluster working with some nodes working behind NAT without public IP address. (Why i need it is a different story)</p>
<p>There are 3 nodes:</p>
<ol>
<li>Kubernetes cluster master (with public IP address)</li>
<li>Node1 (with public IP address)</li>
<li>Node2 (works behind NAT on my lap... | <p>As mentioned in the Kubernetes <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/" rel="nofollow noreferrer">documentation</a>:</p>
<blockquote>
<p>Kubernetes imposes the following fundamental requirements on any
networking implementation (barring any intentional network
segmentat... |
<p>As you know, in k8s, we can set additional entry in /etc/hosts with hostAliases in deployment.yaml like:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: hostaliases-pod
spec:
restartPolicy: Never
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "foo.local"
</code></pre>
<p>But I want the ip is t... | <p>I don't think it's possible that way. Kubectl has a condition that hostAliases[].ip must be a valid IP. There is no way to insert there anything but an IP.</p>
<p>That said, there are other solutions:</p>
<ul>
<li><p>By default kubernetes add to /etc/hosts an entry for POD_IP and POD_NAME, so maybe you can use tha... |
<p>I am learning k8s. My question is that how to let k8s get service url as minikube command "minikube get service xxx --url" do?
Why I ask is because that when pod is down and up/created/initiated again, there is no need to change url by visiting service url. While
I deploy pod as NodePort, I could access pod with hos... | <p>NodePort, as the name suggests, opens a port directly on the node (actually on all nodes in the cluster) so that you can access your service. By default it's random - that's why when a pod dies, it generates a new one for you. However, you can specify a port as well (3rd paragraph <a href="https://kubernetes.io/docs... |
<p>I have a chart in it two containers:</p>
<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: catalog
labels:
app: catalog
chart: catalog-0.1.0
heritage: Tiller
spec:
replicas: 1
selector:
matchLabels:
app: catalog
template:
metadata:
labels:
app: ca... | <p>If catalog application respects <code>http_proxy</code> environment variable, it it easy. Just add an environment variable to catalog container.</p>
<pre><code> - name: catalog
image: catalog:v1
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
pr... |
<p>I have a problem trying exec'ing into a container:</p>
<pre><code>kubectl exec -it busybox-68654f944b-hj672 -- nslookup kubernetes
Error from server: error dialing backend: dial tcp: lookup worker2 on 127.0.0.53:53: server misbehaving
</code></pre>
<p>Or getting logs from a container:</p>
<pre><code>kubectl -n ku... | <blockquote>
<p>I have a problem trying exec'ing into a container</p>
</blockquote>
<p>As you see, Kubernetes is trying to connect to your nodes use the names like <code>worker1</code>, which cannot be resolved in your network.</p>
<p>You have 2 ways to fix it:</p>
<ol>
<li>Use real FQDN for all your nodes which c... |
<p>I have a chart in it two containers:</p>
<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: catalog
labels:
app: catalog
chart: catalog-0.1.0
heritage: Tiller
spec:
replicas: 1
selector:
matchLabels:
app: catalog
template:
metadata:
labels:
app: ca... | <p>For your update, if you need to manipulate iptables, you can add another <code>initContainer</code>, for example:</p>
<pre><code> initContainers:
- image: centos
imagePullPolicy: Always
name: run-iptables
securityContext:
privileged: true
command:
- "sh"
- "-c"
- 'yum -y install... |
<p>I need to resize a bunch of PVCs. It seems the easiest way to do it is through
the ExpandPersistentVolumes feature. I am however having trouble getting the
configuration to cooperate.</p>
<p>The <code>ExpandPersistentVolumes</code> feature gate is set in kubelet on all three
masters, as shown:</p>
<p>(output trimm... | <p>It could happen if you did not enable alpha feature-gate for the option.</p>
<p>Did you set <code>--feature-gates</code> option for <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/" rel="nofollow noreferrer">kube-apiserver</a>?</p>
<pre><code>--feature-gates mapStringBool ... |
<p>I have Kubernetes replication controller which is running 2 pods of PHP applicaton. Now, I need to schedule 3 cronjobs which run some PHP scripts in those pods. How can I achieve it? (The base image for the container is centos:7).</p>
| <p>As said in comments your best option is create <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">Kubernetes CronJobs</a>.</p>
<p>If you don't want to expose you PHP functions, you can always use a container that execute commands in your PHP pods.</p>
<p>Here i... |
<p>I have a cluster that scales based on the CPU usage of my pods. The documentation states that i should prevent <em>thrashing</em> by scaling to fast. I want to play around with the autoscaling speed but i can't seem to find where to apply the following flags: </p>
<ul>
<li>--horizontal-pod-autoscaler-downscale-dela... | <p>The HPA controller is part of the controller manager and you'll need to pass the flags to it, see also the <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/" rel="noreferrer">docs</a>. It is not something you'd do via kubectl. It's part of the control plane (master) ... |
<p>I've setup a kubernetes cluster using <a href="https://github.com/kubernetes-incubator/kubespray" rel="nofollow noreferrer">kubespray</a>, and now I am trying to follow <a href="http://%20https://blog.heptio.com/how-to-deploy-web-applications-on-kubernetes-with-heptio-contour-and-lets-encrypt-d58efbad9f56" rel="nofo... | <p><a href="https://kubernetes.io" rel="noreferrer">Kubernetes</a> offers three ways to expose a service:</p>
<p>1) <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing" rel="noreferrer">L4 LoadBalancer</a>: Available only on cloud providers such as GCE and AWS</p>
<p>2) Expose Serv... |
<p>I am working on a Flask application which communicates with Google cloud storage using python client library. Currently, on a local development, I am using a service account for authenticating the application and making interactions.</p>
<p>I am planning to build a docker image of the application and deploy it on a... | <p>The best way is to deploy a kubernetes secret</p>
<p><code>apiVersion: v1
kind: Secret
metadata:
name: GOOGLE_APPLICATION_CREDENTIALS
data:
key.json: "Your service acount key.json"
</code></p>
<p>For the Pod/ Deployment</p>
<p><code>volumes:
- name: GOOGLE_APPLICATION_CREDENTIALS
secret:
secretNam... |
<p>What I see: Kubernetes takes into account only the memory used by its components when scheduling new Pods, and considers the remaining memory as free, even if it's being used by other system processes outside Kubernetes. So, when creating new deployments, it attempts to schedule new pods on a suffocated node.</p>
<... | <p>Yes, there are few parameters to allocate resources:
You can allocate memory and CPU for your pods and allocate memory and CPU for your system daemons manually. <a href="https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#example-scenario" rel="nofollow noreferrer">In documentation</a> yo... |
<p>This is our environment:</p>
<ol>
<li>I have a Kubernetes cluster running on Amazon.</li>
<li>Jenkins CI/CD running on Amazon that connects to a private GitLab and builds our services as Docker images.</li>
<li>Amazon ECR that stores our Docker images.</li>
</ol>
<p>My questions:</p>
<ol>
<li>How can I auto deplo... | <p>I have a similar workflow and I hope this helps you get some direction. I am using bitbucket pipeline for CI, but I am sure Jenkins will work fine as well.</p>
<p>This is what I do in my CI flow :</p>
<ul>
<li>Build my code and install dependencies</li>
<li>Create a container with a unique tag ( commit-id ) > <cod... |
<p>I've been exploring the <a href="https://github.com/kubernetes-client/java" rel="noreferrer">Kubernetes-Client/Java library</a> and I can't figure out the API call to get all the deployments.</p>
<p>I'm looking for the K8-Client/Java API call for this command:</p>
<pre><code>kubectl get deployments
NAME ... | <p>You can find all methods of the Kubernetes java client here:
<a href="https://github.com/kubernetes-client/java/tree/master/kubernetes/docs" rel="nofollow noreferrer">https://github.com/kubernetes-client/java/tree/master/kubernetes/docs</a></p>
<p>What you're searching for is the <code>listNamespacedDeployment</code... |
<p>It is how to run simple batch in kubernetes yaml (helloworld.yaml):</p>
<pre><code>...
image: "ubuntu:14.04"
command: ["/bin/echo", "hello", "world"]
...
</code></pre>
<p>In Kubernetes i can deploy that like this:</p>
<pre><code>$ kubectl create -f helloworld.yaml
</code></pre>
<p>Suppose i have a batch script l... | <p>I'm using this approach in OpenShift, so it should be applicable in Kubernetes as well.</p>
<p>Try to put your script into a configmap key/value, mount this configmap as a volume and run the script from the volume.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
name: hello-world-job
spec:
parallelism:... |
<ol>
<li>I have setup a kubernetes using kubeadm v1.8.5</li>
<li>Setup a dashboard using:</li>
</ol>
<pre><code>wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.8.0/src/deploy/recommended/kubernetes-dashboard.yaml`
kubectl create -f kubernetes-dashboard.yaml
kubectl create -f kubernetes-dashboard-admin... | <p>Try connect with https, I have same problem, and this works for me</p>
<p>Kubernetes Manual:</p>
<blockquote>
<p>NOTE: Dashboard should not be exposed publicly using kubectl proxy
command as it only allows HTTP connection. For domains other than
localhost and 127.0.0.1 it will not be possible to sign in. Not... |
<p>I have a statefulset of kafka. I need to expand the disk size, i try wihout succes to use the automatic resize feature of k8s 1.9</p>
<p>Here : <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/... | <p>That is an alpha feature which has some problems and limitations.</p>
<p>Try to find some information on the Issues on Github which is related to your problem:</p>
<ul>
<li><p><a href="https://github.com/kubernetes/kubernetes/issues/61259" rel="nofollow noreferrer">Support automatic resizing of volumes</a> </p></l... |
<p>I have a 5 worker node and a master node in a kubernetes cluster. I want to add a new master in that cluster so that the cluster will be highly available. what could be the best approach to add a new master in a cluster? </p>
| <p><a href="https://thenewstack.io/kubernetes-high-availability-no-single-point-of-failure/" rel="noreferrer">This article</a> helped me a lot with understanding how HA cluster looks like in real life, so I recommend to check it out first.</p>
<p>Here is a quote from <a href="https://kubernetes.io/docs/tasks/administer... |
<p>I have deployed an application in kubernetes which is served by Google Ingress Controller (Service as ELB). The application is working fine. But the moment I am applying https related configuration, the https is coming but websocket fails. </p>
<p>Below is the service file and configmap </p>
<p>for http:</p>
<pre... | <p>I think the problem is the annotation:</p>
<pre><code>service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
</code></pre>
<p>The backend-protocol in ELBs must be TCP for websocket connections.</p>
<p>Also, I see you're using Nginx Ingress Controller, maybe you want to set these variables in the co... |
<p>My application is running in Kubernetes pods and I would like to use <a href="https://github.com/golang/groupcache" rel="nofollow noreferrer">golang/groupcache</a> to distribute key/value entities amongst instances of the app.</p>
<p>The groupcache library in each of my app instances is required to know the connect... | <p>Go Client Library is one of the options. Another (more simple) option is to setup a <a href="https://kubernetes.io/docs/concepts/services-networking/service/#headless-services" rel="nofollow noreferrer">headless service</a> for groupcache, so with a single DNS lookup you can get all IP addresses of all groupcache po... |
<p>As I have been using kubernetes more I keep on seeing the reference that a pod can contain 1 container or more and I have even looked at examples.</p>
<p>My question is whether there is a case where this would be best practice and more efficient to create multi container pods since you can scale and replicate your ... | <p>A Pod can contain multiple containers, but for the most portion of the situations, it makes perfect sense for the Pod to be simply an abstraction over a single running container. </p>
<p><strong>In what situations does it make sense to have a multi-container deployed Pod?</strong></p>
<p>What comes to my mind are ... |
<p>I have an umbrella chart with multiple sub-charts, I simply want to make sure that subchart1 runs before subchart2, etc. How can we define the order of subchart execution?</p>
<p>Seems like hook-weights only apply relative to the chart that declares them.</p>
| <p>Here is a part of the Helm <a href="https://helm.sh/docs/topics/charts/#operational-aspects-of-using-dependencies" rel="noreferrer">documentation</a> related to execution order of charts:</p>
<blockquote>
<p>The above sections explain how to specify chart dependencies, but how
does this affect chart installation usi... |
<p>I'm working on a Java Play project, and in my <code>application.conf</code> file I have a Redis cluster set-up that receives an array of Redis server nodes.</p>
<p>Now, I want to inject that value in Kubernetes deployment as an environment variable and can't find the right syntax to do so.</p>
<p>My current <code>... | <p>You can inject your entire application.conf with a mechanism of ConfigMaps:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metatada:
name: app-config
data:
application.conf: |
play.cache.redis {
# enable cluster mode
source: cluster
# nodes are defined as a sequence of objects:
cluste... |
<p>I have a statefulset of kafka. I need to expand the disk size, i try wihout succes to use the automatic resize feature of k8s 1.9</p>
<p>Here : <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/... | <p>I made the feature work, but in a very very dirty way. </p>
<ol>
<li>Modify the size of the PVC</li>
<li>Modify the size of the EBS manually</li>
<li>Force unmount the volume on AWS</li>
<li>The pod crash and is
rescheduled by the statefullset, when the pod is up again the volume and partition have the correct size... |
<p>Having some issue with my kubernetes cluster and DNS.</p>
<p>We recently updated to RHEL 7.5 and one of the machines was the Master. Once it back online most everything worked but I just noticed that external connections from the cluster do not resolve. Internal communication works great.</p>
<p>Here's the busybox... | <p>Not sure of the details of your upgrade, but check to see if your kube-dns version changed when you upgraded your OS. There’s an issue with kube-dns version 1.14.9 resolving external name services. You’ll need to roll back kube-dns to a previous build, or upgrade to 1.14.10.</p>
<p>See this issue: <a href="https://... |
<p>I am having a lot of issues configuring My Dockerized Django + PostgreSQL DB application to work on Kubernetes Cluster, which I have created using Google Cloud Platform.</p>
<p>How do I specify DATABASES.default.HOST from my settings.py file when I deploy image of PostgreSQL from Docker Hub and an image of my Djang... | <p>You will have to create a <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">service</a> (cluster ip) for your postgres pod to make it "accessible". When you create a service, you can <a href="https://kubernetes.io/docs/concepts/services-networking/service/#dns" rel=... |
<p>Currently I have a piece of go code that is based on other examples. I can list all the pods, jobs... etc but I am encountering a rather tricky problem with the creation of a Job on <strong>Openshift</strong>.</p>
<p>The following parts of my code are supposed to create a Job, I even get a response, but no job is b... | <p>Based on the work that I did in the past (you can see <a href="https://github.com/rancher/rancher/pull/11615/commits/6dabdc78dfcdaee6990dc6e3b54fa45c0cc8f8da#diff-9953a124b5cf32451b22b398a0b4d62eR38" rel="noreferrer">here</a>), I think you can specify the Namespace in the ObjectMeta of the Job resource. And you can ... |
<p>I am deploying sample springboot application using fabric8 maven deploy. The build fails with SSLHandshakeException.</p>
<pre><code>F8: Cannot access cluster for detecting mode: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable t... | <p>Adding the certificates to the "cacerts" in $JAVAHOME/jre/lib/security solved the issue. </p>
|
<p>I have a K8s, currently running in single node (master+kubelet,172.16.100.81). I have an config server image which I will run it in pod. The image is talking to another pod named eureka server. Both two images are spring boot application. And eureka server's http address and port is defined by me. I need to transfer... | <p>Generally, you don't need nodePort when you want two pods to communicate with each other. A simpler clusterIP is enough.</p>
<p>Whenever you are exposing a deployment with a service, it will be internally discoverable from the DNS. Both of your exposed services can be accessed using:
<code>http://config-server.defa... |
<p>I'm trying to understand why kubernetes docs <a href="https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#organizing-resource-configurations" rel="noreferrer">recommend</a> to specify service before deployment in one configuration file:</p>
<blockquote>
<p>The resources will be created i... | <p>If you use <code>DNS</code> as service discovery, the order of creation doesn't matter.</p>
<p>In case of <code>Environment Vars</code> (the second way K8S offers service discovery) the order matters, because once that vars are passed to the <strong>starting</strong> pod, they cannot be modified later if the servic... |
<p>We are following a microservice based architecture, where I deploy my application inside a kubernetes cluster by helm package. I have a nodejs application which queries cron jobs from database and should add these jobs to crontab file inside the same container.</p>
<p>So when I expose my container as a nodejs app i... | <p>I understand that you are looking for a job scheduler, by my experience putting more than 1 process per container is not the best idea, maybe you can use another approach using an extra microservice that runs that jobs.</p>
<p>I recommend using Agenda</p>
<p><a href="https://github.com/agenda/agenda" rel="nofollow... |
<p>We sometimes use Python scripts to spin up and monitor Kubernetes Pods running on Google Kubernetes Engine using the <a href="https://github.com/kubernetes-client/python" rel="nofollow noreferrer">Official Python client library for kubernetes</a>. We also enable auto-scaling on several of our node pools. </p>
<p>Ac... | <p>When a nodepool size changes, depending on the size, this can initiate a change in the size of the master. Here are the <a href="https://kubernetes.io/docs/admin/cluster-large/#size-of-master-and-master-components" rel="nofollow noreferrer"><strong>nodepool sizes mapped with the master sizes</strong></a>. In the cas... |
<p>i have a kubernetes cluster of 2 machines on bare metal machines on which master machine contains the docker image which i want to deploy only on slave node, but i dont want to use the cloud repository for image storage,i am building docker image from jenkins job which runs on master machine, if i use docker image... | <p>The slave needs to download the image from somewhere. Images are not automatically distributed to the slaves.</p>
<p>If you don't want to use dockerhub, you need to host your own Docker Registry in the cluster to download images from it. <a href="https://medium.com/@jmarhee/in-cluster-docker-registry-with-tls-on-ku... |
<p>I set up a Kubernetes cluster with a single master node and two worker nodes using <code>kubeadm</code>, and I am trying to figure out how to recover from node failure.</p>
<p>When a worker node fails, recovery is straightforward: I create a new worker node from scratch, run <code>kubeadm join</code>, and everythin... | <p>I ended up writing a Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">CronJob</a> backing up the etcd data. If you are interested: I wrote a blog post about it: <a href="https://labs.consol.de/kubernetes/2018/05/25/kubeadm-backup.html" rel="nofollow ... |
<p>OS: CentOS 7
docker version 1.13.1</p>
<p>I am trying to install kubernetes on centos to run in-house. I built it using the build on docker since the build with go would not work. Documentation is extremely poor regarding dependencies and specifics.</p>
<p>I followed the instructions on the kubernetes site here : ... | <p>First of all, the result of built is located in folder <code>_output</code> :</p>
<pre><code>[@_output]# ls
dockerized images release-images release-stage release-tars
</code></pre>
<p>In folder <code>release-images\$your_architecture</code>, you can find the images in tarballs:</p>
<pre><code>[@release-imag... |
<p>Suppose we have a kubernetes stack running on AWS and we would like to config our component directly via kubernetes chart files to be able to provision some AWS services (for example a DynamoDB table).</p>
<p>What would be the best practice if we want to achieve this and hopefully also allow our kubernetes componen... | <p>What you are describing here is more or less what the <a href="https://github.com/awslabs/aws-servicebroker/" rel="nofollow noreferrer">AWS Service Broker</a> is trying to achieve. Using the <a href="https://www.openservicebrokerapi.org/" rel="nofollow noreferrer">Open Service Broker API</a>, the AWS broker would re... |
<p>Can someone give a simple example on how to route the following URLs:</p>
<pre><code>http://monitor.app.com/service-one
http://monitor.app.com/service-two
http://monitor.app.com/service-three
http://monitor.app.com/service-four
</code></pre>
<p>To the following backend services?</p>
<pre><code>http://service-one/... | <p>Here is a configuration for your example. Adjust it according to your real cluster configuration:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: service-one
spec:
selector:
k8s-app: service-one-app
ports:
- port: 80
targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: ser... |
<p><code>List</code> API objects and triple dashes (<code>---</code>) can both be used to denote multiple objects in a single YAML file. Therefore, why do Lists exist when triple dashes accomplish the same thing (in my opinion) in a cleaner way? Are there any cases in which a List would be preferred over triple dashes,... | <p>I can think of two reasons:</p>
<ol>
<li>Because the Kubernetes API works with JSON and in JSON there is no ---</li>
<li>Maybe the kind List is meant only for responses.</li>
</ol>
|
<p>This question is about the behavior of PersistentVolume and PersistentVolumeClaim configurations within Kubernetes. We have read through the <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">documentation</a> and are left with a few lingering questions. </p>
<p>We a... | <p>So for the pvc it is definitely the case that it has only 10Gig available with this config. For the pv I assume it is the same but in this case I don't know for sure but should be, because of consistency. And it stops working if any of this limits are reached so if you have 11 Jenkins running it will even fail altho... |
<p>I'm creating a pod with a volumeMount set to <code>mountPropagation: Bidirectional</code>. When created, the container is mounting the volume with <code>"Propagation": "rprivate"</code>. </p>
<p>From the k8s <a href="https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation" rel="nofollow noreferrer">d... | <p>this was a regression fixed in 1.10.3 in <a href="https://github.com/kubernetes/kubernetes/pull/62633" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/62633</a></p>
|
<p>repo: <a href="https://github.com/Yolean/kubernetes-kafka" rel="nofollow noreferrer">yolean/kubernetes-kafka</a></p>
<p>I'm going to follow the steps to deploy a kafka cluster in the cloud. But I don't quite understand the instruction. Specifically, under /kafka and /zookeeper, do I need to "kubectl create -f" all... | <blockquote>
<p>I need to "kubectl create -f" all YAMLs? </p>
</blockquote>
<p>If you want a fully installed cluster, yes. </p>
<blockquote>
<p>what do the numerical prefix of each YAML represent? </p>
</blockquote>
<p>Ordering. For example, configure the broker pods, then install Kafka, then configure Kafka </p... |
<p>I defined the following parameters in values.yaml</p>
<pre><code>resources:
nvidia.com/gpu: 1
</code></pre>
<p>and in templates, I'd like to add following logic in <code>templates/deployment.yaml</code></p>
<pre><code>{{- if .Values.resources.nvidia.com/gpu }}
****
{{- end}}
</code></pre>
<p>But it's failed, ... | <p>You can always use the function index:</p>
<pre><code> {{- if index .Values.resources "nvidia.com/gpu" }}
x: {{ index .Values.resources "nvidia.com/gpu" }}
{{- end}}
</code></pre>
|
<p>I have deployed my application image into Kubernetes.</p>
<p>I am trying to send application logs to Splunk. One option would be to use DeamonSet. But, due to some restrictions, I would like to use sidecar.</p>
<p>Is there any sidecar for sending logs from Kubernetes Docker to Splunk?</p>
| <p>As you say, you could add a docker container to your pod with a shared volume, for example</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: app-with-sidecar-logs
spec:
volumes:
- name: logs
emptyDir: {}
containers:
- name: app
image: nginx
volumeMounts:
- name: logs
mountPath:... |
<p>I'm trying to deploy Traefik as an ingress controller on my GKE cluster.
It's a basic cluster with 3 nodes.</p>
<p>I'm used to deploy Traefik using manifest on a Kubernetes cluster deployed by Kubespray, but we are migrating some of our infrastructures to GCP.</p>
<p>So I tried to deploy Traefik using the <a href=... | <pre><code>Invalid value for field 'namedPorts[0].port': '0'
</code></pre>
<p>This error happens when the <code>Service</code> that's being used by GKE Ingress is of type <code>ClusterIP</code> (and not <code>NodePort</code>). GKE Ingress requires backing Services to be of type NodePort.</p>
|
<p>I try to create cluster with kops. I buy domain name in aws route53 megatest.com in I created public Hosted zones.</p>
<pre><code>megatest.com.
NS
ns-1092.awsdns-08.org.
ns-1917.awsdns-47.co.uk.
ns-69.awsdns-08.com.
ns-801.awsdns-36.net.
megatest.com.
SOA
ns-801.awsdns-36.net. awsdns-hostmaster.amazon.com.
</co... | <p>When you create your Hosted zones aws does not change your name server in your Registered domains. </p>
<p>Click on your domain in Registered domains after change your name server with the new name server on your host zones.</p>
|
<p>I'm having trouble accessing a Kubernetes environment variable in my python app's init.py file. It appears to be available in other files, however. </p>
<p>My init.py file includes this code <code>app.config.from_object(os.environ['APP_SETTINGS'])</code>. The value of <code>APP_SETTINGS</code> depends on my envir... | <blockquote>
<p><code>werkzeug.utils.ImportStringError: import_string() failed for 'config.StagingConfig\n'. Possible reasons are:</code></p>
</blockquote>
<p>It very clearly shows you that the module name has a trailing newline character, which is a very, very, very common error for people who try to <code>echo som... |
<p>We are unable to grab logs from our GKE cluster running containers if StackDriver is disabled on GCP. I understand that it is proxying stderr/stdout but it seems rather heavy handed to block these outputs when Stackdriver is disabled.</p>
<p>How does one get an ELF stack going on GKE without being billed for StackD... | <p>You can disable Stackdriver logging/monitoring on Kubernetes by editing your cluster, and setting "Stackdriver Logging" and "Stackdriver Monitoring" to disable.</p>
<p>I would still suggest sticking to GCP over AWS as you get the whole Kube as a service experience. Amazon's solution is still a little way off, and t... |
<p>There is container for using certbot in kubernetes.
<a href="https://hub.docker.com/r/choffmeister/kubernetes-certbot/" rel="nofollow noreferrer">https://hub.docker.com/r/choffmeister/kubernetes-certbot/</a></p>
<p>It uses 1.3.0 release. I want to build same docker image, but with latest version 1.10.2.
I just repl... | <p>It looks like the run.sh file is not available. Can you confirm that file is in the same folder as the Dockerfile? Here is the link to the run.sh file:
<a href="https://github.com/choffmeister/kubernetes-certbot/blob/master/run.sh" rel="nofollow noreferrer">https://github.com/choffmeister/kubernetes-certbot/blob/mas... |
<p>I am trying to run my Django + PostgreSQL application on Kubernetes Google Cloud cluster. I've successfully deployed the following files:</p>
<ol>
<li>Django App Deployment</li>
<li>Django App Service</li>
<li>Kubernetes Secret object for DB credentials</li>
<li>PersistentVolumeClaim</li>
</ol>
<p>But I am having ... | <p>It does not look like an error to me, more like a warning. PostgreSQL is complaining that you should use a totally empty directory for Postgres data folder. What the application is telling you to do is to create an empty directory inside your volume and the mount that specific subdirectory. That would be done by doi... |
<p>I'm starting with k8s, and i have little problem with parallel processing in my pods.</p>
<p>Currently I'm using dot.net core platform with c# 7.2 for my application with is running in pods.
I'm trying to use parallel task in apps, but it looks lika application is using only one core.</p>
<p><strong>So I'm thinkin... | <blockquote>
<p>When to use Parallel API ?</p>
</blockquote>
<p>You have a CPU intensive task and wanted to ensure all the CPU cores are effectively utilized. Parallel calls are always blocking operation for main / Ui thread</p>
<blockquote>
<p>When to use Async Await ?</p>
</blockquote>
<p>When your aim is to d... |
<p>In our Kuberenetes cluster, we are running into sporadic situations where a cluster node runs out of memory and Linux invokes OOM killer. Looking at the logs, it appears that the Pods scheduled onto the Node are requesting more memory than can be allocated by the Node.</p>
<p>The issue is that, when OOM killer is i... | <p>You can now use kube-state-metrics <code>kube_pod_container_status_terminated_reason</code> to detect OOM events</p>
<pre><code>kube_pod_container_status_terminated_reason{reason="OOMKilled"}
kube_pod_container_status_terminated_reason{container="addon-resizer",endpoint="http-metrics",instance="100.125.128.3:8080"... |
<p>I use <code>minikube</code> to create local kubernetes cluster.</p>
<p>I create <code>ReplicationController</code> via <code>webapp-rc.yaml</code> file.</p>
<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
name: webapp
spec:
replicas: 2
template:
metadata:
name: webapp
labels:... | <p>First of all, tomcat image expose port 8080 not 80, so the correct YAML would be:</p>
<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
name: webapp
spec:
replicas: 2
template:
metadata:
name: webapp
labels:
app: webapp
spec:
containers:
- name: webapp
... |
<p>I'v enabled heapster on minikube</p>
<pre><code>minikube addons start heapster
</code></pre>
<p>And custom metrics with</p>
<pre><code>minikube start --extra-config kubelet.EnableCustomMetrics=true
</code></pre>
<p>My deployment looks like</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:... | <p>Ensure the <code>metrics-server</code> addons is enabled on minikube.</p>
<p>When I start minikube () I have the following addons enabled by default:</p>
<pre><code>$ minikube addons list
- addon-manager: enabled
- coredns: disabled
- dashboard: enabled
- default-storageclass: enabled
- efk: disabled
- freshpod: d... |
<p>I have a server nodes and powerful expensive worker nodes.
Worker nodes are set to be autoscaled from/to zero and run few hours per week.</p>
<p>When server creates HTTP request to worker Service (where corresponding Job resides on worker nodes) I want that worker node to bring up, start Job pod and process this re... | <p>Probably you need to create your own Custom Resource Definition (CRD) and write the trigger you need.</p>
<p>You may find useful this link: <a href="https://kubeless.io/docs/implementing-new-trigger/" rel="nofollow noreferrer">https://kubeless.io/docs/implementing-new-trigger/</a></p>
|
<p>I'm using Arch linux<br>
I had virtualbox 5.2.12 installed<br>
I had the minikube 0.27.0-1 installed<br>
I had the Kubernetes v1.10.0 installed<br></p>
<p>When i try start the minkube with <code>sudo minikube start</code> i get this error</p>
<pre><code>Starting local Kubernetes v1.10.0 cluster...
Starting VM...
G... | <p>Minikube VM is usually started for simple experiments without any important payload.
That's why it's much easier to recreate minikube cluster than trying to fix it.</p>
<p>To delete existing minikube VM execute the following command:</p>
<pre><code>minikube delete
</code></pre>
<p>This command shuts down and dele... |
<p>I have a Kubernetes 1.10 cluster up and running. Using the following command, I create a container running bash inside the cluster:</p>
<pre><code>kubectl run tmp-shell --rm -i --tty --image centos -- /bin/bash
</code></pre>
<p>I download the correct version of kubectl inside the running container, make it executa... | <blockquote>
<p>Does this mean, that kubectl detected it is running inside a cluster and is automatically connecting to that one?</p>
</blockquote>
<p>Yes, it used the KUBERNETES_SERVICE_PORT and KUBERNETES_SERVICE_HOST envvars to locate the API server, and the credential in the auto-injected <code>/var/run/secrets/... |
<p>I am currently trying to use a Kubernetes cluster for the Gitlab CI.
While following the not so good docs (<a href="https://docs.gitlab.com/runner/install/kubernetes.html" rel="nofollow noreferrer">https://docs.gitlab.com/runner/install/kubernetes.html</a>), what I did was manually register a runner with the token f... | <p>@djuarez As long the deployment selector matches the pods label in the template section, and in this case from what I can see that is the case:</p>
<pre><code>selector:
matchLabels:
name: gitlab-runner
template:
metadata:
labels:
name: gitlab-runner
</code></pre>
<p>it should not be a problem; pr... |
<p>I have a Kubernetes's and spring boot's env variables conflict error. Details is as follows:</p>
<p>When creating my zipkin server pod, I need to set env variable <code>RABBITMQ_HOST=http://172.16.100.83,RABBITMQ_PORT=5672</code>. </p>
<p>Initially I define zipkin_pod.yaml as follows:</p>
<pre><code>apiVersion: v... | <p>As @Bal Chua and @Pär Nilsson mentioned, for environmental variables you can use only string variables because Linux environmental variables can be only strings. </p>
<p>So, if you use yaml, you need to place value into quotes to force Kubernetes to use string.</p>
<p>For example:</p>
<pre><code>- name: RABBITMQ_... |
<p>I want to export <em>already templated</em> Helm Charts as YAML files. I can not use Tiller on my Kubernetes Cluster at the moment, but still want to make use of Helm Charts. Basically, I want Helm to export the YAML that gets send to the Kubernetes API with values that have been templated by Helm. After that, I wil... | <p>We need logs to check the <code>Unauthorized</code> issue.</p>
<p>But you can easily generate templates locally:</p>
<pre><code>helm template mychart
</code></pre>
<blockquote>
<p>Render chart templates locally and display the output.</p>
<p>This does not require Tiller. However, any values that would normally
be lo... |
<p>I am searching for the command to <strong>print out the podname (or hostname)</strong> when I call my echoserver (<code>gcr.io/google_containers/echoserver</code>. I saw that in a video, regarding <strong>loadbalancing and ingress as a proof of concept</strong>, to show which server responds when I hit the refresh b... | <p>I got it: I have to raise the Version!</p>
<p>With versions greater than 1.4 it works :-)</p>
<p>So the correct one is the actual version 1.10:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
name: echoserver
spec:
replicas: 1
template:
metadata:
name: echoserver
lab... |
<p>Is it possible to get a list of pods that are Running on matser from kubectl?</p>
<p>i have tried this </p>
<pre><code>kubectl get pods -o wide --sort-by="{.spec.nodeName}"
</code></pre>
<p>but this doesnt say whether the node is master or worker</p>
| <p>As mentioned in <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/" rel="nofollow noreferrer">the overview</a>:</p>
<blockquote>
<p>A Pod always runs on a <strong><a href="https://kubernetes.io/docs/concepts/architecture/nodes/" rel="nofollow noreferrer">Node</a></strong>.<br>
... |
<p>I was one that was having trouble with this above mentioned issue where after a "kubectl delete -f" my container would be stuck on "Terminating".
I could not see anything in the Docker logs to help me narrow it down.
After a Docker restart the pod would be gone and i could continue as usual, but this is not the way ... | <p>As <a href="https://stackoverflow.com/users/8019337/kleuf">kleuf</a> mentioned in comments, the solution to the stuck docker container in his case was the following:</p>
<blockquote>
<p>When i installed Kubernetes on Ubuntu 16.04 i followed a guide that
said to install "docker.io". In this article it said to re... |
<p>I am creating some secrets when <code>helm install</code> is executed via <code>pre-install</code> hooks.</p>
<p>Everything works great. However when <code>helm delete</code> is performed the secrets created are not deleted. This is because any resource installed using <code>pre-install</code> is considered to be s... | <p>Tiller creates resources in a specific order (find it in the source code here: <a href="https://github.com/kubernetes/helm/blob/master/pkg/tiller/kind_sorter.go#L26" rel="noreferrer">https://github.com/kubernetes/helm/blob/master/pkg/tiller/kind_sorter.go#L26</a>)</p>
<p>So for this specific user case there is no n... |
<p>I'd like to know if the client-go library for Kubernetes contains a function that validates if a json/yaml file. Ideally, it would catch errors such as names not being a DNS-1123 compliant or invalid fields specified. It would also be ideal if a list of errors was returned as opposed to the function returning after ... | <p>Client-go library for Kubernetes contains no validation functions for YAML/JSON configuration files.</p>
<p>But take a look at this <a href="https://github.com/garethr/kubeval" rel="nofollow noreferrer">utiliy</a>, you can use it for validation on a client’s side and also use its code as an example of validation im... |
<p>I have just installed my kubernetes cluster on azure using AKS. I have not installed anything and I noticed that the 'tunnelfront' pod was running:</p>
<p><a href="https://i.stack.imgur.com/15pCP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/15pCP.png" alt="tunnelfront"></a></p>
<p>I have tried to find... | <p><code>tunnelfront</code> is an AKS system component that's installed on every cluster that helps to facilitate secure communication from your hosted Kubernetes control plane and your nodes. It's needed for certain operations like <code>kubectl exec</code>, and will be redeployed to your cluster on version upgrades (... |
<p>I need to deploy GitLab with Helm on Kubernetes.
I have the problem: PVC is Pending.</p>
<p>I see <code>volume.alpha.kubernetes.io/storage-class: default</code> in PVC description, but I set value <code>gitlabDataStorageClass: gluster-heketi</code> in values.yaml.
And I fine deploy simple nginx from article <a href... | <p>Without a link to the actual helm you used, it's impossible for anyone to troubleshoot why the go-template isn't correctly consuming your <code>values.yaml</code>.</p>
<blockquote>
<p>I see <code>volume.alpha.kubernetes.io/storage-class: default</code> in PVC description, but I set value <code>gitlabDataStorageCl... |
<p><strong>traefik.toml</strong>:</p>
<pre><code>defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.forwardedHeaders]
trustedIPs = ["0.0.0.0/0"]
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
... | <p>When <code>kube-proxy</code> uses the <code>iptables</code> mode, it uses NAT to send data to the node where payload works, and you lose the original <code>SourceIP</code> address in that case.</p>
<p>As I understood, you use <code>Matallb</code> behind the <code>Traefik</code> Ingress Service (because its type is ... |
<p>I'm planning to upgrade kubernetes cluster version from v1.7.10 to v1.8.12. but as this <a href="https://github.com/kubernetes/kubernetes/issues/53644" rel="nofollow noreferrer">issue</a> state that all containers will be restart because of the spec hash change. So, what's the suggested upgrade procedure ? do I need... | <p>After some testing and research, I come to some conclusion:</p>
<ol>
<li><p>Drain the node is not a must. At least, drain can't evict daemonsets. But drain a node is recommend way to upgrade kubernetes, since this can at most extent reduce the impact to applications that's deployed using deployment.</p>
<p>Also, s... |
<p>I'm using kubectl from within a docker container running on a Mac. I've already successfully configured the bash completion for kubectl to work on the Mac, however, it doesn't work within the docker container. I always get <code>bash: _get_comp_words_by_ref: command not found</code>. </p>
<p>The docker image is bas... | <p>Ok, I found it - I simply needed to do a <code>source /etc/bash_completion</code> before or after the <code>source <(kubectl completion bash)</code>.</p>
|
<p>when running docker-compose, all containers have network aliases to the ip of the other containers running in the network.
How are these aliases created ?</p>
<p>I need to recreate an alias in an nginx container within a Kubernetes cluster, because nginx conf doesn't allow environment variables and I reverse proxy ... | <p>In a kubernetes cluster, there is a DNS server service deployed by default.</p>
<p><code>kubectl get svc</code> should show the DNS service IP address.</p>
<p>You can find the DNS server IP address inside the containers <code>/etc/resolv.conf</code> file too.</p>
<p>See <a href="https://kubernetes.io/docs/concept... |
<p>I had a working kops cluster. I deleted some unneeded <code>ig</code>s and updated the cluster. Now kubectl won't connect to the cluster. I get the following error: <code>Unable to connect to the server: dial tcp {ip} i/o timeout</code>.</p>
<p>How do I go about debugging the issue?</p>
| <p>as a first step I would try to run it again with higher log level, there logs are really good.
Note you probably want to redirect to a file ...</p>
<pre><code>kops <whatever> -v 10 &> log.txt
</code></pre>
|
<p>By following link <a href="https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/" rel="noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/</a> it is described how to add secret (encripted) data.</p>
<p>How to get that key-value s with from java client?</p>
| <p>You can use the official Java client for Kubernetes’ REST API and read the secret as defined in this <a href="https://github.com/kubernetes-client/java/blob/master/kubernetes/docs/CoreV1Api.md#readNamespacedSecret" rel="noreferrer">doc</a>. You will get a result of return type <a href="https://github.com/kubernetes-... |
<p>I am trying to create both a PersistentVolume and a PersistentVolumeClaim on Google Kubernetes Engine. </p>
<p>The way to link them is via labelSelector.
I am creating the objects with this definition:</p>
<p>volume.yml</p>
<pre><code>---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-test
namespace... | <p>First of all, <code>PersistentVolume</code> resources don’t belong to any namespace. They’re cluster-level resources like nodes, but <code>PersistentVolumeClaim</code> objects can only be created in a specific namespace.</p>
<p>Seems like when you created the claim earlier, it was immediately bound to the <code>Per... |
<p>How To deploy in kubernetes a message consumer for kafka, amqp or any other message broker which scales up and down ? My hypothesis is that the consumer runs a loop which pulls messages.</p>
<p>I d like kubernetes To create more pods when many messages arrive in the broker queue and remove some pods when too few me... | <p>The Kubernetes Horizontal Pod Autoscaler has support for <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics" rel="noreferrer">custom and external metrics</a>. With more traditional messaging brokers like AMQP (1 queue / many competing consumers) you should ... |
<p>I've created some secrets and I'm trying to import the file in this way:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: {{ template "amq.broker.fullname" . }}-tls
labels:
app: {{ template "amq.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
component: "{{ .Va... | <p>The solution to this is, as per the <a href="https://helm.sh/docs/chart_template_guide/accessing_files/#configmap-and-secrets-utility-functions" rel="nofollow noreferrer">docs</a>, the following:</p>
<pre><code>{{- $root := . -}}
{{- range $path, $bytes := .Files.Glob "secrets/broker.ks" }}
{{ base $path }... |
<p>I am trying to create both a PersistentVolume and a PersistentVolumeClaim on Google Kubernetes Engine. </p>
<p>The way to link them is via labelSelector.
I am creating the objects with this definition:</p>
<p>volume.yml</p>
<pre><code>---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-test
namespace... | <p>Thanks for your help @konstantin-vustin</p>
<p>I found the solution. I had to specify <strong>storageClassName: manual</strong> attribute in the spec of both objects.</p>
<p><a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts... |
<p>I've got a username and password, how do I authenticate kubectl with them?</p>
<p>Which command do I run?</p>
<p>I've read through: <a href="https://kubernetes.io/docs/reference/access-authn-authz/authorization/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authorization/</a> a... | <p>Kubernetes provides a number of different authentication mechanisms. Providing a username and password directly to the cluster (as opposed to using an OIDC provider) would indicate that you're using Basic authentication, which hasn't been the default option for a number of releases.</p>
<p>The syntax you've listed... |
<p>Is there any configuration snapshot mechanism on kubernetes?</p>
<p>The goal is to take a snapshot of all deployments/services/config-maps etc and apply them to a kubernetes cluster.</p>
<p>The steps that should be taken.</p>
<ul>
<li>Take a configuration snapshot</li>
<li>Delete the cluster</li>
<li>Create a new... | <p>These are the 3 that spring to mind, with <code>kubed</code> being, at least according to their readme, the closest to your stated goals:</p>
<ul>
<li><a href="https://github.com/heptio/ark#readme" rel="nofollow noreferrer">Ark</a></li>
<li><a href="https://github.com/appscode/kubed#readme" rel="nofollow noreferrer... |
<p>I am just trying to deploy kubernetes Dashboard in a namespace called "test".</p>
<p><a href="https://raw.githubusercontent.com/kubernetes/dashboard/v1.8.3/src/deploy/recommended/kubernetes-dashboard.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/dashboard/v1.8.3/src/deploy/re... | <p>That happened because you created the ServiceAccount on a different namespace, namely <code>test</code> but as it says, it needs to be deployed in <code>kube-system</code> in order to be able to function.</p>
<p>You can find a nice walkthrough and possibly some clarifications <a href="https://github.com/kubernetes/... |
<p>I have created a <strong>Dockerfile</strong> (for a Node <strong>JNLP</strong> slave which can be used with the <strong>Kubernetes Plugin of Jenkins</strong> ). I am extending from from the official image <code>jenkinsci/jnlp-slave</code></p>
<pre><code>FROM jenkinsci/jnlp-slave
USER root
MAINTAINER Aryak Sengup... | <p>The Jenkins kubernetes plugin will always create a JNLP slave container inside the pod that is created to perform the build. The podTemplate is where you define the other containers you need in order to perform your build.</p>
<p>In this case it seems you would want to add a Node container to your podTemplate. In y... |
<p>Is there any configuration snapshot mechanism on kubernetes?</p>
<p>The goal is to take a snapshot of all deployments/services/config-maps etc and apply them to a kubernetes cluster.</p>
<p>The steps that should be taken.</p>
<ul>
<li>Take a configuration snapshot</li>
<li>Delete the cluster</li>
<li>Create a new... | <p>State of the kubernetes is stored on etcd, so back up etcd data and restore would be able to restore cluster. But this would not backup any information stored in persistent volumes, that needs to be handled separately.</p>
<p>backup operater provided by coreos is a good option: </p>
<ul>
<li><a href="https://coreo... |
<p>Trying run container on Kubernetes, container don't start, fail with error:</p>
<pre><code>Error: failed to start container "tbsp-dev-container":
Error response from daemon: invalid header field value "oci runtime error:
container_linux.go:247: starting container process caused "process_linux.go:320: writing syncT ... | <p>Check that you are base64 encoding all the secrets you are passing to the container.</p>
<p>Based on this <a href="https://github.com/kubernetes/kubernetes/issues/52481" rel="noreferrer">issue</a> that might cause that error to trigger.</p>
|
<p>I am trying using Kubernetes Java client for few use cases.</p>
<p><a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">https://github.com/kubernetes-client/java</a></p>
<p>Our Kubernetes cluster is been implemented with OpenId authentication.</p>
<p>Unfortunately, the Java client doesn't su... | <p><a href="https://github.com/kubernetes-client/java/tree/client-java-parent-2.0.0-beta1/util/src/main/java/io/kubernetes/client/util/credentials" rel="nofollow noreferrer">Apparently not</a>, but by far the larger question is: what would you <em>expect</em> to happen with an <code>oidc</code> <code>auth-provider</cod... |
<p>I created a Docker image based on microsoft/dotnet-framework of a C#.NET console application built for Windows containers, then ensured I can run the image in a container locally. I successfully pushed the image to our Azure Container registry. Now I'm trying to create a deployment in our Azure Kubernetes service, b... | <p><strong>1. What causes this unknown blob error? Does it have to do with a Windows container/Linux container mismatch?</strong>
It's because you're trying to run a Windows-based Docker container on a Linux host. It has nothing directly to do with Kubernetes or AKS. Currently AKS is in preview and supports only Linux ... |
<p>I have a folder in my server that I want to update inside a cointaier in a pod. How do I do that without deleting the Secret?</p>
<p>I know that the following creates my secret:
<code>
oc create secret generic privkey --from-file=/opt/privkey
</code></p>
<p>I know that the following deletes the secret:</p>
<p><co... | <p>try this:</p>
<pre><code>oc create secret generic privkey --from-file=/opt/privkey --dry-run -o yaml | oc replace -f -
</code></pre>
|
<p>We're using a >1.8 version of k8s on gcloud. Unfortunately EventStore stops pushing data until it is rebooted. Thus we'd like to run <code>kubectl --namespace=$NAMESPACE delete pod eventstore-0</code> every 6 hours. Thus we have a cron job like:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
nam... | <p>I would do this:</p>
<pre><code>kubectl delete po $(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' | grep eventstore) -n $NAMESPACE
</code></pre>
<p>or (your way)</p>
<pre><code>kubectl get pods -n $NAMESPACE -o go-template --template '{{range .items}}{{.metadata.na... |
<p>Given:</p>
<ul>
<li>a simple pod running an nginx </li>
<li>a nodeport service</li>
<li>an ingress</li>
</ul>
<p>When calling the <em>pod</em> from within the cluster we get a 200 response code</p>
<p>When calling the <em>service</em> from within the cluster we get a 200 response code</p>
<p>The ingress shows as... | <p>GKE is managing a firewall rule. For some reason new (node) ports used by ingresses aren't added automatically anymore to this rule. After adding the new ports <strong>manually</strong> to this rule in the console, the backend service became healthy.</p>
<p>Still need to find out:</p>
<ul>
<li>why is the port not ... |
<p>I try to resize a kubernetes cluster to zero nodes using</p>
<pre><code>gcloud container clusters resize $CLUSTER_NAME --size=0 --zone $ZONE
</code></pre>
<p>I get a success message but the size of the node-pool remains the same (I use only one node pool)</p>
<p>Is it possible to resize the cluster to zero?</p>
| <p>Sometimes you just need to wait 10-20 minutes before autoscale operation takes effect.<br>
In other cases, you may need to check if some conditions are met for downscaling the node.</p>
<p>According to <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler" rel="nofollow noreferrer">au... |
<p>I'm working in kube-proxy development and I'm in the stage of understanding the purpose and execution of kube-proxy. </p>
<p>I know that kube-proxy will add iptables rules to enable user to access the exposed pods (which is kubernetes service in iptables mode). </p>
<p>what makes me wonder, is the fact that those ... | <p><a href="https://github.com/philips/real-world-kubernetes/blob/master/k8s-setup/kube-proxy.yaml" rel="nofollow noreferrer">kube-proxy.yaml</a></p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: kube-proxy
namespace: kube-system
spec:
hostNetwork: true
containers:
- name: kube-proxy
image: gcr.io/... |
<p>It seems a deployment has gotten stuck. How can I diagnose this further? </p>
<pre><code>kubectl rollout status deployment/wordpress
Waiting for rollout to finish: 2 out of 3 new replicas have been updated...
</code></pre>
<p>It's stuck on that for ages already. It is not terminating the two older pods: </p>
<pre... | <p>You can use describe <code>kubectl describe po wordpress-f59c459fd-qkfrt</code> but from the message the pods cannot be scheduled in any of the nodes.</p>
<p>Provide more capacity, like try to add a node, to allow the pods to be scheduled.</p>
|
<p>Trying to run Elastic Search 6.2.4 on Openshift but it is not running and the container exits with the code 137. </p>
<pre><code>[2018-06-01T14:24:58,148][INFO ][o.e.p.PluginsService ] [jge060C]
loaded module [ingest-common]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [... | <p>Kernel <em>command line</em> parameters can't be changed per pod, but <code>vm.max_map_count</code> is parameter you can change via sysctl.</p>
<p>See these two similar SO question for a solution:</p>
<ul>
<li><a href="https://stackoverflow.com/questions/44439372/how-to-pass-sysctl-flags-to-docker-from-k8s">How to... |
<p>I'm pretty much new to Kubernetes and don't have hands-on experience on it. </p>
<p>My team is facing issue regarding the log format pushed by <a href="/questions/tagged/kubernetes" class="post-tag" title="show questions tagged 'kubernetes'" rel="tag"><img src="https://i.stack.imgur.com/aIElQ.png" height="1... | <p>Kubernetes architecture provides three ways to gather logs:</p>
<p><strong>1. Use a node-level logging agent that runs on every node.</strong></p>
<p>You can implement cluster-level logging by including a node-level logging agent on each node. The logging agent is a dedicated tool that exposes logs or pushes logs ... |
<h1>My question is 'probably' specific to Azure.</h1>
<blockquote>
<p>How can I review the Kube-Proxy logs?</p>
</blockquote>
<p>After SSH'ing into an Azure AKS Node (done) I can use the following to view the Kubelet logs:</p>
<pre><code>journalctl -u kubelet -o cat
</code></pre>
<p>Azure docs on the Azure Kubele... | <p>On AKS, kube-proxy runs as a DaemonSet in the kube-system namespace</p>
<p>You can list the kube-proxy pods + node information with:</p>
<pre><code>kubectl get pods -l component=kube-proxy -n kube-system -o wide
</code></pre>
<p>And then you can review the logs by running:</p>
<pre><code>kubectl logs kube-proxy-... |
<p>i have a sample nodejs application which uses an envVar environment variable, i have deployed this on kubernetes cluster. I am passing the env variable through config map.</p>
<p>once deployed and when pods is all running, if i change my config map with new value. Should deployment of my nodejs application need to ... | <p>When you mount the keys from the ConfigMap as environment variables, you would need to restart your pod for the changes to take effect.</p>
<p>When you mount it as volume into you system, the files in the volume will be updated automatically. The update is not immediate, there is some TTL configured in the <code>ku... |
<p>I couldn't find any information on wherever a connection creation between cluster's pod and locahost is encrypted when running "kubectl port-forward" command.</p>
<p>It seems like it uses "<a href="https://linux.die.net/man/1/socat" rel="noreferrer">socat</a>" library which supports encryption, but I'm not sure if ... | <p>As far as I know when you port-forward the port of choice to your machine kubectl connects to one of the masters of your cluster so yes, normally communication is encrypted. How your master communicate to the pod though is dependent on how you set up internal comms.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.