new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static boolean createNamespace(String name) throws ApiException {
    V1ObjectMeta meta = new V1ObjectMetaBuilder().withName(name).build();
    V1Namespace namespace = new V1NamespaceBuilder().withMetadata(meta).build();

    try {
      coreV1Api.createNamespace(
              namespace, // name of the Namespace
              PRETTY, // pretty print output
              null, // indicates that modifications should not be persisted
              null // name associated with the actor or entity that is making these changes
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }

    return true;
  }
/**
   * Create a Kubernetes namespace.
   *
   * @param name the name of the namespace
   * @return true on success, false otherwise
   * @throws ApiException if Kubernetes client API call fails
   */
Create a Kubernetes namespace.
@param name the name of the namespace
@return true on success, false otherwise
@throws ApiException if Kubernetes client API call fails
Create a Kubernetes namespace . @param name the name of the namespace @return true on success false otherwise @throws ApiException if Kubernetes client API call fails
public static boolean createNamespace(String name) throws ApiException {
    V1ObjectMeta meta = new V1ObjectMetaBuilder().withName(name).build();
    V1Namespace namespace = new V1NamespaceBuilder().withMetadata(meta).build();
    try {
      coreV1Api.createNamespace(
              namespace, 
              PRETTY, 
              null, 
              null 
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }
    return true;
  }
public static boolean createNamespace ( String name ) throws ApiException { V1ObjectMeta meta = new V1ObjectMetaBuilder ( ) . withName ( name ) . build ( ) ; V1Namespace namespace = new V1NamespaceBuilder ( ) . withMetadata ( meta ) . build ( ) ; try { coreV1Api . createNamespace ( namespace , PRETTY , null , null ) ; } catch ( ApiException apex ) { getLogger ( ) . severe ( apex . getResponseBody ( ) ) ; throw apex ; } return true ; }
Create a Kubernetes namespace.
Create a Kubernetes namespace .
// name of the Namespace // pretty print output // indicates that modifications should not be persisted // name associated with the actor or entity that is making these changes