Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATA Error while deploying application: deployments.extensions "cache" already exists #1138

Closed
hazcod opened this issue Jun 4, 2019 · 1 comment

Comments

@hazcod
Copy link

hazcod commented Jun 4, 2019

Hi,

Kompose 1.18.0
FIrst time trying to deploy to kubernetes (on GKE) and I'm trying to re-use my composefiles.

$ kompose -f yml --verbose up       
DEBU Docker Compose version: 3                    
INFO We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application. If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. 
 
INFO Deploying application in "default" namespace 
FATA Error while deploying application: deployments.extensions "cache" already exists 

Any idea what I'm doing wrong?
Composefile:

version: '3'

volumes:
    db-data:
    ssl:
    mail-data:
    mq-data:
    openvas-data:

networks:
  frontend:

  backend:

services:
    cache:
        container_name: cache
        image: "cache:${stage}"
        hostname: cache
        expose:
            - 11211
        tty: false
        restart: "always"
        read_only: true
        tmpfs:
            - /tmp/
        security_opt:   
            - "no-new-privileges"
        networks:
            - backend
        deploy:
            resources:
                limits:
                    memory: 4GB

    db:
        container_name: db
        image: "db:${stage}"
        hostname: db
        volumes:
            - db-data:/app/data
        expose:
            - 5432
        tty: false
        restart: "always"
        read_only: true
        tmpfs:
            - /tmp/
        security_opt:   
            - "no-new-privileges"
        networks:
            - backend
        deploy:
            resources:
                limits:
                    memory: 2GB

    download:
        container_name: download
        image: "download:${stage}"
        hostname: download
        tmpfs: /tmp/  
        cap_add:
            - NET_BIND_SERVICE
        expose:
            - 8080
        tty: false
        restart: "always"
        read_only: true
        
        security_opt:
            - "no-new-privileges"
        deploy:
            resources:
                limits:
                    memory: 1GB
        networks:
            - backend

    mail:
        container_name: mail
        image: "mail:${stage}"
        hostname: mail
        expose:
          - 25000
        volumes:
            - mail-data:/app/data
        tty: true
        restart: "always"
        read_only: true
        tmpfs:
            - /tmp
        security_opt:
            - "no-new-privileges"
        networks:
            - backend

    mq:
        container_name: mq
        image: "mq:${stage}"
        hostname: mq
        expose:
            - 5673
        tty: false
        restart: "always"
        #read_only: true #touch /etc/rabbitmq/rabbitmq.conf
        security_opt:   
            - "no-new-privileges"
        networks:
            - backend
        volumes:
            - mq-data:/var/lib/rabbitmq
        deploy:
            resources:
                limits:
                    memory: 4GB

    openvas:
        container_name: openvas
        image: mikesplain/openvas
        hostname: openvas
        tty: false
        restart: "always"
        #    ports:
        #    - "4433:443"
        expose:
        - 4433
        security_opt:
        - "no-new-privileges"
        deploy:
          resources:
            limits:
              memory: 6GB
        networks:
        - backend
        volumes:
          - openvas-data:/var/lib/openvas/mgr/
        healthcheck:
          test: ["CMD", "curl -k https://localhost:8443/login/login.html"]
          interval: 30s

    php:
        container_name: php
        image: "php:${stage}"
        hostname: php
        expose:
            - 8080
        tty: false
        read_only: true
        tmpfs: /tmp/
        security_opt:
            - "no-new-privileges"
        networks:
            - backend
        deploy:
            resources:
                limits:
                    memory: 4GB
        depends_on:
            - db
        links:
            - db
            - mail
            - mq

    processor:
        container_name: processor
        image: "slave:${stage}"
        links:
          - mq
          - db
        tty: false
        restart: "always"
        read_only: true

        security_opt:
            - "no-new-privileges"
        deploy:
            resources:
                limits:
                    memory: 4GB
        depends_on:
            - slave
            - mq
            - db
        networks:
            - backend

    slave:
        container_name: slave
        image: "slave:${stage}"
        links:
          - mq
          - openvas
          - mail
        tty: false
        restart: "always"
        read_only: true

        security_opt:
            - "no-new-privileges"
        deploy:
            resources:
                limits:
                    memory: 4GB
        depends_on:
            - mq
            - openvas
            - mail
        networks:
            - backend

    web:
        container_name: web
        image: "web:${stage}"
        hostname: web
        tmpfs: /tmp/  
        cap_add:
            - NET_BIND_SERVICE
        expose:
            - 8080
            - 8443
        tty: false
        restart: "always"
        read_only: true
        
        security_opt:
            - "no-new-privileges"
        deploy:
            resources:
                limits:
                    memory: 4GB
        depends_on:
            - php
            - download
        networks:
            - frontend
            - backend
        links:
            - php
            - download


@hazcod
Copy link
Author

hazcod commented Jun 4, 2019

Seems to be fixed with kubectl apply..

@hazcod hazcod closed this as completed Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant