Kubernetes

How to set kube-proxy settings using kubectl on AKS

你离开我真会死。 提交于 2021-02-20 19:08:01
问题 I keep reading documentation that gives parameters for kube-proxy, but does not explain how where these parameters are supposed to be used. I create my cluster using az aks create with the azure-cli program, then I get credentials and use kubectl. So far everything I've done has involved yaml for services and deployments and such, but I can't figure out where all this kube-proxy stuff fits into all of this. I've googled for days. I've opened question issues on github with AKS. I've asked on

How to set kube-proxy settings using kubectl on AKS

孤街浪徒 提交于 2021-02-20 19:05:21
问题 I keep reading documentation that gives parameters for kube-proxy, but does not explain how where these parameters are supposed to be used. I create my cluster using az aks create with the azure-cli program, then I get credentials and use kubectl. So far everything I've done has involved yaml for services and deployments and such, but I can't figure out where all this kube-proxy stuff fits into all of this. I've googled for days. I've opened question issues on github with AKS. I've asked on

Helm 安装Nginx Ingress

天涯浪子 提交于 2021-02-20 13:50:53
为了便于将集群中的服务暴露到集群外部,需要使用Ingress。接下来使用Helm将Nginx Ingress部署到Kubernetes上。 Nginx Ingress Controller被部署在Kubernetes的边缘节点上。 这里将 master 作为边缘节点,打上 label [root@master /]# kubectl label node master node-role.kubernetes.io/edge= node/master labeled [root@master /]# kubectl get nodes NAME STATUS ROLES AGE VERSION master Ready edge,master 4d3h v1.15.1 slaver1 Ready <none> 4d2h v1.15.1 slaver2 Ready <none> 4d2h v1.15.1 安装 使用 yaml 配置文件安装 stable/nginx-ingress chart的值文件ingress-nginx.yaml如下: controller: replicaCount: 1 hostNetwork: true nodeSelector: node-role.kubernetes.io/edge: '' affinity: podAntiAffinity:

Session Affinity Settings for multiple Pods exposed by a single service

感情迁移 提交于 2021-02-20 11:50:48
问题 I have a setup Metallb as LB with Nginx Ingress installed on K8S cluster. I have read about session affinity and its significance but so far I do not have a clear picture. How can I create a single service exposing multiple pods of the same application? After creating the single service entry point, how to map the specific client IP to Pod abstracted by the service? Is there any blog explaining this concept in terms of how the mapping between Client IP and POD is done in kubernetes? But I do

备份Kubernetes的5个最佳实践

左心房为你撑大大i 提交于 2021-02-20 10:47:22
备份应用程序和数据是组织经常需要处理的事情。尽管Kubernetes可以确保应用程序服务的高可用性和可伸缩性,但这些好处并不能有效地保护数据。因此,必须对Kubernetes应用程序进行数据管理和备份,并应将其纳入标准操作流程中。 但是,备份Kubernetes应用程序需要一种独特的方法,该方法与传统的备份解决方案大不相同。使用Kubernetes,经常会将应用程序部署在集群中跨节点的多个容器中,要备份应用程序以及数据和存储量,你需要考虑所有各种Kubernetes对象和配置数据,还必须适应应用程序快速的开发和部署周期,DevOps的“左移(shift-left)”理念,数据保护,安全要求等。 鉴于这些独特的要求,备份Kubernetes似乎是一项艰巨的任务,但是你可以采取一些步骤来简化该过程。以下是五个最佳做法: 1.考虑Kubernetes架构 一个典型的Kubernetes应用程序由数百个组件组成-Pod,服务(service),证书,密钥(secret)等等。任何Kubernetes备份解决方案不仅要能够备份和还原数据,而且还要能够备份和还原所有这些组件。至关重要的是,备份解决方案要通过API自动与Kubernetes控制平面进行交互,以便不仅能够发现集群上运行的Kubernetes应用,而且还可以与基础计算,网络和存储基础架构集成。 存储也是一个重要的考虑因素

How do I see a list of all minikube clusters running in Docker on my mac?

邮差的信 提交于 2021-02-20 08:34:51
问题 I run a Kubernetes cluster on my mac using the latest Docker community edition. I usually do: $ minikube start --vm-driver=hyperkit and it works well for me. Today, I ran that command multiple times in a script. Now, how do I know how many minikube VMs are running on a mac? How do I delete all but one of them? Can I see a list of all minikube vms running? $ minikube status shows: minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 192.168.64.3 Is

How do I see a list of all minikube clusters running in Docker on my mac?

巧了我就是萌 提交于 2021-02-20 08:32:22
问题 I run a Kubernetes cluster on my mac using the latest Docker community edition. I usually do: $ minikube start --vm-driver=hyperkit and it works well for me. Today, I ran that command multiple times in a script. Now, how do I know how many minikube VMs are running on a mac? How do I delete all but one of them? Can I see a list of all minikube vms running? $ minikube status shows: minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 192.168.64.3 Is

Volume is already attached by pod

那年仲夏 提交于 2021-02-20 04:50:31
问题 I install kubernetes on ubuntu on baremetal. I deploy 1 master and 3 worker. and then deploy rook and every thing work fine.but when i want to deploy a wordpress on it ,it stuck in container creating and then i delete wordpress and now i got this error Volume is already attached by pod default/wordpress-mysql-b78774f44-gvr58. Status Running #kubectl describe pods wordpress-mysql-b78774f44-bjc2c Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 3m21s default

2 minutes for ZMQ pub/sub to connect in kubernetes

試著忘記壹切 提交于 2021-02-20 04:49:49
问题 I have a Kubernetes 1.18 cluster using weave as my CNI. I have a ZMQ based pub/sub app and I am often (not always) seeing it take 2 minutes before the subscriber can receive messages from the publisher. This seems to be some sort of socket timeout uniqe to my Kubernetes environment. Here is my trivial ZMQ app example #!/bin/env python2 import zmq, sys, time, argparse, logging, datetime, threading from zmq.utils.monitor import recv_monitor_message FORMAT = '%(asctime)-15s %(message)s' logging

人人都是 API 设计者:我对 RESTful API、GraphQL、RPC API 的思考

旧街凉风 提交于 2021-02-20 01:09:36
点击上方 IT牧场 ,选择 置顶或者星标 技术干货每日送达! >>>技术讨论群<<< 梁桂钊 | 作者 有一段时间没怎么写文章了,今天提笔写一篇自己对 API 设计的思考。首先,为什么写这个话题呢?其一,我阅读了《阿里研究员谷朴:API 设计最佳实践的思考》一文后受益良多,前两天并转载了这篇文章也引发了广大读者的兴趣,我觉得我应该把我自己的思考整理成文与大家一起分享与碰撞。其二,我觉得我针对这个话题,可以半个小时之内搞定,争取在 1 点前关灯睡觉,哈哈。 现在,我们来一起探讨 API 的设计之道。我会抛出几个观点,欢迎探讨。 一、定义好的规范,已经成功了一大半 通常情况下,规范就是大家约定俗成的标准,如果大家都遵守这套标准,那么自然沟通成本大大降低。例如,大家都希望从阿里的规范上面学习,在自己的业务中也定义几个领域模型:VO、BO、DO、DTO。其中,DO(Data Object)与数据库表结构一一对应,通过 DAO 层向上传输数据源对象。而 DTO(Data Transfer Object)是远程调用对象,它是 RPC 服务提供的领域模型。对于 BO(Business Object),它是业务逻辑层封装业务逻辑的对象,一般情况下,它是聚合了多个数据源的复合对象。那么,VO(View Object) 通常是请求处理层传输的对象,它通过 Spring 框架的转换后,往往是一个