func (f *Framework) CreateDeployment(namespace string, deployment *v1.Deployment) error {
	if _, err := f.KubeClient.AppsV1().Deployments(namespace).Create(context.TODO(), deployment, metav1.CreateOptions{}); err != nil {
		return err
	}
	if err := f.WaitForDeployment(deployment.Name, namespace, time.Minute); err != nil {
		return err
	}
	f.WaitForDeploymentPods(deployment.Name, namespace, time.Second*45)
	return nil
}
CreateDeployment creates a deployment and waits for it to show.
package framework
import (
	"context"
	"fmt"
	"time"
	v1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/util/yaml"
)
func (f *Framework) LoadDeploymentManifest(pathToManifest string) (*v1.Deployment, error) {
	manifest, err := openFile(pathToManifest)
	if err != nil {
		return nil, fmt.Errorf("Unable to open file %q: %v", pathToManifest, err)
	}
	deployment := v1.Deployment{}
	if err := yaml.NewYAMLOrJSONDecoder(manifest, 100).Decode(&deployment); err != nil {
		return nil, fmt.Errorf("Unable to decode file %q: %v", pathToManifest, err)
	}
	return &deployment, nil
}