Change:
This demonstration for converting docker compose to a kubernetes demo is referencing some old docker image / manifest types that are no longer supported and I think they fail to build, this breaks the demo workflow. Following the guide as described isn't working... To test, running a confirms this sample yaml file is using an obsolete tag, and more so the container images aren't compliant. Running the kompose conversion & apply works, but the application never shows up when attempting to curl (using for the , or even just changing to for local dev). trying to get the minikube service (with minikube tunnel running), it fails with the following: Checking the pod confirms the image pull fails with an : Same when trying to curl I believe the maintainers need to kindly update the Docker Compose yaml sample file provided to reflect newer docker images! Thanks in advance for this helpful demonstration
This refers specifically to the information contained here: which was last updated funny enough on my birthday, February 5th, 2023. Probably just needs to be updated given newer Dockerfile support versions / manifests
It was also I think necessary to add the Ingress add-on for minikube
/language en
maybe the updated version of this demo is here: as it looks like that docker sample does in fact build with docker. Running kompose convert though doesn't work on that. Probably just some divergence
/kind bug
/retitle Stale page "Translate a Docker Compose File to Kubernetes Resources"
/triage accepted
/assign
Issues with image pull: Warning Failed 17m (x4 over 19m) kubelet Failed to pull image "": Error response from daemon: manifest for not found: manifest unknown: Failed to fetch "v4" from request "/v2/google-samples/gb-frontend/manifests/v4" Changes to commands/files: #Upgrade to v1.33 curl -L -o kompose #Update to docker- based on kompose site examples At services: redis-leader: containername: redis-leader image: redis ports: "6379" redis-replica: containername: redis-replica image: redis ports: "6379" command: redis-server --replicaof redis-leader 6379 --dir /tmp web: containername: web image: ports: "8080:8080" environment: GETHOSTS_FROM=dns labels: LoadBalancer #Apply new yaml files kubectl apply -f redis-leader-, redis-replica-, web-, redis-leader-,redis-replica-,web-tcp- Changes to Output: INFO Kubernetes file "redis-leader-" created INFO Kubernetes file "redis-replica-" created INFO Kubernetes file "web-tcp-" created INFO Kubernetes file "redis-leader-" created INFO Kubernetes file "redis-replica-" created INFO Kubernetes file "web-" created created created created service/redis-leader created service/redis-replica created service/web-tcp created Changes to Testing Services: minikube service web-tcp Starting tunnel for service web-tcp. Opening service default/web-tcp in default browser... Because you are using a Docker driver on linux, the terminal needs to be open to run it. kubectl describe service web-tcp Name: web-tcp Namespace: default Labels: io.kompose.service=web-tcp Annotations: kompose convert LoadBalancer kompose.version: 1.33.0 () Selector: io.kompose.service=web Type: LoadBalancer IP Family Policy: SingleStack IP Families: IPv4 IP: 10.102.30.3 IPs: 10.102.30.3 Port: 8080 8080/TCP TargetPort: 8080/TCP NodePort: 8080 /TCP Endpoints: 10.244.0.5:8080 Session Affinity: None External Traffic Policy: Cluster Events: <none

Discussion:
```sh # Linux <del> curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-linux-amd64 -o kompose </del> <ins> curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-linux-amd64 -o kompose </ins> # macOS <del> curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-darwin-amd64 -o kompose </del> <ins> curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-darwin-amd64 -o kompose </ins> # Windows <del> curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-windows-amd64.exe -o kompose.exe </del> <ins> curl -L https://github.com/kubernetes/kompose/releases/download/v1.34.0/kompose-windows-amd64.exe -o kompose.exe </ins> chmod +x kompose sudo mv ./kompose /usr/local/bin/kompose

1. Go to the directory containing your `docker-compose.yml` file. If you don't have one, test using this one. ```yaml <del> version: "2" </del> services: <del> redis-master: image: registry.k8s.io/redis:e2e </del> <ins> redis-leader: container_name: redis-leader image: redis </ins> ports: - "6379" <del> redis-slave: image: gcr.io/google_samples/gb-redisslave:v3 </del> <ins> redis-replica: container_name: redis-replica image: redis </ins> ports: - "6379" <del> environment: - GET_HOSTS_FROM=dns </del> <ins> command: redis-server --replicaof redis-leader 6379 --dir /tmp </ins> <del> frontend: image: gcr.io/google-samples/gb-frontend:v4 </del> <ins> web: container_name: web image: quay.io/kompose/web </ins> ports: <del> - "80:80" </del> <ins> - "8080:8080" </ins> environment: - GET_HOSTS_FROM=dns labels:

The output is similar to: ```none <del> INFO Kubernetes file "frontend-tcp-service.yaml" created INFO Kubernetes file "redis-master-service.yaml" created INFO Kubernetes file "redis-slave-service.yaml" created INFO Kubernetes file "frontend-deployment.yaml" created INFO Kubernetes file "redis-master-deployment.yaml" created INFO Kubernetes file "redis-slave-deployment.yaml" created </del> <ins> INFO Kubernetes file "redis-leader-service.yaml" created INFO Kubernetes file "redis-replica-service.yaml" created INFO Kubernetes file "web-tcp-service.yaml" created INFO Kubernetes file "redis-leader-deployment.yaml" created INFO Kubernetes file "redis-replica-deployment.yaml" created INFO Kubernetes file "web-deployment.yaml" created </ins> ``` ```bash <del> kubectl apply -f frontend-tcp-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml </del> <ins> kubectl apply -f web-tcp-service.yaml,redis-leader-service.yaml,redis-replica-service.yaml,web-deployment.yaml,redis-leader-deployment.yaml,redis-replica-deployment.yaml </ins> ``` The output is similar to: ```none <del> service/frontend-tcp created service/redis-master created service/redis-slave created deployment.apps/frontend created deployment.apps/redis-master created deployment.apps/redis-slave created </del> <ins> deployment.apps/redis-leader created deployment.apps/redis-replica created deployment.apps/web created service/redis-leader created service/redis-replica created service/web-tcp created </ins> ``` Your deployments are running in Kubernetes.

If you're already using `minikube` for your development process: ```bash <del> minikube service frontend </del> <ins> minikube service web-tcp </ins> ``` Otherwise, let's look up what IP your service is using! ```sh <del> kubectl describe svc frontend </del> <ins> kubectl describe svc web-tcp </ins> ``` ```none <del> Name:                     frontend-tcp Namespace:                default Labels:                   io.kompose.service=frontend-tcp Annotations:              kompose.cmd: kompose convert kompose.service.type: LoadBalancer kompose.version: 1.26.0 (40646f47) Selector:                 io.kompose.service=frontend Type:                     LoadBalancer IP Family Policy:         SingleStack IP Families:              IPv4 IP:                       10.43.67.174 IPs:                      10.43.67.174 Port:                     80  80/TCP TargetPort:               80/TCP NodePort:                 80  31254/TCP Endpoints:                10.42.0.25:80 Session Affinity:         None External Traffic Policy:  Cluster Events: Type    Reason                Age   From                Message ----    ------                ----  ----                ------- Normal  EnsuringLoadBalancer  62s   service-controller  Ensuring load balancer Normal  AppliedDaemonSet      62s   service-controller  Applied LoadBalancer DaemonSet kube-system/svclb-frontend-tcp-9362d276 </del> <ins> Name:                     web-tcp Namespace:                default Labels:                   io.kompose.service=web-tcp Annotations:              kompose.cmd: kompose convert kompose.service.type: LoadBalancer kompose.version: 1.33.0 (3ce457399) Selector:                 io.kompose.service=web Type:                     LoadBalancer IP Family Policy:         SingleStack IP Families:              IPv4 IP:                       10.102.30.3 IPs:                      10.102.30.3 Port:                     8080  8080/TCP TargetPort:               8080/TCP NodePort:                 8080  31624/TCP Endpoints:                10.244.0.5:8080 Session Affinity:         None External Traffic Policy:  Cluster Events:                   <none> </ins> ``` If you're using a cloud provider, your IP will be listed next to `LoadBalancer Ingress`.

resources used. ```sh <del> kubectl delete -f frontend-tcp-service.yaml,redis-master-service.yaml,redis-slave-service.yaml,frontend-deployment.yaml,redis-master-deployment.yaml,redis-slave-deployment.yaml </del> <ins> kubectl delete -f web-tcp-service.yaml,redis-leader-service.yaml,redis-replica-service.yaml,web-deployment.yaml,redis-leader-deployment.yaml,redis-replica-deployment.yaml </ins> ``` <!-- discussion -->