当前位置:网站首页>Deployment of kubernetes' controller
Deployment of kubernetes' controller
2022-06-26 15:01:00 【Hua Weiyun】
kubernetes Of Controller And deployment
Controller yes kubernetes Objects that manage and run containers in a cluster ,pod adopt Controller Perform application operations ,Controller And pod adopt label Label to correspond ,Controller Load can be carried out
deployment yes pod A kind of controller , Deploy stateless applications , It's used to manage pod and replicaSet, It supports rolling upgrade and other functions
Use yaml To create an application
First we use the command to create a yaml file
kubectl create deployment web --image=nginx --dry-run -o yaml > nginx.yamlamong web Indicates the name of the application
So we can generate a Nginx Of yaml file , Then you can make changes based on this file , To use this file, use the command
kubectl apply -f nginx.yamlAnd then expose the ports :
kubectl expose deployment web --port=80 --type=NodePort --target-port=80 --name=web1 -o yaml > web1.yamlamong port It's the internal port ,target-port It's an open port
After that, you can use the following command to view the status of the service
kubectl get pods,svcWe just said that it supports application upgrade 、 Rollback and elastic scaling
upgrade
Use command
kubectl set image deployment web nginx=nginx:1.16Upgrade the app by setting its version number
The upgrade process will not be suspended until the application container is created
Check the upgrade status
kubectl rollout status deployment webnameRollback the previous version command :
kubectl rollout undo deployment web You can also rollback to the specified version , Add parameters - -to revision=3
View historical version
kubectl rollout history deployment websummary
deployment It can guarantee the support services pod Number , Dynamic scaling , Elastic expansion and contraction , But it does not solve the problem of how to access the service , When a new node with a new ip When it starts , Not sure about its ip And port , Therefore, service discovery and load balancing cannot be carried out , This requires service Object .service It's like a registry , adopt service Get the provided ip and port,service Load balancing can also be done ,pod and service Is associated through label and selector Associated .Service Three common types are ClusterIp,NodePort and LoadBalancer, The default is ClusterIp,LoadBalancer It can be used during external visits . You can add yaml In file type The property value of the field changes service type .
️ Thank you for your
If you think this is helpful for you :
- Welcome to follow me ️, give the thumbs-up , Comment on , forward
- Focus on
Panpan small class, Push good articles for you regularly , There are also group chat and irregular lottery activities , You can say what you want , Communicate with the great gods , Learning together . - If there is anything inappropriate, you are welcome to criticize and correct .
边栏推荐
- Flex & bison start
- BM3D in popular language
- Is it safe to open an online stock account? Somebody give me an answer
- SAP gui 770 下载
- R语言glm函数逻辑回归模型、使用epiDisplay包logistic.display函数获取模型汇总统计信息(自变量初始和调整后的优势比及置信区间,回归系数的Wald检验的p值)、结果保存到csv
- One copy ten, CVPR oral was accused of plagiarizing a lot, and it was exposed on the last day of the conference!
- Is it safe to open a stock account through the account opening link given by the broker manager? I want to open an account
- Is it safe to open an account by digging money? Is there any risk?
- R language GLM function logistic regression model, using epidisplay package logistic The display function obtains the summary statistical information of the model (initial and adjusted odds ratio and
- R语言使用ggplot2可视化泊松回归模型(Poisson Regression)的结果、可视化不同参量组合下的计数结果
猜你喜欢
![[solo π] ADB connects multiple mobile phones](/img/44/4bd88725434fb67c9237645f024071.png)
[solo π] ADB connects multiple mobile phones

One copy ten, CVPR oral was accused of plagiarizing a lot, and it was exposed on the last day of the conference!

Program analysis and Optimization - 8 register allocation

Combat readiness mathematical modeling 32 correlation analysis 2

Login authentication service

10分钟了解BIM+GIS融合,常见BIM数据格式及特性

重磅白皮书发布,华为持续引领未来智慧园区建设新模式

Complimentary Book Cognitive Control: how does our brain accomplish tasks?

TCP congestion control details | 1 summary

在云服务器中云磁盘如何挂载
随机推荐
Extended hooks
R language dplyr package bind_ The rows function merges the rows of the two dataframes vertically. The final number of rows is the sum of the rows of the original two dataframes (combine data frames)
clustermeet
Error when redis is started: could not create server TCP listening socket *: 6379: bind: address already in use - solution
[solo π] ADB connects multiple mobile phones
Introduction to basic knowledge of C language (Daquan) [suggestions collection]
TS common data types summary
印尼投资部长:鸿海考虑在其新首都建立电动公交系统、城市物联网
A remove the underline from the label
View触摸分析
R language GLM function logistic regression model, using epidisplay package logistic The display function obtains the summary statistical information of the model (initial and adjusted odds ratio and
Can wptx64 be uninstalled_ Which software of win10 can be uninstalled
手机股票注册开户安全吗,有没有什么风险?
The annual salary of 500000 is one line, and the annual salary of 1million is another line
Notes on writing questions in C language -- table tennis competition
Informatics Olympiad 1405: sum and product of prime numbers (thinking problem)
The DOTPLOT function in the epidisplay package of R language visualizes the frequency of data points in different intervals in the form of point graphs, specifies the grouping parameters with the by p
This is the graceful file system mounting method, which is effective through personal testing
R语言glm函数逻辑回归模型、使用epiDisplay包logistic.display函数获取模型汇总统计信息(自变量初始和调整后的优势比及置信区间,回归系数的Wald检验的p值)、结果保存到csv
The heavyweight white paper was released. Huawei continues to lead the new model of smart park construction in the future