Signed-off-by: ashgit301 <ashvin.p@bluemeric.com>
Change-Id: Ibcf6c944202b20e6a72bc7732c6de255ecfbc0c5
snap install microk8s --classic --channel=1.20/stable >> microk8s_install.log
microk8s status --wait-ready
microk8s enable dns >> microk8s_install.log
snap install microk8s --classic --channel=1.20/stable >> microk8s_install.log
microk8s status --wait-ready
microk8s enable dns >> microk8s_install.log
+ microk8s enable storage >> microk8s_install.log
microk8s add-node > microk8s.join_token
microk8s config > configFile-master
EOF
microk8s add-node > microk8s.join_token
microk8s config > configFile-master
EOF
"sudo sed -i 's/#MOREIPS/IP.7 = ${self.public_ip}\\n#MOREIPS/g' /var/snap/microk8s/current/certs/csr.conf.template",
"sudo sleep 1m",
"sudo microk8s stop",
"sudo sed -i 's/#MOREIPS/IP.7 = ${self.public_ip}\\n#MOREIPS/g' /var/snap/microk8s/current/certs/csr.conf.template",
"sudo sleep 1m",
"sudo microk8s stop",
provisioner "local-exec" {
command = <<EOT
touch token
provisioner "local-exec" {
command = <<EOT
touch token
+ mkdir /root/.ssh && chmod 0700 /root/.ssh
ssh-keyscan -H ${self.public_dns} >> ~/.ssh/known_hosts
scp -i terraform.pem ubuntu@${self.public_dns}:/microk8s.join_token .
tail -n1 microk8s.join_token >> token
ssh-keyscan -H ${self.public_dns} >> ~/.ssh/known_hosts
scp -i terraform.pem ubuntu@${self.public_dns}:/microk8s.join_token .
tail -n1 microk8s.join_token >> token
resource "null_resource" "cluster" {
provisioner "remote-exec" {
inline = ["sudo microk8s kubectl get no >> kubectl.info"]
resource "null_resource" "cluster" {
provisioner "remote-exec" {
inline = ["sudo microk8s kubectl get no >> kubectl.info"]
output "private_ip" {
value = aws_instance.master.private_ip
}
output "private_ip" {
value = aws_instance.master.private_ip
}
+++ /dev/null
- microk8s join 172.31.1.7:25000/f9248352b1c01fd71b52c29880a177b5
- microk8s join 172.31.10.73:25000/23c77c9fff9e96b8cb5599aa6ac38eac
- microk8s join 172.31.3.101:25000/34d8296750d285c7deba6b62e8d12e44
sudo apt update -y >> microk8s_install.log
sudo apt install snapd -y >> microk8s_install.log
sudo apt update -y >> microk8s_install.log
sudo apt install snapd -y >> microk8s_install.log
-sudo snap install microk8s --classic --channel=1.20/stable >> microk8s_install.log
+snap install microk8s --classic --channel=1.20/stable >> microk8s_install.log
sudo microk8s enable dns >> microk8s_install.log
sudo ${token} >> microk8s_install.log
microk8s config > configFile-worker
sudo microk8s enable dns >> microk8s_install.log
sudo ${token} >> microk8s_install.log
microk8s config > configFile-worker