prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I need to get a work-item from a work-queue and then sequentially run a series of containers to process each work-item. This can be done using initContainers (<a href="https://stackoverflow.com/a/46880653/94078">https://stackoverflow.com/a/46880653/94078</a>)</p>
<p>What would be the recommended way of restarting t... | <p>Jobs <em>should</em> be used for working with work queues. When using work queues you should <strong>not set</strong> the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#jobspec-v1-batch" rel="noreferrer"><code>.spec.comletions</code></a> (or set it to <code>null</code>). In that case P... |
<p>I'm trying to create a Kubernetes cluster using Azure Management API.</p>
<pre><code> var credentials = SdkContext.AzureCredentialsFactory
.FromFile(Environment.GetEnvironmentVariable("AZURE_AUTH_LOCATION"));
var azure = Azure
.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
... | <p>According to the error log, it seems you don't set default subscription for your service principal. You could use <code>az account set --subscription <name or id></code> to set it.</p>
<p>If it still does not work, I suggest you could use the following code.</p>
<pre><code> var azure = Azure
.Configure(... |
<p>I have a Kubernetes cluster having some application pods which are generating multiple log files inside each pod. I want to log those files in a centralized logging solution like elasticsearch. The logs are neither part of stdout/stderr of pod, nor they are mounted as host volume. So basically I need some solution w... | <blockquote>
<p>nor they are mounted as host volume</p>
</blockquote>
<p>There's your problem: you will want to expose a path that <em>is</em> a host volume, such that your existing centralized log slurping tool can see them. The only asterisk I know of when doing that is to be mindful of the permissions, which won'... |
<p>I want to set http/https proxy in pods and pass these variables via environment. However, I need to set no_proxy as well. Which values should I put it to not break somethings in k8s-inside-communication? As far as I know, there are some default services as "kubernetes.default.svc".</p>
| <p>You could, as illustrated in <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1467776" rel="nofollow noreferrer">OpenShift Container Platform bug 1467776</a>, add <code>.svc</code> to <code>no_proxy</code> (as in <a href="https://github.com/openshift/openshift-ansible/pull/4678/files" rel="nofollow noreferrer">P... |
<p>I am trying to create Kubernetes cluster using three VMs(Master – 10.x.x.4, Node1 – 10.x.x.150, Node2 – 10.x.x.160).</p>
<p>I was able to create the guestbook application successfully following this link: <a href="http://kubernetes.io/v1.0/examples/guestbook/" rel="noreferrer">http://kubernetes.io/v1.0/examples/g... | <p>You do not have ClusterIP service. You do have a NodePort service. To access it, you connect to the NodePort on any of your nodes in the cluster, as you've already discovered. You do get load-balancing here. Even though you connect to a cluster node, the pod you get does not necessarily run on that particular node.<... |
<p>I tried to use configMap to mount some configs in a subdirectory. For example:</p>
<pre><code>spec.template.spec.containers.[0].volumeMounts:
- name: fh16-volume
mountPath: /etc/fh-16/application.log
subPath: my-config.txt
spec.template.spec.volumes:
- name: fh16-volume
configMap:
name: my-con... | <p>See this note in the <a href="https://kubernetes.io/docs/concepts/storage/volumes/#configmap" rel="nofollow noreferrer">Kubernetes docs</a>:</p>
<blockquote>
<p>Note: A container using a ConfigMap as a subPath volume mount will not receive ConfigMap updates." </p>
</blockquote>
|
<p>I'm trying to use rewrite target from kubernetes with <code>gcloud</code> but it doesn't seem to be respected. My code is the following. Maybe there's something I'm not seen:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo-ingress
annotations:
ingress.kubernetes.io/rewrite-t... | <p>I am assuming you are using the kubernetes ingress-nginx.</p>
<p>Looking at your ingress manifest, it seems like the rewrite annotation is wrong.</p>
<p>According to the documentation it should be:
nginx.ingress.kubernetes.io/rewrite-target</p>
<p>Here's the link to th documentation:</p>
<p><a href="https://gith... |
<p>I have set up a cluster where there are 2 nodes. One is Master and Other is a node, both on different Azure ubuntu VMs. For networking, I used Canal tool.
<code>
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
ubuntu-aniket1 Ready master 57m v1.10.0
ubutu-aniket Ready ... | <p>Try go to:</p>
<pre><code>http://<master IP>:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
</code></pre>
<p>As mentioned here: <a href="https://github.com/kubernetes/dashboard" rel="noreferrer">https://github.com/kubernetes/dashboard</a></p>
|
<p>I use an Kubernetes Init container to provision the application's database. After this is done I want to provide the DB's credentials to the main container via environment variables.</p>
<p>How can this be achieved?</p>
<p>I don't want to create a Kubernetes Secret inside the Init container, since I don't want to sa... | <p>I see several ways to achieve what you want:</p>
<ol>
<li><p>From my perspective, the best way is to use Kubernetes Secret. @Nebril has already provided that idea in the comments. You can generate it by Init Container and remove it by <a href="https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-... |
<p>My ultimate goal is to run Kubernetes on a 3-node CoreOS cluster (if anyone has better suggestions, I'm all ears: at this stage, I'm considering CoreOS a complete waste of my time).</p>
<p>I've started following the <a href="https://coreos.com/blog/coreos-clustering-with-vagrant.html" rel="nofollow noreferrer">Core... | <p>Unfortunately, the documentation you used is currently outdated. Right now <code>ETCD version 3</code> is used as a <code>Kubernetes</code> data storage. It provisions with <code>Ignition</code> (VirtualBox Provider (default)):</p>
<blockquote>
<p>When using the VirtualBox provider for Vagrant (the default), Igni... |
<p>As a k8s cluster administrator, I want to specify on which nodes (using labels) pods will be scheduled, but without modifying any PodSpec section.</p>
<p>So, nodeSelector, affinity and taints can't be options.
Is there any other solution ?</p>
<p>PS: the reason I can't modify the PodSpec is that deployed applicati... | <p>You can use the <a href="https://kubernetes.io/docs/admin/admission-controllers/#podnodeselector" rel="nofollow noreferrer">PodNodeSelector</a> admission controller for this:</p>
<blockquote>
<p>This admission controller has the following behavior:</p>
<ol>
<li>If the Namespace has an annotation with a key <code>sch... |
<p>The Kubernetes <code>client-go</code> package includes a <a href="https://github.com/kubernetes/client-go/tree/master/examples/create-update-delete-deployment" rel="noreferrer">nice example</a> of creating a single deployment using the <code>client-go</code> api.</p>
<p>I want to create and destroy many kubernetes ... | <p>The k8s client uses <code>http.Client</code> internally which is safe to call concurrently. But it is probably wise to limit the number of concurrent API calls to a reasonable upper limit (I'd start with 4; anything above that is probably not going to improve performance much).</p>
|
<p>jwilder/nginx-proxy has 1.3K STARS and 10M+ PULLS on Docker Hub. And Watch 262, Star 7701, Fork 1546 on GitHub.
<a href="https://github.com/jwilder/nginx-proxy" rel="nofollow noreferrer">https://github.com/jwilder/nginx-proxy</a></p>
<p>kubernetes/ingress-nginx has 13 stars on kubeapps.com (one of the most starred ... | <p>That is 2 different applications, but both are based on Nginx and have the similar function.</p>
<ol>
<li><p>Nginx-proxy by jwilder is a proxy server for Docker containers which includes <code>docker-gen</code> to generate a configuration for Nginx automatically. You can use it for SSL termination, load balancing e... |
<p>I am struggling to understand the concept of the Capacity parameter on the PersistentVolume, and similarly the storage Request on the PersistentVolumeClaim when dealing with ReadOnlyMany storage. If the storage is mounted in read only- what exactly is the Capacity/Request in relation to? </p>
<p>i.e. </p>
<pre><co... | <p><strong>PersistentVolume</strong>(PV) is an object usually created by an administrator or auto-provisioned by a cloud provider. </p>
<p>You can imagine it as flash drives laying on a table and available for claiming. </p>
<p><strong>PersistentVolumeClaim</strong>(PVC) is a minimum specification that PV should co... |
<p>I am trying to deploy a <code>jupyter notebook</code> from Kubernetes; however, when I start <code>jupyter</code> and it prints a local host link, I am unable to open it on my computer because it's a "local host." Hence, it needs to be opened within the container. </p>
<p>However, I was unable to find any type of G... | <p>The most common way to access an application in a pod is to use Service. </p>
<p>After creation, a Service object is assigned with a unique IP address (ClusterIP) which remains the same during the whole lifespan of the Service object. Pods can use this ClusterIP and port to access a subset of pods with labels match... |
<p>From the <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noreferrer">Kubernetes docs</a>:</p>
<blockquote>
<p>For Kubernetes-native applications, Kubernetes offers a simple Endpoints API that is updated whenever the set of Pods in a Service changes. For non-native applications, Kub... | <p>I found the same section and interpret it as :</p>
<ul>
<li>native are apps that are packed up and run inside k8s as some ‚kind‘. All dockerized apps should be in that category.</li>
<li>non native is connected with the k8s cluster infrastructure but not deployed within. A legacy app, an Oracle cluster or your back... |
<p>Kafka noob here! I have two questions:</p>
<p>1) Consider few Kafka consumers running on different Kubernetes pods as part of the same Kafka consumer group. The topics being consumed by these pods are compacted topics. Now, let’s say one of the pods goes down and comes up in a while. Now my question is, will the co... | <p>Consumers works the same way for compacted topics as non-compacted ones. During compaction if there are offsets with the same keys then only the latest key stays but the compacted offsets are never deleted it stays pointing to the latest key
Eg. if offsets 10,11,12 have the same keys , then only the 12th offset key ... |
<p>I have a file for a Job resource, which looks something like below.I need to run multiple instances with this definition with separate arguments for each.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
generateName: abc-
spec:
template:
spec:
containers:
- name: abc
image: index... | <p>kind of a generic answer here, just trying to guide you. In general what you express is the need to 'parameterize' your kubernetes deployment descriptors. There are different ways some are simple, some others are a bit hacky and finally there is <a href="https://github.com/kubernetes/helm" rel="nofollow noreferrer">... |
<p>I had sticky session working in my dev environment with minibike with following configurations:</p>
<p>Ingress:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gl-ingress
annotations:
nginx.ingress.kubernetes.io/affinity: cookie
kubernetes.io/ingress.class: "gce"
kuberne... | <p>Session affinity is not available yet in the GCE/GKE Ingress controller.</p>
<p>In the meantime and as workaround, you can use the GCE API directly to create the HTTP load balancer. Note that you can't use Ingress at the same time in the same cluster.</p>
<ol>
<li>Use <a href="https://kubernetes.io/docs/concepts/s... |
<p>I am working on a project using Django on Google Kubernetes Engine and have a few questions on the best architecture format might be. Right now I have several containers in one pod because they are all dependent on each other and communicate frequently. Here is my setup:</p>
<p>Pod: webapp</p>
<p>Containers:</p>
... | <p>It would be better for you to break these containers into multiple pods in order to scale without wasting resources. If you were to scale to for example two instances, a second instance of each container would be started. Your containers will most likely not have identical load and therefore it makes sense to only s... |
<p>I'm trying to use rewrite target from kubernetes with <code>gcloud</code> but it doesn't seem to be respected. My code is the following. Maybe there's something I'm not seen:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo-ingress
annotations:
ingress.kubernetes.io/rewrite-t... | <p>The term <code>rewrite-target</code> is misleading: it is about the path of the <strong>incoming</strong> request.</p>
<p>This might work: use one ingress with <code>rewrite-target: /</code> and <code>path: /</code> for the frontend only, and one ingress with <code>rewrite-target: /api</code> and <code>path: /</cod... |
<p>I have a GKE k8s cluster and wanted to reboot one of the nodes (a vm reboot, and not just the kubelet).</p>
<p>I was looking for the correct way (if there is one) than just resetting the vm directly. But I couldnt find anything in the web.</p>
<p>So, my plan is to use these steps:</p>
<ol>
<li>drain the node</li>
<l... | <p>No, that is the correct way -- and you don't have to <code>drain</code> the Node first unless there is some extenuating circumstance. One of the major features of kubernetes is that it will route around the "damage" of having a Node disappear suddenly.</p>
<p>You <em>could</em> <code>cordon</code> the Node, if you ... |
<p>Is it possible to add existing instances in the GCP to a kubernetes cluster?</p>
<p>I can see the inputs while creating the cluster in graphically mode is :</p>
<p>Cluster Name,
Location,
Zone,
Cluster Version,
Machine type,
Size.</p>
<p>In command mode: </p>
<pre><code>gcloud container clusters create cluster-n... | <p>On your instance run the following</p>
<pre><code>kubelet --api_servers=http://<API_SERVER_IP>:8080 --v=2 --enable_server --allow-privileged
kube-proxy --master=http://<API_SERVER_IP>:8080 --v=2
</code></pre>
<p>This will connect your slave node to your existing cluster. Its actually surprisingly simpl... |
<p>We have a requirement to connect from a POD in GKE to service running on a VM on it's internal IP address. </p>
<p><a href="https://i.stack.imgur.com/nPr6k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nPr6k.png" alt="enter image description here"></a></p>
<p>The K8s cluster and the VM are on ... | <p>I reproduced your issue and it worked fine for me. This is what I did:</p>
<ol>
<li>Create 2 networks (one of them (demo) on 172.16.0.0/16, the other one is my default network, set on 10.132.0.0/20).</li>
<li>Set up VPC peering.</li>
<li>Created a VM in demo network. It got assigned 172.16.0.2</li>
<li>Created the ... |
<p>I'm trying to figure out how to get this setup to work:</p>
<ul>
<li>I am using Kube 1.7 (no RBAC) spun up from kops in AWS</li>
<li>I have a single nginx ingress controller for my entire cluster that is using a <code>LoadBalancer</code> service in the <code>kube-system</code>, namespace installed via Helm</li>
<li... | <p>I solved this myself. The nginx ingress controller has a <code>--publish-service</code> command line argument which will cause it to update the status fields on the ingress objects which, in turn, will cause <code>external-dns</code> to create the appropriate DNS records. When installing via Helm, simply set <code>.... |
<p>I can run this command to create a docker registry secret for a kubernetes cluster:</p>
<pre><code>kubectl create secret docker-registry regsecret \
--docker-server=docker.example.com \
--docker-username=kube \
--docker-password=PW_STRING \
--docker-email=my@email.com \
--namespace mynamespace
</code></pre>
<p>I ... | <p>You can write that yaml by yourself, but it will be faster to create it in 2 steps using <code>kubectl</code>:</p>
<ol>
<li>Generate a 'yaml' file. You can use the same command but in dry-run mode and output mode <code>yaml</code>.</li>
</ol>
<p>Here is an example of a command that will save a secret into a 'docker-... |
<p>I have a autobahn twisted websocket running in python which is working in a dev vm correctly but I have been unable to get working when the server is running in openshift.</p>
<p>Here is the shortened code which works for me in a vm.</p>
<pre><code>from autobahn.twisted.websocket import WebSocketServerProtocol, We... | <p>Graham Dumpleton hit the nail on the head, I modified the code from </p>
<pre><code>factory = WebSocketServerFactory(u"ws://0.0.0.0:8080")
</code></pre>
<p>to </p>
<pre><code>factory = WebSocketServerFactory(u"ws://0.0.0.0:8080", externalPort=80)
</code></pre>
<p>and it corrected the issue. I had to modify my i... |
<p>I have a Kubernetes 1.10.0, Docker 17.03.2-ce, and Jenkins 2.107.1 running on an Ubuntu 17.04 VM with Kubernetes Plugin 1.5 installed in Jenkins. I have 4 other Ubuntu VM(s) successfully set up as nodes in the cluster, including the untainted master. I can deploy nginx-based services directly and have unfettered a... | <p>I went to <a href="http://172.20.43.30:8080/configureSecurity/" rel="noreferrer">http://172.20.43.30:8080/configureSecurity/</a> and set "Agents:TCP port for JNLP agents" to "random"</p>
<p>I then got a "jnlp-slave-ttm5v (suspended)" that stays in the "Build Executor Status"</p>
<p>and the log said:</p>
<pre>... |
<p>Dockerfile has a parameter for <em>ENTRYPOINT</em> and while writing Kubernetes deployment YAML file, there is a parameter in Container spec for <em>COMMAND</em>.</p>
<p>I am not able to figure out what's the difference and how each is used?</p>
| <p>Kubernetes provides us with multiple options on how to use these commands:</p>
<p>When you override the default Entrypoint and Cmd in Kubernetes .yaml file, these rules apply:</p>
<ul>
<li>If you do not supply command or args for a Container, the defaults
defined in the Docker image are used.</li>
<li>If you suppl... |
<p>I have installed a cluster of one master and one node using kubadm</p>
<p><code>kubeadm version: &version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"... | <p>Use the following commands to check logs of Kubelet and diagnose the issue accordingly:</p>
<pre><code>systemctl status kubelet
journalctl -xeu kubelet
</code></pre>
<p>For details:
<a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster/" rel="nofollow noreferrer">https://kubernetes.io/d... |
<p>I'm just new with <code>Kubernetes</code>, I'm using <code>OpenStack</code> and I would like to create a load balancer to access my <code>NodeJs</code> server running on 3 pods. I get a pending loop when my load balancer try to get its public ip. I'm using <code>kubeadm</code> with <code>calico</code>.</p>
<p><a hr... | <p>This is a workaround method. You can mention the external IP:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
name: node-j... |
<p>I am trying to create a little Pod example with two containers that share data via an emptyDir volume. In the first container I am waiting a couple of seconds before it gets destroyed.</p>
<p>In the postStart I am writing a file to the shared volume with the name "started", in the preStop I am writing a file to the... | <p>It is happening because the final status of your pod is <code>Completed</code> and applications inside containers stopped without any external calls.</p>
<p>Kubernetes runs <code>preStop</code> hook only if pod resolves an external signal to stop. Hooks were made to implement a graceful custom shutdown for applicat... |
<p>I'd like to (programatically) get a list of all schedulable nodes in my kubernetes cluster.</p>
<p>I'm fairly sure this used to be possible by looking at <code>.spec.unschedulable</code> in the full output of <code>kubectl get nodes</code> (using JSON or template output), but now it seems this info is inside the <... | <p>Though quite late to the party, I needed something of the similar today to determine when the scheduling of pods would actually start succeeding:</p>
<pre><code>kubectl get nodes -o jsonpath="{range .items[*]}{.metadata.name} {.spec.taints[?(@.effect=='NoSchedule')].effect}{\"\n\"}{end}" | awk 'NF==1 {print $0}'
</... |
<p>How can I list, using command line, all the pods running in the nodes of a particular instance group?</p>
<p>For example, if I have instancegroup "Foo", which has let's say three nodes, N1, N2, and N3, that in turn have pods A and B running on N1, pods C, D and E running on N2, and pod F running on N3.... how can I... | <p>One way would be to assign labels to the nodes in your InstanceGroup, perhaps with the name of the instance group (for simplicity) and then use a combination of kubectl commands to query.</p>
<p>So in your InstanceGroup spec set <code>nodeLabels</code> to be <code>ig: Foo</code> (see <a href="https://github.com/kub... |
<p><b>Disclosure :</b>
<br> </p>
<ul>
<li>I have few questions for the containerization and orchestration tools
available today in the market.</li>
<li>I have worked on docker swarm,
kubernetes, and Elastic Bean Stalk.</li>
</ul>
<p><b>Problem</b>: I want to automate scaling without having to deal with ec2 instances ... | <blockquote>
<p>I am confused and unable to convince people who say No to Kubernetes and Docker Swarm, If Someone can Please provide me a detailed overview of What and Why to use in production on AWS? </p>
</blockquote>
<p>Two out of three solutions provided by you are platform-agnostic, so we can talk about them wi... |
<p>I´m new to kubernetes an created a cluster on google cloud platform.
Now i´m trying to setup automated deployment from vsts an need to create a kubernetes user for this to get a kubeconfig file for authentication.</p>
<p>Now my question is how can i do this?
Do i need to create this user with kubectl (if yes how?)?... | <p>To connect to Kubernetes cluster in GCP, you can use either user or service account. </p>
<p>If you choose user account, run this command: </p>
<pre><code>gcloud init
</code></pre>
<p>or </p>
<pre><code>gcloud init --console-only
</code></pre>
<p>This will bring up GCP authentication dialog. When you pass a... |
<p>I have a gcloud Kubernetes cluster initialized, and I'm using a Dask Client on my local machine to connect to the cluster, but I can't seem to find any documentation on how to upload my dataset to the cluster.</p>
<p>I originally tried to just run Dask locally with my dataset loaded in my local RAM, but obviously t... | <p>Many people store data on a cloud object store, like Amazon's S3, Google Cloud Storage.</p>
<p>If you're interested about Dask in particular these data stores are supported in most of the data ingestion functions by using a protocol like the following:</p>
<pre><code>import dask.dataframe as dd
df = dd.read_csv('g... |
<p>I have this idea for what I think should happen with my project, but I want to check in and see if this works on a theoretical level first. Basically I am working on a Django site that is run on Kubernetes, but am struggling a little bit about which way I should set up my replicationSet/statefulSet to manage uploade... | <p>Hello I think you should forget kubernetes a bit and think of the architecture and capabilities of your Django application. I guess you have built a web app, that offers some 'upload image' functionality, and then you have code that 'stores' this image somewhere. On the very simple scenario if you run your app on yo... |
<p>I've a kubernetes 1.8. I've deploy a lots of services but I've problem remove some pods, it's never delete.</p>
<p>This is the pod describe:</p>
<pre><code>Name: project-settlement-api-798c8b6688-ldclr
Namespace: project
Node: 10.93.96.208/10.93.96.208
Star... | <p>Try restarting the docker daemon on the master node</p>
<p>This issue might be related to what you are experiencing:
<a href="https://github.com/kubernetes/kubernetes/issues/51835" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/51835</a></p>
|
<h1>Issue</h1>
<p>I am having trouble applying TLS to the DNS name of my LoadBalancer service for my Kubernetes cluster, and I am at a bit of a loss.</p>
<p>This is the first time I have worked with Kubernetes as well as Azure's Manage Container Services. For reasons that are out of my control this api is required to... | <p>On Azure, if you need TLS termination on kubernetes, you can use <strong>Nginx Ingress controller</strong>(Now, Microsoft working with Azure ingress controller which uses Application gateway).</p>
<p>To archive this, we can follow those steps:<br>
1 Deploy the Nginx Ingress controller<br>
2 Create TLS certificates<... |
<p>I have a gcloud Kubernetes cluster running and a Google bucket that holds some data I want to run on the cluster.</p>
<p>In order to use the data in the bucket, I need <code>gcsfs</code> installed on the nodes. How do I install packages like this on the cluster using gcloud, kubectl, etc.?</p>
| <p>Check if a recipe like "<a href="https://github.com/pangeo-data/pangeo/wiki/Launch-development-cluster-on-Google-Cloud-Platform-with-Kubernetes-and-Helm" rel="nofollow noreferrer">Launch development cluster on Google Cloud Platform with Kubernetes and Helm</a>" could help.</p>
<p>Using <a href="https://helm.sh/" re... |
<p>I am new to Kubernetes and Helm. I am coming from a plain Docker/docker-compose world.</p>
<p>I have some complex services running multiple Docker containers that require a lot of configuration parameters and logic. The docker-ized services require a lot of different configuration files, keys and command line argum... | <p>In the Kubernetes world, configs are usually managed by ConfigMap, which is the main storage of configuration.</p>
<p>In your situation, I think you can do it like that (at least if I will do it, I will do it that way):</p>
<ol>
<li>Create another one template in Helm with kind ConfigMap and create there a structu... |
<p>I am trying to deploy a stateful set mounted on a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">Persistent Volume</a>.</p>
<p>I installed Kubernetes on AWS via <a href="https://github.com/kubernetes/kops/blob/master/docs/aws.md" rel="nofollow noreferrer">kops</a... | <p>The problem was that my cluster was made with C5 nodes. C5 and M5 nodes follow a different naming convention (<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html" rel="nofollow noreferrer">NVMe</a>), and the naming is not recognised.</p>
<p>Recreate the cluster with t2 type nodes.</p... |
<p>When I ran the KCL as <code>./bin/kcl-bootstrap -p app.properties -j /usr/bin/java -e</code> at the terminal, and then I did <code>ps -ef | grep java</code> and got the pid for it. I issued <code>kill -s TERM $PID_ABOVE</code>. I noticed the node recordProcessor managed to log like this
<code>2018-03-31T11:13:46.99... | <p>For anyone who is facing a similar issue, here are the steps I solved mine:</p>
<p>Add a preStop hook in kubernetes template to execute a shell command
The command is <code>kill -s TERM $(ps -ef | grep "MultiLangDaemon" | grep -v \"grep\" | awk '{print $1}')</code></p>
|
<p>I am trying to do spark-submit on minikube(Kubernetes) from local machine CLI with command</p>
<pre><code>spark-submit --master k8s://https://127.0.0.1:8001 --name cfe2
--deploy-mode cluster --class com.yyy.Test --conf spark.executor.instances=2 --conf spark.kubernetes.container.image docker.io/anantpukale/spark_ap... | <p>Look like bug with default value for parameters <code>spark.kubernetes.driver.container.image</code>, that must be <code>spark.kubernetes.container.image</code>. So try specify driver/executor container image directly:</p>
<ul>
<li>spark.kubernetes.driver.container.image </li>
<li>spark.kubernetes.executor.contain... |
<p>I am creating a server group and I want to add a label to the deployment. I don't find any option in the spinnaker UI to add one. Any help on this?</p>
| <p>The current version of the Kubernetes cloud provider (v1) does not support configuring labels on Server Groups.</p>
<p>The new Kubernetes Provider (v2), which is manifest-based, allows you to configure labels. This version, however, is still in alpha.</p>
<p><strong>Sources</strong></p>
<p><a href="https://github... |
<p>How to select pods from the kubernetes dashboard using labels? </p>
<p>Something similar like this:</p>
<pre><code>$ Kubectl get pods -l environment=production,tier=frontend
</code></pre>
| <p>It's not possible so far (v.1.8.1) on the dashboard to filter by label.</p>
|
<p>I've been reading about how to setup audit in kubernetes <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy" rel="nofollow noreferrer">here</a> which basically says that in order to enable audit I have to specify a yaml policy file to kube-apiserver when starting it up, by using ... | <blockquote>
<p>What's the proper way to add/update a startup parameter of the command that runs kube-apiserver?</p>
</blockquote>
<p>In 99% of the ways that I have seen kubernetes clusters deployed, the <code>kubelet</code> binary on the Nodes reads the kubernetes descriptors in <code>/etc/kubernetes/manifests</cod... |
<p>Is it good practics to allow access to the Kubernetes Dashboard access to developers to view the POD raw Logs directly from dashboard console. If yes with read-only access to the dashboard, then can anyone help me how to create a read-only user to access Kubernetes Dashboard? Currently, I can see there is one admin ... | <p>There is a documentation on how to create a user with limited access. Go <a href="https://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/#use-case-1-create-user-with-limited-namespace-access" rel="nofollow noreferrer">here</a></p>
|
<p>I'm trying to edit deployment in kubernetes by:</p>
<pre><code>kubectl -n <namespace> edit deployment <depolyment_name>.
</code></pre>
<p>after entering the command, vi windows for editing appears, then I make some changes for example in the command section or in volumeMounts section.</p>
<p>but I get... | <pre><code> dnsPolicy: ClusterFirst
# DELETE imagePullSecrets:
# DELETE - {}
restartPolicy: Always
</code></pre>
<p>I would strongly recommend removing that <code>imagePullSecrets</code> block. Since those objects have a mergeKey of <code>name</code>, but that object has no <code>name</code>, it would very easi... |
<p>While following the kubernetes article on <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="noreferrer">Using kubeadm to Create a Cluster</a>, I was stuck when the AddOn pods I was trying to install (Nginx, Tiller, Grafana, InfluxDB, Dashboard) would always stay in a state of <stron... | <blockquote>
<p>the reason was that I hadn't connected a worker node to the cluster yet for the scheduler to schedule the pods on.</p>
</blockquote>
<p>100% correct. You will for sure want some worker nodes, otherwise the idea of "scheduling work" becomes very weird.</p>
<blockquote>
<p>but what is the risk of re... |
<p>I have kubeadm cluster deployed in CentOS VM. while trying to deploy <code>ingress controller</code> following <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/README.md" rel="nofollow noreferrer">github</a> i noticed that i'm unable to see logs: </p>
<pre><code>kubectl logs -n ingress-nginx ... | <blockquote>
<p>getsockopt: connection timed out</p>
</blockquote>
<p>Is 99.99999% a firewall issue. If it was "connection refused" then showing the output of netstat would be meaningful, but (as you can see) <code>kubelet</code> is listening on that port just fine -- it's the networking configuration between the ma... |
<p>I was trying to submit a example job to k8s cluster from binary release of spark 2.3.0, the submit command is shown below. However, I have met an wrong master error all the time. I am really sure my k8s cluster is working fine. </p>
<pre><code>bin/spark-submit \
--master k8s://https://<k8s-master-ip> \
... | <p>because i am not good at English. so maybe have some wrong grammar. but i will do my best to responds your question. my resolve method is check your $SPARK_HOME and change to your "apache-spark-on-k8s" file path.because spark-submit is default use "${SPARK_HOME}" to run your command.maybe you have two spark environm... |
<p>I am trying to run a job on GKE for 5 mins and 50 nodes. However when i scale down instances it happens sequentially and thus costing me much more for a 4-5 min job.</p>
<p>Is there any way to paralelly delete GKE instances?</p>
| <p>Kubernetes cluster has an underlying Instance Group.</p>
<p>I was able to delete the nodes in parallel by directly changing the number of nodes in Instance Group from 50 to 5.</p>
<p>All nodes were deleted within 30 seconds and GKE had also automatically updated the cluster size with the new value.</p>
|
<p>I install the latest version of Kubernetes with the following command on Raspberry PI 3 running Raspbian Stretch.</p>
<pre><code>$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources... | <p>To install specific version of the package it is enough to define it during the <code>apt-get install</code> command:</p>
<pre><code>apt-get install -qy kubeadm=<version>
</code></pre>
<p>But in the current case <code>kubectl</code> and <code>kubelet</code> packages are installed by dependencies when we inst... |
<p>I have created a yaml file for kubernetes cluster
which holds two docker images(2 micro services). created a cluster from it .
<code>kubectl create -f pod.yaml</code>
Cluster is running now.</p>
<p>I wish to add another one new docker image(new micro services to get delpoyed) or remove an existing one docker imag... | <p>I would hold from going into the part where you said <code>which holds two docker images(2 microservices).</code> which might be a separate discussion and is more subjective.</p>
<p>You can add another container spec to your YAML and apply it:</p>
<pre><code>spec:
containers:
- name: container1
//.. more stuff... |
<p>While creating the kubernetes cluster using kubeadm in Centos 7, its creating one year kubeapi certificate. For me this is short time for the cluster. How can I create 5 year certificate during cluster setup?</p>
<pre><code>* SSL connection using TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
* Server certificate:
* ... | <p>Follow the Kubernetes documentation on <a href="https://kubernetes.io/docs/concepts/cluster-administration/certificates/" rel="nofollow noreferrer">certificates</a> to the CA certificate.</p>
<p>If you choose <code>openssl</code> or <code>easyrsa</code> use <code>--days=1825</code>, if you are going with <code>cfss... |
<p>Specifically, why do I end up with two external IP addresses when I follow the <a href="https://cloud.google.com/community/tutorials/nginx-ingress-gke" rel="nofollow noreferrer">directions</a> on Google's website for setting up nginx ingress on GKE? </p>
<p>The two IP addresses are for an Ingress resource and a Ser... | <p>I do not really understand your question, I believe you are a bit confused regarding the ingress resource.</p>
<p>Let me explain a bit, after you run in the tutorial:</p>
<pre><code>helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true
kubectl apply -f ingress-resource.yaml
</code></pre>
<... |
<p>I have a local 3-nodes-cluster of Kubernetes, with weave-Net as the Overlay-Network-Plugin installed. My goal is to try out network policies of kubernetes and to export log messages of this process towards an elk-stack.</p>
<p>Unfortunately, I cannot proceed, because I cannot solve my issues with kube-dns. The name... | <p><strong>None of the Service IPs (aka. Cluster IPs, aka. Portal IPs) respond to ping</strong>, so that's not a good test! A good test is to try the Service IP with an appropriate client, like nslookup for dns, curl for http, etc (and make sure you do that on the correct port too).</p>
<p>As you've seen from <code>ns... |
<p>I have a keystore.jks file which I need to pass as a env variable for my docker process.</p>
<p>I used the below command to store the file as a secret.</p>
<blockquote>
<p>kubectl create secret generic ssl-keystore-cert
--from-file=./keystore.jks</p>
</blockquote>
<p>Using the above secret in my deployment.ya... | <p>In your create secret, you refer to <em>keystore.jks</em></p>
<p>But in your yaml, you refer to <em>server-ssl.jks</em></p>
<p>These should be the same key, but they are differet.</p>
<p>To verify the correct key, run:</p>
<p><code>kubectl describe secrets/ssl-keystore-cert</code></p>
|
<p>I am launching Jobs and I'm trying to use the lifecycle hooks to launch a script at start and another one at shutdown of the container. </p>
<p>I am also specifying resource limits, and they look like this:</p>
<pre><code>resources:
required:
memory: 1Gi
cpu: 1
limits:
memory: 1Gi
... | <p>You have 2 problems, so you get 2 answers :-)</p>
<h1>Problem 1: too high cpu requirement</h1>
<p>You pod specifies the requirement of <code>cpu: 1</code> - this means 1 cpu core. Your nodes have 1 cpu core in total, but are already running some pods, like kube-proxy. So none of them have a full core available for... |
<p>kubernetes PodSecurityPolicy set to runAsNonRoot, pods are not getting started post that Getting error Error: container has runAsNonRoot and image has non-numeric user (appuser), cannot verify user is non-root</p>
<p>We are creating the user (appuser) uid -> 999 and group (appgroup) gid -> 999 in the docker contain... | <p>Here is the <a href="https://github.com/kubernetes/kubernetes/blob/5648200571889140ad246feb82c8f80a5946f167/pkg/kubelet/kuberuntime/security_context.go#L88" rel="noreferrer">implementation</a> of the verification:</p>
<pre><code>case uid == nil && len(username) > 0:
return fmt.Errorf("container has r... |
<p>I currently have two clusters on GKE - one in <code>eu-west1-b</code> and another in <code>us-east1-b</code>. The pods deployed to the nodes in these clusters need to make location-based requests (for latency testing purposes).</p>
<p>I also need to connect to my postgres instance on RDS, which uses IP-based whitel... | <p>A solution:</p>
<ol>
<li><p><a href="https://cloud.google.com/vpc/docs/add-remove-network-tags" rel="nofollow noreferrer">Tag</a> your instances in different zones/regions with different tags</p></li>
<li><p>Create static IP addresses for each zone/region</p></li>
<li><p>Create NAT exit nodes (GCE instances or inst... |
<p>I have a Java application which uses JAAS authentication and hence it needs a below system property.</p>
<blockquote>
<p>-Djava.security.auth.login.config=/jaas/conf/client_jaas.conf</p>
</blockquote>
<p>We set this system property in our startup script thru JAVA_OPTS.</p>
<blockquote>
<p>JAVA_OPTS="${JAVA_OP... | <p>I don't know if this is a related problem to the following: JAVA_OPTS is not an out-of-the-box environment variable, but a convention. If you take a look at <a href="https://github.com/xetys/jhipsterSampleApplication/blob/master/src/main/docker/Dockerfile" rel="nofollow noreferrer">this example Dockerfile</a> </p>
... |
<p>I'm trying to launch Google Container Engine (GKE) in Private GCP network Subnet.</p>
<p>I have created custom Google Cloud VPC, then I have created custom Private Network Access Subnet too under that VPC.</p>
<p>1) When I create GKE cluster with Private Subnet, still my Kubernetes nodes assigned with Public IP. W... | <p>Private Clusters on GKE are now available in beta. They allow you to restrict public internet from connecting to the master.</p>
<p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters</a>... |
<p>I run a small flask application with gunicorn and multiple worker processes on kubernetes. I would like to collect metrics from this application with prometheus, but the metrics should only be accessible cluster internally on a separate port (as this required in our current setting). </p>
<p>For one gunicorn worker... | <p>What you would want to do here is start up a separate process just to serve the metrics. Put the <code>app</code> function in <a href="https://github.com/prometheus/client_python#multiprocess-mode-gunicorn" rel="noreferrer">https://github.com/prometheus/client_python#multiprocess-mode-gunicorn</a> in an app of its ... |
<p><strong><em>Summary:</em></strong>
Jenkins in K8s minikkube works fine and scales well in case of default jnlp agent but stuck with "Waiting for agent to connect" in case of custom jnlp image. </p>
<p><strong><em>Detailed description:</em></strong></p>
<p>I'm running the local minikube with Jenkins setup. </p>
<... | <p>I think you should set credentials for your master jenkins to start new pods.</p>
<pre><code>---
apiVersion: v1
kind: ServiceAccount
metadata:
name: jenkins
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: jenkins
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["create","del... |
<p>I am trying to wrap my brain around the suggested workarounds for the lack of built-in HTTP->HTTPS redirection in ingress-gce, using GLBC. What I am struggling with is how to use this custom backend that is suggested as one option to overcome this limitation (e.g. in <a href="https://stackoverflow.com/q/37001557/274... | <p><strong>Edit in May 2020: "HTTP(S) Load Balancing Rewrites and Redirects support is now in General Availability" as stated in <a href="https://issuetracker.google.com/issues/35904733#comment95" rel="nofollow noreferrer">https://issuetracker.google.com/issues/35904733#comment95</a> seems to mean that now it finally w... |
<p>I have my Kubernetes cluster running in GKE I want to run an application outside the cluster and talk to the Kubernetes API.</p>
<p>By using password retrieved from running:</p>
<pre><code>gcloud container clusters get-credentials cluster-2 --log-http
</code></pre>
<p>I am able to access the API with Basic authen... | <p>@Janos pointed out the potential problem, however I think you will need an actual Cloud IAM Service Account as well, because you said: </p>
<blockquote>
<p>I want to run an application outside the cluster [...]</p>
</blockquote>
<p>If you're authenticating to GKE from outside, I believe you can only use the Goog... |
<p>I receive the following error after running</p>
<pre><code>kubectl apply -f node.deployment.yml
</code></pre>
<p>With the following YAML config:</p>
<pre><code> 1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4 name: node-deployment
5 labels:
6 app: node-app
7 spec:
8 replicas: 2
... | <p>Found the error, forgot to add <code>matchLabels</code> property:</p>
<pre><code> 9 selector:
10 matchLabels:
11 app: node-app
</code></pre>
|
<p>I have a statefulset with 3 members. They are accessible from inside the cluster with something like:</p>
<pre><code>podname-{0..n}.service.default.svc.cluster.local
</code></pre>
<p>I'm using the Kubernetes API from a Controller. I just created the Statefulset with:</p>
<pre class="lang-go prettyprint-override">... | <p>When you create the headless <code>Service</code> with the <code>StatefulSet</code>, it should create DNS SRV entries. You can query that to get a list of all host names of the pods corresponding to the headless <code>Service</code> without knowing the number. For example, if using Python you can do:</p>
<pre><code... |
<p>I using kbuernetes & docker in a isolate environment without Internet, and I always pull image and save to .tar file in other machine and load to the isolate environment, but sometimes kubernetes's Pod cann't launch successful and says the Pod is pull image but network is not ok.
But I check docker's image, the ... | <p>It is not clear what is the <code>imagePullPolicy</code> specified. In your case it should be <code>Never</code>. </p>
<p><a href="https://kubernetes.io/docs/concepts/containers/images/#pre-pulling-images" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/containers/images/#pre-pulling-images</a></p>
|
<p>I'm fighting with Kubernetes. I've googled a lot and looked at a few answers such as <a href="https://stackoverflow.com/questions/40600419/why-am-i-getting-an-errimagepull-error-in-this-kubernetes-deployment">this one</a> - for example - but can't seem to get it to work.</p>
<p>I've created a docker container and ... | <p>Try with:</p>
<pre><code>spec:
containers:
- image: localhost:5000/i-a
imagePullPolicy: Never
name: i-a
ports:
- containerPort: 8090
dnsPolicy: ClusterFirst
restartPolicy: Always
</code></pre>
|
<p>I using kbuernetes & docker in a isolate environment without Internet, and I always pull image and save to .tar file in other machine and load to the isolate environment, but sometimes kubernetes's Pod cann't launch successful and says the Pod is pull image but network is not ok.
But I check docker's image, the ... | <p>You are using <code>:latest</code> tag for the image. When the image tag is <code>latest</code>, kubernetes will set <code>imagePullPolicy</code> to <code>Always</code>. For details, <a href="https://kubernetes.io/docs/concepts/containers/images/#updating-images" rel="nofollow noreferrer">see the official doc</a>.</... |
<p>I'm new to Kubernetes and I'm trying to add a PVC in my <code>StatefulSet</code> on Minikube.
PV and PVC are shown here:</p>
<pre><code>NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
neo4j-backups 5Gi RWO Retain ... | <p>If you use <code>volumeClaimTemplates</code> in <code>StatefulSet</code> k8s will do dynamic provisioning & create one PVC and corresponding PV for each pod, so each one of them gets their own storage. </p>
<p>What you want is to create one PV & one PVC and use it in all replicas of Statefulset. </p>
<p>Be... |
<p>I have an app written in angular4,
I am running on production and sandbox,</p>
<p>I create an image and then deploy on kubernetes</p>
<p>I have some environment variables differnt to sandbox and production , currently I build two differnt images one for sandbox and one for
production:</p>
<p>environments under <... | <p>alternativly you can read from local config json , and then use volumes,
having seperate config map for each of you environments <a href="https://stackoverflow.com/questions/43275995/angular4-how-do-access-local-json">see</a></p>
<p>under <code>src/assets/config</code> put the config json,</p>
<p>in your code re... |
<p>I am new to Kubernetes and I followed this tutorial for deploying WordPress application with k8s <a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">Deploying WordPress</a>.</p>
<p>Let's say I have 3 pods with WordPress:4.8-apache image an... | <p>Potentially, this could happen. In this sense, it looks to me that this is not the proper way to deploy WordPress following the immutability principles (<a href="https://engineering.bitnami.com/articles/why-your-next-web-service-should-be-immutable.html" rel="nofollow noreferrer">https://engineering.bitnami.com/arti... |
<p>AFAIK administrators can use exec to execute commands in a container running in kubernetes. This means that they can see all the secrets correct?</p>
<p>Now if the secret is used to connect to something externally, which that administrator does not have access to, how can I avoid that the adminstrator gets access t... | <blockquote>
<p>Do I need to use something like Hashicorps Vault? </p>
</blockquote>
<p>Generally, yes: you need an external encrypted source in order to separate secret management (readable by admins with the right RBAC) and secrets.</p>
<p>For instance, something like <a href="https://github.com/hashicorp/vault-p... |
<p>I'm new to kubernetes and I'm struggling with starting my frist pods.
I installed kubernetes on my Ubuntu virtual machine, proceeded with </p>
<pre><code>kubeadm init
</code></pre>
<p>followed by other instuctions </p>
<pre><code>mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo c... | <p>Seem like you are running single node (master) k8s: </p>
<p>From <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="noreferrer">Documentation</a>: </p>
<blockquote>
<p>Master Isolation </p>
<p>By default, your cluster will not schedule pods on
the master for security reaso... |
<p>I have a spring boot app image which needs the following property.</p>
<p>server.ssl.keyStore=/certs/keystore.jks</p>
<p>I am loading the keystore file to secrets using the bewloe command.</p>
<p>kubectl create secret generic ssl-keystore-cert --from-file=./server-ssl.jks</p>
<p>I use the below secret reference ... | <p>I tried to repeat the situation with your configuration. I created a secret used command:</p>
<pre><code>kubectl create secret generic ssl-keystore-cert --from-file=./server-ssl.jks
</code></pre>
<p>I used this YAML as a test environment:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: busybox
namespa... |
<p>I using kbuernetes & docker in a isolate environment without Internet, and I always pull image and save to .tar file in other machine and load to the isolate environment, but sometimes kubernetes's Pod cann't launch successful and says the Pod is pull image but network is not ok.
But I check docker's image, the ... | <p>In your case creating the deployment by</p>
<pre><code> kubectl run mysql --image=docker.io/mysql --imagePullPolicy=Never
</code></pre>
<p>should solve the problem. Alternatively you could set <code>imagePullPolicy</code> to <code>Never</code> or <code>IfNotPresent</code> in the <code>yaml</code> spec of your depl... |
<p>I am trying to setup Kubernetes <strong>autoscaler</strong> with Amazon AWS as described here: <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md" rel="nofollow noreferrer">DOCS</a> but I am getting this error in my <strong>cluster-autoscaler</strong> pod log... | <p>You have the configuration issue:</p>
<pre><code> env:
- name: AWS_REGION
value: us-west-2a
</code></pre>
<p>Your AWS region is <code>us-west-2</code>, but AZ is <code>us-west-2a</code>. That's why when Autoscaling generates the URL of autoscaling endpoint, the result is <code>https://autoscaling.us-west-2a.... |
<p>I am running into issues with Kubernetes Service Discovery on Spring Boot applications. </p>
<p>I should be able to discover the services whether my spring boot application is running within or out of Kubernetes cluster. Our local development won't be on k8s cluster.</p>
<p>I am using Service Discovery via DNS. I ... | <p>I have solved this issue using the Spring Cloud Kubernetes Dependencies</p>
<p><code><spring.cloud.kubernetes>0.2.0.RELEASE</spring.cloud.kubernetes></code></p>
<pre><code><dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernet... |
<p>We are migrating some windows components (.net 4.5) to Linux containers (.net core). Existing system is a file processor, which watches a shared location and processes file from there. We can't force existing system to start dropping file at some other location, so new containerised application has to access from sa... | <p>This feature is not working by default, but yes, you can do this. <a href="https://github.com/juliohm1978/kubernetes-cifs-volumedriver" rel="nofollow noreferrer">Here is the project</a> which allows you to do this in a proper way. After volume driver setup, you can use Windows share as <a href="https://kubernetes.i... |
<p>Is there a way to change the logging level on a running cluster, specifically for a single system component such as kube-proxy? </p>
<p>I see some discussion related to this:<br>
<a href="https://github.com/kubernetes/test-infra/pull/4311" rel="nofollow noreferrer">https://github.com/kubernetes/test-infra/pull/431... | <blockquote>
<p>it seems like some sort of a mechanism was put in place, but it is not clear to me how to use this mechanism</p>
</blockquote>
<p>I didn't see anything in that PR that would lead me to believe there is a dynamic (that is: without terminating <code>kube-proxy</code>) mechanism for altering log levels.... |
<p>I have Docker and OpenShift client installed on Ubuntu 16.04.3 LTS </p>
<pre><code>[vagrant@desktop:~] $ docker --version
Docker version 18.01.0-ce, build 03596f5
[vagrant@desktop:~] $ oc version
oc v3.7.1+ab0f056
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://127.0.0.1:844... | <p>I think that because --public-hostname does not specify the ip to be bound, and that ip currently is 127.0.0.1, som of the config is set to that value, and hence the oauth challenge redirects you there. I hope it might be solved in 3.10. </p>
<p>See this issue described in <a href="http://github.com/openshift/origi... |
<p>I am using the following Helm chart: <a href="https://github.com/kubernetes/charts/tree/master/incubator/elasticsearch-curator" rel="nofollow noreferrer">https://github.com/kubernetes/charts/tree/master/incubator/elasticsearch-curator</a> and passing the following in my values.yaml file:</p>
<pre><code>config:
el... | <p>It looks like I was passing the config in the wrong section and it was not picking it up properly. I passed it here and it works:</p>
<pre><code> # Having config_yaml WILL override the other config
config_yml: |-
---
client:
hosts:
- my-es-aws-endpoint
port: 443
use_ssl: True
</... |
<p>I have actively been looking for info on the internet concerning this, but it seems to be a somewhat particular use case. </p>
<p>I am trying to deploy a docker container running a legacy back-end in a Kubernetes/Openshift cluster. </p>
<p>The container is started using an entrypoint.sh script which will initiali... | <p>I can't see anything wrong in what you are describing. The stdout/stderr of process ID 1 should be captured, as will any sub process if they inherit stdout/stderr of the parent process (process ID 1).</p>
<p>Where you can have problems is if an application is set up to log to a normal file and doesn't use stdout/st... |
<p>I'm having troubles with this Vagrantfile that I've defined <a href="https://github.com/pablotoledo/kubernetes-poc/blob/master/Vagrantfile" rel="nofollow noreferrer">https://github.com/pablotoledo/kubernetes-poc/blob/master/Vagrantfile</a>.</p>
<p>In this Vagrant file I set:</p>
<ul>
<li>1 Master</li>
<li>2 Worker... | <p>Usually, when you use kubeadm to create kubernetes cluster, you follow typical sequence: </p>
<ol>
<li>prepare VM (<em>configure CPU, ram, network, drives, vagrant boxes</em>, etc.) </li>
<li>add <strong>gpg-keys</strong> and <strong>repositories</strong> </li>
<li>configure <strong>sysctl</strong> (<em>bridge-nf-... |
<p>I managed to create and deploy a k8s cluster with minikube, running 4 replicas of a simple hello-world node.js app, using the following configuration.</p>
<p>Dockerfile for the app:</p>
<pre><code>FROM ubuntu:latest
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
# TODO could uninstall... | <p>I would add third option : use an Ingress Controller <a href="https://github.com/nginxinc/kubernetes-ingress" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress</a>.</p>
<p>It will create all this features that you are looking for and built in on K8s. </p>
|
<p>I installed kubernetes using these commands on centos7 </p>
<pre><code>cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc... | <p>To install a specific version of the package it is enough to define it during the <code>yum install</code> command:</p>
<pre><code>yum install -y kubelet-<version> kubectl-<version> kubeadm-<version>
</code></pre>
<p>But for your particular case, when you want to install <code>kubernetes</code> v... |
<p>I managed to create and deploy a k8s cluster with minikube, running 4 replicas of a simple hello-world node.js app, using the following configuration.</p>
<p>Dockerfile for the app:</p>
<pre><code>FROM ubuntu:latest
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
# TODO could uninstall... | <p>I guess you want to use nginx as a reverse proxy to your Node.js app. If it is the case, you can use one of the following ways to achieve it. </p>
<p><strong>Option 1</strong></p>
<ol>
<li><p>Build nginx and your node.js app into one Docker image. In this image, configure nginx as a reverse proxy and forward the r... |
<p>I've just created a new cluster using Google Container Engine running Kubernetes 1.7.5, with the new RBAC permissions enabled. I've run into a problem allocating permissions for some of my services which lead me to the following:</p>
<p>The <a href="https://cloud.google.com/container-engine/docs/role-based-access-c... | <p>Janos's answer will work for GKE clusters that have been created with a password, but I'd recommend avoiding using that password wherever possible (or creating your GKE clusters without a password).</p>
<p>Using IAM: To create that <code>ClusterRoleBinding</code>, the caller must have the <code>container.clusterRol... |
<p>I am attempting to run a Flask app via uWSGI in a Kubernetes deployment. When I run the Docker container locally, everything appears to be working fine. However, when I create the Kubernetes deployment on Google Kubernetes Engine, the deployment goes into Crashloop Backoff because uWSGI complains: </p>
<p><code>uws... | <p>It is happening because of the difference between arguments processing in the console and in the configuration.</p>
<p>To fix it, just split your args like that:</p>
<pre><code>args:
- "--http"
- "127.0.0.1:8080"
- "--module code.experimental.launch_service_example.__main__"
- "--callable"
- "APP"
- "-... |
<p>I installed the puppet kubernetes module to manage pods of my kubernetes cluster with <a href="https://github.com/garethr/garethr-kubernetes/blob/master/README.md" rel="nofollow noreferrer">https://github.com/garethr/garethr-kubernetes/blob/master/README.md</a></p>
<p>I am not able to get any pod information back w... | <p>It looks like the <a href="https://github.com/garethr/garethr-kubernetes/" rel="nofollow noreferrer">garethr-kubernetes</a> package hasn't been updated since August 2017, so you probably need a version of the <a href="https://rubygems.org/gems/kubeclient" rel="nofollow noreferrer">kubeclient gem</a> at least that ol... |
<p>I am getting issues when trying to getting the information about the nodes created using AKS(Azure Connected Service) for Kubernetes after the execution of creating the clusters and getting the credentials.</p>
<p>I am using the azure-cli on ubuntu linux machine.</p>
<p>Followed the Url for creation of clusters: <... | <p>After you </p>
<h1>az aks get-credentials -n cluster-name -g resource-group</h1>
<p>If should have merged to your local configuration:</p>
<h1>/home/user-name/.kube/config</h1>
<p>Can you check your config</p>
<h1>kubectl config view</h1>
<p>And check if it is pointing to the right cluster. </p>
|
<p>My company has a small pipeline library that we implicitly load for every build. Is there a way to overload the <code>node {</code> block of every build transparently?</p>
<p>My specific case is that I'm provisioning kubernetes slaves with the kubernetes plugin, and I want to provide a default YAML template, while ... | <p>You can do this, but, in my opinion, it will lead to confusing behavior and possibly strange error cases.</p>
<p>For example:</p>
<p><code>echo.groovy</code></p>
<pre><code>def call(String string) {
steps.echo "Calling step echo: $string"
}
</code></pre>
<p><code>Jenkinsfile</code></p>
<pre><code>echo 'hello'... |
<h1>Context</h1>
<p>I am deploying a set of services that are containerised using Docker into AWS. No matter which deployment solution is chosen (e.g. raw EC2/ECS/Elastic Beanstalk/Fargate) we will face the issue of "service discovery".</p>
<p>To name just a few of the options for service discovery that I've consider... | <p>Service discovery is something you get out-of-the-box with Kubernetes. So having another external service in your platform will be another application to maintain, deploy and can be a point of failure. So I would stick with the the service discovery provided by Kubernetes.</p>
|
<p>I have a Kubernetes PersistentVolume that mounts a directory using HostPath and it is cumbersome to boot up a Pod and exec onto it to view or change the data in that volume. Is it possible to locate the data in this volume on my local file system instead?</p>
| <p>Docker stores these volumes in <code>/Users/username/.docker/Volumes/your-pv-name/pvc-SOME-UUID</code>.</p>
<p>You can actually find the exact location by inspecting the PersistentVolume directly:</p>
<pre><code>$ kubectl get pv -o=jsonpath='{.spec.hostPath.path}' some-persistent-volume-claim
/Users/youruser/.dock... |
<p>HPA status displays <code>132500m / 500</code> in a situation when the actual metric value is lower then <code>100/500</code> (according to the Prometheus). </p>
<pre><code>$ kubectl get hpa -n frontend --context testing
NAME REFERENCE TARGETS MINPODS MAXPODS RE... | <p>I think that is a metric conversion problem.</p>
<p>Here is a good <a href="https://github.com/kubernetes/kubernetes/issues/57365#issuecomment-359467755" rel="nofollow noreferrer">comment</a> from the contributor on the related issue, but it's about the <code>http_requests</code> metric:</p>
<blockquote>
<p>if you l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.