prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I want to create a kubernetes config map with multi-lines, such as this kind of yaml:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: nifi-bootstrap
data:
run.sh: |-
echo "Waiting to run nslookup..."
sleep 30
</code></pre>
<p>How should I write it in a part function in my prototype?</p>
... | <p>The <em>jsonnet</em> "equivalent" of <em>yaml</em>'s <code>|</code> is the <code>|||</code> construct (see <a href="https://jsonnet.org/ref/spec.html" rel="noreferrer">https://jsonnet.org/ref/spec.html</a>), applied your example:</p>
<pre><code>$ cat foo.jsonnet
{
parts:: {
bootstrap(p):: {
apiVersion:... |
<p><a href="http://grs-preprodkubemaster01:5601/kibana" rel="nofollow noreferrer">http://grs-preprodkubemaster01:5601/kibana</a></p>
<p>I have followed docs and installed Kibana, When I used the service as type: LoadBalancer, the service isn't
coming up, so I deleted the type: LoadBalancer and let it default to Clust... | <p>The most common way to expose internal server outside the cluster is an <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Ingress</a>.</p>
<p>First, you need to have an Ingress controller running in your Kubernetes cluster.<br>
There are two types of maintained Ing... |
<p>We are trying to deploy Cassandra within Kubernetes. Thinking of the storage and how to make it work its fastest at each datacenter, without the expense of implementing network attached storage at each data center, it would seem reasonable to make use of a Local Persistent Volume at each datacenter and leverage Cass... | <p>@Simon Fontana Oscarsson is right.</p>
<p>I just want to add a bit more details about that feature for people who will find that question, because it is a common case.</p>
<ol>
<li>Local Persistent Volumes are available only from 1.7 in alpha stage and from 1.10 in beta.</li>
<li>It requires pre-configured LVM on ... |
<p>When a client sends a request to the Kubernetes apiserver, authentication plugins attempt to <a href="https://kubernetes.io/docs/admin/authentication/#webhook-token-authentication#authentication-strategies" rel="nofollow noreferrer">associate a number of attributes to the request</a>. These attributes can be used by... | <p>The UID field is intentionally not used for authentication purposes, but it is to allow logging for audit purposes.</p>
<p>For many organizations this might not be important, but for example Google allows employees to change their usernames (but of course not the numeric UID). Logging the UID would allow lookups of... |
<p>I'm using a slightly customized Terraform configuration to generate my Kubernetes cluster on AWS. The configuration includes an EFS instance attached to the cluster nodes and master. In order for Kubernetes to use this EFS instance for volumes, my Kubernetes YAML needs the id and endpoint/domain of the EFS instance ... | <p>I don't know what you mean by a yaml to set up an Kubernetes cluster in AWS. But then, I've always set up my AWS clusters using <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">kops</a>. Additionally I don't understand why you would want to mount an EFS to the master and/or nodes instead of to ... |
<p>I have a kubernetes yaml deployment file which accepts db username and password as arguments as shown below. </p>
<pre><code>args:
- "-db_host=postgres"
- "-db_port=5432"
- "-db_username=postgres"
- "-db_password=postgres"
</code></pre>
<p>To hide the values of db_username and db_pa... | <p>Once you have an environment variable you can embed its value into the arguments:</p>
<pre><code>env:
- name: MESSAGE
value: "hello world"
command: ["/bin/echo"]
args: ["$(MESSAGE)"]
</code></pre>
<p>Or in your case:</p>
<pre><code>args:
- "-db_host=postgres"
- "-db_port=5432"
- "-db_use... |
<p>Newbie setup :</p>
<ol>
<li>Created First project in GCP</li>
<li>Created cluster with default, 3 nodes. Node version 1.7.6. cluster master version 1.7.6-gke.1.</li>
<li>Deployed aan application in a pod, per example.</li>
<li>Able to access "hello world" and the hostname, using the external-ip and the port.</li>
<... | <p>If you create a cluster with with version 1.9.x or greater, then u can access using tokens.</p>
<ol>
<li>get secret.</li>
</ol>
<p><code>kubectl -n kube-system describe secrets `kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}'` | awk '/token:/ {print $2}'</code></p>
<o... |
<p>I have a deployment (A pods) with a Service and HorizontalPodAutoscaler attached. I want to be able to control the scale down process and do some cleanup before the pod shutdown. Problem is, the cleanup can take a lot of time and for it to complete some other service (B pods) should be able to access the pod trying ... | <p>There is no way to do that because of the termination process design.</p>
<p>Here is the extract from the <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods" rel="nofollow noreferrer">documentation</a> of the termination process:</p>
<ol>
<li><p>User sends command to delete Pod, w... |
<p>I am working on openam deployment on Google cloud platform (GCP) and the OS is RHEL7.
I am facing issue while running minikube start.</p>
<pre><code>[root@test ~]# minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
150.53 MB / 150.53 MB [==========================... | <p><a href="https://github.com/kubernetes/minikube" rel="nofollow noreferrer">You can use</a> <code>--vm-driver=none</code> to run your minikube in cloud. This flag will run your minukube in Docker. You should have installed Docker first. </p>
<p>Also you can create a custom image where VMX will be enabled. Just follo... |
<p>How to ssh to the node inside the cluster in local. I am using docker edge version which has kubernetes inbuilt. If i run
kubectl ssh node
I am getting</p>
<pre><code> Error: unknown command "ssh" for "kubectl"
Did you mean this?
set
Run 'kubectl --help' for usage.
error: unknown command "ssh" for "kub... | <p>There is no "ssh" command in <code>kubectl</code> yet, but there are plenty of options to access Kubernetes node shell.</p>
<p>In case you are using <strong>cloud provider</strong>, you are able to connect to nodes directly from instances management interface.</p>
<p>For example, in <strong>GCP</strong>: Select <c... |
<p>I have created a Kubernetes cluster on AWS by following the instructions below. All my master and worker nodes are running Ubuntu.</p>
<p><a href="https://jee-appy.blogspot.in/2017/10/setup-kubernetes-cluster-kops-aws.html" rel="nofollow noreferrer">https://jee-appy.blogspot.in/2017/10/setup-kubernetes-cluster-kops-... | <p>Kops means <a href="https://github.com/kubernetes/kops" rel="nofollow noreferrer">Kubernetes Operations</a>, and this is a command line tool made to maintain production grade Kubernetes installation. Kops works best with <a href="https://aws.amazon.com/" rel="nofollow noreferrer">Amazon Web Services</a>. There have ... |
<p>I have a lot of standard runtime docker images like python3 with tensorflow 1.7 installed and I want to use these standard images to run some customers code out side of them. The scenario seems quite similar with the serverless. So what is the best way to put the code into runtime dockers?</p>
<p>Right now I am try... | <p>Following cloud native practices, <a href="https://12factor.net/build-release-run" rel="nofollow noreferrer">code should be immutable</a>, and releases and their dependencies uniquely identifiable for repeat-ability, replic-ability, etc - in short: you should really create images with your src code.</p>
<p>In your ... |
<p>I created a Kubernetes Cluster using kubadm and the private IP of the server so all the nodes could reach it withing the cloudprovider network. I am using 4 nodes in DigitalOcean. </p>
<pre><code>kubctl-s-2vcpu-4gb-nyc3-01-master:~# kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority-d... | <p>Where <code>ssh -L ... </code> ends, <code>sshuttle</code> starts :): it creates local tcp "catch-all" DNATing via the ssh dest node, ie will forward <strong>every</strong> tcp connection in the specified <em>CIDR</em>.</p>
<p>Try it out:</p>
<ul>
<li><p>In one terminal (to ease later ^C):</p>
<p><code>ssh... |
<p>Have been trying to setup Kubernetes for local development on my Windows 7 machine with a VirtualBox VM Driver. Installing and running minikube fails each time with the below error:</p>
<pre><code>D:\minikube>minikube start --vm-driver=virtualbox
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0219 0... | <p>I ran into the same error on osx after re-installing minikube. Simply deleting the minikube VM and restarting fixed everything:</p>
<pre><code>$ minikube delete
$ minikube start
</code></pre>
|
<p>I have a <code>spring boot</code> api running on <code>google cloud kubernetes cluster</code>, I wanna have a caching server to use for my api so I thought to use <code>memcache</code>.</p>
<p>I tried two ways of doing it:</p>
<ol>
<li>I downloaded the <code>memcache</code> from the google launcher which is basica... | <p>So I figured it out based on Jonah Benton's advice.</p>
<p>It was actually pretty simple, i used <a href="https://github.com/GoogleCloudPlatform/memcached-docker/blob/master/1/README.md" rel="nofollow noreferrer">this tutorial</a> to create a new pod running <code>memcached</code> in my cluster and then I used <a h... |
<p>I read in kubernetes docs somewhere that kubernetes reads application logs from stdout and stderror in pods.
I created a new application and configured it to send logs to a remote splunk hec endpoint (using splunk-logback jars) and at the same time to console.
So by default, the console logs in logback should go t... | <p>According to the Kubenetes <a href="https://kubernetes.io/docs/concepts/cluster-administration/logging/" rel="nofollow noreferrer">documentation</a>, all output (that a containerized application writes to <code>stdout</code> and <code>stderr</code>) is redirected to a JSON file by default. You can access it by using... |
<p>I have been trying to test minikube to create a demo application with three services. The idea is to have a web UI which communicates with the other services. Each service will be written in different languages: nodejs, python and go.</p>
<p>I created 3 docker images, one for each app and tested the code, basically... | <p>You misconfigured the port numbers.</p>
<p>First, <code>vcsa-manager</code> was exposed on port 8080; after that, you tried to map the service <code>vcsa-manager-service</code> to port 9090.
Then, <code>repo-manager</code> was exposed on port 8000; you commented <code>targetPort</code> and didn’t map the service to ... |
<p>We are having kubernetes cluster which is running on-premise & we having GCR private repository. So how we can access that private repository to my on-premise kubernetes cluster, As I know we can do using gcloud-sdk but it won't be possible to install gcloud-sdk on every node of kubernetes cluster.</p>
| <p>We used to deploy pods on azure AKS cluster and images used to be from GCR.
these are the steps we follow.</p>
<ol>
<li>Create a service account in gcloud with permissions to gcr.</li>
<li>Create keys for the service account.</li>
<li>Add kubectl secret.</li>
<li>Use secret in yaml</li>
</ol>
<p><code>gcloud iam s... |
<p>I am creating a CI/CD pipeline.</p>
<p>I run <code>helm install --wait --timeout 300 ...</code>. But that doesn't really wait, just returns when the "release" status is <code>DEPLOYED</code>.</p>
<p>So then I see a few things in <code>kubectl get pods --namespace default -l 'release=${TAG}' -o yaml</code> that co... | <p>Kubernetes already has something to wait on pods (and print a message every time something changes and print a summary at the end).</p>
<pre><code># kubectl rollout status RESOURCE_TYPE RESOURCE_NAME
kubectl rollout status statefulset app1-hello
# with timeout set to 300 seconds
kubectl rollout status statefulset ... |
<p>I'm setting up a k8s cluster on GKE. A wildcard DNS <code>*.server.com</code> will point to a Ingress controller. Internally to the cluster, there will be webserver pods, each exposing a unique service. The Ingress controller will use the server name to route to the various services. </p>
<p>Servers will be crea... | <p>It appears like you're planning to host multiple domain names on a single Load Balancer (==single <code>Ingress</code> resource). If not, this answer doesn't apply.</p>
<p>You can do this by configuring <code>Ingress</code> with a long list of domain names like:</p>
<pre><code>spec:
rules:
- host: cats.server.... |
<p>Does kubernetes or Helm support shut down the pods if it is idle for more than a given threshold time?</p>
<p>This would be very useful in the development environment, to provide room for other processes to consume it and save cost. </p>
| <p>Kubernetes is featured with the ability to autoscale your application in a cluster. Literally, it means that Kubernetes can start additional pods when the load is increasing and terminate excessive pods when the load is decreasing.</p>
<p>It is possible to downscale the application to zero pods, but, in this case, ... |
<p>As kubernetes 1.9 , all flags than --config are deprecated on kube-scheduler. So how to create config file ?</p>
| <p>Building from tip and using <code>--write-config-to</code> yields a sample config file. Examining it, it's a yaml file using <a href="https://godoc.org/k8s.io/kubernetes/pkg/apis/componentconfig#KubeSchedulerConfiguration" rel="nofollow noreferrer">KubeSchedulerConfig</a> as the schema.</p>
<p>Sample config (no oth... |
<p>I am using docker containers and have docker-compose files for both local development and production environment. I want to try Google Cloud Platform for my new app and specifically Google Kubernetes Engine. My tools is Docker for Mac with Kubernetes on local machine.</p>
<p>It is super important for developers to ... | <p>@tgogos is right.
The best way to achieve your goal is to use <a href="https://cloudplatform.googleblog.com/2018/03/introducing-Skaffold-Easy-and-repeatable-Kubernetes-development.html" rel="nofollow noreferrer">Skaffold</a></p>
<p>It will rebuild container whenever it sees changes in source code.</p>
<p>Skaffold ... |
<p><a href="http://grs-preprodkubemaster01:5601/kibana" rel="nofollow noreferrer">http://grs-preprodkubemaster01:5601/kibana</a></p>
<p>I have followed docs and installed Kibana, When I used the service as type: LoadBalancer, the service isn't
coming up, so I deleted the type: LoadBalancer and let it default to Clust... | <p>I got it to work with these changes in ingress config</p>
<pre><code> apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kube
namespace: kube-system
annotations:
kubernetes.io/ingress.class: nginx
nginx.org/rewrites: "serviceName=kubernetes-dashboard rewrite=/;serviceName=kiban... |
<p>I'm just getting started with GCP and Kubernetes Engine. So far I managed to start a Kubernetes cluster, run my app in a pod and connect it to a Cloud SQL instance. I also added a load balancer so now my app has a static IP and I should be able to connect to it from the outside. </p>
<p>However, I just get a <code>... | <p>Turns out, it's the IP of the load balancer. In the settings.py file I changed the allowed hosts to</p>
<pre><code>ALLOWED_HOSTS = [os.environ.get('LOAD_BALANCER_IP', '127.0.0.1')]
</code></pre>
<p>and in my deployment yaml I added the load balancer IP as an evironment variable to my container:</p>
<pre><code>spe... |
<p>I am having difficulties sending requests to my spring boot application deployed in my Google Cloud Kubernetes cluster. My application receives a photo and sends it to the Google Vision API. I am using the provided client library (<a href="https://cloud.google.com/vision/docs/libraries#client-libraries-install-java"... | <p>I also had to specify the GOOGLE_APPLICATION_CREDENTIALS environment variable on my GKE setup, these are the steps I completed thanks to <a href="https://stackoverflow.com/questions/47021469/how-to-set-google-application-credentials-on-gke-running-through-kubernetes">How to set GOOGLE_APPLICATION_CREDENTIALS on GKE ... |
<p>I am using multiple ingresses resource on my GKE, say I have 2 ingress in different namespaces. I create the ingress resource as shown in the yaml below. With the annotations used in the below yaml, I clearly mention that I am using the GCE controller that comes with GKE(<a href="https://github.com/kubernetes/ingres... | <p>In your Ingress resource you can specify you need the Load Balancer to use a specific IP address with the <code>kubernetes.io/ingress.global-static-ip-name</code> annotation like so:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: gce
kuberne... |
<p>I just installed a new centos server with docker</p>
<pre><code>Client:
Version: 1.13.1
API version: 1.26
Package version: <unknown>
Go version: go1.8.3
Git commit: 774336d/1.13.1
Built: Wed Mar 7 17:06:16 2018
OS/Arch: linux/amd64
Server: Version: 1.... | <p>You can bring up the cluster using your IP address like:
oc cluster up --public-hostname=192.168.122.154 </p>
<p>This way you should be able to access using <a href="https://master.ouatrahim.com:8443/" rel="nofollow noreferrer">https://master.ouatrahim.com:8443/</a></p>
|
<p>I read in kubernetes docs somewhere that kubernetes reads application logs from stdout and stderror in pods.
I created a new application and configured it to send logs to a remote splunk hec endpoint (using splunk-logback jars) and at the same time to console.
So by default, the console logs in logback should go t... | <p>ok so this finally got resolved. The issue was with the logs not being flushed.</p>
<p>In the PatternLayout the %n was missing. Hence everything was going into some buffer I guess and not reaching the console.</p>
|
<p>I have installed Traefik on Kubernetes and followed allong the official tutorial.
I have a cluster of 4 machines for Kubernetes.</p>
<p>When I run <code>kubectl --namespace=kube-system get pods</code> I see <code>traefik-ingress-controller-678226159-eqseo</code>, so all fine.</p>
<p>Then I executed:</p>
<pre><cod... | <p>in <a href="https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/ui.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/ui.yaml</a> there is following ingress definition:</p>
<pre><code>---
apiVersion: extensions/v1beta1
kind: Ingress
metadata... |
<p>I have Kubernetes 1.8.7 cluster deployed on AKS. I am trying to install NGINX ingress controller using help (helm install stable/nginx-ingress --namespace kube-system). I init helm using helm init --service-account default.
I am getting following error </p>
<blockquote>
<p>Error: release my-release failed: clust... | <p>Add --version 0.18.1 to your <code>helm install</code> or <code>helm upgrade</code> command. Still getting to the bottom of this, but the culprit is <a href="https://github.com/kubernetes/charts/pull/5169" rel="nofollow noreferrer">https://github.com/kubernetes/charts/pull/5169</a></p>
|
<p>I have simple Spring boot application which I need to deploy on development and prod different namespaces on a Kubernetes cluster using Helm.</p>
<p>I was thinking about keeping multiple application.properties (application-dev.properties, application-prod.properties) files for each environment and then create confi... | <p>Springboot can automatically infer variables from environment variables. In your application.properties or application.yaml, just use ${MY_ENVIRONMENT_VARIABLE:my-defaultvalue}.<br>
Use helm to populate your configmap.
Use configmap as environment variables into your deployment manifest.</p>
<p>This way you do not... |
<p>I need add argument <code>--authentication-token-webhook</code> in Kubelet. I can change file <code>/etc/systemd/system/kubelet.service.d/10-kubeadm.conf</code> at all nodes step by step with my hands. But it is not funny )). How can I change Kubelet arguments from single point?</p>
| <p>You can either</p>
<ol>
<li>configure your Kubernetes workers via tools like <a href="https://puppet.com/" rel="nofollow noreferrer">Puppet</a> or <a href="https://www.ansible.com/" rel="nofollow noreferrer">Ansible</a>. Write your service drop-in once and deploy it via the tool to all nodes. Make sure you don't re... |
<p>I try to get a value from a YAML file within a shell:</p>
<pre><code>apiVersion: v1
items:
- apiVersion: v1
kind: Pod
spec:
containers:
hostIP: 12.198.110.192
phase: Running
podIP: 10.244.1.9
</code></pre>
<p>With <code>kubectl get pods -l run=hello-kube -o yaml | grep podIP:</code> I get this ... | <p>With awk:</p>
<pre><code>kubectl get pods -l run=hello-kube -o yaml | awk '/podIP:/ {print $2}'
</code></pre>
<p>Output:</p>
<pre>
10.244.1.9
</pre>
|
<p>I fail to see why kubernetes need a pod selector in a deployment statement that can only contain one pod template? Feel free to educate me why kubernetes engineers introduced a selector statement inside a deployment definition instead of automatically select the pod from the template?</p>
<pre><code>---
apiVersion:... | <p>Ah! Funny enough, I have once tried wrapping my head around the concept of label selectors as well before. So, here it goes...</p>
<p>First of all, what the hell are these labels used for? Labels within Kubernetes are the core means of identifying objects. A controller controls pods based on their label instead of t... |
<p>Is it possible to send requests to all pods behind a service/ingress controller based on the requests?</p>
<p>My requirement is to send requests to all the pods if the request is /send/all.</p>
| <p>It's not possible because ingress controller can't do this (for sure nginx and GLBC based ingress can't do it, bud due to the way how to http works I assume this is the case for all ingress controllers).</p>
<p>Depending what your exact case is you have few options.</p>
<p>If your case is just monitoring and you c... |
<p>We have a Cassandra Cluster with 3 pods, in Google Cloud Kubernetes.
Our Cassandra version is 3.9 we are using the Google images.</p>
<p>I got a problem when I tried to create a Materialized View from a table.</p>
<p>The schema of the table is like:</p>
<pre><code>CREATE TABLE environmental_data (
block_id in... | <p>According to <a href="https://www.datastax.com/dev/blog/understanding-materialized-views" rel="nofollow noreferrer">docs</a>, Cassandra considers updates within the same partition as a single mutation. In your case, I suppose, this means that every new insert with the same device id may result in transferring all th... |
<p>I'm using Kubernetes into google cloud platform and have defined some clusters with deployment controllers there.</p>
<p>For each pod into deployment there is a health check which each 30sec check my route(<a href="http://www.example.com" rel="nofollow noreferrer">www.example.com</a>) and the response must be 200... | <p>health check used to verify if a container in a pod is healthy and ready to serve traffic.</p>
<p>So you should check your http status code at first:</p>
<blockquote>
<p>curl -I www.example.com</p>
</blockquote>
<p>What is your http status code in the response?</p>
<p>when you write die() in your index.php the... |
<p>I'm new in Kubernetes and was trying to deploy an nginx-ingress in a Aks cluster with Helm.</p>
<p>After the cluster was created with az-cli, tried to deploy nginx-ingress with this command:</p>
<pre><code>helm install stable/nginx-ingress -n nginx-ingress --namespace kube-system --set rbac.create=false
</code></p... | <p>I just got over this. It looks to me like RBAC may be enabled now on AKS, but only partially? I just created my cluster on 5/11/18.</p>
<p>I took pieces from these two issues...<br>
<a href="https://github.com/kubernetes/helm/issues/3985" rel="noreferrer">https://github.com/kubernetes/helm/issues/3985</a><br>
<a hr... |
<p>I am creating the deployments/services using REST APIs. I send POST request with bodies which contain the JSON objects which create the applications on Openshift. After I call all the APIs, these objects get instantiated.</p>
<p>I have 2 deployments which are dependent on mongodb deployment but this mongodb takes ... | <p>Instead of implementing complex logic for dependency handling, use health checking mechanism of Kubernetes. If your application starts and doesn't see Mongo DB, let it crash. Kubernetes will keep restarting it until Mongo DB comes online, and your application becomes healthy and serving as well. Kubernetes won't sen... |
<p>I have a rest microservice and would like to setup nginx as a reverse proxy for it. I am little confused about which approach to follow:</p>
<ol>
<li>Run nginx in each pod where application code is running.</li>
<li>Run nginx in separate pods and redirect http requests to application code running in separate pods.<... | <p>In my opinion, running nginx in a separate pod is a better option because that way you can scale up and down application separately from a proxy. Usually, we use one container with proxy and few with API. </p>
|
<p>I've created a <a href="https://github.com/kubernetes-incubator/kubespray" rel="nofollow noreferrer">local Kubernetes cluster using ansible</a>.
Everything is running but now I try to connect my <code>kubectl</code> with the cluster (in the VM's).</p>
<p>My cluster is running on <code>https://IP:6443</code></p>
<p... | <p>Kubectl is a command line tool for remote management of Kubernetes cluster.</p>
<p>Kubectl is using a config file you must have to connect to the cluster. It is possible that your config file is inconsistent due to a lot of major or minor changes. If further analyses of the issues does not show good results, try to... |
<p>I have a ReactJS application and I'm deploying it using Kubernetes.</p>
<p>I'm trying to wrap my head around how to inject environment variables into my <code>config.js</code> file from within the Kubernetes deployment file.</p>
<p>I currently have these:
<code>config.js</code> file:</p>
<pre><code>export const C... | <p>The kubernetes environment variables are available in your container. So you would think the task here is a version of getting server side configuration variables shipped to your client side code.</p>
<p>But, If your react application is running in a container, you are most likely running your javascript build pi... |
<p>I need to pass dynamic env variable to <code>kubectl create</code>. Something like this </p>
<p><code>kubectl create -f app.yaml --Target=prod</code></p>
<p>Based on Target code deploys on different servers.</p>
| <p>If you want to avoid installing 3rd party plugin then you can replace the text using sed "s/orginal/change/". It worked. I used this in Jenkins shell. </p>
<p><strong>cat app.yaml | sed "s/l3-apps/l2-apps/" | kubectl create -f -</strong></p>
|
<p>In minikube I can get a service's url via <code>minikube service kubedemo-service --url</code>. How do I get the URL for a <code>type: LoadBalancer</code> service in Docker for Mac or Docker for Windows in Kubernetes mode?</p>
<p><code>service.yml</code> is:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
... | <p>LoadBalancer will work on Docker-for-Mac and Docker-for-Windows as long as you're running a recent build. Flip the type back to <code>LoadBalancer</code> and update. When you check the describe command output look for the <code>Port: <unset> 80/TCP</code> line. And try hitting <a href="http://localhost:80" r... |
<p>We have a issue where connecting to AWS RDS in Istio Service Mesh is results in <code>upstream connect error or disconnect/reset before header</code> .
Our Egress rule is as below </p>
<pre><code> apiVersion: config.istio.io/v1alpha2
kind: EgressRule
metadata:
namespace: <our-namespace>
name: rd... | <p>The protocol in your <code>EgressRule</code> definition should be <code>tcp</code>. The <code>service</code> should contain the IP address or a range of IP addresses in CIDR notation.</p>
<p>Alternatively, you can use the <code>--includeIPRanges</code> flag of <code>istioctl kube-inject</code>, to specify which IP r... |
<p>I have non deckerised application that needs to connect to dockerised application running inside kubernetes pod.</p>
<p>Given that pods may died and came again with different ip address, how my application can detect this? any way to assign a hostname that redirect to whatever existing pods?</p>
| <p>You will have to use kubernetes service. Service gives you a way to talk to your pods with static Ip and dns (if you're client app is inside the cluster). </p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networ... |
<p>I'm able to bind a docker volume to a specific container in a swarm thanks to <a href="https://flocker.readthedocs.io/en/latest/" rel="nofollow noreferrer">flocker</a>, but now i would have multiple replicas of my server (to do load balancing) and so i'm searching something to bind the same data volume to multiple ... | <p>In k8s, you can mount volume to different Pods at the same time if technology that backs the volume supports shared access.</p>
<p>As mentioned in <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">Kubernetes Persistent Volumes</a>:</p>
<blockquote>
<p>Access Mode... |
<p>I want to be able to perform something like <code>docker commit</code> on a container running inside a Kubernetes pod.</p>
<p>Volume snapshots do not meet my criteria because I want to snapshot the complete state of the container, not just the data mounted under some path.</p>
<p>I need this because I provide (tru... | <p>Run the bash shell inside a container named guest:</p>
<pre><code>[root@host ~]# docker run -i -t --name guest oraclelinux:6.6 /bin/bash
[root@guest ~]#
</code></pre>
<p>If you use a web proxy, edit the yum configuration on the guest as described in the <a href="http://docs.oracle.com/cd/E52668_01/E54669/html/ol7-... |
<p>I'm running a kubernetes cluster and one microservice is constantly crashing with exitCode 134. I already changed the resource memory limit to 6Gi</p>
<pre><code>resources: {
limits: {
memory: "6Gi"
}
}
</code></pre>
<p>but the pod never goes above 1.6/1.7Gi. </p>
<p>What may be missing?</p>
| <p>It's not about Kubernetes memory limit. Default JavaScript Heap limit is 1.76GB when running in node (v8 engine).</p>
<p>The command-line in Deployment/Pod should be changed like <code>node --max-old-space-size=6144 index.js</code>.</p>
|
<p>I know that Docker and Kubernetes aren’t direct competitors. Docker is the container platform and containers are coordinated and scheduled by Kubernetes, which is a tool. </p>
<p>What does it really mean and how can I deploy my app on Docker for Azure ? </p>
| <h1>Short answer:</h1>
<ul>
<li><p>Docker (and containers in general) solve the problem of packaging an application and its dependencies. This makes it easy to ship and run everywhere.</p></li>
<li><p>Kubernetes is one layer of abstraction above containers. It is a distributed system that controls/manages containers.<... |
<p>I want to run consul in kubernetes but I am not allowed to run it as user root.</p>
<p>Therefore I added</p>
<pre><code>RUN addgroup consul root
</code></pre>
<p>to the Dockerfile (derived <code>FROM consul:1.0.3</code>)</p>
<p>and start the deployment in kubernetes with</p>
<pre><code>apiVersion: extensions/v1... | <p>I ended up in fixing Consuls <code>docker-entrypoint.sh</code> to check if the user is root before executing the chown command by adding some <code>if [ "$(id -u)" = "0" ]</code> tests.</p>
<p><a href="https://github.com/DatzAtWork/docker-consul/tree/DatzAtWork-patch-non-root" rel="nofollow noreferrer">You can find... |
<p>I am currently trying to deploy a spark example jar on a Kubernetes cluster running on IBM Cloud.</p>
<p>If I try to follow these <a href="https://spark.apache.org/docs/latest/running-on-kubernetes" rel="noreferrer">instructions to deploy spark on a kubernetes cluster</a>, I am not able to launch Spark Pi, because I... | <p>Ensure <code>your.jar</code> file is present inside the container image.</p>
<p><a href="https://spark.apache.org/docs/latest/running-on-kubernetes#cluster-mode" rel="nofollow noreferrer">Instruction</a> tells that it should be there:</p>
<blockquote>
<p>Finally, notice that in the above example we specify a jar wit... |
<p>Base question: When I try to use kube-apiserver on my master node, I get command not found error. How I can install/configure kube-apiserver? Any link to example will help.</p>
<pre><code>$ kube-apiserver --enable-admission-plugins DefaultStorageClass
-bash: kube-apiserver: command not found
</code></pre>
<p>Detai... | <p>You are asking two different questions here, one about kube-apiserver configuration, one about troubleshooting your <code>StorageClass</code>.</p>
<p>Here's an answer for your first question:</p>
<p><code>kube-apiserver</code> is running as a Docker container on your master node. Therefore, the binary is <em>withi... |
<p>When I installed docker and ran <code>service docker start</code> I got this message:</p>
<pre><code>Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
</code></pre>
<p>When I ran <code>journalctl -xe</code> I go... | <p>Docker version 1.13.1</p>
<p>For CentOS Linux release 7.2.1511 (Core), ensure following <code>DOCKER_STORAGE_OPTIONS</code> option is set to <code>devicemapper</code>.</p>
<pre><code>bash # vi /etc/sysconfig/docker-storage
...
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper "
...
bash # vi /etc/sysconfig/do... |
<p>I followed this tutorial on Medium to deploy a Kubernetes cluster on AWS:
<a href="https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4" rel="noreferrer">https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4</a></p>
<... | <p>The problem is that step 13 of the tutorial reads:</p>
<blockquote>
<p>kops get secrets kube --type secret -oplaintext</p>
</blockquote>
<p>It should instead be:</p>
<blockquote>
<p>kops get secrets admin -oplaintext</p>
</blockquote>
|
<p>I got the ingress nginx working in <code>gcloud</code>. However, when I see the log with the command <code>kubectl log</code> </p>
<pre><code>$ kubectl logs nginx-ingress-controller-59f55c679c-zcr24
myhost.com/clients"
10.28.0.1 - [10.28.0.1] - - [14/May/2018:09:00:59 +0000] "GET /api/users/2/10 HTTP/1.1" 304 0 "ht... | <p>It looks like <a href="https://kubernetes.io/docs/tutorials/services/source-ip/" rel="nofollow noreferrer">source IP</a> (in your case, External IP) must be preserved while using the GKE service. Here, the default is set to use cluster IP, which means that traffic will go through SNAT and get transferred from node t... |
<p>What is a simple explanation to resource allocation and definitions in kubernetes?
What does it mean to allocate "1000m" CPU units and 1024Mi off memory?</p>
| <p>(tried to write it in simpler language than the official <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" rel="noreferrer">docs</a>)</p>
<p><strong>CPU</strong> </p>
<p>In Kubernetes each CPU core is allocated in units of one "milicore" meaning one Virtual Core (on a ... |
<p>I have set up a custom kubernetes cluster on GCE using kubeadm. I am trying to use StatefulSets with persistent storage.</p>
<p>I have the following configuration:</p>
<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gce-slow
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-sta... | <p>The answer took me a while but here it is:</p>
<p>Using the GCECloudProvider in Kubernetes outside of the Google Kubernetes Engine has the following prerequisites (the last point is Kubeadm specific):</p>
<ol>
<li><p>The VM needs to be run with a service account that has the right to provision disks. Info on how t... |
<p>I'm currently trying to wrap my head around learning Go, some details of the kubernetes API I haven't used before and the kubernetes api framework for Go at the same time, and would appreciate your help in understanding the grammar of that framework and why people use it anyways.</p>
<p>Honestly I'm not sure why to... | <p>I'm a bit late, but here is my 2 cents.</p>
<h1>Why to use <code>client-go</code> instead of <code>http</code> library</h1>
<p>There are serval pros with <code>client-go</code>.</p>
<ol>
<li><p>Kubernetes resource is defined as <strong>strongly-typed class</strong>, means less misspelled debugging and easy to ref... |
<p>I am trying to develop an application with microservices and Spring Cloud. I am using Zuul as a proxy server, Eureka as a Service discovery and couple of other microservices like product service, order service etc.</p>
<p>For deployment purpose, I am trying to leverage features of Docker and Kubernetes. While learn... | <p>Kubernetes is a container management tool whereas Spring Cloud is a collection of tools to build microservices architectures. There are overlap, like service discovery, gateway or configuration services. </p>
<p>You can use Spring Cloud to build your microservices architecture by deploying the jars yourself. You do... |
<p>I am currently running mysql, wordpress and my custom node.js + express application on kubernetes pods in the same cluster. Everything is working quite well but my problem is that all the data will be reset if I have to rerun the deployments, services and persistent volumes.</p>
<p>I have configured wordpress quite... | <blockquote>
<p>How is this possible to do or am I thinking something wrong?</p>
</blockquote>
<p>It might be better to move configuration mindset from working directly on base container instances to configuring container images/manifests. You have several approaches there, just some pointers:</p>
<ul>
<li><p>Creat... |
<p>kops update cluster xyz.testexample.com</p>
<p>error doing DNS lookup for NS records for "xyz.testexample.com": lookup xyz.testexample.com on 192.168.0.1:53: no such host</p>
| <blockquote>
<pre><code>error doing DNS lookup for NS records for "xyz.testexample.com": lookup xyz.testexample.com on 192.168.0.1:53: no such host
</code></pre>
</blockquote>
<p>That error means Kops is unable to resolve the DNS name <code>xyz.testexample.com</code>.</p>
<p>DNS names in Kops are a critical path. Ple... |
<p>I have a new laptop and kubernetes cluster running on Google Cloud Platform. How can I access that cluster from local machine to execute kubectl commands, open dashboard etc?</p>
<p>That is not clearly stated in the documentation.</p>
| <p>From your local workstation, you need to have the <code>gcloud</code> tool installed and properly configured to connect to the correct GCE account. Then you can run:</p>
<pre><code> gcloud container clusters get-credentials [CLUSTER_NAME]
</code></pre>
<p>This will setup <code>kubectl</code> to connect to your kub... |
<p>Following the Deployment example in the docs. I'm trying to deploy the example nginx. With the following config:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers... | <p>If the deployment is not creating any pods you could have a look at the events an error might be reported there for example:</p>
<pre><code>kubectl get events --all-namespaces
NAMESPACE LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON ... |
<p>I need to start kubernetes pods in a sequence like pod2 should start only when pod1 is up and running.</p>
<p>we can do this in <code>docker-compose.yml</code> using <code>depends_on</code></p>
| <p>No, there is no built-in dependency management equivalent to <code>depends_on</code> available. In general, we assume loosely coupled services and as a good practice there should be no hard dependency in terms of start-up order, but retries and timeouts should be used. If you have to hardcode dependencies, you can u... |
<p>I have a test executor <code>Pod</code> in K8s cluster created through helm, which asks for a dynamically created <code>PersistentVolume</code> where it stores the test results.</p>
<p>Now I would like to get the contents of this volume. It seems quite natural thing to do.
I would expect some <code>kubectl download... | <p>I can think about two options to fulfill your needs:</p>
<ol>
<li>Create a pod with the PV attached to it and use <code>kubectl cp</code> to copy the contents wherever you need. You could for example use a <code>PodSpec</code> similar to the following:</li>
</ol>
<pre class="lang-yaml prettyprint-override"><code>api... |
<p>I am learning kubernetes right now.I want to enter a pod which is in remote cluster . But, I don't know it's entrypoint. I can't find it using <strong>$kubectl describe pod podname</strong>.</p>
| <p>If you want to access the shell in a Container(POD), You can use the following command. </p>
<pre><code>kubectl exec POD -c CONTAINER -- COMMAND [args...]
</code></pre>
<p>For example, IF the Pod has bash shell, you can access it with the following command. </p>
<pre><code>kubectl exec -it shell-demo -- /bin/bas... |
<p>I have a Kubernetes cluster with a master node and two other nodes:</p>
<pre><code>sudo kubectl get nodes
NAME STATUS ROLES AGE VERSION
kubernetes-master Ready master 4h v1.10.2
kubernetes-node1 Ready <none> 4h v1.10.2
kubernetes-node2 Ready ... | <blockquote>
<p>But, I thought that K8s provided some kind of external cluster ip that balanced the requests to the nodes from the outside. What is that IP??</p>
</blockquote>
<ul>
<li><p>Cluster IP is internal to Cluster. Not exposed to outside, it is for intercommunication across the cluster.</p></li>
<li><p>Indee... |
<p>I want to set up a kubernetes cluster that supports <a href="https://kubernetes.io/docs/admin/authorization/rbac/" rel="nofollow noreferrer">RBAC</a> and have multiple admin users. If I create an user like <a href="https://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/" rel="nofollow n... | <p>Here is an easier way to do it. <a href="https://kubernetes.io/blog/2017/10/using-rbac-generally-available-18/" rel="nofollow noreferrer">https://kubernetes.io/blog/2017/10/using-rbac-generally-available-18/</a></p>
<pre><code>kubectl create clusterrolebinding cluster-admin --clusterrole=cluster-admin \
--user=user... |
<p>I'm trying to integrate Kubernetes cluster with Gitlab for using the Gitlab Review Apps feature.</p>
<ul>
<li>Kubernetes cluster is created via Rancher 1.6</li>
<li>Running the <code>kubectl get all</code> from the kubernetes shell gives</li>
</ul>
<blockquote>
<pre><code>NAME TYPE CLUSTER-IP... | <p>I'm also dying out with kubernetes and GitLab. I've created a couple single-node "clusters" for testing, one with <a href="https://kubernetes.io/docs/getting-started-guides/minikube/" rel="noreferrer"><code>minikube</code></a> and another via <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubea... |
<p>I installed a Kubernetes master using kubeadm sucessfully on a VM (VirtualBox). The problem is that if I stop the machine and restart it the master node seems to be down:</p>
<pre><code>kubectl get nodes
The connection to the server 10.0.x.x:6443 was refused - did you specify the right host or port?
</code></pre>
... | <blockquote>
<p>The problem is that if I stop the machine and restart it the master node seems to be down</p>
</blockquote>
<ul>
<li><p>Since it was kubeadm installation that worked properly before restarts, seems like Env var is missing after restart. Try to run this before <code>kubectl get nodes</code>:</p>
<pre... |
<p>So I have just started using Kubernetes API server and I tried this example :</p>
<pre><code>from kubernetes import client, config
def main():
# Configs can be set in Configuration class directly or using helper
# utility. If no argument provided, the config will be loaded from
# default location.
c... | <p>You can actually create a simple api wrapper. This way you can pass through different yaml configuration files, that I imagine may have different hosts</p>
<pre><code>import yaml
from kubernetes import client
from kubernetes.client import Configuration
from kubernetes.config import kube_config
class K8s(object):... |
<p>I've created a cluster on Google Kubernetes Engine (previously Google Container Engine) and installed the Google Cloud SDK and the Kubernetes tools with it on my Windows machine.</p>
<p>It worked well for some time, and, out of nowhere, it stopped working. Every command I'm issuing with <code>kubectl</code> provoke... | <p>For others seeing this issue, there is another cause to consider.</p>
<p>After doing:</p>
<pre><code>gcloud config set project $PROJECT_NAME
gcloud config set container/cluster $CLUSTER_NAME
gcloud config set compute/zone europe-west2
gcloud beta container clusters get-credentials $CLUSTER_NAME --region europe-wes... |
<p>I written deployment file as follow, which is giving me error as <code>unknown field "platform"</code>. Any idea on what to specify so that it deploy based on architecture?</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:... | <p>You have to use nodeAffinity definitions on your deployment spec. Here's an example I use to pin tasks to amd64 or arm hosts:</p>
<pre><code> affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/... |
<p>I'm using kubernetes-client/java api and I want to programmatically get the pod status of all the pods in all the namespaces. My code is based on this <a href="https://github.com/kubernetes-client/java/blob/master/examples/src/main/java/io/kubernetes/client/examples/WatchExample.java" rel="noreferrer">example on Kub... | <p>Watch is designed to send continuous updates. If you run your program for a while and start/stop something, you will see new updates coming.</p>
<p>I'm not sure it's correct to call it an event handler though. It's a different pattern.</p>
|
<p>Inside the same openshift project, I have an application1 (APP1) in POD1 and another application (APP2) in POD2.<br>
Both these applications are offering REST API services. These 2 applications are accesible using 2 differents openshift route.</p>
<p>Acessing the two applications from outside the PAAS (openshift) i... | <p>You may want to have a look at:</p>
<p><a href="https://docs.openshift.com/container-platform/3.7/architecture/networking/networking.html" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/3.7/architecture/networking/networking.html</a></p>
<p>For internal communication it is sufficient to us... |
<p>I am trying to copy a jar file to specific pod's container by executing below command.</p>
<p><code>kubectl cp local_policy.jar podname:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security</code>.</p>
<p>I am getting below error. </p>
<pre><code>rpc error: code = 13 desc = invalid header... | <p>tar binary is necessary to run cp. It is in the help page of kubectl cp:</p>
<pre><code>kubectl cp --help
Copy files and directories to and from containers.
Examples:
# !!!Important Note!!!
# Requires that the 'tar' binary is present in your container
# image. If 'tar' is not present, 'kubectl cp' will fail... |
<p>In Kubernetes documentation I haven't found any explanation of the pods line when describing resources:</p>
<p><a href="https://i.stack.imgur.com/tzBaB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tzBaB.png" alt="enter image description here"></a></p>
<p>What does "pods 110" mean? Why is it f... | <p>According to <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">kubelet</a> documentation:</p>
<pre><code>--max-pods int32 Default: 110
Number of Pods that can run on this Kubelet.
</code></pre>
<p>So, that means that 110 pods could be created on node... |
<p>Now that Heapster is nearing end of life, using the in incubation Metrics Server allows the "core" resources of CPU and Memory, is there a non-deprecated way of accessing other resource metrics (disk and network usage, for example) WITHOUT resorting to Prometheus?</p>
<p>Thank you.</p>
| <p><a href="https://prometheus.io/docs/introduction/overview/" rel="nofollow noreferrer">Prometheus</a> is becoming standard de-facto for monitoring Kubernetes cluster.</p>
<blockquote>
<p><strong>When does it fit?</strong><br />
Prometheus works well for recording any purely numeric time series. It fits both machine-c... |
<p>I have an Google Cloud Load Balancer-backed ingress in my Google Kubernetes Engine cluster. I have an autoscaler set up to scale the number of replicas of my deployment based on CPU usage. Let's say I have set the CPU threshold to 50%.</p>
<p>When there is a burst of requests, the CPU usage goes to 100%. The autosc... | <p>First problem you are describing (serving 503) is called "load shedding". Normally it's a responsibility of the application to say: "oops, I'm overloaded, 503, slow down". If you move this responsibility to the client, then it might be too slow to react to provide you any reasonable protection - its data will always... |
<p>I want to mount a shell script template into a container.</p>
<p>I have the following <code>configmap.yaml</code>:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "myservice-chart.fullname" . }}--scripts-configmap
labels:
app: {{ template "myservice-chart.name" . }}
chart: {{ ... | <p>According to <a href="https://docs.helm.sh/chart_template_guide/" rel="noreferrer">helm chart template guide</a>:</p>
<blockquote>
<p>The curly brace syntax of template declarations can be modified with
special characters to tell the template engine to chomp whitespace.
{{- (with the dash and space added) ind... |
<p>I am new to K8S. I have a yaml file which generates kubernetes secrets mounted on projected volumes. Upon execution, I found that the secret files (packaged with secrets) are showing "root" as file owner and group owner. I want to change the file owner and group owner to the same specific user (say 450). </p>
<... | <p>As far as I know, there's no way to change owner UID for secrets.</p>
<p>A workaround is to copy a secret to a normal file, then change its ownership and mode, like this:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: volume-test
spec:
containers:
- name: container-test
image: busybox
comman... |
<p>I'm using the simplest docker ever:</p>
<pre><code>FROM ubuntu
COPY script.sh /script.sh
CMD /script.sh
</code></pre>
<p>Where all the script does is:</p>
<pre><code>#!/bin/bash
function sigterm() {
echo "Got SIGTERM"
exit
}
trap sigterm SIGTERM
i=1
while true; do
echo "$(date +%H:%M:%S) | $((i++))... | <p>Reading <a href="https://docs.docker.com/engine/reference/builder/#cmd" rel="noreferrer">the Dockerfile documentation on CMD</a></p>
<blockquote>
<p>The CMD instruction has three forms:</p>
<ul>
<li>CMD ["executable","param1","param2"] (exec form, this is the preferred form)</li>
<li>CM... |
<p>I have Consul running in my cluster and each node runs a consul-agent as a DaemonSet. I also have other DaemonSets that interact with Consul and therefore require a consul-agent to be running in order to communicate with the Consul servers.</p>
<p>My problem is, if my DaemonSet is started before the consul-agent, t... | <p>Kubernetes itself does not provide a way to specific dependencies between pods / deployments / services (e.g. "start pod A only if service B is available" or "start pod A after pod B").</p>
<p>The currect approach (based on what I found while researching this) seems to be retry logic or an init container. To quote ... |
<p>I'm looking for a way to increase the master node VM size on GKE.</p>
<p>On <a href="https://kubernetes.io/docs/admin/cluster-large/#size-of-master-and-master-components" rel="noreferrer">https://kubernetes.io/docs/admin/cluster-large/#size-of-master-and-master-components</a> it suggests that for a cluster of 11-10... | <blockquote>
<p>The Kubernetes documentation that you pointed out is <strong>NOT</strong> correct and should be modified since the master actually scales. </p>
</blockquote>
<p>First of all notice that how and when Google Cloud takes care of resizing the master should not be a concern for users if the behaviour of t... |
<p>When I create kubernetes cluster with gcloud container clusters create command, a permission error occurs as follows:</p>
<pre>
$ gcloud container clusters create my-k8s
WARNING: Currently node auto repairs are disabled by default. In the future this will change and they will be enabled by default. Use `--[no-]enab... | <p>I could start with the following command:</p>
<pre><code>gcloud container clusters create my-k8s --project test-project-xxxxxx
</code></pre>
<p>Note: Without a project name without number, the creation fails with the same error.</p>
<pre><code>gcloud container clusters create my-k8s --project test-project
</co... |
<p>On NixOS is is easy to set up Kubernetes by a single line of config:</p>
<pre><code>services.kubernetes.roles = ["master" "node"];
</code></pre>
<p>This installs both the master and node components on the local system and therefore creates a nice little working local kubernetes "cluster".</p>
<p>If I want to set ... | <p>I'm currently working to automate Kubernetes deployment with NixOS / NixOps. It works quiet well with multiple local VirtualBox nodes. Regarding AWS integration I still have to fix few things. Then I will try to integrate with other cloud providers.</p>
<p>You can have a look to this repository: <a href="https://gi... |
<p>How can I use a normal context to configure the kubernetes client-go?</p>
<pre><code> package kube
import (
"fmt"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
)
// GetKubeClient creates a Kubernetes config and client for a... | <p>Found the problem. The implementation of <code>github.com/imdario/mergo</code> changed in a newer version and breaks the actual behavior of generating the client config. So just only use revision <code>6633656539c1639d9d78127b7d47c622b5d7b6dc</code> like in the official kubernetes cient-go repository.</p>
<p><a hre... |
<p>I'm trying to figure out how can a rename a field (or create a new field with the same value ) with Fluentd</p>
<p>Like:</p>
<pre><code>agent: Chrome ....
</code></pre>
<p>To:</p>
<pre><code>agent: Chrome
user-agent: Chrome
</code></pre>
<p>but for a specific type of logs, like <code>**nginx**</code>.</p>
<p>I... | <p>I have a very similar use case, and like @embik said, using record_transformer seems like a more fit choice. In my case I'm trying to downcase a key in a json record fluentd is going through, here's the conf - </p>
<pre><code><filter kubernetes.**.deployment-name**>
@type record_transformer
<record>... |
<p>These are my first steps to the kubernetes world so excuse me if my terms are not used right etc.
I am running a single node kubernetes setup without external loadbalancer and I have deployed a pod with to containers. One mysql database and a powerdns.
Powerdns should expose port 53 to the internet while mysql shoul... | <p>Using <code>hostNetwork: true</code> allows your whole pod (all containers in it) to bind ports to the host, which you already identified as problematic.</p>
<p>First of all, you should consider to move the mysql container out of your pod. Using multiple containers is supposed to group containers working as one uni... |
<p>I've read documentation of kubernetes annotations. </p>
<p>But I couldn't find basic example about using this annotations. For Example;</p>
<p>I have a deployment yaml like below:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
test_value: "test"
name: nginx-deploymen... | <p>Just as <code>Labels</code>, <code>Annotations</code> are key-value pairs which represent metadata that is attached to a Kubernetes object.
But contrary to <code>Labels</code>, which are internally utilized to find a collection of objects which satisfy specific conditions, the purpose of <code>Annotations</code> is... |
<p>In Kubernetes , is there a particular way I can check if a specific feature-gate is enabled/disabled. Say, I want to check if MountPropagation feature is enabled in my cluster. How do I do that.</p>
| <p>Check <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/" rel="nofollow noreferrer">official documents</a> for default value, and run <code>ps aux | grep apiserver | grep feature-gates</code> on <code>master</code> to check if you turn on/off that feature.</p>
|
<p>While going through the helm documentation, i came across rollback feature.
Its a cool feature, but i have some doubts about the implementation of that feature.</p>
<p>How they have implemented it? If they might have used some datastore to preserve old release config, what datastore it is?</p>
<p>Is there any upp... | <p>As the <a href="https://docs.helm.sh/helm/#helm-rollback" rel="nofollow noreferrer">documentation</a> says, it rolls back the entire release. Helm generally stores release metadata in its own configmaps. Every-time you release changes, it appends that to the existing data. Your changes can have new deployment image,... |
<p>I'm using a kubernetes ConfigMap that contains database configurations for an app and there is a secret that has the database password.
I need to use this secret in the ConfigMap so when I try to add environment variable in the ConfigMap and specify the value in the pod deployment from the secret I'm not able to con... | <p>Kubernetes can't make that substitution for you, you should do it with shell in the entrypoint of the container.</p>
<p>This is a working example. I modify the default entrypoint to create a new variable with that substitution. After this command you should add the desired entrypoint.</p>
<pre><code>apiVersion: ex... |
<p>I want to create a CI/CD on Azure with Jenkins, Docker, Kubernetes, starting from simple.</p>
<p>I already went through the <strong>Voting-app</strong> tutorial <strong>Tutorial: Prepare application for Azure Container Service (AKS)</strong> <a href="https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-p... | <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 pipelines and GitOps for promotion across environments.</p>
<p>If you want to see how... |
<p>I want a job to trigger every 15 minutes but it is consistently triggering every 30 minutes.</p>
<p><strong>UPDATE:</strong></p>
<p>I've simplified the problem by just running:</p>
<pre><code>kubectl run hello --schedule="*/1 * * * *" --restart=OnFailure --image=busybox -- /bin/sh -c "date; echo Hello from the Ku... | <p>After running these jobs in a test cluster I discovered that external circumstances prevented them from running as intended.</p>
<p>On the original cluster there were ~20k scheduled jobs. The built-in scheduler for Kubernetes is not yet capable of handling this volume consistently.</p>
<p>The maximum number of jo... |
<p>I am using kubernetes helm to deploy apps to my cluster. Everything works fine from my laptop when helm uses the cluster's kube-config file to deploy to the cluster.</p>
<p>I want to use helm from my CI/CD server (which is separate from my cluster) to automatically deploy apps to my cluster. I have created a k8s se... | <p>why not just run your CI server inside your kubernetes cluster then you don't have to manage secrets for accessing the cluster? We do that on <a href="https://jenkins-x.io/" rel="nofollow noreferrer">Jenkins X</a> and it works great - we can run kubectl or helm inside pipelines just fine.</p>
|
<p>As part of a Jenkins pipeline to build and deploy an app to Google's Kubernetes service (GKE), I've created a script to carry out the following deployment to GKE:</p>
<ul>
<li>checkout code </li>
<li>setup authentication to gcloud and </li>
<li>create the deployment and service using kubectl:</li>
</ul>
<p>Detaile... | <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>We worked around some of the issues you've been havi... |
<p>As explained at <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/</a>
labels name and value have limit of 63 characters. Does anyone know what drives this limit? I am not looking for code con... | <p>As <a href="https://stackoverflow.com/users/8803619/suresh-vishnoi" title="1,427 reputation">Suresh Vishnoi</a> wrote, it is a global restriction based on <a href="https://www.rfc-editor.org/rfc/rfc1123" rel="noreferrer">RFC-1123</a>.</p>
<p><a href="https://stackoverflow.com/questions/32290167/what-is-the-maximum-l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.