Skip to content

system-dev-formations/k8s-webforce3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-webforce3

Go to kubespray directory

Check

  k get nodes
  k get node
  k get node -o wide

## Deployment example
  k create deployment nginx --image=nginx
  k get deployments
  kubectl describe deployment nginx
  kubectl get events
  kubectl get deployment nginx -o yaml 
  kubectl get deployment nginx -o yaml > first.yaml
  kubectl delete deploy nginx
  epurer les lignes necessaires
  k create -f first.yaml
  kubectl get deployment nginx -o yaml > second.yaml
  kubectl create deployment two --image=nginx --dry-run -o yaml
  #kubectl get deployment nginx --export -o yaml

  k expose -h
  kubectl expose deployment/nginx
  kubectl replace -f first.yaml
  kubectl get deploy,pod
  kubectl expose deployment/nginx
  kubectl get svc nginx
  kubectl get ep nginx
  kubectl describe pod nginx-xxxx | grep Node:
  k get pod -o wide 
  kubectl scale deployment nginx --replicas=3
  # arreter tous les pods
  kubectl scale deployment nginx --replicas=0
  kubectl get deployment nginx
  k get ep nginx 
  kubectl exec nginx-xxxxxx -- printenv |grep KUBERNETES
  kubectl delete svc nginx
  kubectl expose deployment nginx --type=LoadBalancer
  kubectl get svc
  k get svc -A
 

CPU and Limits

  k create deployment hog --image systemdevformations/stress
   k get deployment hog
  k describe deployment hog
   kubectl get deployment hog --export -o yaml > hog.yaml
   k replace -f hog.yaml
   k get po 
   k logs hog-xxxxxxxxxx
   k delete deployments.apps hog
   k create -f hog.yaml
   k get pod
   k logs hog-7867569d4b-tng4s
   kubectl scale deployment hog --replicas=10
   ## Namespaces
   kubectl create namespace low-usage-limit
   k get namespace
   k  --namespace=low-usage-limit create -f low-resource-range.yaml
   k get LimitRange
   k get LimitRange -A
   k -n low-usage-limit create deployment limited-hog --image vish/lab-stress
   kubectl -n low-usage-limit get pods
   k -n low-usage-limit get pod limited-hog-xxxxx -o yaml
   k get rs
   K get rs -A 
   k -n low-usage-limit delete deploy limited-hog 
   k  create -f rs.yaml
   k describe rs rs-one
   k get pods
   kubectl delete rs rs-one --cascade=false
   kubectl describe rs rs-one
   k get pods
   kubectl create -f rs.yaml
   k get rs,pod
   kubectl edit po rs-one-xxxx
   k edit po rs-one-h6kpl
   k get rs
   kubectl get po -L system
   k  delete rs rs-one
   kubectl get po -L system
   kubectl describe po rs-one-h6kpl | grep Image:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published