Question stringlengths 65 39.6k | QuestionAuthor stringlengths 3 30 ⌀ | Answer stringlengths 38 29.1k | AnswerAuthor stringlengths 3 30 ⌀ |
|---|---|---|---|
<p>I am having the following questions:</p>
<p>Actually, I am using grafana open source service in Azure Virtual Machine. I would like to see the Kubernetes SLA Metrics on Grafana. When I had googled for it, then I had got the following page: <a href="https://grafana.com/docs/grafana-cloud/kubernetes/" rel="nofollow no... | chaitanya kumar Dondapati | <p>There is now an Azure Managed Grafana service on Azure. When create an instance you can grant it access to Azure Monitor which will serve up statistics from your AKS clusters.</p>
| Mitch Denny |
<p>I'm using ignite chart in kubernetes, in memory deployment without persistent volumes, how can I configure default tables to be created automatically after restart of all ignite pods?</p>
| NoamiA | <p>You can specify them in your <code>IgniteConfiguration</code> using Java or Spring XML, via Query Entities mechanism:</p>
<p><a href="https://ignite.apache.org/docs/latest/SQL/indexes#configuring-indexes-using-query-entities" rel="nofollow noreferrer">https://ignite.apache.org/docs/latest/SQL/indexes#configuring-ind... | alamar |
<p>I'm adding a proxy in front of kubernetes API in order to authenticate users (among other actions) with a homemade authentication system.</p>
<p><a href="https://i.stack.imgur.com/7OevY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7OevY.png" alt="enter image description here"></a></p>
<p>I've... | Charrette | <p>Token credentials are only sent over TLS-secured connections. The server must be https://...</p>
| Jordan Liggitt |
<p>While deploying a Kubernetes application, I want to check if a particular PodSecurityPolicy exists, and if it does then skip installing it again.
I came across the <a href="https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-lookup-function" rel="noreferrer">helm lookup function</a>, which a... | user4202236 | <p>Please check your API version and PSP name. Lookup is returning a <code>map</code> or <code>nil</code> not a string and that's why you are getting that error. The following is working for me. For negative expression, just add <code>not</code> after <code>if</code>.</p>
<pre><code>{{- if (lookup "policy/v1beta1&... | Faheem |
<p>I'm trying to lock down a namespace in kubernetes using <strong>RBAC</strong> so I followed this <a href="https://blog.viktorpetersson.com/2018/06/15/kubernetes-rbac.html" rel="nofollow noreferrer">tutorial</a>.<br>
I'm working on a <strong>baremetal cluster</strong> (no minikube, <strong>no cloud provider</strong>)... | Doctor | <p>A couple possibilities:</p>
<ol>
<li>are you running the "can-i" check against the secured port or unsecured port (add --v=6 to see). Requests made against the unsecured (non-https) port are always authorized. </li>
<li>RBAC is additive, so if there is an existing clusterrolebinding or rolebinding granting "get pod... | Jordan Liggitt |
<p>I would like full details on NodeGroups in an EKS cluster, for example volume size as set using <code>--node-volume-size</code> in the command <code>eksctl create nodegroup ...</code> but also many other details of a NodeGroup that can be set with that command.</p>
<p><code>eksctl get nodegroup</code> gives limite... | Joshua Fox | <p>Answer: This is simply a limitation in <code>eksctl</code>. The limitation exists because the node-group configuration is not implicit in the EC2-based cluster itself, but rather it would need to be saved specially in cluster metadata.</p>
<p>See eksctl GitHub issues: <a href="https://github.com/weaveworks/eksct... | Joshua Fox |
<p>In Ubuntu <code>16.04</code> I'm trying to deploy <code>Kubespray2.5</code> using Ansible Playbook(<code>2.9.7)</code> command and getting error:</p>
<p>I have deployed kubespray many times with version 2.5 but this time only i am getting this error.
Please help to me.</p>
<p><code>ansible-playbook -i inventory/my... | Ranvijay Sachan | <p>The <a href="https://apt.dockerproject.org/" rel="nofollow noreferrer">https://apt.dockerproject.org/</a> repository has been shut down on March 31, 2020.</p>
<p>Your playbook is outdated; acquire a newer version or adjust it according to the linked instructions yourself.</p>
| AKX |
<p>I am deploying angular application on kubernetes, After deployment pod is up and running, but when I am trying to access the application through ingress it is giving 502 bad gateway error. The application was working fine until I made some recent functional changes and redeploy using the yaml/config files that was ... | suku | <p>The screenshot you have attached shows an nginx error. Initially I thought it meant that it was a configuration error on your pod (an error in the actual container).</p>
<p>But then I noticed you are using an NGINX ingress controller, so most likely the issue is in the ingress controller.</p>
<p>I would proceed mech... | Gonfva |
<p>I am trying to mount a directory called rstudio which is residing in /mnt/rstudio. But when I try to mount using persistent volume, the directory is showing up but not the files inside rstudio. Here's my deployment file</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metada... | Siddharth | <p>LGTM. I am getting files if I swap the image with <code>nginx</code>. I would check two things:</p>
<ol>
<li>Permissions: Check what permissions the files have. You may have to update your permissions or UID to access the files.</li>
<li>Does <code>rstudio</code> image use that path? It may be processing that folder... | Faheem |
<p><strong>TL;DR</strong></p>
<p>My pods mounted Azure file shares are (inconsistently) being deleted by either Kubernetes / Helm when deleting a deployment.</p>
<p><strong>Explanation</strong></p>
<p>I've recently transitioned to using Helm for deploying Kubernetes objects on my Azure Kubernetes Cluster via the Dev... | Matt Woodward | <p><strong>Credit goes to</strong> <a href="https://twitter.com/tomasrestrepo" rel="nofollow noreferrer">https://twitter.com/tomasrestrepo</a> here on pointing me in the right direction (the author of the article I mentioned above).</p>
<p>The behaviour here was a consequence of having the Reclaim Policy on the Storag... | Matt Woodward |
<p>I am trying to automate my deployment to Azure AKS, but trying to work out how to reference the image name in my manifest file. At the moment I have commented out the image name in the manifest file so see if that works but getting an error:</p>
<blockquote>
<p>##[error]TypeError: Cannot read property 'trim' of unde... | Rutnet | <p>Update: @Rutnet figured out the way to pass the new tag using <code>Azure/k8s-deploy1@1</code> action. From the <a href="https://github.com/Azure/k8s-deploy" rel="nofollow noreferrer">docs</a>:</p>
<blockquote>
<p>(Optional) Fully qualified resource URL of the image(s) to be used for
substitutions on the manifest fi... | Faheem |
<p>My deployment is working fine. i just try to use local persistent volume for storing data on local of my application. after that i am getting below error.</p>
<blockquote>
<p>error: error validating "xxx-deployment.yaml": error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets... | Dharmendra jha | <p>You need to move the <code>imagePullSecret</code> further down. It's breaking the container spec. <code>imagePullSecret</code> is defined at the pod spec level while <code>volumeMounts</code> belongs to the container spec</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
meta... | Faheem |
<p>Want to understand how pod1 claimed PVC with <code>accessMode: ReadWriteOnce</code> is able to share with pod2 when <code>storageclass glusterfs</code> is created?Shouldn't it fail as I need to specify the <code>accessMode</code> as <code>ReadWriteMany</code>?</p>
<p>-> Created <code>storageclass</code> as <code>gl... | Melwyn Jensen | <p>Volumes are <code>RWO</code> per node, not per Pod. Volumes are mounted to the node and then bind mounted to containers. As long as pods are scheduled to the same node, <code>RWO</code> volume can be bind mounted to both containers at the same time.</p>
| Tuminoid |
<p>I'm using Azure Kubernetes Services and was wondering if creating a new load balancing service would require me to re-create my deployments. I've been experimenting a bit, but I can't tell if the responses from the service were just delayed because of startup time and I'm impatient, or if the loadbalancer doesn't cr... | Carson | <p>You don't need to redeploy the application if you just want to expose the service. A service can be exposed as a load balancer or other types. When you create a service of type LoadBalancer, the cloud controllers in AKS will create the Load Balancer Azure resource and setup the backend configuration based on the exi... | Faheem |
<p>Currently I'm using Kubernetes version 1.11.+. Previously I'm always using the following command for my <em>cloud build</em> scripts:</p>
<pre><code>- name: 'gcr.io/cloud-builders/kubectl'
id: 'deploy'
args:
- 'apply'
- '-f'
- 'k8s'
- '--recursive'
env:
- 'CLOUDSDK_COMPUTE_ZONE=${_REGION}'
- 'CLOU... | irvifa | <p>This is due to <a href="https://github.com/kubernetes/kubernetes/issues/71042" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/71042</a></p>
<p><a href="https://github.com/kubernetes/kubernetes/pull/66602" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/66602</a> sh... | Jordan Liggitt |
<p>I am trying to create an ingress controller that points to a service that I have exposed via NodePort.</p>
<p>Here is the yaml file for the ingress controller (taken from <a href="https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks... | HonoredTarget | <p>You must use a proper hostname to reach the route defined in the <code>Ingress</code> object. Either update your <code>/etc/hosts</code> file or use <code>curl -H "hello-world.info" localhost</code> type command. Alternatively, you can delete the <code>host</code> mapping and redirect all traffic to one de... | Faheem |
<p>I am deploying liquibase scripts using CI CD pipeline. There are some instances where a liquibase changeset transaction might take very long and the pod may go down during that time. For example, a changeset adds a new non-null column into an existing table which already has a million records. A default value will b... | San N | <p>The answer somewhat depends on your database and were it actually is killed. What liquibase tries to do is:</p>
<p>First, update the databasechangeloglock table as "locked" and commit it</p>
<p>Then, for each <em><strong>changeset</strong></em></p>
<ol>
<li>Start a transaction</li>
<li>Execute each change ... | Nathan Voxland |
<p>I need to be able to assign custom environment variables to each replica of a pod. One variable should be some random uuid, another unique number. How is it possible to achieve? I'd prefer continue using "Deployment"s with replicas. If this is not feasible out of the box, how can it be achieved by customizing replic... | rubenhak | <p>You can use the downward API to inject the metadata.uid of the pod as an envvar, which is unique per pod</p>
| Jordan Liggitt |
<p>I'm in the process of containerizing various .NET core API projects and running them in a Kubernetes cluster using Linux. I'm fairly new to this scenario (I usually use App Services with Windows) and a questions regarding best practices regarding secure connections are starting to come up:</p>
<ol>
<li><p>Since thes... | INNVTV | <ol>
<li><p>It depends on where you want to terminate your TLS. For most use cases, the ingress controller is a good place to terminate the TLS traffic and keep everything on HTTP inside the cluster. In that case, any HTTP port should work fine. If port 80 is exposed by Dotnet core by default then you should keep it.</... | Faheem |
<p><a href="https://i.stack.imgur.com/9uUKq.png" rel="nofollow noreferrer"><strong>RESPONSE HEADER</strong></a></p>
<p>Why am I receiving a network error? Does anyone have a clue what layer this is occurring / how I can resolve this issue?</p>
<p><strong>What I've Tried</strong><br />
(1) Checked CORS... everything see... | L L | <p>If it's failing specifically for long running calls then you may have to adjust your ELB idle timeout. It's 60 seconds by default. Check out the following resource for reference:</p>
<p><a href="https://aws.amazon.com/blogs/aws/elb-idle-timeout-control/" rel="nofollow noreferrer">https://aws.amazon.com/blogs/aws/elb... | Faheem |
<p>I've a ASP.NET core console application that I run in a container on Kubernetes. In the deployment.yaml I've set the environment variable:</p>
<pre><code>env:
- name: "ASPNETCORE_ENVIRONMENT"
value: "Development"
</code></pre>
<p>And in the console application I've the following code:</p>
<pre><code>stati... | BvdVen | <p>We use this template to run a ASP.NET Core App in our Kubernetes cluster:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: <namespace>
name: <application name>
spec:
replicas: 1
minReadySeconds: 15
strategy:
type: RollingUpdate
rollingUpdate:
ma... | maveonair |
<p>I have upload.yaml file which is uploads a script to mongo, I package with helm.</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
generateName: upload-strategy-to-mongo-v2
spec:
parallelism: 1
completions: 1
template:
metadata:
name: upload-strategy-to-mongo
spec:
volumes:
- ... | xavlock | <p>This seems to be a known issue. Helm doesn't work with <code>generateName</code>. For unique names, you can use the <a href="https://helm.sh/docs/chart_template_guide/builtin_objects/" rel="nofollow noreferrer">Helm's build in properties</a> like <code>Revision</code> or <code>Name</code>. See the following link for... | Faheem |
<p>I am developing a website that runs a simulation given a user-submitted script. I tried to follow some Online Judge architectures, but in my case, I need to send user input and receive the output in realtime, like a simulation.</p>
<p>I tried Kubernetes Jobs, but isn't seems so easy to communicate with the container... | Ícaro Lima | <p>Please take a look at the design of the spark operator:</p>
<p><a href="https://github.com/GoogleCloudPlatform/spark-on-k8s-operator" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/spark-on-k8s-operator</a></p>
<p>That has a somewhat similar design to what you’re targeting. Similarly, Argo Workflow... | Faheem |
<p>Has anyone managed to use managed identity with Bridge to Kubernetes?</p>
<p>I've been reading these articles:
<a href="https://learn.microsoft.com/en-us/visualstudio/bridge/managed-identity?view=vs-2019" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/visualstudio/bridge/managed-identity?view=vs-2019</a... | Ian1971 | <p>I worked it out by decompiling the extension. It is a documentation issue.
The correct file name is indeed <code>KubernetesLocalProcessConfig.yaml</code></p>
<p>and the below yaml will work (note the <strong>-</strong> was missing in the docs)</p>
<pre><code>version: 0.1
enableFeatures:
- ManagedIdentity
</code></... | Ian1971 |
<p>I need to download files into a specific folder of a container on a pod, at startup. The image for this container already has an existing folder with other files in it. (example is adding plugin jars to an application) </p>
<p>I've attempted the below example, however k8s volumeMounts overwrites the folder on conta... | Melissa | <p>volume mounts always shadow the directory they are mounted to. a volume mount is the only way for an init container to manage files that are also visible to another container in the pod. if you want to copy files into a directory that already contains files in the main container image, you'll need to perform that co... | Jordan Liggitt |
<p>Difficulty running airflow commands when running Airflow on Kubernetes that I installed from the Helm stable/airflow repo. For instance I try to exec into the scheduler pod and run <code>airflow list</code> and I get the following error:</p>
<pre><code>airflow.exceptions.AirflowConfigException: error: cannot use sql... | alex | <p>Make sure you are using <code>bash</code>. <code>/home/airflow/.bashrc</code> imports the environment variables from <code>/home/airflow/airflow_env.sh</code> to setup the connection. The following are some examples:</p>
<pre class="lang-bash prettyprint-override"><code>kubectl exec -ti airflow-scheduler-nnn-nnn -- ... | Faheem |
<p>Observed two kinds of syntaxes for PV & PVC creation in AWS EKS.</p>
<p>1)Using vol Id while creating both PV & PVC (Create volume manually and using that id)
2)Without using vol Id (dynamic provisioning of PV)</p>
<p>example-1:</p>
<pre><code>- apiVersion: "v1"
kind: "PersistentVolume"... | SNR | <p>It should be based on your requirements. Static provisioning is generally not scalable. You have to create the volumes outside of the k8s context. Mounting existing volumes would be useful in disaster recovery scenarios.</p>
<p>Using <a href="https://docs.aws.amazon.com/eks/latest/userguide/storage-classes.html" rel... | Faheem |
<p>Did someone already get this error : pods "k8s-debian9-charming-but-youthful-merkle" is forbidden: pod does not have "kubernetes.io/config.mirror" annotation, node "k8s-uk1-node-002" can only create mirror pods ?</p>
<p>Why the node is configured to create only mirror pods ? How to unconfigure this ? Is this RBAC p... | Greg | <p>The NodeRestriction admission plugin is responsible for enforcing that limitation, to prevent nodes from creating pods that expand their access to resources like serviceaccounts and secrets unrelated to their existing workloads</p>
| Jordan Liggitt |
<p>I have deployed an AWS ALB Controller and I create listeners with ingress resources in a EKS cluster.</p>
<p>The steps I followed are the following:</p>
<ul>
<li>I had an ingress for a service named <code>first-test-api</code> and all where fine</li>
<li>I deploy a new Helm release [<code>first</code>] with just ren... | Kostas Demiris | <p>I will provide some generic advice on things I would look at, but it might be better to detail a small example.</p>
<p>Yes, ALB controller should automatically manage changes on the backend.</p>
<p>I would suggest ignoring the helm chart and looking into the actual objects:</p>
<ul>
<li><code>kubectl get ing -n <... | Gonfva |
<p>I'm not able to deploy Wordpress using Rancher Catalog and bitnami/wordpress Helm Chart. MariaDB pod runs fine but wordpress pod errors out as</p>
<p><code>ReplicaSet "wordpress-557fcb8469" has timed out progressing.; Deployment does not have minimum availability.</code></p>
<p>Also from the wordpress pod ... | JackTheKnife | <blockquote>
<p>Unknown MySQL server host 'wordpress-mariadb' (-3)</p>
</blockquote>
<p>The error indicates a DNS failure. Please review your <a href="https://rancher.com/docs/rke/latest/en/config-options/add-ons/dns/" rel="nofollow noreferrer">CoreDNS configuration</a>. Check CoreDNS logs for any errors. CoreDNS forwa... | Faheem |
<p>I have a persistentVolumeClaim fix (50go) and I wouldlike to divise this volume in 3 parts :</p>
<pre><code>volumes:
- name: part1
persistentVolumeClaim:
claimName: myDisk
- name: part2
persistentVolumeClaim:
claimName: myDisk
- name: part3
... | jerome12 | <p>Persistent volumes or claims can’t be divided. Also, there is a 1:1 relationship between Volumes and Claims. You can, however, create multiple PVs/PVCs from a storage classes. See the following example for reference. I am creating three PVCs from one storage class. It will also create relevant PVs for me as well. In... | Faheem |
<p>I'm new to AKS, ACR, and DevOps Pipelines and I'm trying to setup a CI/CD pipeline for my application which uses Spring Boot backend and Angular frontend.
Below is the azure pipeline yaml file that I am using</p>
<pre><code># Deploy to Azure Kubernetes Service
# Build and push image to Azure Container Registry; Depl... | Phani | <p>You need to do build the docker container for the Angular application separately. Ideally, it should be deployed alongside the SpringBoot application. You will need a new build and deploy pipeline with a potentially separate manifests file.</p>
<p>Reference articles on how to build docker images for Angular apps:</p... | Faheem |
<p>For an HA kubernetes cluster, I don't find confirmation if all etcd members are answering read query from apiserver or direct client access, or only master etcd member is doing read/write operations ?</p>
<p>Write acces is well described, only master etcd member is doing it.
But for a K8S cluster with 3 etcd (or mo... | acra | <p>Yes, reads are served by any etcd member in an HA Kubernetes cluster</p>
| Jordan Liggitt |
<p>I have installed istio 1.6.7 in an AKS cluster using <code>istioctl</code>.
I have enabled the istio operator using <code>init</code> command.
When I try to enable Grafana and Kiali using a separate yaml on top of the installed istio system with <code>kubectl</code>, the istio ingress gateway pod is recreated and my... | vishnu rajasekharan | <p>I am assuming you are referring to the <a href="https://istio.io/latest/docs/setup/install/standalone-operator/" rel="nofollow noreferrer">Standalone Operator Installation</a> guide. When updating the configuration, you have to change the original manifest and not create a new one. Your specified manifest doesn't co... | Faheem |
<p>I am having trouble enabling webhook authentication for the kubelet API. My cluster is deployed with kubeadm. <a href="https://stackoverflow.com/questions/44855609/enabling-kubelet-server-bearer-token-authentication">This post is similar, but not the same issue</a></p>
<p>I can authenticate to my API server with a ... | jsirianni | <p>The 403 indicates you successfully authenticated (or you would have gotten a 401 error), the kubelet checked with the apiserver if you were authorized to access kubelet metrics (otherwise it would have just allowed it), it got a definitely response from the apiserver (otherwise you would have gotten a 500 error), an... | Jordan Liggitt |
<p>I've run into a problem accessing Azure Key Vault whilst converting some services from Microsoft Service Fabric to Kubernetes. Within our ASP.NET core ConfigureServices call, we call AddAzureKeyVault from Microsoft.Extensions.Configuration.AzureKeyVaultConfigurationExtensions to inject some sensitive parts of our co... | darwinawardee | <p>I just ran your code sample on my machine, local cluster, and an AKS cluster. It's working in all places. Please check your environment. You may be looking in the wrong place. There must be something in your local environment. Try running it in a different environment. For example: from home (without VPN).</p>
| Faheem |
<p>I'm trying to connect my k8s cluster to my ceph cluster with this manual:
<a href="https://akomljen.com/using-existing-ceph-cluster-for-kubernetes-persistent-storage/" rel="nofollow noreferrer">https://akomljen.com/using-existing-ceph-cluster-for-kubernetes-persistent-storage/</a></p>
<p>I want to deploy rbd-provi... | Kirill Ponomarev | <p>Service accounts can be granted permissions in another namespace. </p>
<p>For example, within the namespace "acme", grant the permissions in the <code>view</code> <code>ClusterRole</code> to the service account in the namespace "acme" named "myapp" :</p>
<pre><code>kubectl create rolebinding myapp-view-binding \
... | Jordan Liggitt |
<p>I am trying to create a Pod in Kubernetes using <code>curl</code>. </p>
<p>This is the YAML:</p>
<pre><code>cat > nginx-pod.yaml <<EOF
apiVersion: v1
kind: Pod
metadata:
name: nginx1
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
EOF
</code></pre>
<p>I ha... | E235 | <p>make sure you set content type to application/yaml, and use --binary-data with yaml… --data drops newlines</p>
| Jordan Liggitt |
<p>I've created K8S cluster in AWS and generated certificates per each component and they can connect eachother. But while I'm trying to get logs or installing an application via Helm, i'M getting below error : </p>
<pre><code>$ helm install ./.helm
Error: forwarding ports: error upgrading connection: error dialing ba... | Muhammet Arslan | <p>Wildcard certificates can only be used for a single segment of DNS names. You will need a certificate valid for <code>ip-172-20-74-98.eu-central-1.compute.internal</code>
or <code>*.eu-central-1.compute.internal</code></p>
| Jordan Liggitt |
<p>I'm trying to bootstrap a etcd cluster within my kubernetes cluster, here is the relevant section of the pod definition</p>
<pre><code> - name: etcd
image: quay.io/coreos/etcd:v2.2.0
ports:
- containerPort: 2379
- containerPort: 2380
- containerPort: 4001
env:
- name: POD_IP
value... | Tom Hadlaw | <p>The arguments are not interpreted by a shell, so curly braces don't get you the behavior you want. If you want to use an envvar value in an arg, variable references like <code>$(VAR_NAME)</code> are expanded using the container's environment.</p>
| Jordan Liggitt |
<p>I'm running Kubernetes 1.6.2 with RBAC enabled. I've created a user <code>kube-admin</code> that has the following Cluster Role binding</p>
<pre class="lang-yaml prettyprint-override"><code>kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: k8s-admin
subjects:
- kind: User
nam... | Curtis Allen | <p>The connection between kubectl and the api is fine, and is being authorized correctly.</p>
<p>To satisfy an exec request, the apiserver contacts the kubelet running the pod, and that connection is what is being forbidden.</p>
<p>Your kubelet is configured to authenticate/authorize requests, and the apiserver is no... | Jordan Liggitt |
<p>Been working on a disaster recovery plan for my Kubernetes cluster and I am able to make snap shots of my managed disks but im not sure how to bind a recovered manager disk to an existing volumn cliam so I can re hydrate my data after a loss of data.</p>
| Hizzy | <p>You can mount any disk <a href="https://learn.microsoft.com/en-us/azure/aks/azure-disk-volume#mount-disk-as-volume" rel="nofollow noreferrer">manually</a> as a volume in a POD to recover data. Better approach would be to use <a href="https://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure/blob/master/READM... | Faheem |
<p>I'm running kubernetes v1.11.5 and I'm installing helm with a tiller deployment for each namespace.
Let's focus on a single namespace. This is the tiller service account configuration:</p>
<pre><code>---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: marketplace-int
---
kind: Role
apiVer... | RuBiCK | <p>This is due to permission escalation prevention in RBAC. See <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#privilege-escalation-prevention-and-bootstrapping" rel="noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/rbac/#privilege-escalation-prevention-and-bootstrapping</a> f... | Jordan Liggitt |
<p>I've been using K8S ConfigMap and Secret to manage our properties. My design is pretty simple, that keeps properties files in a git repo and use build server such as Thoughtworks GO to automatically deploy them to be ConfigMaps or Secrets (on choice condition) to my k8s cluster.</p>
<p>Currently, I found it's not re... | James Jiang | <p>You can get YAML from the <code>kubectl create configmap</code> command and pipe it to <code>kubectl apply</code>, like this:</p>
<pre><code>kubectl create configmap foo --from-file foo.properties -o yaml --dry-run=client | kubectl apply -f -
</code></pre>
| Jordan Liggitt |
<p>Kubernetes ships with a <code>ConfigMap</code> called <code>coredns</code> that lets you specify DNS settings. I want to modify or patch a small piece of this configuration by adding:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
data:
upstreamNameservers: |
["1.1.1.1", "1.0.0.1"]
</code></pre>
<p>I know I c... | Muhammad Rehan Saeed | <p>This will apply the same patch to that single field:</p>
<pre><code>kubectl patch configmap/coredns \
-n kube-system \
--type merge \
-p '{"data":{"upstreamNameservers":"[\"1.1.1.1\", \"1.0.0.1\"]"}}'
</code></pre>
| Jordan Liggitt |
<p>I am trying to add at this <strong>--server</strong> argument three https endpoint to make it HA. Is that possible?</p>
<pre class="lang-sh prettyprint-override"><code>kubectl config set-cluster Zarsk \
--certificate-authority=ca.pem \
--embed-certs=true \
--server=https://${k8s_PUBLIC_ADDRESS}:6443 \
... | manzion_111 | <p>No, only a single connection URL is supported</p>
| Jordan Liggitt |
<p>Am trying to better understand RBAC in kubernetes. Came across this unexpected situation where authorization test using <code>kubectl auth can-i</code> and actual results are different. In short, newly created user should not be able to get pods as per this test, however this user can actually get pods.</p>
<p>Vers... | papu | <p><code>kubectl get pods</code> with no specific pod name actually does a list. See <a href="https://kubernetes.io/docs/reference/access-authn-authz/authorization/#determine-the-request-verb" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authorization/#determine-the-request-verb</a>... | Jordan Liggitt |
<p>Trying to install Elastic Stack</p>
<p>Hi I have connected to a cluster via gitlab self hosted ee.13.2.2</p>
<p>I am using gitlab and I installed the ingress, prometheus, cert manager and the runner but when I try to install Elastic stack it will not install. Does anyone know where I can look to find the correct log... | Jake | <p>Please try running it again. Helm sometimes times out rather quickly. If it's failing consistently, look inside elastic-stack namespace. See which pods are not starting inside it and what errors are you getting there.</p>
| Faheem |
<p>I can't find documentation on how to create user group on Kubernetes with <code>yaml</code> file. I'd like gather some authenticated users in group using their e-mail accounts.</p>
<p>I'd like to write in <code>yaml</code> something like :</p>
<pre><code> kind: GoupBinding
apiVersion: rbac.authorization.k8s.io/v1... | Toren | <p>Groups are determined by the configured authentication method. See <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authentication/</a> for details about how each authenticator determines the group memb... | Jordan Liggitt |
<p>I am using external nginx loadbalancer and trying to configure K8s Master but its failing with below error :</p>
<blockquote>
<p>error uploading configuration: unable to create configmap: configmaps is forbidden: User "system:anonymous" cannot create configmaps in the namespace "kube-system"**</p>
</blockquote>
... | mannam14387 | <p>If your nodes speak to the apiserver through a load balancer, and expect to use client certificate credentials to authenticate (which is typical for nodes), the load balancer must not terminate or re-encrypt TLS, or the client certificate information will be lost and the apiserver will see the request as anonymous. ... | Jordan Liggitt |
<p>is jsonPath supported in kubernetes http api ?</p>
<p>for ex; how the following translates to in http API ?</p>
<pre><code>kubectl get pods -o=jsonpath='{.items[0]}'
</code></pre>
| user19937 | <p>It's not supported by the API, you would need to evaluate that jsonpath against the API response. </p>
| Jordan Liggitt |
<p>I can't get a rolebinding right in order to get node status from an app which runs in a pod on GKE.</p>
<p>I am able to create a pod from there but not get node status. Here is the role I am creating:</p>
<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: node-reader
rules:
- api... | unludo | <p>Subresource permissions are represented as <code><resource>/<subresource></code>, so in the role, you would specify <code>resources: ["nodes","nodes/status"]</code></p>
| Jordan Liggitt |
<p>I'd like to mount volume if it exists. For example:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: mypod
image: redis
volumeMounts:
- name: foo
mountPath: "/etc/foo"
volumes:
- name: foo
secret:
sec... | nmiculinic | <p>secret and configmap volumes can be marked optional, and result in empty directories if the associated secret or configmap doesn't exist, rather than blocking pod startup</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: mypod
image: redis
volumeMounts:
... | Jordan Liggitt |
<p>In Kubernetes object metadata, there are <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata" rel="noreferrer">the concepts of <code>resourceVersion</code> and <code>generation</code></a>. I understand the notion of <code>resourceVersion</code... | Laird Nelson | <p>resourceVersion changes on every write, and is used for optimistic concurrency control</p>
<p>in some objects, generation is incremented by the server as part of persisting writes affecting the <code>spec</code> of an object.</p>
<p>some objects' <code>status</code> fields have an <code>observedGeneration</code> s... | Jordan Liggitt |
<p>I created a pod with context: </p>
<pre><code>kubectl config set-context DevDan-context \
--cluster=kubernetes \
--namespace=development \
--user=DevDan
</code></pre>
<p>I see the pod if I run <code>kubectl --context=DevDan-context get pods</code>. </p>
<p>But if I run just <code>kubectl get pods</code> I do... | E235 | <p><code>set-context</code> sets attributes of a given context</p>
<p><code>use-context</code> switches to it as the default, so that <code>get pods</code> with no --context arg uses it by default</p>
| Jordan Liggitt |
<p>I have a Kubernetes 1.10 cluster up and running. Using the following command, I create a container running bash inside the cluster:</p>
<pre><code>kubectl run tmp-shell --rm -i --tty --image centos -- /bin/bash
</code></pre>
<p>I download the correct version of kubectl inside the running container, make it executa... | Achim | <blockquote>
<p>Does this mean, that kubectl detected it is running inside a cluster and is automatically connecting to that one?</p>
</blockquote>
<p>Yes, it used the KUBERNETES_SERVICE_PORT and KUBERNETES_SERVICE_HOST envvars to locate the API server, and the credential in the auto-injected <code>/var/run/secrets/... | Jordan Liggitt |
<p>The <code>kubernetes</code> service is in the <code>default</code> namespace. I want to move it to <code>kube-system</code> namespace. So I did it as follow:</p>
<pre class="lang-yaml prettyprint-override"><code>kubectl get svc kubernetes -o yaml > temp.yaml
</code></pre>
<p>This generates <code>temp.yaml</code> ... | sope | <p>Name and namespace are immutable on objects. When you try to change the namespace, <code>replace</code> looks for the service in the new namespace in order to overwrite it. You should be able to do <code>create -f ...</code> to create the service in the new namespace</p>
| Jordan Liggitt |
<p>I have a AKS cluster in which I have deployed three Docker containers in three different namespaces. The first pod needs to check the availability of the other two pods. What I mean is that POD-1 monitors the POD-2 and POD-3. Is there any option to monitor the pod this way? Can POD-1 generate logs or alerts if any e... | june alex | <p>You can use the Kubernetes API client SDK for C# (<a href="https://github.com/kubernetes-client/csharp" rel="nofollow noreferrer">https://github.com/kubernetes-client/csharp</a>) to connect with the API Server and get the status of the desired PODS.</p>
<p>You may need to create a Service Account and assign it to yo... | Faheem |
<p>I'm creating a pod with a volumeMount set to <code>mountPropagation: Bidirectional</code>. When created, the container is mounting the volume with <code>"Propagation": "rprivate"</code>. </p>
<p>From the k8s <a href="https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation" rel="nofollow noreferrer">d... | Will | <p>this was a regression fixed in 1.10.3 in <a href="https://github.com/kubernetes/kubernetes/pull/62633" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/pull/62633</a></p>
| Jordan Liggitt |
<p>I have a k8s job setup as a helm hook for pre-install and pre-upgrade stages.</p>
<p>"helm.sh/hook": pre-install,pre-upgrade</p>
<p>Is there a way to know inside the job/pod which stage it is getting executed - whether it is pre-install or pre-upgrade ?</p>
| Dhanuj Dharmarajan | <p>You could create separate jobs/pods manifests assigning them different arguments/env variables to keep track of the hook events. I haven't seen anything in the tool itself.</p>
| Faheem |
<p>When kubelet tries to start on my Kubernetes worker nodes, I'm getting messages like this in the system log:</p>
<pre><code>May 25 19:43:57 ip-10-240-0-223 kubelet[4882]: I0525 19:43:57.627389 4882 kubelet_node_status.go:82] Attempting to register node worker-1
May 25 19:43:57 ip-10-240-0-223 kubelet[4882]: E052... | Giles Thomas | <p>The server determines the user from the CN of the certificate. Check the script that generated the certificate, it likely had an unset var when it created the CN in the form <code>CN=system:node:$NODE</code></p>
| Jordan Liggitt |
<p>I'm trying to run mongo commands through my bash script file.</p>
<p>I have sample.sh -- run with ./sample.sh</p>
<p>I want to run below command inside my sample.sh file. It is bash script.
I want to mongo commands run inside the file, not inside the shell.</p>
<pre><code>kubectl exec $mongoPodName -c mongo-mongodb ... | Hakimeh Mordadi | <p>Don't you have to run command with <code>--eval</code>?</p>
<pre class="lang-bash prettyprint-override"><code>kubectl exec $mongoPodName -c mongo-mongodb -- mongo --eval 'db.createUser({user:"admin",pwd:"123456",roles:[{role:"root",db:"admin"}]})'
</code></pre>
| Faheem |
<p>everyone</p>
<p>Recently I upgraded my k8s cluster to v1.10.3, then I rolled it back to v1.9.8, then to v1.8.12. After that I found something I can't understand.</p>
<p>I can list deployment in my default namespace:</p>
<pre><code>NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
dunk... | Kun Li | <p>In 1.10, objects in the apps API group began persisting in etcd in apps/v1 format (introduced in 1.9). </p>
<p>Rolling back to 1.9.x from 1.10.x is safe</p>
<p>If you want to roll back further to 1.8.x, you must first round trip all the apps/v1 resources (daemonsets, deployments, replicasets, statefulsets) to ensu... | Jordan Liggitt |
<p>I created a namespace <code>xxx</code>; the role for this namespace is to get pods, services, etc. I created a service account <code>yyy</code> and a role binding <code>yyy</code> to the role in namespace <code>xxx</code>.</p>
<p>When I try to check something through the API with a secret token, for example</p>
<p... | kris | <p>To allow access only in a specific namespace create a rolebinding, not a clusterrolebinding:</p>
<p><code>kubectl create rolebinding my-viewer --clusterrole=view --serviceaccount=xxx:yyy -n xxx</code></p>
| Jordan Liggitt |
<p>I am working on developing tools to interact with Kubernetes. I have OpenShift setup with the allow all authentication provider. I can log into the web console as I would expect.</p>
<p>I have also been able to setup a service account and assign a cluster role binding to the service account user. Despite this, when... | Josh A | <p><code>oadm policy add-cluster-role-to-user view em7</code> grants to the user named <code>em7</code></p>
<p>you need to grant permissions to the service account, e.g. <code>oadm policy add-cluster-role-to-user view system:serviceaccount:default:em7</code></p>
| Jordan Liggitt |
<p>I'm trying to run a deployment on a Kubernetes cluster at work through a GitLab CI/CD process (i.e. I don't control most of the configs). I'm also new to Kubernetes, so please forgive me if this is basic and obvious.</p>
<p>I have created my rolebindings:</p>
<pre><code>kubectl create rolebinding [foo] --clusterro... | Justin | <p>You are granting permissions to the default service account with the rolebinding you are creating. However, the deployment is not using that service account. If you look at the deployment manifest, it will have a serviceAccountName of bar-service-account. </p>
<p>Either change the deployment to use the default serv... | Jordan Liggitt |
<p>I am using Google Kubernetes Engine and have the Google HTTPS Load Balancer as my ingress.</p>
<p>Right now the load balancer uses Let's Encrypt certificates. However, is there a simple way to ensure that the certificates are automatically renewed prior to their 90 day expiry?</p>
| Dan | <p>You have not specified how you configured Let's Encrypt for your load balancer. Right now Google does not offer this for you, so I assume you mean you set the Let's Encrypt certificate yourself. In this case, Google can't renew your certificate.</p>
<p>Until there's an official support you can install a third-party... | ahmet alp balkan |
<p>I'm writing a shell script which needs to login into the pod and execute a series of commands in a kubernetes pod.</p>
<p>Below is my sample_script.sh:</p>
<pre><code>kubectl exec octavia-api-worker-pod-test -c octavia-api bash
unset http_proxy https_proxy
mv /usr/local/etc/octavia/octavia.conf /usr/local/etc/octavi... | ahmed meraj | <p>Are you running all these commands as a single line command? First of all, there's no <code>;</code> or <code>&&</code> between those commands. So if you paste it as a multi-line script to your terminal, likely it will get executed locally.</p>
<p>Second, to tell bash to execute something, you need: <code>b... | ahmet alp balkan |
<p>I have an OpenShift server I'm trying to work on. When I use:</p>
<p><code>oc apply -f</code> </p>
<p>My request is successfully processed. </p>
<p>However, many tools I want to use for development expect <code>kubectl</code> to be used to connect to the cluster. In most circumstances, I can use <code>kubectl</co... | Himself12794 | <p>what client and server version do you have?</p>
<p>kubectl attempts to do client-side validation when it creates/applies objects. to do this, it first downloads the openapi schema. when making requests to an older server, that endpoint may not be recognized, and may result in a "forbidden" error</p>
<p>setting <co... | Jordan Liggitt |
<p>I have quite a few failures when starting kube-apiserver in 1.10.11 K8s version.
Its health check comes back with poststarthook/rbac/bootstrap-roles failed. Very annoyingly, for security reasons, the reason is "reason withheld"
How do I know what this check is? Am I missing some permissions / bindings? I'm upgrad... | user3421490 | <p>All the details can be accessed with a super user credential or on the unsecured port (if you are running with that enabled) at <code>/healthz/<name-of-health-check></code></p>
<p>The RBAC check in particular reports unhealthy until the initial startup is completed and default roles are verified to exist. Typ... | Jordan Liggitt |
<p>I have deployed kubernetes v1.8 in my workplace. I have created roles for admin and view access to namespaces 3months ago. In the initial phase RBAC is working as per the access given to the users. Now RBAC is not happening every who has access to the cluster is having clusteradmin access. </p>
<p>Can you suggest t... | vamsi krishna | <p>Ensure the RBAC authorization mode is still being used (<code>--authorization-mode=…,RBAC</code> is part of the apiserver arguments)</p>
<p>If it is, then check for a clusterrolebinding that is granting the cluster-admin role to all authenticated users:</p>
<p><code>kubectl get clusterrolebindings -o yaml | grep -... | Jordan Liggitt |
<p>I'd like to see the 'config' details as shown by the command of:</p>
<pre><code>kubectl config view
</code></pre>
<p>However this shows the entire config details of all contexts, how can I filter it (or perhaps there is another command), to view the config details of the CURRENT context?</p>
| Chris Stryczynski | <p><code>kubectl config view --minify</code> displays only the current context</p>
| Jordan Liggitt |
<p>I am following the instructions as given <a href="https://kubernetes.io/docs/getting-started-guides/gce/" rel="nofollow noreferrer">here</a>.</p>
<p>I used the following command to get a running cluster, in gcloud console I typed: <code>curl -sS https://get.k8s.io | bash</code> as described in the link, after that,... | Akash | <p>Is there a reason why you did not use GKE (Google Kubernetes Engine) which provides the dashboard add-on installed out of the box?</p>
<p>In your case, simply:</p>
<ul>
<li>the kubernetes-dashboard addon might not be installed (but logs say so, so I think this is not the problem)</li>
<li>network configuration tha... | ahmet alp balkan |
<p>I'm encountering a situation where pods are occasionally getting evicted after running out of memory. Is there any way to set up some kind of alerting where I can be notified when this happens?</p>
<p>As it is, Kubernetes keeps doing its job and re-creating pods after the old ones are removed, and it's often hours... | Ameo | <p>GKE exports Kubernetes Events (<code>kubectl get events</code>) to Stackdriver Logging, to the "GKE Cluster Operations" table:
<a href="https://i.stack.imgur.com/SsvHR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SsvHR.png" alt=""></a></p>
<p>Next, write a query specifically targeting evictions (the qu... | ahmet alp balkan |
<p>What is the difference between Objects and Resouces in Kubernetes world? </p>
<p>I couldn't find it from <a href="https://kubernetes.io/docs/concepts/" rel="noreferrer">https://kubernetes.io/docs/concepts/</a> . I wonder they make no distinction about them but seems they see objects as a high-level concept of resou... | Ryota Hashimoto | <p>A representation of a specific group+version+kind is an object. For example, a v1 Pod, or an apps/v1 Deployment. Those definitions can exist in manifest files, or be obtained from the apiserver.</p>
<p>A specific URL used to obtain the object is a resource. For example, a list of v1 Pod objects can be obtained from... | Jordan Liggitt |
<p>I'm trying to automatically provision a loadbalancer on GCP by using the <code>ingress</code> object with our GKE cluster.</p>
<p>I have three GKE deployments and each is available with a service on port <code>8080</code> with a unique nodePort. </p>
<p>When using <code>ingress-fanout.yaml</code>, it creates 4 bac... | Mike | <p>First of all, "backends" have nothing to do with the "paths" you specified. "backends" on GCP Console are pointing to your GKE node pools.</p>
<p>Ingress supports adding a default backend. You could have tried just searching for "ingress default backend". You can find documentation about this here: <a href="https:/... | ahmet alp balkan |
<p>I started working on kubernetes. I already worked with single container pods. Now i want to working on multiple container pod. i read the statement like </p>
<blockquote>
<p>if an application needs several containers running on the same host, why not just make a single container with everything you need?</p>
</bl... | BSG | <p>This is called "multiple processes per container".
<a href="https://docs.docker.com/config/containers/multi-service_container/" rel="nofollow noreferrer">https://docs.docker.com/config/containers/multi-service_container/</a></p>
<p>t's discussed on the internet many times and it has many gotchas. Basically there's... | ahmet alp balkan |
<p>I'm kind of a newbie at using GCP/Kubernetes. I want to deploy both a GRPC service and a client to GCP. </p>
<p>I have read a lot about it and have tried several things. There's something on cloud endpoints where you compile your proto file and do an api.config.yaml. (<a href="https://cloud.google.com/endpoints/doc... | Chidi Williams | <p>To deploy a grpc application to GKE/Kubernetes:</p>
<ol>
<li>Learn about gRPC, follow one of the quickstarts at <a href="https://grpc.io/docs/quickstart/" rel="noreferrer">https://grpc.io/docs/quickstart/</a></li>
<li>Learn about how to build Docker images for your application.
<ul>
<li>Follow this Docker tutorial... | ahmet alp balkan |
<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... | kosta | <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>
... | ahmet alp balkan |
<p>I run the kube-apiserver with my self-signed certificate:</p>
<pre><code>/opt/bin/kube-apiserver \
--etcd_servers=http://master:2379,http://slave1:2379,http://slave2:2379 \
--logtostderr=false \
--v=4 \
--client-ca-file=/home/kubernetes/ssl/ca.crt \
--service-cluster-ip-range=192.168.3.0/24 \
--tls-cert-file=/home/... | Sun Gengze | <p>TL;DR. You can comment out "certificate-authority-data:" key to get it working.</p>
<hr />
<p>More info</p>
<p>There is an open issue (<a href="https://github.com/kubernetes/kubernetes/issues/13830" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/13830</a>) with the behavior of t... | Jordan Liggitt |
<p>I have a server running on Kubernetes to handle hourly processing jobs. Thinking of using a service to expose the pods, and using an (external) cron job to hit the load balancer so that kubernetes can autoscale to handle the higher load as required. However in implementation, if the cron job sends, say, 100 requests... | jlyh | <p>If you're looking for serverless-style instant scale-up, something like <a href="https://github.com/knative/" rel="nofollow noreferrer">https://github.com/knative/</a> might be something you can use on top of Kubernetes/GKE.</p>
<p>Other than that, the only way to scale up pods on Kubernetes today is the Horizontal... | ahmet alp balkan |
<p>I would like to disable the logging of the health checks produced by my Ingress, on my pods.</p>
<p>I have a GCE ingress, distributing two pods, and I would like to clear up the logs i get from them.</p>
<p>Do you have any idea ?</p>
<p>Thanks,</p>
| Simon Lacoste | <p>(It's not clear what do you mean by disabling logs. So I'll make an assumption.)</p>
<p>If your application is logging something when it gets a request, you can check the user agent of the request to disable requests from Google Load Balancer health checking.</p>
<p>When you provision a GCE ingress, your app will ... | ahmet alp balkan |
<p>I'm running a Google Kubernetes Engine with the "private-cluster" option.
I've also defined "authorized Master Network" to be able to remotely access the environment - this works just fine.
Now I want to setup some kind of CI/CD pipeline using Google Cloud Build -
after successfully building a new docker image, thi... | Mizaru | <p>It's <strong>currently</strong> not possible to add Cloud Build machines to a VPC. Similarly, Cloud Build does not announce IP ranges of the build machines. So you can't do this today without creating a "ssh bastion instance" or a "proxy instance" on GCE within that VPC.</p>
<p>I suspect this would change soon. GCB... | ahmet alp balkan |
<p>I'd like to ask if is there possibility to create shared quota for few namespaces, e.g. for team</p>
<p>Scenario:</p>
<pre><code>cluster:
100c
100gb ram
</code></pre>
<pre><code>quota for TEAM A 40c/40gb
quota for TEAM B 60c/60gb
</code></pre>
<p>Some namespaces from TEAM An e.g.</p>
<pre><code>teama-dev
teama-... | lukasz | <p>That is not possible in Kubernetes today.</p>
<p>OpenShift supports quota across multiple namespaces via <a href="https://docs.openshift.com/container-platform/3.3/admin_guide/multiproject_quota.html" rel="nofollow noreferrer">ClusterResourceQuota</a>, and it is possible something like that might make it into Kuber... | Jordan Liggitt |
<p>I have configured 1.8 cluster 1 master, 2 nodes using kuebadm. When I shutdown and restart the nodes kubelet is not starting, its compiling about the certificate. Same steps worked older version of Kubernetes.</p>
<pre><code>Oct 2 22:02:32 k8sn-01 kubelet: I1002 22:02:32.854542 2795 client.go:75] Connecting to ... | sfgroups | <p>This is due to <a href="https://github.com/kubernetes/kubernetes/issues/53288" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/53288</a></p>
<p>For kubeadm, this issue was just resolved with a config change in an updated package (rpm 1.8.0-1, deb 1.8.0-01)</p>
<p>If you already have a nod... | Jordan Liggitt |
<p>I am following along <a href="https://bani.com.br/2018/09/istio-sidecar-injection-enabling-automatic-injection-adding-exceptions-and-debugging/" rel="nofollow noreferrer">this article</a> and try this on GKE. After adding the argument <code>- --log_output_level=default:debug</code> the change seems accepted as I get... | musicformellons | <p>Depends on how installed Istio on GKE. There are multiple ways to install Istio from GKE.</p>
<p>If you're installing from <a href="http://cloud.google.com/istio" rel="nofollow noreferrer">http://cloud.google.com/istio</a> which installs a Google-managed version of istio to your cluster, editing like <code>kubectl... | ahmet alp balkan |
<p>I'm running a simple spring microservice project with Minikube. I have two projects: lucky-word-client (on port 8080) and lucky-word-server (on port 8888). lucky-word-client has to communicate with lucky-word-server. I want to inject the static Nodeport of lucky-word-server (<a href="http://192" rel="nofollow norefe... | Danny | <p>Kubernetes automatically injects services as environment variables. <a href="https://kubernetes.io/docs/concepts/services-networking/service/#environment-variables" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#environment-variables</a></p>
<p><strong>But you should not u... | ahmet alp balkan |
<p>We have a kubernetes cluster (v1.10.2) that behaves very strange when we set to <strong>false</strong> the <strong>"anonymous-auth"</strong> flag.
We use the flannel network plugin and the logs in the flannel docker related to this issue are the following:</p>
<pre><code>E0515 09:59:13.396856 1 streamwatcher.... | Adi Fatol | <p>are you running the apiserver as a static pod? does it have a liveness check defined to call the /healthz endpoint? if so, that is likely run as an anonymous user and is failing when anonymous requests are disabled, causing the apiserver pod to be restarted</p>
| Jordan Liggitt |
<p>I cannot find a way to remove GPU (accelerator resource) from Google Kubernetes Engine (GKE) cluster. There is no official documentation on how to make change to it. Can you suggest a proper way to do so? The UI is gray out and it cannot allow me to make change from the console. </p>
<p>Here is the screenshot when ... | Fony Lew | <p>You cannot edit settings of a Node Pool once it is created.</p>
<p>You should create a new node pool with the settings you want (GPU, machine type etc) and delete the old node pool.</p>
<p>There's a tutorial on how to migrate to a new node pool smoothly here: <a href="https://cloud.google.com/kubernetes-engine/doc... | ahmet alp balkan |
<p>I was learning Kubernetes authentication, and authorization using RBAC.
Now a question always puzzling me, How exactly the users in Kubeconfig file(eg /home/.kube/config) differ from the users of basic-auth-file in kube-apiserver startup command? </p>
<p>I have gone through the offical documents, and there seems no... | Jepsenwan | <p>A kubeconfig file contains three types of stanzas: clusters, users, and contexts.</p>
<ol>
<li><p>A cluster stanza describes how kubectl should reach a particular cluster. It has the URL and optionally a CA bundle to use to verify a secure connection.</p></li>
<li><p>A user stanza describes credentials kubectl shou... | Jordan Liggitt |
<p>I'm setting up a k8s cluster on GKE. A wildcard DNS <code>*.server.com</code> will point to a Ingress controller. Internally to the cluster, there will be webserver pods, each exposing a unique service. The Ingress controller will use the server name to route to the various services. </p>
<p>Servers will be crea... | Laizer | <p>It appears like you're planning to host multiple domain names on a single Load Balancer (==single <code>Ingress</code> resource). If not, this answer doesn't apply.</p>
<p>You can do this by configuring <code>Ingress</code> with a long list of domain names like:</p>
<pre><code>spec:
rules:
- host: cats.server.... | ahmet alp balkan |
<p>Bellow is the how I watch kubernetes to get deployments status(include added\modified\delete ......)</p>
<pre><code>[boomer@bzha kubernetes]$ curl http://10.110.200.24:8080/apis/extensions/v1beta1/watch/namespaces/kube-system/deployments
{"type":"ADDED","object":{"kind":"Deployment","apiVersion":"extensions/v1beta1... | zhashuyu | <p>Yes, watching without a resourceVersion specified first sends ADDED events for all existing objects.</p>
<p>It is more common to perform a list operation first to obtain all existing objects, then start a watch passing the resourceVersion from the returned list result to watch for changes from that point. </p>
| Jordan Liggitt |
<p>I want to execute equivalent of</p>
<p><code>kubectl get all -l app=myapp -n mynamespace</code></p>
<p>or</p>
<p><code>kubectl label all -l version=1.2.0,app=myapp track=stable --overwrite</code></p>
<p>using client-go</p>
<p>I looked at <a href="https://github.com/kubernetes/client-go/blob/master/dynamic" rel=... | Kseniia Churiumova | <p>You can't list "all objects" with one call.</p>
<p>Unfortunately the way Kubernetes API is architected is via API groups, which have multiple APIs under them.</p>
<p>So you need to:</p>
<ol>
<li>Query all API groups (<code>apiGroup</code>)</li>
<li>Visit each API group to see what APIs (<code>kind</code>) ... | ahmet alp balkan |
<p>While the <a href="https://github.com/kubernetes/client-go/blob/master/examples/out-of-cluster-client-configuration/main.go" rel="nofollow noreferrer">kubernetes golang api example for out-of-cluster authentication works fine</a>, and <a href="https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708" rel="no... | SteveCoffman | <p>The <code>rest.Config</code> struct passed to the <code>NewFromConfig</code> client constructors lets you specify bearer tokens and/or client certificate/key data directly. </p>
| Jordan Liggitt |
<p>I've updated the SSL certificate for my Kubernetes Ingress services, but I don't know how to restart the instances to use the updated cert secret without manually deleting and restarting the Ingress instances. That isn't ideal because of the number of ingresses that are making use of that specific cert (all sitting ... | moberemk | <p>You shouldn't need to delete the Ingress object to use the updated TLS Secret.</p>
<p>GKE Ingress controller (<a href="https://github.com/kubernetes/ingress-gce" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-gce</a>) automatically picks up the updated Secret resource and updates it. (Open an issue ... | ahmet alp balkan |
<p>I've already manage to have max one pod with containerized application per node. Now I want to create Kubernetes cluster in which each user will have access to one, personal node. As a result I want to have architecture where each user will work in isolated environment. I was thinking about some LoadBalancing with I... | N0va | <p>Kubernetes in general is not a fit for you.</p>
<p>If you're trying to do "max 1 per pod node" or "a node for every user", you should not force yourself to use Kubernetes, maybe what you're looking for is just virtual machines.</p>
| ahmet alp balkan |
<p>I'm running jobs on EKS. After trying to start a job with invalid yaml, it doesn't seem to let go of the bad yaml and keeps giving me the same error message even after correcting the file.</p>
<ol>
<li>I successfully ran a job.</li>
<li>I added an environment variable with a boolean value in the <code>env</code> se... | jstim | <p>"yes" must be quoted in yaml or it gets treated as a keyword that means a boolean true</p>
<p>Try this:</p>
<pre><code>value: "yes"
</code></pre>
| Jordan Liggitt |
<p>For a deployed Kubernetes CronJob named <code>foo</code>, how can I manually run it immediately? This would be for testing or manual runs outside its configured schedule.</p>
| Dan Tanner | <p>You can start a job based on an existing job's configuration, and a cronjob is just another type of job. </p>
<p>Syntax:<br>
<code>kubectl create job --from=cronjob/$CronJobName $NameToGiveThePodThatWillBeCreated</code> </p>
<p>e.g.:<br>
<code>kubectl create job --from=cronjob/foo foo-manual-1</code></p>
| Dan Tanner |
<p>I set <code>concurrencyPolicy</code> to <code>Allow</code>, here is my <code>cronjob.yaml</code>:</p>
<pre><code>apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: gke-cron-job
spec:
schedule: '*/1 * * * *'
startingDeadlineSeconds: 10
concurrencyPolicy: Allow
successfulJobsHistoryLimit: 3
failedJob... | Lin Du | <p>It's because you're reading the wrong documentation. CronJobs aren't a GKE-specific feature. For the full documentation on CronJob API, refer to the Kubernetes documentation: <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#concurrency-policy" rel="nofollow noreferrer">https://kubernetes... | ahmet alp balkan |
<p>Hello StackOverflow users,</p>
<p>I've started working in the Kubernetes space recently and saw that <a href="https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/" rel="noreferrer">Custom Resource Definitions(CRDs) types are not namespaced and are available to to all ... | awgreene | <p>See <a href="https://github.com/kubernetes/kubernetes/issues/65551#issuecomment-400909534" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/65551#issuecomment-400909534</a> for a discussion of this issue.</p>
<p>A particular CRD can define a custom resource that is namespaced or cluster-wide, but th... | Jordan Liggitt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.