Class PodContainer


  • public class PodContainer
    extends Pod
    A representation of a Kubernetes Pod container.
    Author:
    Jonathan Knight
    • Constructor Detail

      • PodContainer

        public PodContainer​(K8sCluster k8s,
                            String podName,
                            String containerName)
        Create a PodContainer in a Pod in the default namespace.
        Parameters:
        k8s - the K8sCluster containing the parent Pod
        podName - the name of the Pod
        containerName - the name of this container
      • PodContainer

        public PodContainer​(K8sCluster k8s,
                            String podName,
                            String containerName,
                            String namespace)
        Create a PodContainer.
        Parameters:
        k8s - the K8sCluster containing the parent Pod
        podName - the name of the Pod
        containerName - the name of this container
        namespace - the namespace that the parent Pod is running in
    • Method Detail

      • getContainerName

        public String getContainerName()
        Obtain the name of this container.
        Returns:
        the name of this container
      • getArgs

        protected List<String> getArgs​(String command)
        Obtain the base kubectl arguments.
        Overrides:
        getArgs in class Pod
        Parameters:
        command - the kubectl command
        Returns:
        the base kubectl arguments
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class Pod
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Pod