User Tools

Site Tools


linux:k8sdocker

This is an old revision of the document!


Table of Contents

kubectl

  1. kubectl config view
  2. kubectl config use-context xxxxx
  3. kubectl get/describe pods/nodes/services
  4. kubectl cluster-info
  5. kubectl get pods –all-namespaces
  6. kubectl apply -f shopfront-service.yaml
  7. kubectl rolling-update uddplatform –image=shaoxp/upplatform:v2
  8. kubectl rolling-update uddplatform –image=shaoxp/uddplatform:0.2 –image-pull-policy Always
  9. kubectl rolling-update my-nginx –rollback
  10. kubectl exec -it shell-demo – /bin/bash
  11. kubectl exec -it ubuntu – bash -il
  12. kubectl get secret –namespace default angry-butterfly-mysql -o jsonpath=“{.data.mysql-root-password}” | base64 –decode; echo
  13. kubectl port-forward svc/angry-butterfly-mysql 3306

docker

  1. docker build –build-arg JAR_FILE=./build/libs/ydsjfileservice-0.0.1.jar -t registry.cn-shanghai.aliyuncs.com/ydsjtest/ydsjfileservice:0.1 .
  2. docker login –username=shaoxp@1069047797104995 registry.cn-shanghai.aliyuncs.com
  3. docker push registry.cn-shanghai.aliyuncs.com/ydsjtest/ydsjfileservice:0.1
  4. docker run registry.cn-shanghai.aliyuncs.com/ydsjtest/ydsjfileservice:0.1

helm

  1. helm init –upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.11.0 –stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts –force-upgrade
  2. helm install –name helm-mongodb-ydsjtest stable/mongodb
  3. helm list
  4. helm search
  5. helm inspect stable/mongodb

choco

  1. choco uninstall kubernetes-helm
  2. choco install kubernetes-helm –version 2.11.0
linux/k8sdocker.1549011165.txt.gz · Last modified: 2021/06/01 15:29 (external edit)