Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #go
- handler := clientset.CoreV1().Pods("").PodInterface
- pod := apiv1.Pod{
- TypeMeta: metav1.TypeMeta{
- Kind: "Pod",
- APIVersion: "v1",
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "my-pod",
- Namespace: "my-namespace",
- },
- Spec: apiv1.PodSpec{
- Containers: []apiv1.Container{
- {
- Name: "my-container",
- Image: "my-container",
- },
- },
- },
- }
- result, err := handler.Create(pod)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement