To start using your cluster, you need to run the following as a regular user: mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Alternatively, if you are the root user, you can run: export KUBECONFI...
Every day, I usekubectlcommands like get pods to check if my service is running or get a service to find out the port it is listening on, especially when your service is using the ingress feature of Kubernetes. Since many people have asked about sharing more information about Kubernetes, we...
While working on Kubernetes cluster environment, there will be times when you run into a situation where you need to delete pods from one of your worker nodes. You may need to debug issues with the node itself, upgrade the node, or simply scale down your cluster. The action of deleting a...
kubectl previous 参数作用:If true, print the logs for the previous instance of the container in a pod if it exists.单容器pod:kubectl logs pod-name --previous得出结论:kubelet读的是 /var/log/pods/ 下的日志文件,–previous 读的也是 /var/log/pods/ 下的日志文件,且专门有个链接文件来指向上一...
kube-scheduler组件是kubernetes中的核心组件之一,主要负责pod资源对象的调度工作,具体来说,kube-scheduler组件负责根据调度算法(包括预选算法和优选算法)将未调度的pod调度到合适的最优的node节点上。 kube-scheduler架构图 kube-scheduler的大致组成和处理流程如下图,kube-scheduler对pod、node等对象进行了list/watch,根据...
One of the most exciting features we've added to Podman is support for interacting with Kubernetes objects.
本文主要分析kubernetes/cmd/kubelet部分,该部分主要涉及kubelet的参数解析,及初始化和构造相关的依赖组件(主要在kubeDeps结构体中),并没有kubelet运行的详细逻辑,该部分位于kubernetes/pkg/kubelet模块,待后续文章分析。 kubelet的cmd代码目录结构如下: kubelet
A command-line tool to perform health-checks for gRPC applications in Kubernetes and elsewhere - grpc-ecosystem/grpc-health-probe
Tail Logs from Pods Till now, I’ve talked about the logs of containers in the pod. Now, we’ll look at how you can view logs of multiple containers. Labelsand selectorsare a major part of Kubernetes architecture and logging these labels allows you to select the pods whose logs you want...
该部分代码位于:kubernetes/cmd/kube-controller-manager/app/controllermanager.go // NewControllerManagerCommand creates a *cobra.Command object with default parametersfuncNewControllerManagerCommand()*cobra.Command{...cmd:=&cobra.Command{Use:"kube-controller-manager",Long:`The Kubernetes controller manager...