飞天使-k8s知识点19-kubernetes实操4-资源调度 标签和选择器:Label与Selector的使用-版本回退

文章目录

      • 添加label
        • 资源调度 Deployment:创建与配置文件解析
        • rs pod deploy 的关联信息展示
        • Deployment:滚动更新
        • Deployment:回滚
          • 回退版本实际操作

添加label

[root@kubeadm-master1 test]# kubectl get pod
NAME                                 READY   STATUS      RESTARTS   AGE
client                               1/1     Running     0          49d
my-pod                               1/1     Running     0          9d
my-pod1                              0/1     Completed   6          83m
net-test1                            1/1     Running     136        56d
net-test2                            1/1     Running     14         56d
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d
[root@kubeadm-master1 test]# kubectl get po --show-labels
NAME                                 READY   STATUS      RESTARTS   AGE   LABELS
client                               1/1     Running     0          49d   run=client
my-pod                               1/1     Running     0          9d    test=1.0.0,type=app
my-pod1                              0/1     Completed   6          83m   test=1.0.0,type=app
net-test1                            1/1     Running     136        56d   run=net-test1
net-test2                            1/1     Running     14         56d   run=net-test2
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d   app=nginx,pod-template-hash=67dfd6c8f9
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d   app=tomcat,pod-template-hash=6c44f58b47
[root@kubeadm-master1 test]# kubectl label po my-pod author=xx1
pod/my-pod labeled
[root@kubeadm-master1 test]# kubectl get po --show-labels
NAME                                 READY   STATUS      RESTARTS   AGE   LABELS
client                               1/1     Running     0          49d   run=client
my-pod                               1/1     Running     0          9d    author=xx1,test=1.0.0,type=app
my-pod1                              0/1     Completed   6          83m   test=1.0.0,type=app
net-test1                            1/1     Running     136        56d   run=net-test1
net-test2                            1/1     Running     14         56d   run=net-test2
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d   app=nginx,pod-template-hash=67dfd6c8f9
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d   app=tomcat,pod-template-hash=6c44f58b47
[root@kubeadm-master1 test]# kubectl label po my-pod author=xxx1 --overwrite
pod/my-pod labeled
[root@kubeadm-master1 test]# kubectl get po --show-labels
NAME                                 READY   STATUS      RESTARTS   AGE   LABELS
client                               1/1     Running     0          49d   run=client
my-pod                               1/1     Running     0          9d    author=xxx1,test=1.0.0,type=app
my-pod1                              0/1     Completed   6          85m   test=1.0.0,type=app
net-test1                            1/1     Running     136        56d   run=net-test1
net-test2                            1/1     Running     14         56d   run=net-test2
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d   app=nginx,pod-template-hash=67dfd6c8f9
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d   app=tomcat,pod-template-hash=6c44f58b47
资源调度 Deployment:创建与配置文件解析

在这里插入图片描述

分别是有状态和无状态应用
创建deployment 
[root@kubeadm-master1 ~]# kubectl create deploy nginx-deploy --image=nginx:1.7.9
查看 replicaset
[root@kubeadm-master1 ~]# kubectl get replicaset
NAME                           DESIRED   CURRENT   READY   AGE
nginx-deploy-845964f5bf        1         1         1       2m34s查看pod
[root@kubeadm-master1 ~]# kubectl get po
NAME                                 READY   STATUS      RESTARTS   AGE
nginx-deploy-845964f5bf-2pvw4        1/1     Running     0          3m获取deployment的yaml 文件
[root@kubeadm-master1 ~]# kubectl get deploy nginx-deploy -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:annotations:deployment.kubernetes.io/revision: "1"creationTimestamp: "2024-02-16T02:25:18Z"generation: 1labels:app: nginx-deploymanagedFields:- apiVersion: apps/v1fieldsType: FieldsV1fieldsV1:f:metadata:f:labels:.: {}f:app: {}f:spec:f:progressDeadlineSeconds: {}f:replicas: {}f:revisionHistoryLimit: {}f:selector: {}f:strategy:f:rollingUpdate:.: {}f:maxSurge: {}f:maxUnavailable: {}f:type: {}f:template:f:metadata:f:labels:.: {}f:app: {}f:spec:f:containers:k:{"name":"nginx"}:.: {}f:image: {}f:imagePullPolicy: {}f:name: {}f:resources: {}f:terminationMessagePath: {}f:terminationMessagePolicy: {}f:dnsPolicy: {}f:restartPolicy: {}f:schedulerName: {}f:securityContext: {}f:terminationGracePeriodSeconds: {}manager: kubectl-createoperation: Updatetime: "2024-02-16T02:25:18Z"- apiVersion: apps/v1fieldsType: FieldsV1fieldsV1:f:metadata:f:annotations:.: {}f:deployment.kubernetes.io/revision: {}f:status:f:availableReplicas: {}f:conditions:.: {}k:{"type":"Available"}:.: {}f:lastTransitionTime: {}f:lastUpdateTime: {}f:message: {}f:reason: {}f:status: {}f:type: {}k:{"type":"Progressing"}:.: {}f:lastTransitionTime: {}f:lastUpdateTime: {}f:message: {}f:reason: {}f:status: {}f:type: {}f:observedGeneration: {}f:readyReplicas: {}f:replicas: {}f:updatedReplicas: {}manager: kube-controller-manageroperation: Updatetime: "2024-02-16T02:25:20Z"name: nginx-deploynamespace: defaultresourceVersion: "8890971"uid: 7951f67e-ad52-436a-8f25-5d8241fa06c6
spec:progressDeadlineSeconds: 600replicas: 1revisionHistoryLimit: 10selector:matchLabels:app: nginx-deploystrategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:creationTimestamp: nulllabels:app: nginx-deployspec:containers:- image: nginx:1.7.9imagePullPolicy: IfNotPresentname: nginxresources: {}terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstrestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}terminationGracePeriodSeconds: 30
status:availableReplicas: 1conditions:- lastTransitionTime: "2024-02-16T02:25:20Z"lastUpdateTime: "2024-02-16T02:25:20Z"message: Deployment has minimum availability.reason: MinimumReplicasAvailablestatus: "True"type: Available- lastTransitionTime: "2024-02-16T02:25:18Z"lastUpdateTime: "2024-02-16T02:25:20Z"message: ReplicaSet "nginx-deploy-845964f5bf" has successfully progressed.reason: NewReplicaSetAvailablestatus: "True"type: ProgressingobservedGeneration: 1readyReplicas: 1replicas: 1updatedReplicas: 1

在这里插入图片描述

在这里插入图片描述

rs pod deploy 的关联信息展示
[root@kubeadm-master1 ~]# kubectl get po,rs,deploy --show-labels
NAME                                     READY   STATUS      RESTARTS   AGE   LABELS
pod/client                               1/1     Running     0          50d   run=client
pod/my-pod                               1/1     Running     0          9d    author=xxx1,test=1.0.0,type=app
pod/my-pod1                              0/1     Completed   6          19h   test=1.0.0,type=app
pod/net-test1                            1/1     Running     138        57d   run=net-test1
pod/net-test2                            1/1     Running     14         57d   run=net-test2
pod/nginx-deploy-845964f5bf-2pvw4        1/1     Running     0          10m   app=nginx-deploy,pod-template-hash=845964f5bf
pod/nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d   app=nginx,pod-template-hash=67dfd6c8f9
pod/tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d   app=tomcat,pod-template-hash=6c44f58b47NAME                                           DESIRED   CURRENT   READY   AGE   LABELS
replicaset.apps/nginx-deploy-845964f5bf        1         1         1       10m   app=nginx-deploy,pod-template-hash=845964f5bf
replicaset.apps/nginx-deployment-67dfd6c8f9    1         1         1       56d   app=nginx,pod-template-hash=67dfd6c8f9
replicaset.apps/tomcat-deployment-6c44f58b47   1         1         1       56d   app=tomcat,pod-template-hash=6c44f58b47NAME                                READY   UP-TO-DATE   AVAILABLE   AGE   LABELS
deployment.apps/nginx-deploy        1/1     1            1           10m   app=nginx-deploy
deployment.apps/nginx-deployment    1/1     1            1           56d   app=nginx
deployment.apps/tomcat-deployment   1/1     1            1           56d   app=tomcat
Deployment:滚动更新
修改镜像版本
kubectl edit deploy
image 选择升级为高版本改完之后运行这个命令看 deploy pod 的变化
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     1            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     1            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     2            3           20m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy  --show-labels
NAME                READY   UP-TO-DATE   AVAILABLE   AGE   LABELS
nginx-deploy        3/3     3            3           20m   app=nginx-deploy
nginx-deployment    1/1     1            1           56d   app=nginx
tomcat-deployment   1/1     1            1           56d   app=tomcat查看滚动更新的状态
[root@kubeadm-master1 ~]# kubectl rollout status deploy nginx-deploy
deployment "nginx-deploy" successfully rolled out修改nginx的镜像为1.7.9[root@kubeadm-master1 ~]# kubectl set image deployment/nginx-deploy nginx=nginx:1.7.9
deployment.apps/nginx-deploy image updated
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     3            3           24m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl get deploy
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deploy        3/3     3            3           24m
nginx-deployment    1/1     1            1           56d
tomcat-deployment   1/1     1            1           56d
[root@kubeadm-master1 ~]# kubectl rollout status deploy nginx-deploy
deployment "nginx-deploy" successfully rolled out
[root@kubeadm-master1 ~]# kubectl describe deploy nginx-deploy
Name:                   nginx-deploy
Namespace:              default
CreationTimestamp:      Fri, 16 Feb 2024 10:25:18 +0800
Labels:                 app=nginx-deploy
Annotations:            deployment.kubernetes.io/revision: 3
Selector:               app=nginx-deploy
Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:Labels:  app=nginx-deployContainers:nginx:Image:        nginx:1.7.9Port:         <none>Host Port:    <none>Environment:  <none>Mounts:       <none>Volumes:        <none>
Conditions:Type           Status  Reason----           ------  ------Available      True    MinimumReplicasAvailableProgressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-deploy-845964f5bf (3/3 replicas created)
Events:Type    Reason             Age                From                   Message----    ------             ----               ----                   -------Normal  ScalingReplicaSet  8m58s              deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 3Normal  ScalingReplicaSet  5m6s               deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 1Normal  ScalingReplicaSet  4m56s              deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 2Normal  ScalingReplicaSet  4m56s              deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  4m47s              deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 3Normal  ScalingReplicaSet  4m47s              deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  4m45s              deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 0Normal  ScalingReplicaSet  39s (x2 over 25m)  deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  38s                deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  36s (x4 over 38s)  deployment-controller  (combined from similar events): Scaled down replica set nginx-deploy-968b78ccf to 0查看rs1 和 rs2 的更新状态,上一个变成0 ,新的变成3 
[root@kubeadm-master1 ~]# kubectl get rs --show-labels
NAME                           DESIRED   CURRENT   READY   AGE     LABELS
nginx-deploy-845964f5bf        3         3         3       27m     app=nginx-deploy,pod-template-hash=845964f5bf
nginx-deploy-968b78ccf         0         0         0       7m58s   app=nginx-deploy,pod-template-hash=968b78ccf
Deployment:回滚
[root@kubeadm-master1 ~]# kubectl set image deployment/nginx-deploy nginx=nginx:1.9.1
deployment.apps/nginx-deploy image updated
[root@kubeadm-master1 ~]# kubectl rollout status deployments nginx-deploy
deployment "nginx-deploy" successfully rolled out
[root@kubeadm-master1 ~]# kubectl get pod
NAME                                 READY   STATUS      RESTARTS   AGE
client                               1/1     Running     0          50d
my-pod                               1/1     Running     0          9d
my-pod1                              0/1     Completed   6          19h
net-test1                            1/1     Running     138        57d
net-test2                            1/1     Running     14         57d
nginx-deploy-968b78ccf-8lb9c         1/1     Running     0          16s
nginx-deploy-968b78ccf-d8mhr         1/1     Running     0          17s
nginx-deploy-968b78ccf-nqq4s         1/1     Running     0          19s
nginx-deployment-67dfd6c8f9-5s6nz    1/1     Running     1          56d
tomcat-deployment-6c44f58b47-4pz6d   1/1     Running     1          56d
[root@kubeadm-master1 ~]# kubectl describe deploy nginx-deploy
Name:                   nginx-deploy
Namespace:              default
CreationTimestamp:      Fri, 16 Feb 2024 10:25:18 +0800
Labels:                 app=nginx-deploy
Annotations:            deployment.kubernetes.io/revision: 4
Selector:               app=nginx-deploy
Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:Labels:  app=nginx-deployContainers:nginx:Image:        nginx:1.9.1Port:         <none>Host Port:    <none>Environment:  <none>Mounts:       <none>Volumes:        <none>
Conditions:Type           Status  Reason----           ------  ------Available      True    MinimumReplicasAvailableProgressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-deploy-968b78ccf (3/3 replicas created)
Events:Type    Reason             Age                From                   Message----    ------             ----               ----                   -------Normal  ScalingReplicaSet  25m                deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 3Normal  ScalingReplicaSet  17m (x2 over 41m)  deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  17m                deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  17m (x4 over 17m)  deployment-controller  (combined from similar events): Scaled down replica set nginx-deploy-968b78ccf to 0Normal  ScalingReplicaSet  48s (x2 over 21m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 1Normal  ScalingReplicaSet  46s (x2 over 21m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  46s (x2 over 21m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 2Normal  ScalingReplicaSet  45s (x2 over 21m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  45s (x2 over 21m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 3Normal  ScalingReplicaSet  44s (x2 over 21m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 0查看历史版本
[root@kubeadm-master1 ~]# kubectl rollout history deployment/nginx-deploy
deployment.apps/nginx-deploy
REVISION  CHANGE-CAUSE
3         <none>
4         <none>如果修改时候 kubectl set image deployment/nginx-deploy nginx=nginx:1.7.9 --record 
上面的none 就会记录详细的信息查看历史版本详细信息
kubectl rollout history deployment/nginx-deploy --revision=3确认回退版本之后
kubectl rollout undo deployment/nginx-deploy --to-revision=2查看回退版本的状态
kubectl get deploy 
kubectl describe deploy 
回退版本实际操作
[root@kubeadm-master1 ~]# kubectl describe deploy nginx-deploy
Name:                   nginx-deploy
Namespace:              default
CreationTimestamp:      Fri, 16 Feb 2024 10:25:18 +0800
Labels:                 app=nginx-deploy
Annotations:            deployment.kubernetes.io/revision: 4
Selector:               app=nginx-deploy
Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:Labels:  app=nginx-deployContainers:nginx:Image:        nginx:1.9.1Port:         <none>Host Port:    <none>Environment:  <none>Mounts:       <none>Volumes:        <none>
Conditions:Type           Status  Reason----           ------  ------Available      True    MinimumReplicasAvailableProgressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-deploy-968b78ccf (3/3 replicas created)
Events:Type    Reason             Age                From                   Message----    ------             ----               ----                   -------Normal  ScalingReplicaSet  37m                deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 3Normal  ScalingReplicaSet  29m (x2 over 53m)  deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  29m                deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  29m (x4 over 29m)  deployment-controller  (combined from similar events): Scaled down replica set nginx-deploy-968b78ccf to 0Normal  ScalingReplicaSet  12m (x2 over 34m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 1Normal  ScalingReplicaSet  12m (x2 over 33m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  12m (x2 over 33m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 2Normal  ScalingReplicaSet  12m (x2 over 33m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  12m (x2 over 33m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 3Normal  ScalingReplicaSet  12m (x2 over 33m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 0
[root@kubeadm-master1 ~]# kubectl rollout history deployment/nginx-deploy --revision=4
deployment.apps/nginx-deploy with revision #4
Pod Template:Labels:	app=nginx-deploypod-template-hash=968b78ccfContainers:nginx:Image:	nginx:1.9.1Port:	<none>Host Port:	<none>Environment:	<none>Mounts:	<none>Volumes:	<none>[root@kubeadm-master1 ~]# kubectl rollout history deployment/nginx-deploy --revision=3
deployment.apps/nginx-deploy with revision #3
Pod Template:Labels:	app=nginx-deploypod-template-hash=845964f5bfContainers:nginx:Image:	nginx:1.7.9Port:	<none>Host Port:	<none>Environment:	<none>Mounts:	<none>Volumes:	<none>[root@kubeadm-master1 ~]# kubectl rollout undo deployment/nginx-deploy --to-revision=3
deployment.apps/nginx-deploy rolled back
[root@kubeadm-master1 ~]# kubectl describe deploy nginx-deploy
Name:                   nginx-deploy
Namespace:              default
CreationTimestamp:      Fri, 16 Feb 2024 10:25:18 +0800
Labels:                 app=nginx-deploy
Annotations:            deployment.kubernetes.io/revision: 5
Selector:               app=nginx-deploy
Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:Labels:  app=nginx-deployContainers:nginx:Image:        nginx:1.7.9Port:         <none>Host Port:    <none>Environment:  <none>Mounts:       <none>Volumes:        <none>
Conditions:Type           Status  Reason----           ------  ------Available      True    MinimumReplicasAvailableProgressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-deploy-845964f5bf (3/3 replicas created)
Events:Type    Reason             Age                From                   Message----    ------             ----               ----                   -------Normal  ScalingReplicaSet  30m (x4 over 30m)  deployment-controller  (combined from similar events): Scaled down replica set nginx-deploy-968b78ccf to 0Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 1Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 2Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled up replica set nginx-deploy-968b78ccf to 3Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  13m (x2 over 34m)  deployment-controller  Scaled down replica set nginx-deploy-845964f5bf to 0Normal  ScalingReplicaSet  10s (x3 over 54m)  deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 1Normal  ScalingReplicaSet  9s (x2 over 30m)   deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 2Normal  ScalingReplicaSet  9s                 deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 2Normal  ScalingReplicaSet  8s (x2 over 38m)   deployment-controller  Scaled up replica set nginx-deploy-845964f5bf to 3Normal  ScalingReplicaSet  8s                 deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 1Normal  ScalingReplicaSet  6s                 deployment-controller  Scaled down replica set nginx-deploy-968b78ccf to 0

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/684342.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

鸿蒙开发系列教程(二十一)--轮播处理

轮播处理 Swiper本身是一个容器组件&#xff0c;当设置了多个子组件后&#xff0c;可以对这些子组件进行轮播显示 在自身尺寸属性未被设置时&#xff0c;会自动根据子组件的大小设置自身的尺寸 参数&#xff1a; 通过loop属性控制是否循环播放&#xff0c;该属性默认值为tr…

LinkedList数据结构链表

LinkedList在Java中是一个实现了List和Deque接口的双向链表。它允许我们在列表的两端添加或删除元素&#xff0c;同时也支持在列表中间插入或移除元素。在分析LinkedList之前&#xff0c;需要理解链表这种数据结构&#xff1a; 链表&#xff1a;链表是一种动态数据结构&#x…

Recovering a Small String-Codeforces

题目链接&#xff1a;Problem - A - Codeforces 解题思路&#xff1a;分三种情况 第一个字母a,最后一个字母z 前两个字母a 最后两个字母z 其他根据大小算出剩下的字母 下面是c代码&#xff1a; #include<iostream> using namespace std; int main() {int t, n;cin…

算法刷题:四数之和

四数之和 .题目链接题目详情算法原理我的答案 . 题目链接 四数之和 题目详情 算法原理 题目要求的是abctarget 这道题我们可以参考一下三数之和 三数之和中,我们固定的是其中一个数,四数之和中,我们则需要固定两个数 即 abctarget的时候固定d,找到abctarget-d 在求abctarget…

学法减分线上考试答案查找?分享九个搜题直接出答案的软件 #媒体#媒体#笔记

在信息爆炸的时代&#xff0c;选择适合自己的学习辅助工具和资料&#xff0c;能够提供更高效、便捷和多样化的学习方式。 1.试题猪 这是个微信公众号 一款聚合了好多款搜题软件的公众号&#xff0c;对话框可以直接搜题&#xff0c;题库好像挺多的&#xff0c;一次性能出好多…

Linux系统入门

目录 探索命令行 学习使用 man 寻找帮助 控制字符 统计代码行数 统计磁盘使用情况 在Linux下编写 Hello World 程序 使用重定向 使用Makefile管理工程 Unix哲学 探索命令行 Linux命令行中的命令使用格式都是相同的: 命令名称 参数1 参数2 参数3 ... 参数之间用任意…

【无标题】JAVA学习-集合.使用TreeMap

TreeMap 是 Java 中的一种有序映射&#xff08;SortedMap&#xff09;实现&#xff0c;它根据键的自然顺序进行排序&#xff0c;或者根据自定义的 Comparator 进行排序。TreeMap 的底层实现是红黑树&#xff08;Red-Black Tree&#xff09;&#xff0c;这使得它的插入、删除和搜…

HCIA-HarmonyOS设备开发认证V2.0-轻量系统内核内存管理-动态内存

目录 一、动态内存运行机制二、动态内存开发流程三、动态内存使用说明四、动态内存核心算法五、动态内存接口六、代码分析&#xff08;待续...&#xff09;坚持就有收获 一、动态内存运行机制 动态内存管理&#xff0c;即在内存资源充足的情况下&#xff0c;根据用户需求&…

如何在 Angular 中使用 ng2-charts 来使用 Chart.js

介绍 Chart.js 是一个流行的 JavaScript 图表库&#xff0c;ng2-charts 是 Angular 2 的一个包装器&#xff0c;用于在 Angular 中集成 Chart.js。 在本教程中&#xff0c;您将使用 Chart.js 和 ng2-charts 在 Angular 应用程序中创建示例图表。 先决条件 要完成本教程&…

【解决(几乎)任何机器学习问题】:超参数优化篇(超详细)

这篇文章相当长&#xff0c;您可以添加至收藏夹&#xff0c;以便在后续有空时候悠闲地阅读。 有了优秀的模型&#xff0c;就有了优化超参数以获得最佳得分模型的难题。那么&#xff0c;什么是超参数优化呢&#xff1f;假设您的机器学习项⽬有⼀个简单的流程。有⼀个数据集&…

【Rust】使用Rust实现一个简单的shell

一、Rust Rust是一门系统编程语言&#xff0c;由Mozilla开发并开源&#xff0c;专注于安全、速度和并发性。它的主要目标是解决传统系统编程语言&#xff08;如C和C&#xff09;中常见的内存安全和并发问题&#xff0c;同时保持高性能和底层控制能力。 Rust的特点包括&#x…

python数据分析numpy基础之sum用法和示例

1 python数据分析numpy基础之sum用法和示例 python的numpy库的sum()函数&#xff0c;用于对数组指定轴的元素求和。 用法 numpy.sum(a, axisNone, dtypeNone, outNone, keepdims<no value>, initial<no value>, where<no value>)描述 入参a可以为数组或类…

java8-使用流-2

筛选各异的元素 流还支持一个叫作aistinct的方法&#xff0c;它会返回一个元素各异(根据流所生成元素的hashcode和eguals方法实现)的流。例如&#xff0c;以下代码会筛选出列表中所有的偶数&#xff0c;并确保没有重复。图5-2直观地显示了这个过程。 List<Integer>number…

Panalog 日志审计系统 sessiptbl.php 前台RCE漏洞复现

0x01 产品简介 Panalog是一款日志审计系统,方便用户统一集中监控、管理在网的海量设备。 0x02 漏洞概述 Panalog日志审计系统 sessiptbl.php接口处存在远程命令执行漏洞,攻击者可执行任意命令,接管服务器权限。 0x03 影响范围 version <= MARS r10p1Free 0x04 复现…

勒索病毒最新变种.faust勒索病毒来袭,如何恢复受感染的数据?

引言&#xff1a; 随着我们进入数字化时代&#xff0c;数据的重要性变得愈发显著&#xff0c;而网络安全威胁也日益增加。.faust勒索病毒是其中一种备受恶意分子钟爱的危险工具&#xff0c;它通过加密用户文件并勒索高额赎金来对个人和组织发起攻击。本文将深入探讨.faust勒索…

thinkphp+vue企业产品展示网站f7enu

本文首先介绍了企业产品展示网站管理技术的发展背景与发展现状&#xff0c;然后遵循软件常规开发流程&#xff0c;首先针对系统选取适用的语言和开发平台&#xff0c;根据需求分析制定模块并设计数据库结构&#xff0c;再根据系统总体功能模块的设计绘制系统的功能模块图&#…

紫微斗数双星组合:廉贞破军在卯酉

文章目录 前言内容总结 前言 紫微斗数双星组合&#xff1a;廉贞破军在卯酉 内容 紫微斗数双星组合&#xff1a;廉贞破军在卯酉 性格分析 廉贞星、破军星二星同宫&#xff0c;具有冒险开创的精神和领导能力&#xff0c;忍耐力强&#xff0c;工作积极稳重&#xff0c;冲劲大&a…

FreeSWITCH在session上执行定时挂机与取消

一、实验场景环境描述 FreeSWITCH测试机&#xff1a;192.168.137.32 会议室&#xff1a; test1 分机&#xff1a; 1000 模拟的场景&#xff1a; 1&#xff09;会议室test1邀请分机1000加入会议室 在邀请时&#xff0c;添加定时挂机任务。 2&#xff09;分机1000接通后&#x…

【51单片机】利用STC-ISP软件工具【定时器计算器】配置【定时器】教程(详细图示)(AT89C52)

前言 大家好吖&#xff0c;欢迎来到 YY 滴单片机系列 &#xff0c;热烈欢迎&#xff01; 本章主要内容面向接触过单片机的老铁 主要内容含&#xff1a; 欢迎订阅 YY滴C专栏&#xff01;更多干货持续更新&#xff01;以下是传送门&#xff01; YY的《C》专栏YY的《C11》专栏YY的…

Shell脚本——提取目录名和文件名

目录 一、${} 1.${var##*/} 2.${var##*.} 3.${var#*.} 4.${var%/*} 5.${var%%.*} 6.总结 二、basename和dirname 1.basename 2.dirname 在许多场景下&#xff0c;我们都需要对文件名称或者文件所在的目录进行操作&#xff0c;已达到我们业务目的。通常的操作是由路径…