In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Pod features k8s minimum snap-in A collection of containers a container sharing network command space in Pod Pod is a short-lived Pod container classification
1.infrastructure container basic container (maintains the entire Pod cyberspace)
Node node operation # View the container's network cat / opt/kubernetes/cfg/kubelet# is created every time the Pod is created. Corresponding to the Pod, it is transparent to the user, and the network component is automatically loaded as a component and provided to the docker ps.
2.initcontainers initializes the container
When pod is created, the initialization initcontainers must be performed. In the old version, there is no distinction between before and after execution (the smaller the number of PID number is, the higher the priority is, and the more it is started first). With the improvement of the cloud platform, the startup mode is changed to host mode, and the separated initialization containers will be loaded first, and only after the initialization containers have been loaded can the business containers continue to run normally.
3.container business container, starting in parallel
Example:
Init containers in use
This example defines a simple Pod that has two init containers. The first waits for myservice, and the second waits for mydb. Once both init containers complete, the Pod runs the app container from its spec section.apiVersion: v1kind: Podmetadata: name: myapp-pod labels: app: myappspec: containers:-name: myapp-container image: busybox:1.28 command: ['sh','-caches, 'echo The app is running! & & sleep 3600'] initContainers:-name: init-myservice image: busybox:1.28 command: [' sh','- cations, 'until nslookup myservice; do echo waiting for myservice Sleep 2; done;']-name: init-mydb image: busybox:1.28 command: ['sh','-caches, 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;'] Image pull policy (image PullPolicy) IfNotPresent: default. Pull Always only if the image does not exist on the host: pull the image again every time Pod is created. Never:Pod will never actively pull this image.
Example:
Verify by creating a pod that uses a private image, e.g.:kubectl apply-f-
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.