K8S — AdmissionWebhook

Kubernetes Alemi
Bir kubectl get po nun hikayesi — Bölüm 1

5.Adım

What is the Problem?

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: manas
webhooks:
- name: the-validator.img-validation.svc
clientConfig:
service:
name: the-validator
namespace: img-validation
path: "/validate"
caBundle: "${CA_BUNDLE}"
rules:
- operations: ["CREATE"]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
- operations: ["CREATE"]
apiGroups: [""]
apiVersions: ["apps/v1"]
resources: ["deployment"]
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.load_cert_chain("/etc/certs/cert.pem", "/etc/certs/key.pem")
if __name__ == "__main__":
app.run(debug=True, host="0.0.0.0", ssl_context=context)
kubectl run app-new --generator=run-pod/v1 --image my-repo/re1dis
Error from server: admission webhook "the-validator.img-validation.svc" denied the request: Image repository is not allowed

Son olarak;

Kaynakça

--

--

PythonRubyLinux(❤)

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store