prompt
stringlengths
65
38.7k
response
stringlengths
41
29.1k
<p>I'm new at kubernetes, and Im wondering the best way to inject values to <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">ConfigMap</a>.</p> <p>for now, I defined Deployment object which takes the relevant values from ConfigMap file. I wish to use...
<p>You can find the links to the quoted text in the end of the answer.</p> <blockquote> <p>A good practice when writing applications is to separate application code from configuration. We want to enable application authors to easily employ this pattern within Kubernetes. While the Secrets API allows separating infor...
<p>I have a single node kubernetes cluster running. Everything working fine, but when I run the "kubectl get cs" (kubectl get componentstatus) it showing two instance of etcd. I have running a single etcd instance.</p> <p><code>[root@master01 vagrant]# kubectl get cs NAME STATUS MESSAGE ...
<p>Despite the fact that @Jyothish Kumar S has found the root cause on his own and fixed the issue - It's a good practice to have an answer that will be available for those, who will face the same problem in the future.</p> <p>Issue came from missconfiguration in API server config file <code>/etc/kubernetes/manifests/...
<p>I have installed Apache Superset from its Helm Chart in a Google Cloud Kubernetes cluster. I need to <code>pip install</code> a package that is not installed when installing the Helm Chart. If I connect to the Kubernetes bash shell like this:</p> <p><code>kubectl exec -it superset-4934njn23-nsnjd /bin/bash</code></...
<p>As @Murli mentioned, you should use <code>pip3</code>. However, one thing you should remember is, <code>helm</code> is for managing k8s, i.e. what goes into the cluster should be traceable. So I recommend you the following:</p> <pre><code>$ helm get stable/superset </code></pre> <p>modify the values.yaml. In my ca...
<p>When I execute the following commands (taken from the official installation guide for kubernetes), the output is unexpected (shown below: ) Command (On CentOS 7):</p> <pre><code>cat &lt; /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-...
<p>You seem to be missing <code>&lt;&lt;EOF</code> at the end of the first line.</p> <p>Also, I can see there is a <strong>mistake</strong> in the <a href="https://kubernetes.io/docs/setup/independent/install-kubeadm/" rel="noreferrer">docs</a>.</p> <p>Line containing <code>exclude=kube*</code> should be removed.</p>...
<p>The failing code runs inside a Docker container based on <code>python:3.6-stretch</code> debian. It happens while Django moves a file from one Docker volume to another.</p> <p>When I test on MacOS 10, it works without error. Here, the Docker containers are started with docker-compose and use regular Docker volumes ...
<p>The following solution is a hotfix. It would have to be applied to <em>any</em> method that calls <code>copystat</code> directly or indirectly (or any shutil method that produces an ignorable <code>errno.ENOSYS</code>).</p> <pre><code>if hasattr(os, 'listxattr'): LOGGER.warning('patching listxattr to avoid ERRO...
<p>we are starting with Kubernetes and wondering how other projects manage Kubernetes secrets:</p> <ul> <li>Since Kubernetes secrets values are just base64 encoded, it's not recommended to commit the secrets into source control</li> <li>If not committing to source control, it should be kept in some central place somew...
<blockquote> <p>how other projects manage Kubernetes secrets</p> </blockquote> <p>Since they are not (at least not yet) proper secrets (base64 encoded), we treat them to separate restricted access git repository.</p> <p>Most of our projects have code repository (with non-secret related manifests such as deployments...
<p><code>kubectl describe nodes</code> gives information on the requests and limits for resources such as CPU and memory. However, the api endpoint <code>api/v1/nodes</code> doesn't provide this information.</p> <p>Alternatively, I could also hit the <code>api/v1/pods</code> endpoint to get this information per pod wh...
<p>From what I've found in documentation, the endpoint responsible for that is the Kubernetes API Server. </p> <blockquote> <p><em>CPU</em> and <em>memory</em> are each a <em>resource type</em>. A resource type has a base unit. CPU is specified in units of cores, and memory is specified in units of bytes.</p> ...
<p>I am trying to implement CI/CD pipeline for my spring boot microservice deployment. Here I have some sample microservices. When I am exploring about Kubernetes , I found that pods, services, replica sets/ controller, statefulsets etc. I understood those Kubernetes terminologies properly. And I am planning to use Doc...
<p>Jenkins can do anything you can do given that the tools are installed and accessible. So an easy solution is to install docker and kubectl on Jenkins and provide him with the correct kube config so he can access the cluster. So if your host can use kubectl you can have a look at the <code>$HOME/.kube/config</code> f...
<p>Question regarding AKS, each time release CD. The Kubernetes will give random IP Address to my services. <br/> I would like to know how to bind the domain to the IP?</p> <p>Can someone give me some link or article to read?</p>
<p>You have two options.</p> <p>You can either deploy a Service with <code>type=LoadBalancer</code> which will provision a cloud load balancer. You can then point your DNS entry to that provisioned LoadBalancer with (for example) a CNAME.</p> <p>More information on this can be found <a href="https://kubernetes.io/doc...
<p>How can we get the real resource usage (not resource requests) of each pod on Kubernetes by command line? Heapster is deprecated. Meanwhile, Metrics-server still does not support <code>kubectl top pod</code>.</p> <ol> <li><p>Heapster - </p> <p>I deployed Heapster using the following command </p> <pre><code>$ heap...
<blockquote> <p>Error from server (ServiceUnavailable): the server is currently unable to handle the request (get services http:heapster:)</p> </blockquote> <p>It sounds like the heapster deployment just forgot to install the <code>Service</code> for <code>heapster</code>; I would expect this would get you past <em>...
<p>Which is the difference between a <code>Role</code> or a <code>ClusterRole</code>?</p> <p>When should I create one or the other one?</p> <p>I don't quite figure out which is the difference between them.</p>
<p>From the <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="noreferrer">documentation</a>:</p> <blockquote> <p>A Role can only be used to grant access to resources within a single namespace.</p> </blockquote> <p>Example: List all pods in a namespace</p> <blockquote> <p>A ClusterRole ...
<p>I am keeping all my code in SVN repository within my on-premise server. And also I am trying to implement the CI/CD pipeline for deploying my application. I am trying to use Kubernetes and Jenkins tools for implementing this. When I am exploring the implementation examples of CI/CD pipeline using Jenkins and Kuberne...
<p>Hooks to trigger Jenkins from SVN are also possible. Or you can poll the repository for changes - the Jenkins SVN plugin supports both methods (<a href="https://wiki.jenkins.io/display/JENKINS/Subversion+Plugin" rel="nofollow noreferrer">https://wiki.jenkins.io/display/JENKINS/Subversion+Plugin</a>). The examples yo...
<p>I want to persistent data file via pvc with glusterfs in kubernetes, I mount the diretory and it'll work, but when I try to mount the file, it'll fail, because the file was mounted to the directory type, how can I mount the data file in k8s ?</p> <p>image info:<a href="https://i.stack.imgur.com/86jeC.jpg" rel="nore...
<blockquote> <p>how can I mount the data file in k8s ?</p> </blockquote> <p>This is often application specific and there are several ways to do so, but mainly you want to read about <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="noreferrer">subPath</a>.</p> <p>Generally, you can c...
<p>I've been following <a href="https://www.linkedin.com/pulse/adding-users-quick-start-kubernetes-aws-jakub-scholz/" rel="nofollow noreferrer">this post</a> to create user access to my kubernetes cluster (running on Amazon EKS). I did create key, csr, approved the request and downloaded the certificate for the user. T...
<p>As mentioned in this <a href="https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html" rel="nofollow noreferrer">article</a>:</p> <blockquote> <p>When you create an Amazon EKS cluster, the IAM entity user or role (for example, for federated users) that creates the cluster is automatically granted syst...
<p>Kubernetes top (kubectl top) command shows different memory usage than Linux top command ran inside pod. </p> <p>I’ve created k8s deployment where YAML contains these memory limits:</p> <pre><code>resources: limits: cpu: "1" memory: 2500Mi requests: cpu: 200m memory: 2Gi </code></pre> <p>Follo...
<p>Command <code>kubectl top</code> shows metrics for a given pod. That information is based on reports from <a href="https://github.com/google/cadvisor" rel="noreferrer">cAdvisor</a>, which collects real pods resource usage.</p> <p>If you run <code>top</code> inside the pod, it will be like you run it on the host sys...
<p>I have a dockerfile that looks like this at the moment:</p> <pre><code>FROM golang:1.8-alpine COPY ./ /src ENV GOOGLE_CLOUD_PROJECT = "snappy-premise-118915" RUN apk add --no-cache git &amp;&amp; \ apk --no-cache --update add ca-certificates &amp;&amp; \ cd /src &amp;&amp; \ go get -t -v cloud.google.co...
<blockquote> <p>I want to be able to set the environment variables in the pod config so that the docker file can use those...how do I do that instead of just coding them into the docker image directly?</p> </blockquote> <p>There is no need to specify <strong>any</strong> <code>ENV</code> directive in a Dockerfile; t...
<p>With the Kubernetes orchestrator <a href="https://blog.docker.com/2018/07/kubernetes-is-now-available-in-docker-desktop-stable-channel/" rel="nofollow noreferrer">now available</a> in the stable version of Docker Desktop for Win/Mac, I've been playing around with running an existing compose stack on Kubernetes local...
<p><code>docker stack deploy</code> with a Compose file to Kube only works on Docker's Kubernetes distributions - Docker Desktop and Docker Enterprise. </p> <p>With the recent federation announcement you'll be able to manage AKS and EKS with Docker Enterprise, but using them direct means you'll have to use Kubernetes ...
<p>I am getting below error while trying to apply patch :</p> <pre><code>core@dgoutam22-1-coreos-5760 ~ $ kubectl apply -f ads-central-configuration.yaml Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply Error from server (Conflict): error when applying p...
<p>It seems likely that your yaml configurations were copy pasted from what was generated, and thus contains fields such as <code>creationTimestamp</code> (and <code>resourceVersion</code>, <code>selfLink</code>, and <code>uid</code>), which don't belong in a declarative configuration file.</p> <p>Go through your yaml ...
<p>There is a default <code>ClusterRoleBinding</code> named <code>cluster-admin</code>.<br> When I run <code>kubectl get clusterrolebindings cluster-admin -o yaml</code> I get: </p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: annotations: rbac.authorization.kubernetes....
<p><strong>Answer updated</strong>:</p> <p>It seems that there is no way to do it using <code>kubectl</code>. There is no object like Group that you can "get" inside the Kubernetes configuration. </p> <p>Group information in Kubernetes is currently provided by the Authenticator modules and usually it's just string in...
<p>I would like to use the etcdctl functionnalities of my etcd pod from my kurnetes cluster but I can't. I have install my kubernetes from kubeadm and I have 1 master and 1 node. </p> <p>When I try commands etcdctl from inside of my etcd pod, I get those errors:</p> <blockquote> <p>client: etcd cluster is unavailab...
<p>It looks like you have <code>etcd</code> listening for client connections on <code>https://127.0.0.1:2379</code> and you have client certificate authentication enabled as far as i can see. You should then be able to run the following command to connect to <code>etcd</code>:</p> <pre><code>ETCDCTL_API=3 etcdctl memb...
<p>In my gcloud console it shows the following error for my defined ingresses: </p> <blockquote> <p>Error during sync: error while evaluating the ingress spec: service "monitoring/kube-prometheus" is type "ClusterIP", expected "NodePort" or "LoadBalancer"</p> </blockquote> <p>I am using traefik as reverse proxy...
<p>I don't know why that error happens, because it seems (to me) to be a valid configuration. But to clear the error, you can switch your service to a named NodePort. Then switch your ingress to use the port name instead of the number. For example:</p> <p>Service:</p> <pre><code>apiVersion: v1 kind: Service metada...
<p>I need to give access to a set of pods within a namespace to an external support. I've been reading about the RBAC API, [Cluster]Roles and [Cluster]Role Bindings; but I could not find anything about how to apply a role to a group of pods (based on annotations or labels). Does anyone know if it is possible to do that...
<p>Try below way of defining role-binding with resource name as example on <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="noreferrer">docs</a>:</p> <pre><code>kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: default name: configmap-updater rules: - apiGroup...
<p>I was testing Skaffod and It is a great tool for microservices development. But I do not find any tutorial on how to use it with Java. Is there any support to Maven builds?</p>
<p>There is a discussion going on about adding <a href="https://github.com/GoogleContainerTools/skaffold/issues/526" rel="nofollow noreferrer">support for Java apps here</a>, you can very much use <a href="https://docs.docker.com/develop/develop-images/multistage-build/" rel="nofollow noreferrer">Docker multistage buil...
<p>I have already deployed pods using Daemonsets with nodeselector. My requirements is I need to use kind Deployment but at the same time I would want to retain Daemonsets functionality .I have nodeselector defined so that same pod should be installed in labelled node. How to achieve your help is appreciated. My requir...
<p>Look into <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity" rel="nofollow noreferrer">affinity and anti-affinity</a>, specifically, inter-pod affinity and anti-affinity.</p> <p>From official documentation: </p> <blockquote> <p>Inter-pod affinity and anti-affi...
<p>I have a batch job that I want to run on a Kubernetes cluster on Google Cloud. That job has to be run periodically, say once a week and takes a day to complete. From the doc:</p> <blockquote> <p>Beginning with Kubernetes version 1.7, you can specify a minimum size of zero for your node pool. This allows your node...
<p>If you provision Kubernetes cluster dynamically, as far as you can rebuild cluster environment without any dependencies on the worker Nodes from scratch, <code>Autoscaling</code> down to zero Nodes will be a good solution, whereas Kubernetes master Nodes (system Pods) are not charged in <code>GKE</code>, according t...
<p>Admins-MacBook-Pro:~ Harshin$ kubectl cluster-info Kubernetes master is running at <a href="http://localhost:8080" rel="noreferrer">http://localhost:8080</a></p> <p>To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. error: the server doesn't have a resource type "services"</p> <p>i a...
<p>Change "name: kubernetes" to actual name of your cluster. </p> <p>Here is what I did to work it through....</p> <p>1.Enabled verbose to make sure config files are read properly. </p> <blockquote> <p>kubectl get svc --v=10</p> </blockquote> <p>2.Modified the file as below:</p> <pre><code>apiVersion: v1 cluster...
<p>I have three nodes in my google container cluster.</p> <p>Everytime i perform a kubernetes update through the web-ui on the cluster in Google Container Engine. </p> <p><a href="https://i.stack.imgur.com/aHY5O.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aHY5O.png" alt="Google container cluster update"...
<p>I was having the same problem as you. We found some solutions.</p> <ul> <li><a href="https://github.com/doitintl/kubeIP" rel="noreferrer">KubeIP</a> - But this needed a cluster 1.10 or higher. Ours is 1.8</li> <li>NAT - At GCP documentation they talk about this method. It was too complex for me.</li> </ul> <p><str...
<p>I'm attempting to grant a Kubernetes ServiceAccount the cluster-admin role using a ClusterRoleBinding:</p> <pre><code>apiVersion: v1 kind: ServiceAccount metadata: name: jenkins namespace: jenkins --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: jenkins roleRef: apiGrou...
<p>The error "cannot change roleRef" was referring to the fact that the ClusterRoleBinding I was trying to create already existed.</p> <p>By running <code>kubectl get clusterrolebinding</code> I was able to see that the ClusterRoleBinding already existed.</p> <p>After running <code>kubectl delete clusterrolebinding/j...
<p>I am running geth full node <a href="https://github.com/ethereum/go-ethereum/wiki/geth" rel="nofollow noreferrer">https://github.com/ethereum/go-ethereum/wiki/geth</a> on Google Cloud platform on a VM instance. Currently, I have mounted a SSD and write the chain data to it.</p> <p>I want to now run it on multiple V...
<p>Take a look at this Kubernetes Engine tutorial which shows you how to run StatefulSets with automatic persistent volume provisioning: <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps</a></p> ...
<p>I am working on the evolution of a siem soc, and my actual issue is to recover my logs from my storage account on Azure to a Elasticsearch-data deployed on a pod on KUBERNETES. So I would like to know the the right approach for that. </p> <p>With filebeat there is no <code>input</code> for azureblod, only <code>out...
<p>There is an approach you could consider for accomplishing your task. Kubernetes in Azure allows you to deploy Azure File Shares with your containers. If you move your logs to a file share, you should be able to accomplish your project. </p> <p>I'd recommend checking Diego's post <strong><a href="https://medium.com/...
<p>I'm using a dockerized microservice architecture running on Kubernetes with Nginx, and am encountering an issue with hostnames. How do you correctly add the hostname to Kubernetes (or perhaps Nginx too)?</p> <p>The problem: When microservice A called <code>admin</code> tries to talk to microservice B called <code>s...
<p>You can use kubernetes own dns.</p> <p><a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/</a></p> <p>So you can access your pod using pod dns;</p> <blockquote> <p>When enabled, pods are ...
<p>I have a cronjob that sends out emails to customers. It occasionally fails for various reasons. I <em>do not want</em> it to restart, but it still does.</p> <p>I am running Kubernetes on GKE. To get it to stop, I have to delete the CronJob and then kill all the pods it creates manually. </p> <p>This is bad, f...
<p>It turns out that you have to set a <code>backoffLimit: 0</code> in combination with <code>restartPolicy: Never</code> in combination with <code>concurrencyPolicy: Forbid</code>. </p> <p><strong>backoffLimit</strong> means the number of times it will retry before it is considered failed. The default is 6.</p> ...
<p>I am to patch an image onto init containers</p> <p>my image is stored in a variable called $IMAGE_NAME </p> <p>When I run </p> <blockquote> <p>kubectl patch deployment production-art-backend -p {"spec":{"template":{"spec":{"initContainers":[{"name":"run-migrations","image":"$IMAGE_NAME"}]}}}}</p> </blockquote>...
<p>This is a bash issue, not necessarily a <code>kubectl</code> issue!</p> <p>Because the JSON string requires double quotes, you need to wrap the variable inside single quotes. Try this:</p> <pre><code>kubectl patch deployment production-art-backend -p {"spec":{"template":{"spec":{"initContainers":[{"name":"run-migr...
<p>I am trying to understand k8s and helm. </p> <p>When I create a helm chart, there are 2 files: <code>service.yaml</code> and <code>deployment.yaml</code>. Both of them have a <strong>name</strong> field. </p> <p>If I understand correctly, the deployment will be responsible for managing the pods, replicasets, etc a...
<p>The "service" creates a persistent IP address in your cluster which is how everything else connects it. The Deployment creates a ReplicaSet, which creates a Pod, and this Pod is the backend for that service. There can be more than 1 pod, in which case the service load balances, and these pods can change over time, c...
<p>I have some questions about the golang API for kubernetes.</p> <ol> <li><p>which one should I use? k8s.io/client-go or k8s.io/kubernetes/pkg/client? What's the difference?</p></li> <li><p>I want to get list of all pods and then listen to add/update/delete events, what's the difference between using the api.Pods("")...
<blockquote> <p>which one should I use? k8s.io/client-go or k8s.io/kubernetes/pkg/client?</p> </blockquote> <p>Use <code>k8s.io/client-go</code>.</p> <blockquote> <p>what's the difference between using the api.Pods("").Watch method and using an informer?</p> </blockquote> <p>The informer is essentially a shared ...
<p>I am using Kubespray with Kubernetes 1.9</p> <p>What I'm seeing is the following when I try to interact with pods on my new nodes in anyway through kubectl. Important to note that the nodes are considered to be healthy and are having pods scheduled on them appropriately. The pods are totally functional.</p> <pre><...
<blockquote> <p>What's going on?</p> </blockquote> <p>That name needs to be resolvable from your workstation, because for <code>kubectl logs</code> and <code>kubectl exec</code>, the API sends down the URL for the client to interact <em>directly</em> with the <code>kubelet</code> on the target Node (to ensure that a...
<p>I have minikube installation on my machine for some testing that requires Basic Auth,</p> <p>How can I enable it for all services I'll create in future?</p>
<p>If you mean for the Kubernetes API services then that can be enabled in minikube with a CSV file - <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-password-file" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authentication/#static-password-f...
<p>I want to run a sails.js application on Google Kubernetes Engine. Running the application docker container locally works perfectly. The deployment to GKE is done via gitlab Auto-Devops pipelines. Deploying the application to GKE is working so far and I can access pages of the sails.js application using the generated...
<p>Ok, found the error by myself. This was a silly mistake because sails was somehow configured to include <code>grunt</code> and <code>sails-hook-grunt</code> only as devdependencies in <code>package.json</code>.</p> <p>Since on the production container, <code>NODE_ENV</code> is set as environment variable, <code>npm...
<p>I've got kubernetes running via docker (Running linux containers on a windows host). I created a deployment (1 pod with 1 container, simple hello world node app) scaled to 3 replicas.</p> <p>Scaled to 3 just fine, cool, lets scale to 20, nice, still fine. So I decided to take it to the extreme to see what happens w...
<p><a href="https://github.com/docker/for-mac/issues/2536" rel="nofollow noreferrer">https://github.com/docker/for-mac/issues/2536</a> is a useful thread on this as it gives tips for getting logs, increasing resources or if necessary doing a factory reset (as discussed in the comments)</p>
<p>I have a docker container that is running fine when I run it using docker run. I am trying to put that container inside a pod but I am facing issues. The first run of the pod shows status as "Completed". And then the pod keeps restarting with CrashLoopBackoff status. The exit code however is 0. </p> <p>Here is the ...
<p>The container would terminate with exit code 0 if there isn't at least one process running in the background. To keep the container running, add these to the deployment configuration:</p> <pre><code> command: ["sh"] stdin: true </code></pre> <p>Replace <code>sh</code> with <code>bash</code> on any other shell t...
<p>I followed "<a href="https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html" rel="nofollow noreferrer">https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html</a>" to create an EKS cluster using terraform. </p> <p>I was able to create a config map successfully but i am unabl...
<p>Make sure you add a similar tag as below to your VPCs, Subnets &amp; ASGs - </p> <blockquote> <p>"kubernetes.io/cluster/${CLUSTER_NAME}" = "shared"</p> </blockquote> <p><strong>NOTE: The usage of the specific kubernetes.io/cluster/* resource tags below are required for EKS and Kubernetes to discover and manage n...
<p>I follow <a href="https://medium.freecodecamp.org/learn-kubernetes-in-under-3-hours-a-detailed-guide-to-orchestrating-containers-114ff420e882" rel="nofollow noreferrer">this</a> tutorial about Kubernetes.</p> <p>I got to the part, which guide me to run:</p> <pre><code>minikube service sa-frontend-lb </code></pre> ...
<p>As one can see, it <em>is</em> attempting to launch a browser, but there are none installed that it recognizes, except for what I would <em>guess</em> is Chrome <em>(since one can see that "chromium" did not work out)</em>, and as the message indicates, it doesn't tolerate running as <code>root</code>.</p> <p>In th...
<p>I came to a very specific case by using Laravel framework as a part of a kubernetes cluster. These are the facts, which have to be known:</p> <ul> <li>I've created a Docker container for caching called <code>redis</code></li> <li>I've created a Docker container for application called <code>application</code></li> <...
<p>@Florian's <a href="https://github.com/laravel/framework/issues/24999" rel="nofollow noreferrer">reply</a> to himself on github:</p> <p>My solution was to change the config in <code>config/database.php</code> like that:</p> <pre><code>'redis' =&gt; [ 'client' =&gt; 'predis', 'default' =&gt; [ 'sc...
<p>I want to pass some values from Kubernetes yaml file to the containers. These values will be read in my Java app using <code>System.getenv("x_slave_host")</code>. I have this dockerfile: </p> <pre><code>FROM jetty:9.4 ... ARG slave_host ENV x_slave_host $slave_host ... $JETTY_HOME/start.jar -Djetty.port=9090 </code...
<p>env section should be added under containers, like this:</p> <pre><code> containers: - name: master env: - name: slave_host value: slavevalue </code></pre>
<p>I've an applicaion running inside pod which is created by deployment specification in k8s. As I've NFS clients in all nodes, I can mount volume from host to pod. Here is the mount-vol portion of yml file</p> <pre><code>spec: containers: volumeMounts: - mountPath: /app/config name: config-volume ...
<p>I don't think you mount containers to host. It is always host to pod. Make sure that the path /nfs/logs/containerLogs exist in the host so that your pod can write to it.</p>
<p>Im trying to set up a local cluster using VM and minikube, as Id been reading its only possible to use it for local purposes, but id like to join a secondary machine, and im searching a way to create the join and hash.</p>
<p>You can easily do it in case your minikube machine is using VirtualBox. </p> <ol> <li><p>Start the minikube:</p> <pre><code>$ minikube start --vm-driver="virtualbox" </code></pre></li> <li><p>Check the versions of kubeadm, kubelet and kubectl in minikube and print join command:</p> <pre><code>$ kubectl version $...
<p>I am aware that the general wisdom when using docker is to move data out of the container and use volumes instead.</p> <p>But I am trying to create a system that provides a one-click, completely containerized installation method, and saying "you should install mongodb first on your computer" is not an option.</p> ...
<p>If you do not want to use volumes, you can save your container at a specific time by using <code>docker commit --change &quot;added some changes to my container&quot; &lt;container_id&gt; repo/image:tag</code></p> <p>The new image will contains all filesystem of your current container.</p> <p>That being said, not us...
<p>I am aware that the general wisdom when using docker is to move data out of the container and use volumes instead.</p> <p>But I am trying to create a system that provides a one-click, completely containerized installation method, and saying "you should install mongodb first on your computer" is not an option.</p> ...
<p>You could export and import the docker container easily.</p> <p>An export whole container in the tar file</p> <pre><code>docker export docker_container_name &gt; latest.tar </code></pre> <p>Import Docker container and run it</p> <pre><code>cat exampleimage.tar | docker import - exampleimagelocal:new </code></pre...
<p>I have this <code>NodePort</code> service that exposes two ports:</p> <pre><code>kind: Service apiVersion: v1 metadata: name: my-service spec: type: NodePort selector: app: my-service ports: - name: nginx-public port: 443 targetPort: nginx-public - name: metrics port: 9200 targetPort...
<p>you can define two services one selects nginx-public and the other selects metrics. use two different labels on the pods respectively.</p>
<p>I have multiple instances of Mongo db deployed inside my kubernetes cluster through helm packages. They are running as a service, in NodePort. How do I connect to those Mongo db instances through UI tools like MongoDB Compass and RoboMongo from outside the cluster? Any help is appreciated.</p>
<p>You can use <code>kubectl port-forward</code> to connect to MongoDB from outside the cluster.</p> <p>Run <code>kubectl port-forward &lt;&lt; name of a mongodb pod &gt;&gt; --namespace &lt;&lt; mongodb namespace &gt;&gt; 27018:27018</code>.<br> Now point your UI tool to <code>localhost:27018</code> and <code>kubec...
<p>I`ve gotten delay time clock for some cluster nodes. Do I need to change the timesyncd service or any other thing to avoid synchronization issues?</p>
<p>Time synchronization is very important because if on of node stay behind it may cause of "split brain". </p>
<p>Recently I have been researching about microservices and kubernetes. All the tutorial and article I read online talks about general staff. I have several specific questions about building a microservices app on kubernetes.</p> <ol> <li><strong>API gateway:</strong> Is API gateway a microservice I built for my app t...
<blockquote> <p>Is API gateway a microservice I built for my app that can automatically scale? Or is it already a built-in function of kubernetes?</p> </blockquote> <p>Kubernetes does not have its own API-gateway service. It has an Ingress controller, which operates as a reverse proxy and exposes Kubernetes reso...
<p>What I found out so far:</p> <ul> <li>A &quot;docker stop&quot; sends a SIGTERM to process ID 1 in the container.</li> <li>The process ID 1 in the container is the java process running tomcat.*)</li> <li>Yes, tomcat itself shuts down gracefully, but not do so the servlets.</li> <li>Servlets get killed after 2 second...
<p>Now I found the answer here: <a href="https://stackoverflow.com/a/11154770/2081279">https://stackoverflow.com/a/11154770/2081279</a></p> <p>It worked for me under linux with </p> <pre><code>&lt;Context path="/myapp" unloadDelay="10000"/&gt; </code></pre> <p>but only with upper letter "C"ontext.</p>
<p>I'm running the leader-elector (v0.5) as a sidecar on three pods, on three different nodes. </p> <p>Arguments: --election=XXX --http=0.0.0.0:4040</p> <p>All works well until I kill the leader pod. </p> <p>Now I get one of the pods into a state where the logs say it switched to the new leader:</p> <pre><code>kube...
<p>It looks like a bug.<br> There is an open issue on GitHub: <a href="https://github.com/kubernetes/contrib/issues/2930" rel="nofollow noreferrer">How is this possible? #2930</a></p>
<p>I tried running the official metricbeat docker image as described here (<a href="https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html</a>) on a GCP kubernetes cluster as a dea...
<p>We had the same problem and what fixed it was adding this </p> <pre><code>hostNetwork: true dnsPolicy: ClusterFirstWithHostNet </code></pre> <p>In the DaemonSet yaml on the same level as the containers tag</p>
<p>I'd like to know what are your best practices (or just your practices) regarding the management of your helm charts versions.</p> <p>I wonder what is the best way to deal with application versioning, continuous integration/delivery and chart packaging.</p> <p>Today I have many microservices that live their life. E...
<p>I think this is a choice that comes down to the needs of your project. An interesting comparison is the current versioning strategy of the public charts in the Kubernetes charts repo and the current default versioning strategy of Jenkins-X. </p> <p>The public charts only get bumped when a change is made to the char...
<p>I'm running the leader-elector (v0.5) as a sidecar on three pods, on three different nodes. </p> <p>Arguments: --election=XXX --http=0.0.0.0:4040</p> <p>All works well until I kill the leader pod. </p> <p>Now I get one of the pods into a state where the logs say it switched to the new leader:</p> <pre><code>kube...
<p>Yes, bug. I've uploaded a fixed container here: <a href="https://hub.docker.com/r/fredrikjanssonse/leader-elector/tags/" rel="nofollow noreferrer">https://hub.docker.com/r/fredrikjanssonse/leader-elector/tags/</a></p>
<p>I have created basic helm template using <code>helm create</code> command. While checking the template for Ingress its adding the string RELEASE-NAME and appname like this <code>RELEASE-NAME-microapp</code></p> <p>How can I change <code>.Release.Name</code> value?</p> <pre><code>helm template --kube-version 1.11....
<p>This depends on what version of Helm you have; <code>helm version</code> can tell you this.</p> <p>In Helm version 2, it's the value of the <code>helm install --name</code> parameter, or absent this, a name Helm chooses itself. If you're checking what might be generated via <code>helm template</code> that also take...
<p>I just read the documentation of istio 1.0.0, especially its concept. There is one thing that I am trying to understand, especially the existence of <a href="https://istio.io/docs/concepts/traffic-management/#rule-configuration" rel="noreferrer"><code>DestinationRule</code></a>. So, before using Istio, the only way ...
<p>They complement each other. You still have to define a Kubernetes service, but the Istio <code>DestinationRules</code> will allow you to refine "subsets" in that service, via labels, and then route traffic intelligently between subsets used in a <code>VirtualService</code> object. You can still see the Kubernetes Se...
<p>The issue is that I would like to persistent one status file(status generated by the service), not the directory, of some service in case the status lost when service restart, how to solve?</p>
<p>If it's just a status file, you should be able to write it into a config map. See <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume" rel="nofollow noreferrer">Add ConfigMap data to a Volume</a>. If in volumes you have</p> <pre><code>volumes: ...
<p>I need that tomcat is registered with my Node IP and a port.</p> <p>My question is:</p> <p>At the moment that i run the command:</p> <pre><code>kubectl run tomcat-pod --image=tomcat --port=80 --labels="name=tomcat-pod" </code></pre> <p>In this moment the tomcat is running.</p> <p>Then I believe that exposing li...
<p>To achieve your goal and make <code>Tomcat</code> deployment available on the Node machine, consider using <code>Service</code> type <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer">NodePort</a> to expose Tomcat application server on the <code>Node IP</co...
<p>I am trying to enable the rate-limit for my istio enabled service. But it doesn't work. How do I debug if my configuration is correct?</p> <pre><code>apiVersion: config.istio.io/v1alpha2 kind: memquota metadata: name: handler namespace: istio-system spec: quotas: - name: requestcount.quota.istio-system ...
<p>You have to define the virtual service for the service <code>my-service</code>:</p> <pre><code>apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: myservice spec: hosts: - myservice http: - route: - destination: host: myservice </code></pre> <p>This way, you allow Is...
<p>We have a Cassandra Cluster on my kubernetes cluster. How we are planning migrate the current cluster from GCP to AWS. How can I restore my Cassandra Keyspaces and Snapshots. From the following link, I got a idea for took backup: <a href="https://8kmiles.com/blog/cassandra-backup-and-restore-methods/" rel="nofollow ...
<p>I think you have two options here:</p> <ol> <li>a backup/restore approach as you stated. Be aware that <code>nodetool snapshot</code> is copying your data and exports the schema of the table in <code>schema.cql</code> file. You will need to run a <code>describe keyspace</code> command on the existing cluster and ru...
<p>I'm running into DNS issues on a GKE 1.10 kubernetes cluster. Occasionally pods start without any network connectivity. Restarting the pod tends to fix the issue.</p> <p>Here's the result of the same few commands inside a container without network, and one with.</p> <h2>BROKEN:</h2> <pre><code>kc exec -it -n iot...
<p>I also faced the same problem, and I simply worked around it for now by switching to the 1.9.x GKE version (after spending many hours trying to debug why my app wasn't working).</p> <p>Hope this helps!</p>
<p>I'm using the below manifest to deploy postgresql on kubernetes within NFS persistent volume:</p> <pre><code>apiVersion: v1 kind: PersistentVolume metadata: name: nfs2 spec: capacity: storage: 6Gi accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain nfs: server: 10.139.82.123 ...
<p>NFS does not support fsync kernel vfs call which is required transaction logs for ensuring the writing out the redo logs on the disk. So you should use block storage when you need to use RDBMS, such as PostgreSQL and MySQL. You might lose the data consistency althogh you can run the one on the NFS. </p>
<p>I am stuggling with a simple one replica deployment of the <a href="https://hub.docker.com/r/eventstore/eventstore/" rel="nofollow noreferrer">official event store image</a> on a Kubernetes cluster. I am using a persistent volume for the data storage. </p> <pre><code>apiVersion: extensions/v1beta1 kind: Deployment ...
<p>I was refered to this pull request on Github that stated the the proces was not killed properly: <a href="https://github.com/EventStore/eventstore-docker/pull/52" rel="nofollow noreferrer">https://github.com/EventStore/eventstore-docker/pull/52</a></p> <p>After building a new image with the Docker file from the pul...
<p><a href="https://i.stack.imgur.com/U450c.png" rel="nofollow noreferrer">Image for reference</a></p> <p>I have 2 questions:</p> <ol> <li><p>I have a node on kubernetes cluster, I wanted to know the difference between CPU request, limit on this image. <strong>I know the difference between limit,request on deployment...
<p>The values are the total of the values for the 4 pods on the node, shown as a fraction of the total resource available on the node. So e.g. you could have a maximum of 110 pods on the node and you currently have 4. You can use this to get a sense of when your node is nearing being 'full' (i.e. if one of those metric...
<p>In process install of my kubernetes cluster, I ran into the problem of naming pods. <br> How to add to the name of the container the name of the node on which it is was deployed?<br></p> <p>Exemple of my Daemon Set yaml:</p> <pre><code>.... spec: template: spec: name: CONTAINER-NAME-HOST-NAME .... </c...
<p>Naming convention falls under the <a href="https://www.rfc-editor.org/rfc/rfc1123#section-2" rel="nofollow noreferrer">RFC 1123 definition</a> of a DNS label.</p> <p><code>Starting from v1.4 names must not be longer than 253 characters.</code></p> <p><code>Name should be expressed by the regular expression: [a-z0-9]...
<p>I'm new to K8s. In process to config Openstack Cinder as K8s StorageClass, i have to add some flags to my kube controller manager, and I found that it's my big problem. I'm using K8s 1.11 in VMs, and my K8s cluster has a kube-controller-manager pod, but I don't know how to add these flags to my kube-controller-manag...
<p>You can check <code>/etc/kubernetes/manifests</code> dir on your master nodes. This dir would contain yaml files for master components. </p> <p>These are also known as static pods. </p> <p>More Info : <a href="https://kubernetes.io/docs/tasks/administer-cluster/static-pod/" rel="noreferrer">https://kubernetes.io/d...
<p>I am able to scrape Prometheus metrics from a Kubernetes service using this Prometheus job configuration:</p> <pre><code>- job_name: 'prometheus-potapi' static_configs: - targets: ['potapi-service.potapi:1234'] </code></pre> <p>It uses Kubernetes DNS and it gives me the metrics from any of my three pods I use ...
<p>Here they use <a href="https://github.com/prometheus/prometheus/blob/v2.3.2/documentation/examples/prometheus-kubernetes.yml#L253-L256" rel="nofollow noreferrer"><code>example.io/scrape=true</code></a> (and similar annotations for specifying the <a href="https://github.com/prometheus/prometheus/blob/v2.3.2/documenta...
<p>An environment is configured that uses kubernetes pods to instantiate master node and slaves nodes. Everyting works fine except that the workspace is not available on jenkins UI when the slave is taken down by the kubernetes (slave offline). I have tried several solutions (using an NFS) .... but it doesn't work ......
<p>Jenkins' kubernetes plugin adds and removes slaves on demand, but as far as core Jenkins is concerned, they're permanent slaves which have their own workspaces. Jenkins doesn't know that their workspaces are on NFS, only that the slave is gone and the workspace is inaccessible. That's one of the limitations of ephem...
<p>I have a helm repository set up for my CI/CD pipeline, but the one thing I am having trouble with is helm's versioning system which is focused on a semantic versioning system as in <code>x.x.x</code>. </p> <p>I want to be able to specify tags like "staging", "latest", and "production", and although I am able to suc...
<p>My approach to this, where I do not want to version my chart (and subcharts) semanticaly as well is not to use helm repository at all and just pull whole chart in CI/CD from git instead. If you are publishing them to wider audience this may not suit you, but for own CI/CD which is authorized to access our repositori...
<p>I have a <strong>Deployment</strong> that I'm writing in a <strong>helm</strong> template and am getting an error when including part of a <strong>command</strong> line:</p> <pre><code>command: ["/cloud_sql_proxy", printf "-instances=%s=tcp:0.0.0.0:3306" .Values.sqlproxy.instanceName, "-...
<p>You need to wrap template directives in <code>{{ }}</code></p> <pre><code>"{{ printf "-instances=%s=tcp:0.0.0.0:3306" .Values.sqlproxy.instanceName }}" </code></pre>
<p>Hello I tried looking at the auth options in the annotations for kubernetes traefik ingress. I couldn't find anything where I could configure Forward Authentication as documented here: <a href="https://docs.traefik.io/configuration/entrypoints/#forward-authentication" rel="noreferrer">https://docs.traefik.io/configu...
<p>According to the Traefik documentation that feature will be available in version 1.7 of Traefik (currently a release candidate).</p> <p><a href="https://docs.traefik.io/v1.7/configuration/backends/kubernetes/#authentication" rel="noreferrer">Here is a link to the authentication documentation</a></p> <p>My guess is...
<p>How can I substring a string like /com/app1/main to get the value of main in a HELM template ? </p>
<p>You can use the <a href="http://masterminds.github.io/sprig/strings.html" rel="noreferrer">regexFind</a> function in helm</p> <p><code>regexFind "[^/]+$" "/com/app1/main"</code></p> <p>Will get the text following the last <code>/</code></p>
<p>When using pvc to persist the container data, it seems pvc always override the container's directory, the original data in directory will not be available, what's the reason ?</p>
<p>This is by design. Kubelet is responsible for preparing the mounts for your container, and they can come from plaethora of different storagebackends. At the time of mounting they are empty and kubelet has no reason to put any content in them.</p> <p>That said, there are ways to achieve what you seem to expect by us...
<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>Under the "container template", You need to change the name "jnlp" to something else.</p> <p>Kubernetes plugin will run a sidecar container with the name jnlp for connecting to the master server. If you use the name jnlp for the main container, it will conflict.</p>
<p>I am trying to Create User With Limited Namespace Access. created namespace named as test and also created Group:programmers, User:frontend. Generated credentials for user:frontend by the help of following <a href="http://docs.bitnami.com/kubernetes/how-to/configure-rbac-in-your-kubernetes-cluster/" rel="nofollow n...
<p>You need to create a <code>serviceAccount</code>, take a look at this snippet:</p> <pre><code>apiVersion: v1 kind: ServiceAccount metadata: name: myAccount </code></pre> <p>bind it to your role:</p> <pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: name: myBinding roleRef: ...
<p>I've read this <a href="https://istio.io/blog/2018/egress-https/#tls-origination-by-istio" rel="nofollow noreferrer">article</a> about TLS Origination problem in istio. Let me quote it here:</p> <blockquote> <p>There is a caveat to this story. In HTTPS, all the HTTP details (hostname, path, headers etc.) are encr...
<p>The cited blog post is from January 31, 2018, and the statement was correct then. Now (1.0) Istio supports traffic routing by SNI, see <a href="https://istio.io/docs/tasks/traffic-management/egress/" rel="nofollow noreferrer">https://istio.io/docs/tasks/traffic-management/egress/</a>.</p> <p>This reminds me to upda...
<p>I need to allow requests from multiple origins: <code>http://localhost:4200</code>, <code>http://localhost:4242</code>, etc., on nginx-ingress version 1.7.1. But I'm not able to do that for multiple origins, because <code>nginx.ingress.kubernetes.io/cors-allow-credentials: true</code> will not work with <code>nginx....
<p>Add the annotation to enable <code>CORS</code>:</p> <pre><code>nginx.ingress.kubernetes.io/enable-cors: "true" </code></pre> <p>Be aware that <strong>the string "*" cannot be used for a resource that supports credentials</strong> (<a href="https://www.w3.org/TR/cors/#resource-requests" rel="noreferrer">https://www...
<p>I want to work with Airflow on Kubernetes (GKE). What is the best way and production-grade to deploy it? (Kubernetes executor or Celery) We also want to work with the Kubernetes operators and run the tasks as pods.</p>
<p>If you want to use Google Kubernetes Engine (GKE), use <a href="https://cloud.google.com/composer/" rel="nofollow noreferrer">Google Cloud Composer</a> which is a managed version of Apache Airflow on Google that is run on GKE.</p>
<p>Is it possible to add some metrics to a Java system that will return the version number as a string for the application that is monitored?</p> <p>I am aiming for a dashboard where each pod, running a Java application inside a Docker container, in a Kubernetes cluster is monitored and the current version of each Jav...
<p>In your application, you can make available a Gauge metric that uses labels to export e.g. a version number or commit/build hash and then set the value of the gauge to <code>1</code>.</p> <p>For example, this is how the <code>redis_exporter</code> exports information about a redis instance:</p> <pre><code># HELP r...
<p>I already have some services in my k8s cluster and want to mantain them separately. Examples:</p> <ul> <li>grafana with custom dashboards and custom dockerfile</li> <li>prometheus-operator instead of basic prometheus</li> <li>jaeger pointing to elasticsearch as internal storage</li> <li>certmanager in my own namesp...
<p>Kubernetes provides quite a big variety of Networking and Load Balancing features from the box. However, the idea to simplify and extend the functionality of <a href="https://istio.io/docs/setup/kubernetes/sidecar-injection/#automatic-sidecar-injection" rel="nofollow noreferrer">Istio sidecars</a> is a good choice ...
<p>I deployed an image to Kubernetes, but it never becomes ready, even after hours. </p> <pre><code>$ kubectl get pods NAME READY STATUS RESTARTS AGE myapp-b8dd974db-9jbsl 0/1 ImagePullBackOff 0 21m </code></pre> <p>All this happens with the Quicksta...
<p>You can use <code>kubectl describe myapp-b8dd974db-9jbsl</code> to get more information on your pod.</p> <p>But from the status message 'ImagePullBackOff' it is probably trying to download the docker image and failing.</p> <p>This might because of several reasons, you will obtain more information with the <code>ku...
<p>I'm running a Kubernetes cluster (GCP) with 10 deployments. Each deployment is configured to auto scale on stress. </p> <p>From my website statistics, I found that Monday is the day with the most load. I want to define Kubernetes deployment to have more <code>min-replicas</code> on this day.</p> <p>Is this possibl...
<p>You seem to be talking of two things here. </p> <ol> <li><p>Pod autoscaling (Add more pods when load on existing pods increases) : HPA will help with this. If your workloads show a spike in CPU or memory and can handle horizontal scaling, then HPA would work fine. Example : <a href="https://kubernetes.io/docs/task...
<p>I have an use case where I need to collect the <strong>downtime of each deployment</strong> (if all the replicas(pods) are down at the same point of time).</p> <p><strong>My goal is to maintain the total down time for each deployment since it was created.</strong></p> <p>I tried getting it from <strong>deployment ...
<p>A monitoring tool like prometheus would be a better solution to handle this. As an example, below is a graph from one of our deployments for last 2 days </p> <p><a href="https://i.stack.imgur.com/99gPA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/99gPA.png" alt="Deployment Availablity"></a></...
<p>I have deployed Jenkins on Kubernetes and am trying to configure the nginx ingress for it. </p> <p>Assume I want it to be available at <a href="https://myip/jenkins" rel="noreferrer">https://myip/jenkins</a></p> <p>This is my initial ingress configuration:</p> <pre><code>apiVersion: extensions/v1beta1 kind: Ingre...
<p>This is how I solved it configuring the Jenkins image context path without the need to use the ingress rewrite annotations:</p> <pre><code>kind: Deployment metadata: creationTimestamp: null labels: app: jenkins name: jenkins spec: replicas: 1 selector: matchLabels: app: jenkins strategy: {...
<p>I have a deployment and a service in GKE. I exposed the deployment as a Load Balancer but I cannot access it through the service (curl or browser). I get an:</p> <pre><code>curl: (7) Failed to connect to &lt;my-Ip-Address&gt; port 443: Connection refused </code></pre> <p>I can port forward directly to the pod a...
<p>I figured out what it was... </p> <p>My golang app was listening on localhost instead of 0.0.0.0. This meant that port forwarding on kubectl worked but any service exposure didn't work.</p> <p>I had to add "--host 0.0.0.0" to my k8s command and it then listened to requests from outside localhost.</p> <p>My com...
<p>we have a kubernetes cluster running on Centos 7. However all logging is going to /var/log/messages which is making centos system logs hard to read. Is there a way I can tell kubeadm/kubernetes to log to /var/log/kubernetes rather?</p> <p>We are already sending our application (pod) logs to a mountpoint. We need to...
<blockquote> <p>However all logging is going to /var/log/messages which is making centos system logs hard to read. Is there a way I can tell kubeadm/kubernetes to log to /var/log/kubernetes rather?</p> </blockquote> <p>No, not exactly, but you can reconfigure Docker to log in a different way.</p> <p>This might depe...
<p>I am working on Azure Kubernetes service. I am creating AKS through portal successfully. But, I need to do it through the ARM Templates.</p> <p>How to create AKS with help of ARM Templates? </p> <p>For this, I followed <a href="https://github.com/neumanndaniel/armtemplates/blob/master/container/aks.json" rel="nofo...
<blockquote> <p>How to create AKS with help of ARM Templates?</p> </blockquote> <p>One of the most direct methods, navigate to creating AKS page in the portal, fill the attributes, click <code>Download a template for automation</code>, then you will get the template.</p> <p><a href="https://i.stack.imgur.com/UUpTb....
<p>Is it atypical for multi-master K8s cluster deployments to use unique certs per service, per controller node? Most guides I've seen generate unique certs per service (API, Controller, Scheduler) and then use those certs for the eponymous service on each Controller node. </p> <p>Does Kubernetes disallow or discourag...
<blockquote> <p>Does Kubernetes disallow or discourage unique certs per service, per node? With DNS/IP SANs it should be possible to still have each service respond to a singular cluster address, so I'm curious if this decision is one for the sake of simpler instructions, or if it's actually some requirement ...
<p>I have a problem, I need to collect metric data from read-only-port located on 10255, but unfortunately by using netstat I found that such port don't exists at all. Can somebody help with advise, how could I create such port on kubelet or how can I avoid this port for data collection?</p>
<p>The <em>kubelet</em> requires a parameter to be set: <strong>--read-only-port=10255</strong> (<a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" rel="nofollow noreferrer">read more about kubelet</a>) </p> <p>If you are using <em>kubeadm</em> to bootstrap the cluster, you can use a ...
<p>I am trying to run a docker container registry in Minikube for testing a CSI driver that I am writing. </p> <p>I am running minikube on mac and am trying to use the following minikube start command: <code>minikube start --vm-driver=hyperkit --disk-size=40g</code>. I have tried with both kubeadm and localkube bootst...
<p>You need to configure your Minikube virtual machine for using <code>/dev/sda1</code> instead of <code>/</code> for Docker. To log in to it, use <code>minikube ssh</code> command.</p> <p>Than you have two options:</p> <ol> <li><p>Mount <code>/dev/sda1</code> to <code>var/lib/docker</code>, but don't forget to copy ...
<p>I'm trying to host an application using Google Kubernetes Engine. My docker image works when run locally, but when I put it on Google Cloud and set it up using a kubernetes cluster it fails in a very strange way. </p> <p>I'm able to connect to the application and it works until I trigger a call of <code>google.clou...
<p>I noticed you didn't mention using Kubernetes Secrets. Here's how I did it.</p> <ol> <li>Create a Secret with <code>kubectl</code> on your local machine.</li> </ol> <pre><code>$ kubectl create secret generic gac-keys --from-file=&lt;PATH_TO_SERVICE_ACCOUNT_FILE&gt; </code></pre> <p>This creates a Secret called...
<p>Getting below errors when I’m trying to run spark-submit on k8 cluster</p> <p><strong>Error 1</strong>: This looks like a warning it doesn’t interrupt the app running inside executor pod but keeps on getting this warning</p> <pre><code>2018-03-09 11:15:21 WARN WatchConnectionManager:192 - Exec Failure java.io.EOF...
<p>You need to set <code>${SPARK_LOCAL_IP}</code> environment variable to pod IP and pass to spark-submit this environment variable using <code>--conf spark.driver.host=${SPARK_LOCAL_IP}</code>.</p> <p>See the spark docs for more information regarding these variables.</p>
<p>I have create docker registry as a pod with a service and it's working login, push and pull. But when I would like to create a pod that use an image from this registry, the kubelet can't get the image from the registry.</p> <p>My pod registry:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: registry-dock...
<p>The <code>auths</code> data has login credentials for "localhost:5000", but your image is at "10.96.81.252:5000/nginx:latest".</p>
<p>I have followed the documentation for spinning up an EKS cluster that says to make a service role with certain policies.</p> <p><a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ug.pdf" rel="noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/eks-ug.pdf</a></p> <pre><code>To create your Amazon...
<p>It seems that the EKS userguide assumes you have created load balancers in your AWS account prior to creating the EKS cluster, and thus have an existing <strong>AWSServiceRoleForElasticLoadBalancing</strong> service role in AWS IAM. </p> <p>As described in <a href="https://docs.aws.amazon.com/elasticloadbalancing/...
<p>I am trying to route outbound traffic from an application in my GKE cluster through a static IP, as the destination server requires whitelisting IP for access. I have been able to do this using the terraformed nat gateway, but this impacts all traffic from the cluster.</p> <p>Following the istio guide on the site, ...
<p>I think of your problem as having three steps. First, to fix the outgoing traffic to a particular pod. The istio egress gateway does this for you. Second and third, to fix the pod to a particular IP address.</p> <p>If you use GCP's version of floating IP addresses, then you can assign a known IP to one of the hos...
<p>I'm trying to save the contents of a configmap to a file on my local hard drive. Kubectl supports selecting with JSONPath but I can't find the expression I need to select just the file contents.</p> <p>The configmap was created using the command</p> <pre><code>kubectl create configmap my-configmap --from-file=my.c...
<p>There’s an open <a href="https://github.com/kubernetes/kubernetes/issues/63503" rel="noreferrer">issue</a> at the Kubernetes GitHub repo with a list of things that needs to be fixed in regards to kubectl (and JSONpath), one of them are issue <a href="https://github.com/kubernetes/kubernetes/issues/16707" rel="norefe...
<p>I want to undeploy pod/redeploy for previous image - meaning reverting of code. This should happen from kubernates dashboard. Like there is option to delete deployment in cluster dashboard .. similarly is there a way to undeploy or redeploy to previous image tag?</p>
<p>You can't currently roll back from the dashboard, no. Actually there is an open feature request asking for it - <a href="https://github.com/kubernetes/dashboard/issues/2889" rel="nofollow noreferrer">https://github.com/kubernetes/dashboard/issues/2889</a></p> <p>Rolling back a deployment from the command-line is po...