Examples of Kubernetes


Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(filterText);
    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();
        PodListSchema pods = kubernetes.getPods();
        KubernetesHelper.removeEmptyPods(pods);
        TablePrinter table = podsAsTable(pods);
        return tableResults(table);
    }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(filterText);
    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();

        ReplicationControllerListSchema replicationControllers = kubernetes.getReplicationControllers();
        printReplicationControllers(replicationControllers, System.out);
        return null;
    }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(filterText);
    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();
        ServiceListSchema services = kubernetes.getServices();
        printServices(services, System.out);
        return null;
    }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(replicationControllerId);
    }

    @Override
    public Result execute(UIExecutionContext context) throws Exception {
        Kubernetes kubernetes = getKubernetes();

        String idText = replicationControllerId.getValue();
        ReplicationControllerSchema replicationController = kubernetes.getReplicationController(idText);
        if (replicationController == null) {
            System.out.println("No replicationController for id: " + idText);
        } else {
            executeReplicationController(replicationController);
        }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(serviceId);
    }

    @Override
    public Result execute(UIExecutionContext context) throws Exception {
        Kubernetes kubernetes = getKubernetes();

        String idText = serviceId.getValue();
        ServiceSchema service = kubernetes.getService(idText);
        if (service == null) {
            System.out.println("No service for id: " + idText);
        } else {
            executeService(service);
        }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        builder.add(podId);
    }

    @Override
    public Result execute(UIExecutionContext context) throws Exception {
        Kubernetes kubernetes = getKubernetes();

        String podIdText = podId.getValue();
        PodSchema podInfo = kubernetes.getPod(podIdText);
        if (podInfo == null) {
            System.out.println("No pod for id: " + podIdText);
        } else {
            executePod(podInfo, podIdText);
        }
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        healthCheck();
    }

    private void healthCheck() {
        FabricService service = fabricService.get();
        Kubernetes kubernetes = getKubernetes();
        if (kubernetes != null && service != null) {
            try {
                Map<String, PodSchema> podMap = KubernetesHelper.getPodMap(kubernetes);
                Container[] containerArray = service.getContainers();
                Collection<PodSchema> pods = podMap.values();
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        this.kubernetesService = kubernetesService;
    }

    @Override
    protected Object doExecute() throws Exception {
        Kubernetes kubernetes = kubernetesService.getKubernetes();
        Objects.notNull(kubernetes, "kubernetes");
        Objects.notNull(services, "services");

        for (String service : services) {
            deleteService(kubernetes, service);
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

        this.kubernetesService = kubernetesService;
    }

    @Override
    protected Object doExecute() throws Exception {
        Kubernetes kubernetes = kubernetesService.getKubernetes();
        Objects.notNull(kubernetes, "kubernetes");
        Objects.notNull(pods, "pods");

        for (String pod : pods) {
            deletePod(kubernetes, pod);
View Full Code Here

Examples of io.fabric8.kubernetes.api.Kubernetes

    @Override
    public int complete(String buffer, int cursor, List<String> candidates) {
        StringsCompleter delegate = new StringsCompleter();
        try {
            Kubernetes kubernetes = kubernetesService.getKubernetes();
            if (kubernetes != null) {
                PodListSchema pods = kubernetes.getPods();
                if (pods != null) {
                    List<PodSchema> items = pods.getItems();
                    if (items != null) {
                        for (PodSchema item : items) {
                            String id = item.getId();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.