kubernetes-pod

Multi-Cluster Kubernetes - cross cluster communication

北慕城南 提交于 2021-01-29 09:24:27
问题 Not sure if this is the right place, please point me to a different forum if not. In a multi-cluster kubernetes setup, is cross-cluster communication a valid design? In particular, a pod in one cluster relying on a pod in another cluster. Or are there limitations or anti-patterns associated with this that we should avoid? If not, what tools do you use to manage this deployment and monitor load on each cluster? 回答1: Multicluster deployments give you a greater degree of isolation and

configmap change doesn't reflect automatically on respective pods

非 Y 不嫁゛ 提交于 2021-01-29 07:50:01
问题 apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1 kind: Deployment metadata: name: consoleservice1 spec: selector: matchLabels: app: consoleservice1 replicas: 3 # tells deployment to run 3 pods matching the template strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 minReadySeconds: 5 template: # create pods using pod definition in this template metadata: labels: app: consoleservice1 spec: containers: - name: consoleservice image: chintamani/insightvu:ms

Kubernetes PodAffinity not able to deploy pods

折月煮酒 提交于 2021-01-07 06:57:10
问题 So I have this problem, and try to implement podAffinity to solve it. I have 3 nodes and want to deploy 2 pods on the same node. In the Deployment YAML files I have service:git under metadata.labels , and the following is the affinity setting: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: service operator: In values: - git topologyKey: kubernetes.io/hostname But the pods failed to deploy, I got the following error: 0/3 nodes

Load distribution: All HTTP requests are getting redirected to a single pod in a k8 cluster

荒凉一梦 提交于 2020-12-15 06:40:14
问题 I have created a very simple spring boot application with only one REST service. This app is converted into a docker image ("springdockerimage:1") and deployed in the Kubernetes cluster with 3 replicas. Contents of my "Deployment" definition is as follows: apiVersion: apps/v1 kind: Deployment metadata: name: springapp labels: app: distributiondemo spec: selector: matchLabels: app: distributiondemo replicas: 3 template: metadata: labels: app: distributiondemo spec: containers: - name: spring

Does Kubernetes POD have namespace and cgroup associated with it?

时光怂恿深爱的人放手 提交于 2020-12-15 03:51:38
问题 Docker Containers have cgroups and namespaces associated with them, whether they are running in a pod or vm or host machine. Similarly, does a Kubernetes Pod's have namespaces and cgroups associated with them, or it's just the containers within the pod have these(cgroup & namespace) associations. If they do, how can I find this info from the host? 回答1: group of whales is called a pod. Consider a pod of two humpback whales. One whale is grey in color and other is blue. What is the color of the

Updated configMap.yaml but it's not being applied to Kubernetes pods

泄露秘密 提交于 2020-12-13 16:14:19
问题 I'm editing configMap.yaml in my Helm chart, but when I log in to one of my pods to check if it's being applied, it doesn't reflect my changes. I'm fairly new to Helm charts so any help is appreciated. 回答1: For updating your ConfigMap you can also use kubectl patch command if you find it more fitting for you. Documentation regarding it can be found here. For applying the changes there is a very useful tool called Reloader. Reloader can watch changes in ConfigMap and Secret and do rolling

Updated configMap.yaml but it's not being applied to Kubernetes pods

吃可爱长大的小学妹 提交于 2020-12-13 16:05:53
问题 I'm editing configMap.yaml in my Helm chart, but when I log in to one of my pods to check if it's being applied, it doesn't reflect my changes. I'm fairly new to Helm charts so any help is appreciated. 回答1: For updating your ConfigMap you can also use kubectl patch command if you find it more fitting for you. Documentation regarding it can be found here. For applying the changes there is a very useful tool called Reloader. Reloader can watch changes in ConfigMap and Secret and do rolling

Difference between Container port and targetport in Kubernetes?

末鹿安然 提交于 2020-12-13 07:21:05
问题 How is container port different from targetports in a container in Kubernetes? Are they used interchangeably, if so why? I came across the below code snippet where containerPort is used to denote the port on a pod in Kubernetes. apiVersion: apps/v1 kind: Deployment metadata: name: postgres-deployment labels: app: demo-voting-app spec: replicas: 1 selector: matchLabels: name: postgres-pod app: demo-voting-app template: metadata: name: postgres-pod labels: name: postgres-pod app: demo-voting

how to stop/pause a pod in kubernetes

隐身守侯 提交于 2020-11-30 04:15:30
问题 I have a MySQL pod running in my cluster. I need to temporarily pause the pod from working without deleting it, something similar to docker where the docker stop container-id cmd will stop the container not delete the container. Are there any commands available in kubernetes to pause/stop a pod? 回答1: So, like others have pointed out, Kubernetes doesn't support stop/pause of current state of pod and resume when needed. However, you can still achieve it by having no working deployments which is