Home avatar

蜷缩的蜗牛

专注云原生运维

Istio部署实战

Helm 安装

安装基础资源

1
2
3
helm template istio-base manifests/charts/base \
     -n istio-system \
     --set base.enableCRDTemplates=true

Openconnect双因素认证

修改认证方式

1
2
# vim /etc/ocserv/ocserv.conf
auth = "plain[passwd=/etc/ocserv/ocpasswd,otp=/etc/ocserv/ocserv.otp]"

配置pam

1
echo "auth requisite pam_oath.so debug usersfile=/etc/ocserv/ocserv.otp window=20" >> /etc/pam.d/ocserv

Openconnect设置用户组实现多路由

1.首先添加两个带分组的用户

1
2
ocpasswd -c /etc/ocserv/ocpasswd -g gruop1 user1 
ocpasswd -c /etc/ocserv/ocpasswd -g gruop2 user2

2.添加创建路由表组

1
2
3
mkdir /etc/ocserv/group 
echo -e "route = 10.10.0.0/255.255.255.0" >> /etc/ocserv/group/group1 
echo -e "no-route = 211.80.0.0/255.240.0.0" >> /etc/ocserv/group/group2

以上连个路由表是演示group1和group2随便写的 请自行添加路由规则 此外路由表里还可以写DNS 短线时间的参数

理解Iptable

iptables 作为 Linux 内核中的重要功能,有着广泛的应用,在 Istio 中默认就是利用 iptables 做透明流量劫持的。理解 iptables,对于我们理解 Istio 的运作有十分重要的作用。本文将为大家简单介绍下 iptbles。

GitHub Api接口

获取仓库信息

1
2
3
4
curl --request GET \
--url "https://api.github.com/repos/kbsonlong/kubernetes-guide" \
--header "Accept: application/vnd.github.v3+json" \
--header "Authorization: Bearer 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"

删除仓库

0%