Difference between revisions of "Kubectl create deploy"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
  
  
  k describe deployment my-web-deployment-v1
+
  [[kubectl describe deployment]] my-web-deployment-v1
 
  Name:                  my-web-deployment-v1
 
  Name:                  my-web-deployment-v1
 
  Namespace:              default
 
  Namespace:              default

Revision as of 15:20, 15 February 2024

kubectl create deploy 

Example

kubectl create deploy my-web-deployment-v1 --image=nginx --port=80


kubectl describe deployment my-web-deployment-v1
Name:                   my-web-deployment-v1
Namespace:              default
CreationTimestamp:      Thu, 15 Feb 2024 16:12:09 +0100
Labels:                 app=my-web-deployment-v1
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=my-web-deployment-v1
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=my-web-deployment-v1
  Containers:
   nginx:
    Image:        nginx
    Port:         80/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   my-web-deployment-v1-8bd6566ff (1/1 replicas created)
Events:
  Type    Reason             Age    From                   Message
  ----    ------             ----   ----                   -------
  Normal  ScalingReplicaSet  2m31s  deployment-controller  Scaled up replica set my-web-deployment-v1-8bd6566ff to 1 



Logs

k logs my-web-deployment-v1-8bd6566ff-wslwg
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/02/15 15:12:14 [notice] 1#1: using the "epoll" event method
2024/02/15 15:12:14 [notice] 1#1: nginx/1.25.4
2024/02/15 15:12:14 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
2024/02/15 15:12:14 [notice] 1#1: OS: Linux 5.10.205-195.807.amzn2.x86_64
2024/02/15 15:12:14 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/02/15 15:12:14 [notice] 1#1: start worker processes
2024/02/15 15:12:14 [notice] 1#1: start worker process 29
2024/02/15 15:12:14 [notice] 1#1: start worker process 30

See also

Advertising: