Образец Kompose up не запускайте развертывание под K3s - PullRequest
0 голосов
/ 14 апреля 2020

Я установил K3s с помощью следующей команды и успешно

# export INSTALL_K3S_EXEC="--write-kubeconfig ~/.kube/config --write-kubeconfig-mode 666"
# curl -sfL https://docs.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -

Затем я попытался запустить docker-compos.yaml с официальным примером

version: "2"

services:
  redis-master:
    image: gcr.io/google_containers/redis:e2e
    ports:
      - "6379"
  redis-slave:
    image: gcr.io/google_samples/gb-redisslave:v1
    ports:
      - "6379"
    environment:
      - GET_HOSTS_FROM=dns
  frontend:
    image: gcr.io/google-samples/gb-frontend:v4
    ports:
      - "80:80"
    environment:
      - GET_HOSTS_FROM=dns

Но когда я начал, я нашел только его запустил службу не запустил deployments

# kompose -f docker-compose.yaml up
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 
INFO Successfully created Service: frontend       
INFO Successfully created Service: redis-master   
INFO Successfully created Service: redis-slave    

Your application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details.

# kubectl get deployment,svc,pods,pvc
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/kubernetes     ClusterIP   10.43.0.1       <none>        443/TCP    14h
service/frontend       ClusterIP   10.43.62.105    <none>        80/TCP     8s
service/redis-master   ClusterIP   10.43.11.115    <none>        6379/TCP   8s
service/redis-slave    ClusterIP   10.43.180.220   <none>        6379/TCP   8s

Нет следующей части

INFO Successfully created deployment: redis-master
INFO Successfully created deployment: redis-slave
INFO Successfully created deployment: frontend

У меня нет configuration somewhere или kompose недоступно в k3s?

ОС - Ubuntu 18.04.2 LTS
k3s, версия - v1.17.4+k3s1 (3eee8ac3)
, комплектация - 1.21.0 (992df58d8)

...