prompt stringlengths 65 38.7k | response stringlengths 41 29.1k |
|---|---|
<p>I'm trying to figure out how to create an array with some CIDR ip address in order to have the same array in my pipeline. So here is an example var file:</p>
<pre><code>whitelist-ip-ranges: |-
- 10.0.0.0/24
- 11.0.0.0/24
- 12.0.0.0/24
</code></pre>
<p>My pipeline is like:</p>
<pre><code>....
....
....
params:
... | <p>I'm sorry, I cannot speak to anything <code>helm</code> based. I can speak for a concourse pipeline, though.</p>
<p>Concourse does not support providing <code>params</code> to tasks that are an array. <code>params</code> are passed in as environment variables to a running task, so they are transformed from YAML to ... |
<p><strong>When the client tries to connect our ingress defined endpoint via a <code>wss://</code> request, the app returns 400 bad request, which according to socket.io docs is due to missing headers removed by load balancing proxies like nginx.</strong> </p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
me... | <p>Websockets is not currently supported, we are working on adding it and I will update here when it is available.</p>
<p>Thank you</p>
<p>Edit: Websocket support is available in all regions, the annotation for it is:</p>
<pre><code> annotations:
ingress.bluemix.net/websocket-services: service-name
</code></pre... |
<p>I am new to kubernetes. I have an issue in the pods. When I run the command</p>
<pre><code> kubectl get pods
</code></pre>
<p>Result:</p>
<pre><code>NAME READY STATUS RESTARTS AGE
mysql-apim-db-1viwg 1/1 Running 1 20h
mysql-govdb-qioee 1/1 ... | <p>In case of not having the yaml file:</p>
<p><code>kubectl get pod PODNAME -n NAMESPACE -o yaml | kubectl replace --force -f -</code></p>
|
<p>When creating/adding a node to kubernetes, we also have to create a Canal pod.</p>
<p>Currently, kubernetes does not wait for the Canal pod to be ready before trying to schedule pods, resulting in failures (error below)</p>
<pre><code>Error syncing pod, skipping: failed to "CreatePodSandbox" for "nginx-2883150634-... | <p>This is common issue, so I'll post the answer anyway.</p>
<p>The behaviour is normal especially in a self-hosted k8s cluster. In a self-hosted environment, all deployments incl the control plane elements (eg. kube-apiserver, canal) are scheduled at the same time.</p>
<p>The failed pods should eventually start prop... |
<p>My Dockerfile contains default environment variables for development and testing scenarios:</p>
<pre><code>ENV mysql_host=mysql \
mysql_user=app \
mysql_password=password \
</code></pre>
<p>and my k8s yaml contains an env directive: </p>
<pre><code>spec:
containers:
env:
- name: "mysql_passwor... | <p>you need to declare all the variables in the the correct yaml format
so in this exmaple mysql_password will override the variable but mysql_password2 will not override and will only be inserted if its not declared already :</p>
<pre><code>spec:
containers:
env:
- name: mysql_password
value:... |
<pre><code>restTemplate.postForEntity(url,entity, String.class);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
</code></pre>
<p>Throws null pointer exception when trying to create an object.</p>
<p>I checked entity and url, it is getting printed in Logger m... | <p>The problem seem to be that you are executing the request <strong>two times</strong>.</p>
<pre><code>restTemplate.postForEntity(url, entity, String.class);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
</code></pre>
<p>Both <code>postForEntity</code> and... |
<p>I want to find out the linux flavor running on the vm created using minikube-kubernetes.
I log in to the vm and do a cat /proc/version
<code>Linux version 4.9.13 gcc version 5.4.0 (Buildroot 2017.02)</code>.
Can someone tell me which flavor this is?
Obviously not ubuntu as none of the commands man, apt-get work. </... | <pre><code>cat /etc/*release
</code></pre>
<p>This works across most distributions.</p>
|
<p>I'm trying to create a Kubernetes scheduled job, however, I noticed that:</p>
<ul>
<li>On Kubernetes versions >= v1.4 it's called <em>ScheduledJob</em>
(<a href="http://janetkuo.github.io/docs/user-guide/scheduled-jobs/" rel="nofollow noreferrer">http://janetkuo.github.io/docs/user-guide/scheduled-jobs/</a>)</li>
... | <p>There is a milestone to migrate CronJobs to Beta in v 1.8 that can be tracked <a href="https://github.com/kubernetes/kubernetes/issues/41039" rel="nofollow noreferrer">here</a>.</p>
|
<p>I want to find out the linux flavor running on the vm created using minikube-kubernetes.
I log in to the vm and do a cat /proc/version
<code>Linux version 4.9.13 gcc version 5.4.0 (Buildroot 2017.02)</code>.
Can someone tell me which flavor this is?
Obviously not ubuntu as none of the commands man, apt-get work. </... | <p>The minikube distro is custom built using buildroot. It is meant to be a minimal distro and does not include a package manager or package repository. </p>
<ul>
<li><a href="https://github.com/kubernetes/minikube/tree/master/deploy/iso/minikube-iso" rel="noreferrer">https://github.com/kubernetes/minikube/tree/master... |
<p>I am quite confused about the roles of Ingress and Load Balancer in Kubernetes.</p>
<p>As far as I understand Ingress is used to map incoming traffic from the internet to the services running in the cluster.</p>
<p>The role of load balancer is to forward traffic to a host. In that regard how does ingress differ fr... | <p><strong>Load Balancer:</strong> A kubernetes LoadBalancer service is a service that points to external load balancers that are NOT in your kubernetes cluster, but exist elsewhere. They can work with your pods, assuming that your pods are externally routable. Google and AWS provide this capability natively. In terms ... |
<p>I have a Kubernetes cluster running in AWS. I used <code>kops</code> to setup and start the cluster. </p>
<p>I defined a minimum and maximum number of nodes in the nodes instance group: </p>
<pre><code>apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: 2017-07-03T15:37:59Z
labels:
k... | <p>Someone opened a <a href="https://github.com/kubernetes/kops/issues/341" rel="nofollow noreferrer">ticket for this on GitHub</a> and it suggests you have to install the <a href="https://github.com/kubernetes/kops/tree/master/addons/cluster-autoscaler" rel="nofollow noreferrer">autoscaler addon</a>. Check if it's alr... |
<p>I am trying to run Vitess on Minikube and I'm going through the 'Getting Started' steps found here: <a href="http://vitess.io/getting-started/#set-up-google-compute-engine-container-engine-and-cloud-tools" rel="nofollow noreferrer">http://vitess.io/getting-started/#set-up-google-compute-engine-container-engine-and-c... | <p>Maybe the go install directory is not in your path. Have you tried running vtctlclient manually (just like kvtctl.sh does)?</p>
<p>PS: You may want to join our Vitess Slack channel where you may get more prompt answers for your questions. Let me know if you need an invite.</p>
|
<p>I have installed kubernetes trial version with minikube on my desktop running ubuntu. However there seem to be some issue with bringing up the pods.
Kubectl get pods --all-namespaces shows all the pods in ContainerCreating state and it doesn't shift to Ready.</p>
<p>Even when i do a kubernetes-dahboard, i get</p>
... | <p>It's quite possible that the Pod container images are being downloaded. The images are not very large so the images should get downloaded pretty quickly on a decent internet connection.</p>
<p>You can use <code>kubectl describe pod --namespace kube-system <pod-name></code> to know more details on the pod brin... |
<p><a href="https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/" rel="noreferrer">Kubernetes documentation</a> on setting environment variables of a container only include examples of new environment variables.</p>
<p>This approach does not work when I try to extend an exist... | <p>If you only need this path declaration for the command you are running with, you can add it to <code>containers</code> section, under <code>args</code></p>
<p>Example:</p>
<pre><code>spec:
containers:
- name: blah
image: blah
args:
- PATH="$PATH:/usr/local/nvidia/bin" blah
</code></pre>
<p>If you ... |
<p>I have two machines within my netwrok which I want communicate from the pod. </p>
<p>Ips are as follows : </p>
<pre><code>10.0.1.23 - Lets call it X
13.0.1.12 - Lets call it Y
</code></pre>
<p>When I ssh into the master node or agent node and then do a ping to X or Y, the ping is successful.
Therefore the mach... | <p>Based on your question, it sounds like you've added another subnet to the k8 Virtual Network that gets deployed with the ACS Kubernetes cluster.</p>
<p>As it turns out, I ran into this <em>exact</em> same problem in our project. Azure Container Services uses very specific routing rules for the agent nodes. When the... |
<p>I'm learning Kubernetes. I'm trying to mapping equivalent concept from Kubernetes to Docker. For example: I have a following <code>docker-compose.yml</code></p>
<pre><code>db:
container_name: db
image: postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: 1234
app:
container_name: ... | <p>A pod being a group of one or more container, your docker-compose would by default mimick one pod. (so your second interpretation)</p>
<p>But with <a href="https://docs.docker.com/engine/swarm/" rel="nofollow noreferrer">docker swarm mode</a>, you can make sure those two container are in their own "pod" (as a group... |
<p>I have some previously run pods that I think were killed by Kubernetes for OOM or DEADLINE EXCEEDED, what's the most reliable way to confirm that? Especially if the pods weren't recent. </p>
| <p>If the pods are still showing up when you type <code>kubectl get pods -a</code> then you get type the following <code>kubectl describe pod PODNAME</code> and look at the reason for termination. The output will look similar to the following (I have extracted parts of the output that are relevant to this discussion):<... |
<p>Without any knows changes in our Kubernetes 1.6 cluster all new or restarted pods are not scheduled anymore. The error I get is:</p>
<pre><code>No nodes are available that match all of the following predicates:: MatchInterPodAffinity (10), PodToleratesNodeTaints (2).
</code></pre>
<p>Our cluster was working perfec... | <p>The problem was that a Pod got stuck in deletion. That caused kube-controller-manager to stop working.</p>
<p>Deletion didn't work because the Pod/RS/Deployment in question had limits that conflicted with the maxLimitRequestRatio that we had set after the creation. A bug report is on the way.</p>
<p>The solution w... |
<p>Kubernetes by default adds a <code>kubernetes</code> service in the default namesapce. This allows access to the kubernetes API from any pod in that namespace.</p>
<p>For example, I can </p>
<pre><code>TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
kubectl exec -it $SOME_POD -- bash
curl -v https... | <p>You can access the <code>kubernetes</code> service from other namespaces by qualifying the hostname:</p>
<p>The hostnames <code>kubernetes.default.svc</code>, <code>kubernetes.default.svc.cluster.local</code>, and the IP contained in <code>$KUBERNETES_SERVICE_HOST</code> will all resolve to the kubernetes API servi... |
<p>In most examples about using secrets in Kubernetes, you can find similar examples:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
username: User
password: **********
</code></pre>
<p>What is the purpose of <code>type: Opaque</code> in the definition above? What other t... | <p><code>type: Opaque</code> means that from kubernetes's point of view the contents of this Secret is unstructured, it can contain arbitrary key-value pairs.</p>
<p>In contrast, there is the Secret storing <code>ServiceAccount</code> credentials, or the ones used as <code>ImagePullSecret</code>. These have a constrai... |
<p>I am using docker service and kubernetes for container orchestration.</p>
<p>I would like to have all the volumes mounted from the host with the option nosuid.</p>
<p>Emptydir volumes could also live without suid. The only question is whether kubernetes supports specifying such mount options or if they can be hand... | <p>As you mentioned, <code>EmptyDir</code> volumes can live without <code>suid</code> is correct but, as of now, there is no way to mention <code>nosuid</code> kind of mount options in Kubernetes Volume manifests.</p>
|
<p>I've been struggling with this for quite a while now. My effort so far is shown below. The env variable, <code>CASSANDRA_AUTHENTICATOR</code>, in my opinion, is supposed to enable password authentication. However, I'm still able to logon without a password after redeploying with this config. Any ideas on how to enab... | <p>So I made few changes to the artifact you have mentioned:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cassandra
spec:
replicas: 1
template:
metadata:
labels:
app: cassandra
spec:
containers:
- name: cassandra
image: bitnami/c... |
<p>I'm running Kong API gateway on GKE and trying to add my own service. </p>
<p>I have 3 pods</p>
<ul>
<li><code>cassandra</code></li>
<li><code>kong</code> </li>
<li><code>apiindex</code></li>
</ul>
<p>and 2 services(node ports) </p>
<ul>
<li><code>apiindex</code> (80/443/8080 ports are open)</li>
<li><code>kong... | <p>You need to use the fully qualified name of the service (FQDN) in kubernetes <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 instead of <code>apiindex</code> need to us... |
<p>I am attempting to have a kubernetes nginx deployment with zero downtime. Part of that process has been to initiate a rollingUpdate, which ensures that at least one pod is running nginx at all times. This works perfectly well.</p>
<p>I am running into errors when the old nginx pod is terminating.
According to the ... | <p>I hate answering my own questions, but after noodling a bit this is what i have so far. </p>
<p>I created a bash script that is semi-blocking, called <code>killer</code>:</p>
<pre><code>#!/bin/bash
sleep 3
PID=$(cat /run/nginx.pid)
nginx -s quit
while [ -d /proc/$PID ]; do
sleep 0.1
done
</code></pre>
<p>I fo... |
<p>I have installed Docker v17.06-ce on 2 minion nodes plus a master node and Kubernetes with Kubeadm v1.7.0. Then I deployed Web UI (Dashboard) with <code>kubectl create -f https://git.io/kube-dashboard</code> and changed type to <em>NodePort</em> using <code>kubectl edit service kubernetes-dashboard -n kube-system</c... | <p>you need to install the heapster pod. try installing this and check.</p>
<p>Install the heapster rbac also.</p>
<pre><code>kubectl create -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/rbac/heapster-rbac.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes/heaps... |
<h1>Problem</h1>
<p>I have a monitoring application that I want to deploy inside of a DaemonSet. In the application's configuration, a unique user agent is specified to separate the node from other nodes. I created a ConfigMap for the application, but this only works for synchronizing the other settings in the environ... | <p>You can use an init container to preprocess a config template from a config map. The preprocessing step can inject local variables into the config files. The expanded config is written to an emptyDir shared between the init container and the main application container. Here is an example of how to do it.</p>
<p>... |
<p>I have been having problems trying to deploy my web app in <a href="https://kubernetes.io/" rel="nofollow noreferrer">kubernetes</a>. </p>
<p>I wanted to mimic old deploy with nginx working as reverse proxy in front of my back and front end services.</p>
<p>I have 3 pieces in my system, nginx, front and back. I bu... | <p>Nginx caches the resolved IPs. To force Nginx to resolve DNS, you can introduce a variable:</p>
<pre><code>location /api/v1 {
set $url "http://my-server";
proxy_pass $url;
}
</code></pre>
<p>More details can be found in this related <a href="https://serverfault.com/a/593003/151221">this answer</a>.</p>
<p... |
<p>When launching my Kubernetes deployment for Flower (Celery monitoring service), the following environment variables are generated in the Flower pod by Kubernetes:</p>
<pre><code>FLOWER_PORT=tcp://10.67.97.89:5555
FLOWER_PORT_5555_TCP=tcp://10.67.97.89:5555
FLOWER_PORT_5555_TCP_ADDR=10.67.97.89
FLOWER_PORT_5555_TCP_... | <p>You can not prevent creation of these, but you can overwrite them with your own values by setting them explicitly in your deployments pod template. So, if you ie. expect the default value of FLOWER_PORT to be say <code>80</code> instead of <code>tcp://...</code>, all you need to do is put</p>
<pre><code>env:
- name... |
<p>I'm intending to have a CD Pipeline with Jenkins which takes my application, publishes a docker image to my private docker repository. I think I know how to do that. </p>
<p>What I'm unsure about it the Kubernetes part. I want to take that image and deploy it to my private Kubernetes cluster (currently 1 Master &am... | <p>Assuming that you have the following deployment in your cluster:</p>
<pre><code>apiVersion: apps/v1beta1 # for versions before 1.6.0 use
extensions/v1beta1
kind: Deployment
metadata:
name: foobar-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: foobar-app
spec:
conta... |
<p>I have created a cluster using the google cloud platform (container engine) and deployed a pod using the following YAML file:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deployment-name
spec:
replicas: 1
template:
metadata:
n... | <p>You have two options:</p>
<ol>
<li>You could have multiple services, one for each port. As you pointed out, each service will end up with a different IP address</li>
<li>You could have a single service with multiple ports. In this particular case, you must give all ports a name.</li>
</ol>
<p>In your case, the ser... |
<p>I need to provide access to the file /var/docker.sock on the Kubernetes host (actually, a GKE instance) to a container running on that host. </p>
<p>To do this I'd like to mount the directory into the container, by configuring the mount in the deployment.yaml for the container deployment.</p>
<p>How would I specif... | <p>You need to define a <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">hostPath</a> volume.</p>
<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: appd-sa-agent
spec:
replicas: 1
template:
metadata:
labels:
run: appd-sa-a... |
<p>I'm following example found <a href="http://kubecloud.io/minikube-workflows/" rel="nofollow noreferrer">here</a>.</p>
<p>I'm simply trying to understand how volumes work with Kubernetes. I'm testing locally so I need to contend with minikube. I'm trying to make this as simple as possible. I'm using nginx and wou... | <p>Probably the folder you created is not in kubernetes node (it is minikube vm).</p>
<p>Try to create folder inside vm and try again</p>
<pre><code>ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip)
mkdir /Users/myuser/website
</code></pre>
<p>Also take a look at <a href="https://github.com/kubernete... |
<p>Today I recreated my cluster with v1.7.1 when I run the <code>kubeadm join --token 189518.c21306e71082d6ec</code> command, it giving the below error. this used work in previous version of kubernetes. Is something changed in this version, How do we resolve this?</p>
<pre><code>[root@k8s17-02 ~]# kubeadm join --tok... | <p>Looks like it's trying to look up the hostname and can't because it's not in DNS. There are two ways around this:</p>
<ol>
<li>Kubernetes works better with named nodes. While this is annoying, it provides benefits in the long run, such as when you have to use different IP addresses on a reboot. You could edit <code... |
<p>I created a cluster using Kubernetes and I want to make petitions to a server using different IP, does each of the nodes has a different one so that I can parallelize the requests? Thanks</p>
| <p>to make calls to your pods you should use kubernetes services which effectively loadbalance requests between your pods, so that you do not need to worry about particular IPs of PODs at all.</p>
<p>That said, each pod has it's unique IP address, but these are internal addresses, in most implementations they come fro... |
<p>For local development I have a working minikube. There we have different services deployed. Now I want to connect the Frontend with the Backend.</p>
<p>The Frontend is a angular application and lives in its own service.
The Backend is a node.js application also using a separate service and uses DNS to connect to ot... | <p>First I will try to address your specific questions</p>
<blockquote>
<p>The only working state was approached when I first started the Backend
service with type NodePort and copied the url and port to the
Frontends target URL. I think this is very unclean to me. Is there
another approach to get the url for ... |
<p>Does windows minikube support a persistent volume with a hostpath? If so what is the syntax?</p>
<p>I tried:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
name: kbmongo002
labels:
type: local
spec:
storageClassName: mongostorageclass
capacity:
storage: 10Gi
accessModes:
- Rea... | <p>If you use virtualbox in windows, only the <code>c:/Users</code> is mapped into vm as <code>/c/Users</code> which is kubernetes system can access. It is the feature in Virtualbox.</p>
<p><a href="https://i.stack.imgur.com/6TWOC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6TWOC.png" alt="snaps... |
<p>I installed the minikube for local kubernetes development according to article <a href="http://www.bogotobogo.com/DevOps/DevOps-Kubernetes-1-Running-Kubernetes-Locally-via-Minikube.php" rel="nofollow noreferrer">DevOps-Kubernetes-1-Running-Kubernetes-Locally-via-Minikube</a></p>
<ul>
<li>Ubuntu 16.04 LTS</li>
<li>m... | <p>You can set its default value with:</p>
<pre><code>minikube config set kubernetes-version v1.7.0
</code></pre>
<p>It edits <code>~/.minikube/config/config.json</code> and adds:</p>
<pre><code>{
"kubernetes-version": "v1.7.0"
}
</code></pre>
<p>Check out <a href="https://minikube.sigs.k8s.io/d... |
<p>ERROR: The template version is invalid: Unknown version (heat_template_version: 2016-10-14). Should be one of: 2012-12-12, 2013-05-23, 2010-09-09</p>
| <p>Best way of creating kubernetes cluster on openstack is, by using <strong>Magnum</strong></p>
<p><strong>Magnum</strong> is a OpenStack project which allows to create COE on a fly</p>
<p>Please refer this link for further details:</p>
<p><a href="https://wiki.openstack.org/wiki/Magnum" rel="nofollow noreferrer">h... |
<p>How do you get logs from kube-system pods? Running <code>kubectl logs pod_name_of_system_pod</code> does not work:</p>
<pre><code>Ξ» kubectl logs kube-dns-1301475494-91vzs
Error from server (NotFound): pods "kube-dns-1301475494-91vzs" not found
</code></pre>
<p>Here is the output from <code>get pods</code>:</p>
<p... | <p>Use the namespace param to kubectl : <code>kubectl --namespace kube-system logs kubernetes-dashboard-rvm78</code></p>
|
<p>I am trying to follow this tutorial to create a Galera cluster using kubernetes on AWS, but I see that the Dynamic provisioning of the volume fails and this is the error I see in kube-controller-manager.log</p>
<pre><code>0711 06:12:21.065942 6 aws_ebs.go:434] Provision failed: claim.Spec.Selector is not supp... | <p>looks like a configuration issue, "claim.Spec.Selector" should not be set in StorageClass/PVC yaml for AWS.</p>
|
<p>I am a new cookie to kubernetes . I am wondering if kubernetes have automatically switch the pods to another node if that node resources are on critical.</p>
<p>For example if Pod A , Pod B , Pod C is running on Node A and Pod D is running on Node B. The resources of Node A used by pods would be high. In these case... | <p>Yes, Kubernetes can migrate the pods to another node automatically if resources are used highly. The pod would be killed and a new pod would be started on another node. You would probably want to learn about <a href="https://medium.com/google-cloud/quality-of-service-class-qos-in-kubernetes-bb76a89eb2c6" rel="noref... |
<p>I'm using helm to generate kubernetes yamls. </p>
<p>My values.yaml looks like this:</p>
<pre><code>...
jobs:
- nme: job1
command: [sh, -c, "/app/deployment/start.sh job1"]
activeDeadlineSeconds: 600
- name: job2
command: [sh, -c, "/app/deployment/start.sh job2"]
activeDeadlineSeconds: 600
...
... | <p>Inside the loop the value of the <code>.</code> is set to the current element and you have to use <code>$.Chart.Name</code> to access your data.</p>
<p>I asked a similar question and I think the answer <a href="https://stackoverflow.com/a/44734585/8131948">https://stackoverflow.com/a/44734585/8131948</a> will answe... |
<p>I have some containers that will be runnin users code in them. In order to strengthen security, I want to prevent them from having access to kubernetes api via the service account mechanism, but don't want to turn it off globally. The documentation says you can switch the service account name but only to another val... | <p>In Kubernetes 1.6+, you can disable service account mounting on a Pod:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
automountServiceAccountToken: false
...
</code></pre>
<p>See <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/" rel="noreferre... |
<p>I'm working on a mysql users operator and I'm somewhat stuck on what's the proper way to report any issues.</p>
<p>The plan is to watch on CRD for <code>MysqlUser</code> and create <code>Secret</code>s and mysql users in the specified DB. Obviously, either of that can go wrong, at which point I need to report an er... | <p>This sounds similar to events reported from volume plugin (kubelet) where, for example, kubelet is unable to mount a volume from NFS server because server address is invalid, thus can not take to it.</p>
<p>Tracking events in <code>status.conditions</code> is less useful in this scenario since users typically have ... |
<p>I have been struggling for a few hours on this one. I have a very simple 2 tier dotnet core skeleton app (mvc and webapi) hosted on Azure using Kubernetes with Windows as the orchestrator.
The deployment works fine and I can pass basic environment variables over. The challenge I have is that I cannot determine how ... | <p>If your backend service was created BEFORE the frontend pods, you should have the environment variables <code>ACME_APP_SERVICE_HOST</code> and <code>ACME_APP_SEVICE_PORT</code> inside the pods.</p>
<p>If your backend service was created AFTER the frontend pods, then delete the pods and wait for them to be restarted... |
<p><a href="https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/" rel="nofollow noreferrer">Official documentation</a> on enabling the GPU support states:</p>
<blockquote>
<p>A special alpha feature gate Accelerators has to be set to true across
the system: --feature-gates="Accelerators=true".</p>
</block... | <p>I use Ubuntu16.04.</p>
<p><code>Add --feature-gates="Accelerators=true"</code> to <code>KUBELET_ARGS</code> in file <code>/etc/kubernetes/kubelet</code> should be fine.</p>
|
<p>I'm trying to launch Google Container Engine (GKE) in Private GCP network Subnet.</p>
<p>I have created custom Google Cloud VPC, then I have created custom Private Network Access Subnet too under that VPC.</p>
<p>1) When I create GKE cluster with Private Subnet, still my Kubernetes nodes assigned with Public IP. W... | <p><strong>With lots of R&D and some replies got from forum.</strong></p>
<p><strong><em>GKE should allow you to create a cluster in a Network that does have a default route to internet</em></strong>. We can launch a cluster in private subnet but that GKE cluster instance will treat as Public Subnet only.</p>
<p>... |
<p>My workflow is something on the lines of:</p>
<ol>
<li>Create a static Public IP on Azure and map it to a DNS name.</li>
<li>Then start a service in Kubernetes which spins up a an LB to which we attached the pre-reserved public IP.</li>
</ol>
<p>Approach 1:</p>
<pre><code>externalName: <FQDN>
</code></pre>
... | <p>try this:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
labels:
run: my-nginx
name: my-nginx
namespace: default
spec:
clusterIP: $clusterip
loadBalancerIP: $externalip
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
run: my-nginx
sessionAffinity: None
type: LoadB... |
<p>I am using <a href="https://github.com/coreos/prometheus-operator" rel="nofollow noreferrer">prometheus-operator</a> to manage a <a href="https://prometheus.io/" rel="nofollow noreferrer">Prometheus</a> deployment on my <a href="https://kubernetes.io/" rel="nofollow noreferrer">Kubernetes</a> cluster. The setup is ... | <p>There turned out to be two problems preventing the collection of the cAdvisor metrics.</p>
<p>First, there is <a href="https://coreos.com/operators/prometheus/docs/latest/user-guides/cluster-monitoring.html#preparing-kubernetes-components" rel="nofollow noreferrer">an option in prometheus-operator</a> that must be ... |
<p>I currently have a service that looks like this:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
name: httpd
spec:
ports:
- port: 80
targetPort: 80
name: http
protocol: TCP
- port: 443
targetPort: 443
name: https
protocol: TCP
selector:
app: httpd
extern... | <p>If you only have exactly one pod, you can use <code>hostNetwork: true</code> to achieve this:</p>
<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: caddy
spec:
replicas: 1
template:
metadata:
labels:
app: caddy
spec:
hostNetwork: true # <---------
contai... |
<p>How do I interpret the memory usage returned by "kubectl top node". E.g. if it returns:</p>
<pre>
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
ip-XXX.ec2.internal 222m 11% 3237Mi 41%
ip-YYY.ec2.internal 91m 9% 2217Mi 60%
</pr... | <p><code>kubectl top node</code> is reflecting the actual usage to the VM(nodes), and k8s dashboard is showing the percentage of limit/request you configured.</p>
<p>E.g. Your EC2 instance has 8G memory and you actually use 3237MB so it's 41%. In k8s, you only request 410MB(5.13%), and have a limit of 470MB memory. Th... |
<p>After triggering the following from my terminal, I have been unable to find a way to list Cronjobs running, but dormant and prior to their first run:</p>
<pre><code>oc run pi --image=perl --schedule='*/1 * * * *' \
--restart=OnFailure --labels parent="cronjobpi" \
--command -- perl -Mbignum=bpi -wle 'print ... | <p>In OpenShift 3.6, I have no issues with running:</p>
<pre><code>$ oc get cronjobs
NAME SCHEDULE SUSPEND ACTIVE LAST-SCHEDULE
hello */2 * * * * False 0 Fri, 21 Jul 2017 14:02:00 +1000
</code></pre>
<p>When the cronjob time arrives a job is created from the job template.</p>
<pre>... |
<p>I have kubernetes installed on bare metal ubuntu server, below is the output of kubectl version command</p>
<blockquote>
<p>Client Version: version.Info{Major:"1", Minor:"6",
GitVersion:"v1.6.0",
GitCommit:"fff5156092b56e6bd60fff75aad4dc9de6b6ef37",
GitTreeState:"clean", BuildDate:"2017-03-28T16:36:33Z",
... | <p>Enable the session Affinity to direct the traffic to one pod per client session
here is the samepl deployment.</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: shellinabox
labels:
k8s-app: shellinabox
tier: frontend
namespace: default
spec:
replicas: 2
template:
m... |
<p>Currently, I am getting the <code>ECONNREFUSED</code> where node can't connect to the database. I am not sure where the database host is supposed to end up. Should I be using <code>localhost:7474</code>, <code>127.0.0.1:7474</code>, <code>0.0.0.0:7474</code>, or am I supposed to use some host that gets generated whe... | <p>Perhaps a less known feature of Kubernetes is the fact that some <em>magic</em> environment variables are injected in the running pods.</p>
<p>In your particular case, pods have an environment variable for each service in the namespace. The format is the following:</p>
<pre><code><your service>_SERVICE_HOST
... |
<p>I am setting up a minimal Kubernetes cluster on localhost on a Linux machine (starting with hack/local-up-cluster from the checked out repo). In my deployment file I defined an ingress, which should make the services, which are deployed in the cluster, accessible from the outside. Deployment.yml:</p>
<pre><code>---... | <p>An <code>Ingress</code> resource is just a definition for your cluster how to handle ingress traffic. It needs an <em>Ingress Controller</em> to actually process these definitions; creating an Ingress resource without having deployed an Ingress controller will not have any effect.</p>
<p>From <a href="https://kuber... |
<p>So far, I have been using Spring Boot apps (with Spring Cloud Stream) and Kafka running without any supporting infrastructure (PaaS).</p>
<p>Since our corporate platform is running on Kubernetes we need to move those Spring Boot apps into K8s to allow the apps to scale and so on. Obviously there will be more than o... | <p>Kafka brokers do not push data to clients. Rather clients poll() and pull data from the brokers. As long as the consumers can connect to the bootstrap servers and you set the Kafka brokers to advertise an IP and port that the clients can connect to and poll() then it will all work fine.</p>
|
<p>As I'm going through Docker/Kubernetes tutorials, I notice a lot of people put nginx into a pod.</p>
<p>Even after reading about nginx, I am not sure what they are using it for. Doesn't Kubernetes serve your app and handle things like load balancing and whatnot?</p>
<p>Isn't something like Node.js a "web server" t... | <p>Kubernetes is load balancing the requests to your app. Now it is up to you whether you want to expose your app directly or you want to use a WebServer in front of it.</p>
<p>Putting Nginx in front of it would allow you to have things like access logs, error logs, caching, serving static files etc... There are cases... |
<p>I followed the instructions for installing Bash completion as given by <code>kubectl completion -h</code>:</p>
<ol>
<li>I installed <code>bash-completion</code> via Homebrew</li>
<li>In my <code>~/.bashrc</code>, I first source <code>bash-completion</code> then output from the completion kubectl subcommand:
<ul>
<... | <p>Once <code>bash-completion</code> is installed by Homebrew, it appears that its completions
need to reside in <code>$(brew --prefix)/etc/bash_completion.d</code>. There you'll find a lot of other completions that come bundled. To add the completion for kubectl:</p>
<pre><code>$ kubectl completion bash > $(brew ... |
<p>I have a Node.js app that provides a service which cannot be interrupted.</p>
<p>However the load to the app varies overtime and to save cost I would like the vm instance machine type to autoscale in function of the load (ie when over 80% CPU utilisation, scale up from 1 vCPU(3.75 GB memory, n1-standard-1) to 2vCPU... | <p>You can only change the machine type of a stopped instance and an instance is considered stopped only when the instance is in the TERMINATED state. It is not possible to change the machine type of a running instance.</p>
<p><a href="https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-in... |
<p>I'm working on a mysql users operator and I'm somewhat stuck on what's the proper way to report any issues.</p>
<p>The plan is to watch on CRD for <code>MysqlUser</code> and create <code>Secret</code>s and mysql users in the specified DB. Obviously, either of that can go wrong, at which point I need to report an er... | <p>CRDs do not have a status part yet (1.7). Notifying via events is perfectly fine, that's the reason for having them in the first place.</p>
|
<p>I am using the ELK stack (elasticsearch, logsash, kibana) for log processing and analysis in a Kubernetes (minikube) environment. To capture logs I am using filebeat. Logs are propagated successfully from filebeat through to elasticsearch and are viewable in Kibana. </p>
<p>My problem is that I am unable to get ... | <p>I have achieved what you looking for, by assigning a group of specific pods to a namespace, and now can query the log I look for using a combination of namespace, pod name and container name which is also included in generated log which is piped by file beat without any extra effort as you can see here
<img src="htt... |
<p>I'm trying to create a persistent volume using the azureFile however I keep getting the following error.</p>
<pre><code>MountVolume.SetUp failed for volume "kubernetes.io/azure-file/2882f900-d7de-11e6-affc-000d3a26076e-pv0001" (spec.Name: "pv0001") pod "2882f900-d7de-11e6-affc-000d3a26076e" (UID: "2882f900-d7de-11e... | <p>I had <a href="http://harrytechnotes.blogspot.com/2017/08/kubernetes-3-failed-to-mount-azure-files.html" rel="nofollow noreferrer">a blog</a> discussion the errors when mounting Azure files. The <code>permission denied</code> error might be due to the following reasons:</p>
<ol>
<li>The Azure storage account name a... |
<p>I have followed the <a href="https://github.com/IdentityServer/IdentityServer4.Samples/tree/release/Quickstarts/7_JavaScriptClient" rel="noreferrer">IdentityServer4 quickstarts</a> and am able to authenticate my javascript web page (almost the same as that provided in the quickstart) with a localhosted instance of I... | <p>I think I have worked this out. To resolve my issue, I have done two things:</p>
<ol>
<li><p>Create my own X509 certificate and shared this certificate between each of my IdentityServer's. There are lots of examples of how to create valid certificates on the net; I just used</p>
<pre class="lang-cs prettyprint-overr... |
<p>I want to debug the pod in a simple way, therefore I want to start the pod without deployment.</p>
<p>But it will automatically create a deployment</p>
<pre><code>$ kubectl run nginx --image=nginx --port=80
deployment "nginx" created
</code></pre>
<p>So I have to create the <code>nginx.yaml</code> file</p>... | <pre><code>kubectl run nginx --image=nginx --port=80 --restart=Never
</code></pre>
<blockquote>
<p><code>--restart=Always</code>: The restart policy for this Pod. Legal values [<code>Always</code>, <code>OnFailure</code>, <code>Never</code>]. If set to <code>Always</code>
a deployment is created, if set to <code... |
<p>I'm using minikube, starting it with</p>
<pre><code>minikube start --memory 8192
</code></pre>
<p>For 8Gb of RAM for the node.
I'm allocating pods with the resource constraints</p>
<pre><code> resources:
limits:
memory: 256Mi
requests:
memory: 256Mi
</code></pre>
<p>So 256Mb of RAM... | <p>You must understand the way requests and limits work.</p>
<p>Requests are the requirements for the amount of allocatable resources required on the node for a pod to get scheduled on it. These will not cause OOMs, they will cause pod not to get scheduled.</p>
<p>Limits, on the other side, are hard limits for given ... |
<p>In order to check status, I started the <code>busybox</code> in kubernetes using interactive shell.</p>
<pre><code>$ kubectl run -i --tty busybox --image=busybox --restart=Never -- sh
/ # exit
$ kubectl run -i --tty busybox --image=busybox --restart=Never -- sh
Error from server (AlreadyExists): pods "busybox" alre... | <p>Just add <code>--rm</code>:</p>
<pre><code>$ kubectl run busybox -i --tty --image=busybox --restart=Never --rm -- sh
If you don't see a command prompt, try pressing enter.
/ # exit
$ kubectl get pod busybox
Error from server (NotFound): pods "busybox" not found
</code></pre>
<blockquote>
<p><code>--rm=false</cod... |
<p>I deploy Redis container via Kubernetes and get the following warning:</p>
<blockquote>
<p>WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/... | <p>Yes, with init-containers it's quite straightforward:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: thp-test
spec:
restartPolicy: Never
terminationGracePeriodSeconds: 1
volumes:
- name: host-sys
hostPath:
path: /sys
initContainers:
- name: disable-thp
image: busybox
... |
<p>As host-gw use IP routes to subnets via remote machine IPs, it looks like pure L3 network solution.</p>
<p>Therefore, why need direct L2 connectivity between hosts?</p>
| <p><code>host-gw</code> adds route table entries on hosts, so that host know how to traffic container network packets.</p>
<p>This works on L2, because it only concerns <code>hosts</code>, <code>switches</code> and <code>containers</code>. <code>switches</code> does not care IP and route, <code>hosts</code> know <code... |
<p>We are having problems on kube-proxy loading iptables. It locks docker when there's a large number of services. Is there a way to tune this with its parameters?</p>
<p>From its documentation, I can only find --iptables-min-sync-period and --iptables-sync-period might be related? What's the recommended values for th... | <p>We spent the last few weeks looking at this, too. I assume you are also also seeing big CPU spikes (or even a constant 100% iptables) in networks with large amounts of ingress rules/routes.</p>
<p>That was identified a few releases ago and in the 1.5 cycle we got a few patches in that would reduce the number of ip... |
<p>That slave-agent pod always seems to die and go away very quickly after an error in my Jenkinsfile. Is there a way to exec into it and keep it alive while I'm in it? I am running Jenkins on Kubernetes using Helm</p>
| <p>If the pod is already dead you can't <code>kubectl exec</code> into the container.</p>
<p>However, you can ssh directly into the node that ran your pod and inspect the (now stopped) container directly. (You can't <code>docker exec</code> into it once it stopped)</p>
<p>Something like this:</p>
<pre><code># this p... |
<p>I have deployed kubernetes cluster with kops....</p>
<pre><code>kops create cluster --state=${STATE_STORE} --cloud=aws --zones=eu-west-2a,eu-west-2b --node-count=2 --node-size=t2.small --master-size=t2.small ${NAME}
</code></pre>
<p>Is any way to change node-size after deployment? without deleting cluster...</p>
| <p>Yes this is possible.</p>
<p>You need to run the command: <code>kops edit ig --name=CHANGE_TO_CLUSTER_NAME nodes</code></p>
<p>This will bring up and editor screen similar to:</p>
<pre><code>apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: "2017-07-01T12:06:22Z"
labels:
kops.k8s.... |
<p>I want to create a loadBalancer service on kubernetes that exposes a large range of ports. As you can't do that on kubernetes yet (<a href="https://github.com/kubernetes/kubernetes/issues/23864" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/23864</a>).</p>
<p>I have manually entered a ra... | <p>This is controlled by the <code>--service-node-port-range portRange</code> argument to <code>kube-apiserver</code> - the way to change that depends on your environment.</p>
<p>Keep in mind that nodePorts are meant to be used by load balancers as building blocks. So what you are trying to do is most likely not the b... |
<p>Iβm trying to change the value of a variable if another variable it set by combining the two with a dash in the middle, Iβm not sure of the syntax to do this, Iβm thinking of somethings like:</p>
<pre><code>{{- $serviceNamespace := .Values.serviceNamespace -}}
{{- $serviceTag := .Values.serviceTag -}}
{{- if $servi... | <p>For concatenation just use printf:</p>
<pre><code>{{- $serviceNamespace := printf "%s-%s" .Values.serviceNamespace .Values.serviceTag -}}
</code></pre>
|
<p>I can sort my Kubernetes pods by name using:</p>
<pre><code>kubectl get pods --sort-by=.metadata.name
</code></pre>
<p>How can I sort them (or other resoures) by age using <code>kubectl</code>?</p>
| <p>Pods have status, which you can use to find out startTime.</p>
<p>I guess something like <code>kubectl get po --sort-by=.status.startTime</code> should work.</p>
<p>You could also try:</p>
<ol>
<li><code>kubectl get po --sort-by='{.firstTimestamp}'</code>.</li>
<li><code>kubectl get pods --sort-by=.metadata.creation... |
<p>I have installed kubernetes using minikube on ubuntu 16.04 machine.
I have also installed kubernetes-dashboard.
When i try accessing the dashboard i get</p>
<pre><code>Waiting, endpoint for service is not registered yet
Waiting, endpoint for service is not ready yet...
Waiting, endpoint for service is not ready yet... | <p>You need to run <code>minikube dashboard</code>. You shouldn't install dashboard separately; it comes with minikube.</p>
|
<p>I am getting a couple of errors with Helm that I can not find explanations for elsewhere. The two errors are below.</p>
<pre><code>Error: no available release name found
Error: the server does not allow access to the requested resource (get configmaps)
</code></pre>
<p>Further details of the two errors are in the ... | <p><a href="https://github.com/helm/helm/issues/2224#issuecomment-356344286" rel="noreferrer">The solution given by kujenga from the GitHub issue</a> worked without any other modifications:</p>
<pre><code>kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule... |
<p>I am installing dashboard service using helm. Its create pods and service name like this <strong><em>kubernetes-dashboard-kubernetes-dashboard</em></strong>. How can remove the duplicate <strong><em>kubernetes-dashboard</em></strong> word from the name.</p>
<pre><code>helm install stable/kubernetes-dashboard --na... | <p>I'm afraid you can not achieve this without changes in kubernetes-dashboard helm chart. </p>
<p>According this code </p>
<pre><code> _helpers.tpl
...
{{ define "fullname" }}
{{- $name := default "kubernetes-dashboard" .Values.nameOverride -}}
{{ printf "%s-%s" .Release.Name $name | trunc 63 -}}
{{ end }... |
<p>Kubernetes - is there a repository for centos that works? I don't want to use git clone, I would prefer to use rpm packages. Is this package compatible with the new docker 17-0XX if it exists?</p>
| <p>I use below repo to install the kubernetes rpm in <strong>CentOS Linux release 7.3.1611 (Core)</strong></p>
<p><strong>add this repo</strong></p>
<pre><code>cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgc... |
<p>Iβve 3 servers : 1. kubernetes Master 2. kubernetes Minion1 3. kubernetes Minion2</p>
<p>A replication controller (with http service) running on kubernetes master with 4 replicas (pods) with a cluster IP 10.254.x.x</p>
<p>The cluster IP can accessible via busybox pod that is created by kubectl command.</p>
<p>No... | <p>As @Grimmy stated, I also think that is accomplished by the use of an <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">ingress resource and an ingress controller</a>.</p>
<p>For example, a pod with nginx and an ingress controller, can be used as a load balancer be... |
<p>I have set a kubernetes (version 1.6.1) cluster with three servers in control plane.
Apiserver is running with the following config:</p>
<pre><code>/usr/bin/kube-apiserver \
--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \
--advertise-address=x.x.x.x \
--a... | <p>The <code>--api-servers</code> flag is deprecated. It's no longer in the <a href="https://kubernetes.io/docs/admin/kubelet/" rel="nofollow noreferrer">documentation</a>. kubeconfig is the brand new way to point kubelet to kube-apiserver.</p>
<p>The kosher way to do this today is to deploy a Pod with nginx on each w... |
<p>I would like to create review apps for my open source application which already has a docker file.Is there any way where I could write an app.json file to deploy a Docker container for new pull requests for review apps?
or is there any way to use heroku container registry and runtime in review apps?</p>
| <p>Using heroku's new <a href="https://devcenter.heroku.com/articles/heroku-yml-build-manifest" rel="nofollow noreferrer">build manifest</a>, you can use the Build API to deploy your docker apps.
This means you can use <code>git push</code> to build a docker app. You can also use GitHub Sync, and Review Apps.</p>
|
<p>How to know the kubernetes version that is installed by minikube?
I am aware of the kubectl version and the minikube version.</p>
| <p>Once your minikube is running, you can use <code>kubectl version</code> command to see the version of kubernetes server. </p>
<p>Also, when you start minikube using <code>minikube start</code>, kubernetes version is shown in stdout.</p>
<pre><code>$ minikube start
Starting local Kubernetes v1.6.0 cluster...
</code... |
<p>Would the following directory structure work?</p>
<p>The goal is to have Jenkins trigger off GitHub commits and run Multi-branch Pipelines that build and test containers. (I have everything running on Kubernetes, including Jenkins)</p>
<pre><code>/project
.git
README.md
Jenkinsfile
/docker_image_1
Dock... | <p>There's no good answer to this question currently. </p>
<p>Kubernetes provides a standard API for deployment, but as a technology it relies on additional 3rd party tooling manage the build part of the ALM workflow. There a lots of options available for turning your source code into a container running on Kubernetes... |
<p>I create a sample setup of Kubernets cluster on Azure using Azure Container Service, and it did its job just fine. I set up several containers and services within the Kubernetes, no problem with that.</p>
<p>What makes me fuzzy is that if, say, I run <strong>several nginx containers and want to expose it via differ... | <p>In Azure container service, to expose a kubernetes service to Internet, we should use Azure Load balancer. As Radek said, several containers in one pod, and use the same load balancer to keep HA. </p>
<p>If you want to expose several containers to Internet with different Public IP addresses, we can create several p... |
<p>I am using experimental checkpoint feature to start up my app in the container and save its state.
I do so because tests on the app cannot be run in pararell and startup takes long.
I want to migrate to kubernetes to manage test containers</p>
<ul>
<li>Build and start up an app in the container </li>
<li>Save state... | <p>Container state migration (CRIU) is a feature that Docker has in a experimental state. According to Kubernetes devs (<a href="https://github.com/kubernetes/kubernetes/issues/3949" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/3949</a>), looks like it is not something Kubernetes will suppo... |
<p>If i have installed K8S using minikube, where will the master node components be installed. (Ex: the api server, replication controller, etcd etc)
Is it in the host? or the VM?
I understand the worker node is the VM configured by minikube </p>
| <p>Everything is installed in the Virtual Machine. Based on the localkube project, it is creating an All-in-one single-node cluster. </p>
<p>More information here: <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/cluster-lifecycle/local-cluster-ux.md" rel="nofollow noreferrer"... |
<p>I was testing Hyperledger-fabic v1.0.0 with kubernetes. The fabic contains 2 orgs, 4 peers, 1 orderer, and a cli. The things goes well until I instantiates the chaincode in the cli. The peer's error message in the picture. It says missing image, but the image just create successful. What's the problem and how can I ... | <p>The answer can be found in the Hyperledger RocketChat on the <a href="https://chat.hyperledger.org/channel/fabric-kubernetes?msg=v27L9igqJZRDW9wQz" rel="nofollow noreferrer">#fabric-kubernetes channel</a>. </p>
<p>"you basically need the peer to surface its dynamic IP (thats what <code>AUTOADDRESS</code> does) and ... |
<p>I have tried two different applications, both consisting of a web application frontend that needs to connect to a relational database. </p>
<p>In both cases the frontend application is unable to connect to the database. In both instances the database is also running as a container (pod) in OpenShift. And the web ap... | <p>In order for the internal DNS resolution to work, you need to ensure <code>dnsmasq.service</code> is running, <code>/etc/resolv.conf</code> contains the IP address of the OCP node itself instead of other DNS servers (these should be in <code>/etc/dnsmasq.d/origin-upstream-dns.conf</code>).</p>
<p>Example:</p>
<pre... |
<p>As docker means many things : </p>
<ul>
<li>the docker images</li>
<li>and the tools to run the images (docker engine)</li>
</ul>
<p>I am confused and it's not clear for me:
Are the "docker engine" mandatory to use Kubernetes to run docker images.</p>
<p>If not, is it still recommended to run kubernetes with the ... | <p>Yes, Kubernetes often comes bundled up with the things necessary to run containers, but it itself is a container orchestration system. So if you're going to need whatever base container engine you need to run the kind of containers you want (Docker or otherwise). </p>
<p>I would personally recommend Docker unless y... |
<p>I can provide a ubuntu with ssh by docker, and user can setup their env.
For example, he apt-get install something and modify his bashrc, vimrc and so on.
Once I restart this computer, the user still has same env after restart finished.</p>
<p>How can I provide same service by k8s?
Once I restart the node, it wil... | <p>@Saket is Correct. </p>
<p>If a docker container needs to persist its state (in this case the user changing something inside the container), then that state must be saved somewhere... How would you do this with a VM? Answer: save to disk. </p>
<p>In k8s storage is represented as a persistent volume. Something call... |
<p>I'm trying to delete a failed pod from the <code>Pods</code> page on the Kubernetes Web UI, but it is not getting deleted. </p>
<p>I understand what the error itself is, and I believe I have resolved it by using <code>secrets</code>, since this is a private repo. That said, I cannot re-add the pod again correctly, ... | <p>I just found a solution to my own problem. Go to the <code>Workloads</code> page in the Kubernetes Web UI, and delete the associated <code>Deployment</code>, and the <code>Pod</code> will be deleted as well.</p>
<p>If the pod does not get deleted after this, you will need to force a delete from the command line.</p... |
<p>I am trying to setup redis cluster on Kubernetes. One of my requirements is that my redis cluster should be resilient in case of kubernetes cluster restart(due to issues like power failure).</p>
<p>I have tried Kubernetes statefulset and deployment.
<br>In case of statefulset, on reboot a new set of IP addresses ar... | <p><code>Redis-4.0.0</code> has solved this problem by adding support for <a href="https://github.com/antirez/redis/issues/2527" rel="nofollow noreferrer">cluster announce node IP and Port</a></p>
<p>Set <code>cluster-announce-ip</code> as static IP of service over redis instance kubernetes deployment.</p>
<p>Link to... |
<p>I have a kubernetes cluster that is running in out network and have setup an NFS server on another machine in the same network. I am able to ssh to any of the nodes in the cluster and mount from the server by running <code>sudo mount -t nfs 10.17.10.190:/export/test /mnt</code> but whenever my test pod tries to use ... | <p>You have to set a <strong>securityContext</strong> as <strong>privileged: true</strong>. Take a look at this <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container" rel="nofollow noreferrer">link</a></p>
|
<p>I have deployed kubernetes cluster. The issue i have is that the dashboard is not accessible from external desktop system.</p>
<p>Following is my setup.
Two vm's with cluster deployed, one master one node.
dashboard running without any issue the kube-dns is also working as expected.
kubernetes version is 1.7.</p>
... | <p>kubectl proxy not working > 1.7</p>
<p>try this:</p>
<p>copy ~/.kube/config file to your desktop
then run the kubect like this </p>
<pre><code> export POD_NAME=$(kubectl --kubeconfig=config get pods -n kube-system -l "app=kubernetes-dashboard,release=kubernetes-dashboard" -o jsonpath="{.items[0].metadata.name}")... |
<p>In order to do some POCs over Mesos, Kubernetes, DC/OS and more, I would like to build a small cluster of 3-5 nodes.
I started to build a cluster via AWS, but it becomes expansive fastly.
So, I was wondering if there is a good way to build such a cluster without spending too much money on it.</p>
| <p>There is a blog where the author gives a good explanation and open source code for a cheap 3 nodes HA production cluster. It's in Digitalocean but could be replicated in any similar host provider. It's too long to post everything here so check this <a href="https://5pi.de/2016/11/20/15-producation-grade-kubernetes-... |
<p>I'm trying to install kubernetes cluster (v1.7.2) with 2 nodes. And using weave as cni. When joining the other node, kubeadm complains of hostname</p>
<pre><code>[root@ctdpc001572 ~]# kubeadm join --token c5ba8a.6bcb25f017648271 10.41.30.50:6443
[kubeadm] WARNING: kubeadm is in beta, please do not use it for produc... | <p>Adding ip route manually on other node resolved the issue. :sweat-smile:</p>
<pre><code>route add 10.96.0.1 gw <your real master IP>
</code></pre>
|
<p>I'm using this <code>Dockerfile</code> to deploy it on openshift. - <a href="https://github.com/sclorg/postgresql-container/tree/master/9.5" rel="nofollow noreferrer">https://github.com/sclorg/postgresql-container/tree/master/9.5</a></p>
<p>It works fine, until I enabled <code>ssl=on</code> and injected the <code>s... | <p>It looks like this is not trivial, as it requires to set Volume Security Context so all the containers in the pod are run as a certain user <a href="https://docs.openshift.com/enterprise/3.1/install_config/persistent_storage/pod_security_context.html" rel="nofollow noreferrer">https://docs.openshift.com/enterprise/3... |
<p>We have a kubernetes cluster which has a dropwizard based web application running as a service. This application has a rest uri to upload files. It cannot upload files larger than 1MB. I get the following error:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">... | <p>Had this on my setup as well. Two advices here:</p>
<p>1: switch to official kubernetes nginx ingress, it's awesome (<a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx</a>)</p>
<p>2: with the above ingress, you can add an annotation to your I... |
<p>I have two services, <code>tea</code> and <code>coffee</code>, each is in their own namespace, I would like <code>domain.com</code> to go to the <code>tea</code> service and <code>domain.com/coffee</code> to go to <code>coffee</code>.</p>
<p>As each is in a namespace I have had to make two pieces of ingress, but wh... | <p>I guess the problem isn't having tea and coffee, but defining the <code>coffee</code> path twice in the coffee ingress. According to <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#simp... |
<p>I'm using kubernetes and changed all my replication controllers to deployments (the new RC from k8s ).</p>
<p>I used to Expose Pod Information of Containers Through Environment Variables as described in here:</p>
<p><a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-... | <p>This deploymned works for me. can you test this in your cluster?</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx
labels:
k8s-app: nginx
tier: network-tools
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
k8s-app: nginx
spe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.