Skip to content
Menu
(◍ ´꒳` ◍)

  • Blog
  • Front Page
(◍ ´꒳` ◍)

k8s-k8s-up&Running05

By erhu on 2023年3月17日2023年4月17日

  docekr k8s

这段代码涉及的是使用 Kubernetes IN Docker (kind) 工具创建本地 Kubernetes 集群。

kind create cluster --wait 5m:创建一个新的 Kubernetes 集群,并等待 5 分钟直到集群完全启动。此命令将创建一个新的 Kubernetes 节点映像,启动 Kubernetes 控制平面和工作负载节点,以及创建一个默认的 kubeconfig 文件以用于访问集群。

export KUBECONFIG="$(kind get kubeconfig-path)":将当前会话的 KUBECONFIG 环境变量设置为 kind 集群的 kubeconfig 文件路径。这将使得后续运行 kubectl 命令时自动使用 kind 集群的 kubeconfig 文件。

kubectl cluster-info:通过 kubectl 命令查看当前集群的信息,包括 API 服务器地址、DNS 服务地址和证书信息等。

kind delete cluster:删除当前已创建的 kind 集群。这将停止 Kubernetes 控制平面和工作负载节点,并删除集群使用的 Docker 容器及其映像。

minikube

You can find the minikube tool on GitHub. There are binaries for

Linux, macOS, and Windows that you can download. Once you have

the minikube tool installed, you can create a local cluster using:

$ minikube start

创建迷你kube

This will create a local VM, provision Kubernetes, and create a local

kubectl configuration that points to that cluster.

When you are done with your cluster, you can stop the VM with:

$ minikube stop停止

If you want to remove the cluster, you can run:

$ minikube delete删除

Category: k8s

文章导航

k8s-k8s-up&Running04
k8s-k8s-up&Running06

Related Posts

承认平庸-k8s面试题

3月 5, 2023
Read More

k8s-TechWorld with Nana07

4月 13, 2023
Read More

k8s-k8s-up&Running04

3月 17, 2023
Read More

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

近期文章

  • 实施002
  • 实施SQL001
  • 泛微oa001-字段
  • 硬件前端-海康威视摄像头
  • 使用Docker搭建Weblogic服务001

近期评论

    归档

    • 2023年10月
    • 2023年9月
    • 2023年8月
    • 2023年5月
    • 2023年4月
    • 2023年3月
    • 2021年11月
    • 2021年10月
    • 2021年9月
    • 2021年8月
    • 2021年5月

    分类

    • C
    • docker
    • iptable
    • ISIS
    • java
    • k8s
    • liunx
    • OpenCV py
    • ospf
    • solr
    • zabbix
    • 劳动法
    • 周杰伦
    • 格林法则
    • 等保
    • 鸿蒙

    其他操作

    • 登录
    • 条目feed
    • 评论feed
    • WordPress.org
    ©2025 (◍ ´꒳` ◍) | WordPress Theme by Superb WordPress Themes