-
Disable and stop the systemd-resolved service:
sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved
-
Then put the following line in the
[main]
section of your/etc/NetworkManager/NetworkManager.conf
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 定义全局变量用于存储函数返回的多个值 | |
ORB_SSH_SELECTOR_PROMPT="" | |
ORB_SSH_SELECTOR_MACHINE="" | |
# 函数:显示 OrbStack 机器列表并选择一个机器 | |
select_orb_machine() { | |
local machines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Generate encryption key for EncryptionConfig | |
export ENCRYPTION_KEY=$(head -c 32 /dev/urandom | base64) | |
# Array of cluster machine IPs | |
export NODE_IPS=(192.168.31.80 192.168.31.81 192.168.31.82) | |
# Array of hostnames corresponding to cluster IPs | |
export NODE_NAMES=(k8s-master-01 k8s-slave-01 k8s-slave-02) |
Parse the kubernetes manifest in yaml or json, don't care a manifest type.
Examples:
package main
import (
"bytes"
"context"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
// path/to/whatever does not exist | |
} | |
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
// path/to/whatever exists | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctr image pull docker.io/library/hello-world | |
ctr image pull docker.io/library/hello-world:latest | |
ctr image ls | |
ctr image ls -q | |
ctr c create docker.io/library/hello-world:latest demo | |
ctr c list | |
ctr image remove docker.io/library/hello-world:latest | |
ctr c list | |
ctr c remove demo |
MOVE TO HERE
首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置:
The go
command line tool needs to be able to fetch dependencies from your private GitLab, but authenticaiton is required.
This assumes your private GitLab is hosted at privategitlab.company.com
.
The following environment variables are recommended:
export GO111MODULE=on
export GOPRIVATE=privategitlab.company.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install git | |
git config --global user.name "CheverJohn" | |
git config --global user.email "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start etcd | |
nohup etcd & | |
// stop etcd | |
kill `pgrep etcd` | |
// get all route info | |
etcdctl get / --prefix --keys-only | |
// delete all route info |
NewerOlder