0

For context, the cloud provider I'm using for this project is MaaS. I'm not sure if that will have any bearing on the answers to my question, but if that is important context, please answer under the maas context.

I'm brand new to juju. The canonical-kubernetes is the charm I'm using. I'd like to customize the bundle for our particular need.

https://docs.jujucharms.com/2.5/en/reference-bundle is great! The top of the document states: This reference page applies to non-Kubernetes bundles only and that reference document has seemingly no help to me for the bundle.yaml I'm working on.

  1. What is the difference between a "normal" bundle deployment vs a "kubernetes" bundle deployment?
  2. The canonical-kubernetes deployment is deploying machines but the yaml manifests places the resources under the services object. There are seemingly no document references on this difference.
  3. I'm specifically looking for how to do things like tag machines, run cloud-init on a per-machine basis, and other various machine things.

The googs got me this link https://pythonhosted.org/juju-deployer/config.html but I don't think that's accurate for me needs either.

I gleened cloud-init methodologies from https://discourse.jujucharms.com/t/using-model-config-key-cloudinit-userdata/512

and I am pretty sure I didn't do that right because the documentation says it's supposed to be a manifest that's included and it doesn't work when run. But I really need this capability.

I've also opened issues:

https://github.com/juju-solutions/bundle-canonical-kubernetes

https://github.com/juju/docs

series: bionic
description: A highly-available, production-grade Kubernetes cluster.
services:
  easyrsa:
    annotations:
      gui-x: '450'
      gui-y: '550'
    charm: cs:~containers/easyrsa-231
    constraints: root-disk=8G
    num_units: 1
    machine:
      tags:
        - easyrsa
    resources:
      easyrsa: 5
  etcd:
    annotations:
      gui-x: '800'
      gui-y: '550'
    charm: cs:~containers/etcd-411
    constraints: root-disk=8G
    num_units: 3
    options:
      channel: 3.2/stable
    machine:
      tags:
        - etcd
    resources:
      etcd: 3
      snapshot: 0
  flannel:
    annotations:
      gui-x: '450'
      gui-y: '750'
    charm: cs:~containers/flannel-398
    resources:
      flannel-amd64: 108
      flannel-arm64: 108
      flannel-s390x: 94
  kubeapi-load-balancer:
    annotations:
      gui-x: '450'
      gui-y: '250'
    charm: cs:~containers/kubeapi-load-balancer-617
    constraints: root-disk=8G
    expose: true
    num_units: 1
    machine:
      tags:
        - kubeapi-lb
    resources: {}
  kubernetes-master:
    annotations:
      gui-x: '800'
      gui-y: '850'
    charm: cs:~containers/kubernetes-master-642
    constraints: cores=2 mem=4G root-disk=16G
    num_units: 2
    options:
      channel: 1.14/stable
    series: xenial
    machine:
      tags:
        - kubernetes master
    resources:
      cdk-addons: 0
      kube-apiserver: 0
      kube-controller-manager: 0
      kube-proxy: 0
      kube-scheduler: 0
      kubectl: 0
    cloudinit-userdata: |
      runcmd: |
        #!/bin/bash
        <SCRIPT THINGS>
  kubernetes-worker:
    annotations:
      gui-x: '100'
      gui-y: '850'
    charm: cs:~containers/kubernetes-worker-508
    constraints: cores=4 mem=4G root-disk=16G
    expose: true
    num_units: 3
    options:
      channel: 1.14/stable
    series: xenial
    machine:
      tags:
        - kubernetes worker
    resources:
      cni-amd64: 118
      cni-arm64: 110
      cni-s390x: 115
      kube-proxy: 0
      kubectl: 0
      kubelet: 0
  nfs-server:
    num_units: 1
    storage_root: /nfsvol
    expose: true
    charm: cs:nfs-9
    constraints: cores=2 mem=4G
    machine:
      tags:
        - nfs server
envExport:
  services:
    easyrsa:
      to: 0
    etcd:
      to: 1
    kubernetes-master:
      to: 2
    kubernetes-worker:
      to: 3
    kubeapi-load-balancer:
      to: 4
    nfs-server:
      to: 5
relations:
- - kubernetes-master:kube-api-endpoint
  - kubeapi-load-balancer:apiserver
- - kubernetes-master:loadbalancer
  - kubeapi-load-balancer:loadbalancer
- - kubernetes-master:kube-control
  - kubernetes-worker:kube-control
- - kubernetes-master:certificates
  - easyrsa:client
- - nfs-server:nfs
  - kubernetes-worker:nfs
- - etcd:certificates
  - easyrsa:client
- - kubernetes-master:etcd
  - etcd:db
- - kubernetes-worker:certificates
  - easyrsa:client
- - kubernetes-worker:kube-api-endpoint
  - kubeapi-load-balancer:website
- - kubeapi-load-balancer:certificates
  - easyrsa:client
- - flannel:etcd
  - etcd:db
- - flannel:cni
  - kubernetes-master:cni
- - flannel:cni
  - kubernetes-worker:cni

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.