In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Related Services and uses Node name name usage Management Node kubctl-apiserver provides HTTP Rest unified interface services for processing and verifying REST requests and updating API objects in etcd status management node kubectl-controller-manager resource control management synchronous management node kube-scheduler is responsible for resource scheduling (scheduling Pod) worker node kubelet manages the life cycle of Pod The work node kube-proxy for creating, starting and stopping tasks is responsible for network communication and load balancing # 1. Restart the service
Kubectl patch deployment app name-p {\ "spec\": {\ "template\": {\ "metadata\": {\ "labels\": {\ "date\":\ "date +'% s'\"}-n kube-system
# 2. Reassign the number of pod
Kubectl scale deployment kubernetes-dashboard-- replicas=1-n kube-system
# 3. View deployed applications
Kubectl get deploy-n kube-system
# 4. Get the log contents of the last run of the container
Kubectl logs-previous
Kubectl logs-- previous l7-lb-controller-74c67fb85d-5b5cg-n kube-system
# 5. View description
Kubectl describe svc kubernetes-dashboard-n kube-system
Kubectl describe pod kubernetes-dashboard-n kube-system
# 6. View pod deployment nodes and IP
Kubectl get pods-n kube-system-o wide
# 7. View the services in the cluster
Kubectl get services-all-namespaces
Kubectl get svc kubernetes-dashboard-n kube-system
# 8. View exposed port
Kubectl get endpoints-n kube-system kubernetes-dashboard
Kubectl get ep-n kube-system kubernetes-dashboard
# # 9. Label Management add tags
Kubectl label node 192.168.61.66 nodetype=node-overwrite
Lsmod | grep ip_vs
View label
Kubectl get node-- show-labels-n kube-system
Kubectl get pods-show-labels kube-sytem
Kubectl get pod-- show-labels kubernetes-dashboard-6845889d64-25f9x-n kube-system
# 10. View svc/pod description
Kubectl describe type resource name namespace
Kubectl describe svc kubernetes-dashboard-n kube-system
Kubectl describe pod kubernetes-dashboard-n kube-system
# 11. Query log check the log of a certain Pod (standard output)
Kubectl logs-f pod name-n kube-system
Execute commands within the container
Kubectl exec-ti pod name / bin/bash-n kube-system
# 12. Display pod information in yaml/json mode
Kubectl get deployment-o yaml kubernetes-dashboard-n kube-system
Kubectl get daemonset-o yaml-n kube-system calico-node
Kubectl get svc-o json pod name-n kube-system
# 13. Show all services
Kubectl get deployments-n kube-system
Kubectl get daemonsets-n kube-system
# 14. Create a namespace by creating a command
Kubectl create namespace new-namespace
Create from a file
Cat > my-namespace.yaml / usr/bin/kubeadm
View cluster access connections
Kubectl cluster-info
View permissions
Kubectl describe clusterrole cluster-admin-n kube-system
View kubectl version
Kubectl version
View the supported api version
Kubectl api-version
View current kubectl configuration
Kubectl config view
View cluster status
Kubectl get componentstatuses
Kubectl get rs
View cluster nodes
Kubectl get nodes
View Namespace
Kubectl get namespaces
Node condition maintenance
Each Node includes the following status information
Address: including hostname, public network IP and private network IP
Conditions (Condition): including OutOfDisk, Ready, MemoryPressure and DiskPressure
Capacity (Capacity): total resources available on the Node, including CPU, memory, and Pod
Basic information (Info): including kernel version, container engine version, OS type, etc.
Maintenance status / cancel maintenance mode
Kubectl cordon NodeName
Kubectl uncordon NodeName
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.