Kubrenetes-Pod

Table of Contents pod related concepts Pod basic concepts Pods can be used in the following two ways in the Kubrenes cluster: The pause container causes all containers in the Pod to share two resources The pause container in kubernetes mainly provides the following functions for each container What is the purpose of Kubernetes designing […]

The process of k8s pod obtaining IP address

As you learn the Kubernetes network model, it’s important to understand what the various network components do and how they interact. This article introduces how various network components interact in a Kubernetes cluster and how to help each Pod obtain an IP address. One of the core requirements of the Kubernetes networking model is that […]

Kubernetes pod management

Table of Contents 1. Application deployment 2. Write yaml file 3. init container 4. Probe 1. Survival probe 2. Readiness probe 1. Application deployment Download test image docker pull yakexi007/myapp:v1 docker pull yakexi007/myapp:v2 docker tag yakexi007/myapp:v1 reg.westos.org/library/myapp:v1 docker tag yakexi007/myapp:v2 reg.westos.org/library/myapp:v2 docker push reg.westos.org/library/myapp:v1 docker push reg.westos.org/library/myapp:v2 Create autonomous pods (not recommended for production) kubectl […]

[K8S] External access request principle process (relationship between service, kube-proxy, pod)

Article directory Simple process 1. Ingress 2. Service 1. Key concepts 2.Service types and use cases: 1)ClusterIP: 2) NodePort 3) LoadBalancer 3. Kube-proxy 1 Introduction 2. Introduction to the three agency modes 1) userspace mode: 2) IPtables mode: 3) ipvs mode: 4. The relationship between service, kube-proxy and pod Simple process The user initiates a […]

How to install mongodb-7.0 as systemd service with podman

How to install mongodb-7.0 as systemd service with podman 1. Installation 1.1. Create volume 1.2. Configuration file 1.3. Create a container 1.4. Service management 1.5. Container management 2. Client management 1. Installation 1.1. Create volume Configure volumes podman volume create –label type=mongo-7.0 –label env=dev mongo-7.0-conf data volume podman volume create –label type=mongo-7.0 –label env=dev mongo-7.0-data […]

How to view the logs before Pod crash in K8s

Scene When the pod is in the crash state, the container keeps restarting. At this time, using kubelet logs may never capture the logs. Solution: kubectl previous Parameter function: If true, print the logs for the previous instance of the container in a pod if it exists. Single container pod: kubectl logs pod-name –previous Multi-container […]

Why does every Kubernetes Pod need a Pause container?

Follow the “Wonderful World of Linux” on the public account Set it as a “star” and let you play Linux every day! Introduction The error reported by Kubernetes is as follows: Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image “k8s.gcr.io/pause:3.5”: failed to pull image “k8s.gcr.io/pause: 3.5”: […]

How to gracefully restart kubernetes Pods

I have been upgrading the service grid Istio recently. After the upgrade, a necessary process is to restart all the Pods on the data plane, that is, the business Pods, so that the sidecars of these Pods can be updated to the new version. Option 1 Because we have a large number of Pods in […]

Teach you how to view the logs before the Pod crashes

1. Scene When the pod is in crash state, the container keeps restarting. At this time, the logs may not be captured using kubelet logs. 2. Solution kubelet previous parameter function: If true, print the logs for the previous instance of the container in a pod if it exists. Single container Pod: kubectl logs pod-name […]