systemctl restart kube-apiserver
kubectl delete pod ${pod.name}
kubectl delete {name}
kubectl delete services ${service.name}
kubectl get deployments
kubectl get pods
kubectl get rc
kubectl get events
kubectl config view
kubectl get services
kubectl get namespaces
kubectl get nodes
kubectl get replicationcontrollers
kubectl describe node nodename
kubectl create -f mynode-rc.yaml
kubectl delete -f mynode-rc.yaml
kubectl delete -f nginx.yaml -f redis.yaml
kubectl replace -f nginx.yaml
kubectl get pods -o wide
kubectl get deploy
kubectl get all -o wide
#动态缩放
kubectl scale rc myapp --replicas=3
# 创建Service
# Pod可以通过CLUSTER-IP+端口号,进行访问
kubectl create -f mysql-svc.yaml
kubectl get svc
# mysql-svc.yaml
# 外网通过 docker主机IP+30306端口访问
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
type: NodePort
ports:
- port: 3306
nodePort: 30306
selector:
app: mysql