Dok Docs
Github Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

dok

Overview

This article mainly lists some commands and options that dok can use and the usage scenarios. It is recommended to put dok in the /usr/bin/ directory.

Help Information

The help command of dok can solve most of the parameter problems and doubts.

dok -h

Command Autocompletion

dok completion bash > /etc/bash_completion.d/dok

Create Minimize Cluster

The created cluster only has Kubernetes components and does not install any Helm applications.

dok createCluster \
-m 172.22.1.108 \
-w 172.22.0.159 \
-p /root/dok-release-without-app-image.gz \
--password Dokpwd2023

Create Prod-Level Cluster

dok createCluster \
-m 172.22.1.16,172.22.0.41,172.22.0.117 \
-w 172.22.1.89,172.22.0.136,172.22.0.19 \
-p /root/dok-release-without-app-image.gz \
--password Dokpwd2023

Ignore Host Check

dok createCluster \
-m 172.22.1.108 \
-w 172.22.0.159 \
-p /root/dok-release-without-app-image.gz \
--password Dokpwd2023 \
--noCheck

SCP Files

Under the premise of configuring password-free or knowing the secret of the machine.

dok scp \
--hosts 43.134.164.101 \
--file /root/dok-sync.sh \
--password Dokpwd2023

Etcd Backup

dok backupEtcd --snapshotDir /tmp/

Etcd Restore

dok restoreEtcd \
--masters 10.9.204.1,10.9.204.2,10.9.204.3 \
--snapshot /tmp/2022-08-01-10-59-53-snap.db

Join Node

dok joinNode \
--conf /tmp/dok-config.yaml \
--pkg /root/dok-release-without-app-image.gz \
-m 172.22.0.140 \
-w 172.22.0.43 \
--password Dokpwd2023

Delete Node

dok deleteNode -w vm-0-129-centos

Reset Node

dok resetNode -m 10.9.204.77 -w 10.9.24.177

Log Analyze

dok logAnalyze \
--conf /tmp/dok-config.yaml \
--logFile /tmp/dok.log \
--resultDir /tmp/logAnalyze

Without CNI

The created cluster only has Kubernetes components, and no CNI plug-in is installed. Users can install CNI by themselves according to the actual situation.

dok createCluster \
-m 172.22.1.108 \
-w 172.22.0.159 \
-p /root/dok-release-without-app-image.gz \
--password Dokpwd2023 \
--withoutCNI

with Calico

Specify Calico as the CNI when creating the cluster with the --cni calico option.

dok createCluster \
-m 172.22.0.13,172.22.0.110,172.22.1.126 \
-w 172.22.0.62,172.22.1.174,172.22.0.229 \
-p /root/dok-release-without-app-image.gz \
--password Dokpwd2023 \
--noCheck