Created
August 8, 2019 08:15
-
-
Save leoh0/6b2bd150d941d9a34647bc5791b35115 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
curl -s \ | |
--cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt \ | |
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ | |
-H 'Content-Type: application/json' \ | |
-d'{"apiVersion":"v1","kind":"Pod","metadata":{"name":"nginx"},"spec":{"containers":[{"name":"nginx","image":"nginx","ports":[{"containerPort":80}]}]}}' \ | |
https://kubernetes.default.svc/api/v1/namespaces/$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)/pods | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment