想怎么搓,就怎么搓!
powershell 语言编写的 traefik 控制平面。
开源 + 免费项目
由于目前是第一版,或许bug较多,勿喷!
powershell传教士 作品
技术支持qq群:k4t国产k8s群1
qq群 号:722528388
MIT License
traefik被我喜爱的原因:跨平台,同时支持监控目录和etcd。
支持win,linux版同时使用。
支持etcd的同时,支持watch文件目录。而另n台traefik,可以配置为只用etcd。
很方便在win上,编辑toml文件调试。然后通过dashboard查看是否成功。
测试正常后,再向etcd中写入,以达到数据面高可用的目的。
https://gitee.com/chuanjiao10/powershell/tree/master/nosql/k8setcd
首先需要合并cert和私钥。在k8s的master上:
openssl pkcs12 -export \
-inkey /etc/kubernetes/pki/etcd/server.key \
-in /etc/kubernetes/pki/etcd/server.crt \
-out ./k8s.pfx
然后把【k8s.pfx】复制到任意win,linux机子上。
不依赖任何第三方dll库。
支持win版powershell。
支持linux版powershell。
https://gitee.com/chuanjiao10/kasini3000_agent_linux
注意:安装脚本会默认打开root账户,经过密码登录。 若不想开启,需要用此命令关闭: pwsh -f /your_path/ssh_root_passwd_login_off.ps1
For the security of the linux node, it is recommended to manually run the following command after pushing the SSH public key to close the root + password login.
答: 你的linux的ip
答: 取决于你运行docker时的命令行。
下面例子中,源端口就是80
docker container run -d -p 80:10000
ssh root@你的linux的ip pwsh -f /xxx.ps1 -参数名1 参数1
答:
在linux机上,用curl测试,跳转后的结果。若通了,则下一步。若不同,则检查你的网络。
在linux机上,用curl测试,跳转前的结果。
比如 192.168.1.2:80 ------> www.baidu.com:80
先在linux上curl后面的端口(百度),然后curl前面的端口。
答: https://doc.traefik.io/traefik/reference/dynamic-configuration/kv/
https://doc.traefik.io/traefik/routing/providers/kv
答:
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/services/baidushangyou/loadBalancer/servers/0/url' -v 'http://test1.baidu.com:443'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/services/baidushangyou/loadBalancer/servers/1/url' -v 'http://test2.baidu.com:443'
答:
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/routers/my-router-https/entryPoints/0' -v 'websecure'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/routers/my-router-https/service' -v 'noop@internal'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/routers/my-router-https/rule' -v 'Host(`test223.com`) && PathPrefix(`/baidu`)'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/routers/my-router-https/middlewares/0' -v 'https-upstream'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/routers/my-router-https/tls' -v 'true'
答:
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/tls/stores/default/defaultCertificate/certFile' -v 'a:/traefik_v2.9.10/test223.cert'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/tls/stores/default/defaultCertificate/keyFile' -v 'a:/traefik_v2.9.10/test223.key'
答:
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/middlewares/https-upstream/redirectRegex/regex' -v '^https://test223.com/baidu$'
./put-etcdKey.ps1 -endpoint 'http://192.168.1.2:2379' -k 'traefik/http/middlewares/https-upstream/redirectRegex/replacement' -v 'https://www.baidu.com'
答:
./lib/list-etcdKey.ps1 -endpoints 'http://1.2.3.4:2379'
或
./lib/list-k8sKey.ps1 -endpoints 'http://1.2.3.4:2379'
答:
$v = ./lib/get-etcdkey.ps1 -k 'foo' -endpoints 'http://1.2.3.4:2379'
./lib/put-etcdkey.ps1 -k 'foo' -v $v -endpoints 'http://5.6.7.8:2379'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。