Kubernetes

Taint eks node-group

独自空忆成欢 提交于 2021-02-18 17:51:40
问题 I have a cluster with 2 node groups: real time and general . I would like only pods which tolerate affinity real time to be able to run on nodes from the real time cluster. My approach was to taint the relevant nodes and add toleration to the pod that I want to register to that node. I came into a dead-end when I was trying to taint a node-group. In my case I have an EKS node group that is elastic, i.e. nodes are increasing and decreasing in numbers constantly. How can I configure the group

Helm 安装 nginx-ingress 的方法

陌路散爱 提交于 2021-02-18 17:02:33
还是没学会 今天继续研究. Using Helm NGINX Ingress controller can be installed via Helm using the chart stable/nginx from the official charts repository. To install the chart with the release name my-nginx : helm install stable/nginx-ingress --name my-nginx If the kubernetes cluster has RBAC enabled, then run: helm install stable/nginx-ingress --name my-nginx -- set rbac.create= true 好像不管用呢... 试过了 不太行 貌似. 来源: oschina 链接: https://my.oschina.net/u/4316097/blog/3863962

Kubernetes Pod 驱逐详解

笑着哭i 提交于 2021-02-18 16:09:48
本文分享自微信公众号 - 晋级CTO(up_cto)。 如有侵权,请联系 support@oschina.cn 删除。 本文参与“ OSC源创计划 ”,欢迎正在阅读的你也加入,一起分享。 来源: oschina 链接: https://my.oschina.net/u/1178435/blog/4455857

Docker build inside kubernetes pod fails with “could not find bridge docker0”

筅森魡賤 提交于 2021-02-18 13:53:43
问题 I moved our build agents into Kubernetes / Container Engine. They used to run on container vm (version container-vm-v20160321) and mount docker.sock into the docker container so we can run docker build from inside the container. This used the following manifest: apiVersion: v1 kind: Pod metadata: name: gocd-agent spec: containers: - name: gocd-agent image: travix/gocd-agent:16.8.0 imagePullPolicy: Always volumeMounts: - name: ssh-keys mountPath: /var/go/.ssh readOnly: true - name: gcloud-keys

K8s使用NFS持久卷配置

孤人 提交于 2021-02-18 12:55:34
nfs服务部署 参照网上文档操作,太简单,这里不提。 创建storageclass kind: StorageClass metadata: name: slow namespace: ns1 provisioner: kubernetes.io/no-provisioner volumeBindingMode: Immediate 创建持久卷 apiVersion: v1 kind: PersistentVolume metadata: name: vulfiles namespace: ns1 labels: name: vulfiles spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes: - ReadOnlyMany persistentVolumeReclaimPolicy: Recycle storageClassName: slow mountOptions: - hard - nfsvers=4.1 nfs: path: /opt/data server: 192.168.199.150 申请使用持久卷部分空间 apiVersion: v1 kind: PersistentVolumeClaim metadata: name: vulpvc namespace: ns1 spec:

Kubernetes error: Unable to connect to the server: dial tcp 127.0.0.1:8080

ぃ、小莉子 提交于 2021-02-18 11:45:15
问题 I'm seeing the following error when running kubectl get pods : Unable to connect to the server: dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refused it. This was working when I ran it two weeks ago. My config file in the ~/.kube/config directory looks as follows: apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: https://zld05687.vci.co.com name: dev-cluster - cluster: insecure-skip-tls-verify: true server: https:/

Kubernetes nginx ingress rabbitmq management and kibana

纵饮孤独 提交于 2021-02-18 11:28:12
问题 On my AKS cluster I have a Nginx ingress controller that I used to reverse proxy my kibana service running on the AKS. I want to however add another http services through the ingress, rabbitmq management console. I'm unable to get both to work with the following configuration: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-aegis namespace: dev annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubernetes.io

Whats the difference between “Pods” and “Static Pods” in kubernetes and when to choose “static pods” over regular pods

北战南征 提交于 2021-02-18 11:24:51
问题 New to kubernetes and looking to understand the best practice around using different kubernetes objects and have difficulty understanding what is a major difference between "Pods" and "Static Pods" functionally if there is any ? Major questions as below : Question 1: What is a major difference between "Pods" and "Static Pods" functionally if there is any ? Question 2: When to choose "static pods" over regular pods. 回答1: Static pods are pods created and managed by kubelet daemon on a specific

Determine what resource was not found from “Error from server (NotFound): the server could not find the requested resource”

淺唱寂寞╮ 提交于 2021-02-18 10:36:06
问题 I'm running kubectl create -f notRelevantToThisQuestion.yml The response I get is: Error from server (NotFound): the server could not find the requested resource Is there any way to determine which resource was requested that was not found? kubectl get ns returns NAME STATUS AGE default Active 243d kube-public Active 243d kube-system Active 243d This is not a cron job. Client version 1.9 Server version 1.6 This is very similar to https://devops.stackexchange.com/questions/2956/how-do-i-get

Is it possible to rewrite HOST header in k8s Ingress Controller?

我只是一个虾纸丫 提交于 2021-02-18 10:20:41
问题 Due to some legacy application that relies on Host header to function correctly, I need to have an Ingress (proxy, etc) that capable of rewrite Host header and pass that to downstream (backend). Is there any Ingress Controller that supports this functionality? Example: End user access our website through foo.com/a for backend a and foo.com/b for backend b . But since a and b are legacy app, it only accept: a accepts connection when Host: a.foo.com b accepts connection when Host: b.foo.com 回答1