lost and found ( for me ? )

Ubuntu 16.04: deploy Kubernetes cluster with Juju and MAAS

Here are logs when I set up Kubernetes cluster with Juju and MAAS.

MAAS Version 1.9.5+bzr4599-0ubuntu1 (14.04.1)
Juju 2.2.2 ( 2.2.2-xenial-amd64 )

Assume you have already set up Juju and MAAS.

[ deploy Kubernetes clusters ]

download a bundle from https://jujucharms.com/canonical-kubernetes/ and deployed K8s with Juju
# juju deploy ./bundle01.yaml

Here is a bundle I used.
# cat bundle01.yaml
series: xenial
description: 'A nine-machine Kubernetes cluster, appropriate for production. Includes

 three-machine etcd cluster and three Kubernetes worker nodes.

     gui-x: '450'
     gui-y: '550'
   charm: cs:~containers/easyrsa-12
   num_units: 1
     gui-x: '800'
     gui-y: '550'
   charm: cs:~containers/etcd-40
   num_units: 1
     gui-x: '450'
     gui-y: '750'
   charm: cs:~containers/flannel-20
     gui-x: '450'
     gui-y: '250'
   charm: cs:~containers/kubeapi-load-balancer-16
   expose: true
   num_units: 1
     gui-x: '800'
     gui-y: '850'
   charm: cs:~containers/kubernetes-master-35
   num_units: 1
     channel: 1.7/stable
     gui-x: '100'
     gui-y: '850'
   charm: cs:~containers/kubernetes-worker-40
   expose: true
   num_units: 2
     channel: 1.7/stable
- - 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
- - 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

After deploying K8s.
# juju status --format short

- easyrsa/0: (agent:idle, workload:active)
- etcd/0: (agent:idle, workload:active) 2379/tcp
- kubeapi-load-balancer/0: (agent:idle, workload:active) 443/tcp
- kubernetes-master/0: (agent:idle, workload:active) 6443/tcp
 - flannel/0: (agent:idle, workload:active)
- kubernetes-worker/0: (agent:idle, workload:active) 80/tcp, 443/tcp
 - flannel/2: (agent:idle, workload:active)
- kubernetes-worker/1: (agent:idle, workload:active) 80/tcp, 443/tcp
 - flannel/1: (agent:idle, workload:active)

[ access to the dashboard ]

# juju config kubernetes-master enable-dashboard-addons=true
WARNING the configuration setting "enable-dashboard-addons" already has the value "true"

ssh to the kubernetes-master and look into a “config” file.
You will find an IP address of API server, username and credentials.
# juju ssh kubernetes-master/0

ubuntu@m-node05:~$ cat config
- name: admin
   password: credentials
   username: admin

ubuntu@m-node05:~$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080
Heapster is running at http://localhost:8080/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at http://localhost:8080/api/v1/namespaces/kube-system/services/kube-dns/proxy
kubernetes-dashboard is running at http://localhost:8080/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy
Grafana is running at http://localhost:8080/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
InfluxDB is running at http://localhost:8080/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Access to the https:// <IP>/ui , enter username and credentials.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.