webhook-demo icon indicating copy to clipboard operation
webhook-demo copied to clipboard

请问一下为什么部署sleep.yaml,pod中只有一个container?

Open Deerxl opened this issue 4 years ago • 2 comments

步骤是完全按照博主的文章 http://www.iceyao.com.cn/2019/06/05/%E7%8E%A9%E8%BD%ACK8s-AdmissionWebhook/ 来的,只修改了镜像的地址(因为k8s不在本地),但是pod没有自动打上app.kubernetes.io/name标签,也没有两个container,标签只有app=sleep,pod-template-hash=5dd48c8869。service同样只有标签app=sleep,ingress没有标签。

Deerxl avatar Mar 17 '21 06:03 Deerxl

已解决。

Deerxl avatar Mar 18 '21 02:03 Deerxl

博主在脚本webhook-patch-ca-bundle.sh内的“ export CA_BUNDLE=$(kubectl config view --raw --flatten -o json | jq -r '.clusters[] | select(.name == "'$(kubectl config current-context)'") | .cluster."certificate-authority-data"') ”出现了问题,这个脚本不会生成“certificate-authority-data”字段,而是“kubernetes-admin-cf0a7805341d8446ea7726b20d8222020”。

Deerxl avatar Mar 18 '21 02:03 Deerxl