func createNginxPod(client clientset.Interface, namespace string, nodeSelector map[string]string, pvclaims []*v1.PersistentVolumeClaim) (*v1.Pod, error) {
	pod := makeNginxPod(namespace, nodeSelector, pvclaims)
	pod, err := client.CoreV1().Pods(namespace).Create(context.TODO(), pod, metav1.CreateOptions{})
	if err != nil {
		return nil, fmt.Errorf("pod Create API error: %v", err)
	}
	// Waiting for pod to be running
	err = e2epod.WaitForPodNameRunningInNamespace(client, pod.Name, namespace)
	if err != nil {
		return pod, fmt.Errorf("pod %q is not Running: %v", pod.Name, err)
	}
	// get fresh pod info
	pod, err = client.CoreV1().Pods(namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{})
	if err != nil {
		return pod, fmt.Errorf("pod Get API error: %v", err)
	}
	return pod, nil
}
// createNginxPod creates an nginx pod.
createNginxPod creates an nginx pod.
// createNginxPod creates an nginx pod .
func createNginxPod(client clientset.Interface, namespace string, nodeSelector map[string]string, pvclaims []*v1.PersistentVolumeClaim) (*v1.Pod, error) {
	pod := makeNginxPod(namespace, nodeSelector, pvclaims)
	pod, err := client.CoreV1().Pods(namespace).Create(context.TODO(), pod, metav1.CreateOptions{})
	if err != nil {
		return nil, fmt.Errorf("pod Create API error: %v", err)
	}
	err = e2epod.WaitForPodNameRunningInNamespace(client, pod.Name, namespace)
	if err != nil {
		return pod, fmt.Errorf("pod %q is not Running: %v", pod.Name, err)
	}
	pod, err = client.CoreV1().Pods(namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{})
	if err != nil {
		return pod, fmt.Errorf("pod Get API error: %v", err)
	}
	return pod, nil
}
func createNginxPod ( client clientset . Interface , namespace string , nodeSelector map [ string ] string , pvclaims [ ] * v1 . PersistentVolumeClaim ) ( * v1 . Pod , error ) { pod := makeNginxPod ( namespace , nodeSelector , pvclaims ) pod , err := client . CoreV1 ( ) . Pods ( namespace ) . Create ( context . TODO ( ) , pod , metav1 . CreateOptions { } ) if err != nil { return nil , fmt . Errorf ( " " , err ) } err = e2epod . WaitForPodNameRunningInNamespace ( client , pod . Name , namespace ) if err != nil { return pod , fmt . Errorf ( " " , pod . Name , err ) } pod , err = client . CoreV1 ( ) . Pods ( namespace ) . Get ( context . TODO ( ) , pod . Name , metav1 . GetOptions { } ) if err != nil { return pod , fmt . Errorf ( " " , err ) } return pod , nil }
createNginxPod creates an nginx pod.
createNginxPod creates an nginx pod .
// Waiting for pod to be running // get fresh pod info