503 Service Temporarily Unavailable nginx/1.13.9 in jenkins x - kubernetes

I have created kubernetes cluster using minikube and installed Jenkins x on it.
I am not able to access the Jenkins x dashboard.
Error 503 Service Temporarily Unavailable nginx/1.13.9.
note: I have tried with restarting minikube cluster also.

As mentioned by James Rawlings in the comments, it's likely to be a resource issue. The recommendations in the manual are:
A known good configuration on a 2015 model Macbook Pro is to use 8 GB of RAM, 8 cores, a 150 GB disk size and hyperkit.
The disk size is particularly large as a number of images will need to be downloaded.
So we highly recommend using one of the public clouds above to try out Jenkins X. They all have free tiers so it should not cost you any significant cash and it’ll give you a chance to try out the cloud.
Default minikube installation uses only 2048 MB of RAM, 2 CPU cores and 20Gb disk space. You can adjust minikube VM size using command line options:
$ minikube start --cpus=8 --memory=8192 --disk-size=150g --vm-driver=hyperkit
or use jx tool for that:
For MacOS
$ brew install docker-machine-driver-hyperkit
# docker-machine-driver-hyperkit need root owner and uid
$ sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
$ sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
$ brew tap jenkins-x/jx
$ brew install jx
$ jx create cluster minikube
For linux:
$ curl -L https://github.com/jenkins-x/jx/releases/download/v1.3.784/jx-linux-amd64.tar.gz | tar xzv
$ sudo mv jx /usr/local/bin
$ jx create cluster minikube

Related

Entando 6 Installation Issue

I have been trying to install Entando 6 on my Mac following the instructions on http://docs.entando.com, however when deploying to Kubernetes I get an error with quickstart-kc-deployer. Has anyone managed to successfully go through with the installation?
deployment failure
Also I am new to Kubernetes and trying to access any logs, however as of now I have not been able to access logs and understand a bit more what the root cause of the failure is. Help on that is also more than welcome as well.
Thanks.
If you're in a local development environment the best bet would be to try the new instructions at dev.entando.org. If you're installing on a cloud Kubernetes provider try the updated instructions here.
I've reproduced them here for completeness:
Install Multipass (https://multipass.run/#install
Launch VM
multipass launch --name ubuntu-lts --cpus 4 --mem 8G --disk 20G
Open a shell multipass shell ubuntu-lts
Install k3s curl -sfL https://get.k3s.io | sh -
Download Entando custom resource definitions
curl -L -C - https://raw.githubusercontent.com/entando/entando-releases/v6.2.0/dist/qs/custom-resources.tar.gz | tar -xz
Create custom resources
sudo kubectl create -f dist/crd
Create namespace
sudo kubectl create namespace entando
Download Helm chart
curl -L -C - -O https://raw.githubusercontent.com/entando/entando-releases/v6.2.0/dist/qs/entando.yaml
Configure access to your cluster
IP=$(hostname -I | awk '{print $1}')
sed -i "s/192.168.64.25/$IP/" entando.yaml
If you want to deploy on a cloud provider (EKS, AKS, GKE) then there are new instructions under the Configuration and Operations section at
https://dev.entando.org/next/tutorials

Virtualbox running inside Linux Mint : issue with minikube credentials

On my laptop I have Linux Mint OS. Details as below:
Mint version 19,
Code name : Tara,
PackageBase : Ubuntu Bionic
Cinnamon (64-bit)
I have installed kubectl binary using curl from this reference site: https://kubernetes.io/docs/tasks/tools/install-kubectl/
commands used for kubectl installation:
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
installed minikube on local linux machine using the link:
https://github.com/kubernetes/minikube/releases
command used for minikube installation:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.29.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
Downloaded this VirtualBox 5.2.18 for Linux Ubuntu 18.04 / Debian 10 AMD64 from https://www.virtualbox.org/wiki/Downloads
THen I lanuched virtualbox manager. There is no virtual machine created.
Then followed quickstart guide on my local Linux Mint machine:
https://github.com/kubernetes/minikube/blob/v0.29.0/README.md
On my local Linux mint machine under downloads directory, the moment I run command "minikube start" :
xxxxxxxx:~/Downloads$ minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
171.87 MB / 171.87 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Though I am running minikue start command on my local Linux machine, it says its starting minikube in virtualmachine inside Oracle virtualbox manager.
My first question is HOW? Is there any specific setting that is being done behind the scenes to have minikube getting started in VM installed on my operating system (in this case I am on Linux mint 19)
minikube getting started in VM
If I double click on minikube running on VM, then it opens up a screen where it asks me logging to minikube. Please see below screenshot.
minikube asking credentials
My second question is: I haven't set any credentials for minikube. What could be the credentials? Is there any way to set credentials?
UPDATE 1
As per comment by #Rico , for his 2nd point, he said "to connect to minikube VM you can run minikube ssh" isn't it same like what I showed in 2nd attached screenshot in my issue? I mean double click on minikube VM running inside oracle virtualbox manager and that pops up screen asking for login credentials.
However, I tried to use command: minikube ssh on my local machine after starting minikube.
xxxxxxxxxxxxxx:~$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ ls
$ pwd
/home/docker
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
k8s.gcr.io/coredns 1.2.2 367cdc8433a4 4 weeks ago 39.2MB
k8s.gcr.io/kubernetes-dashboard-amd64 v1.10.0 0dab2435c100 5 weeks ago 122MB
k8s.gcr.io/kube-apiserver-amd64 v1.10.0 af20925d51a3 6 months ago 225MB
k8s.gcr.io/kube-controller-manager-amd64 v1.10.0 ad86dbed1555 6 months ago 148MB
k8s.gcr.io/kube-scheduler-amd64 v1.10.0 704ba848e69a 6 months ago 50.4MB
k8s.gcr.io/etcd-amd64 3.1.12 52920ad46f5b 6 months ago 193MB
k8s.gcr.io/kube-addon-manager v8.6 9c16409588eb 7 months ago 78.4MB
k8s.gcr.io/k8s-dns-kube-dns-amd64 1.14.8 80cc5ea4b547 8 months ago 50.5MB
k8s.gcr.io/pause-amd64 3.1 da86e6ba6ca1 9 months ago 742kB
k8s.gcr.io/echoserver 1.4 a90209bb39e3 2 years ago 140MB
$
It didn't ask me any credentials.
So should I say that "Minikube uses boot2docker as its base image, so the default SSH login to the VM ends up being docker:tcuser"
UPDATE 2
As per #Rico: "basically when you do minikube ssh it connects to the VM using private/public key authentication" - I agree. It didn't ask me any credentials when I did "minikube ssh" command from my host machine.
also as per point 1: "with command 'minikube start' it starts the VM that has all the kubernetes components in it" - So for this I went ahead and tried to run any kubectl command after ssh ing into minikube and its saying command not found.
$ kubectle get pods
-bash: kubectle: command not found
However it does recognize docker command
$ docker --version
Docker version 17.12.1-ce, build 7390fc6
I also tried to find VM details
$ uname -a
Linux minikube 4.15.0 #1 SMP Thu Sep 27 17:28:06 UTC 2018 x86_64 GNU/Linux
The short answer, minkube downloads a VM image to your host machine, in this case, Mint Linux for you then it starts the VM that has all the kubernetes components in it.
Credentials can be from any user in the VM OS. To connect to the minikube VM you can run minikube ssh from your host. From there you can run something like sudo adduser to add any user you like and set the credentials that you'd like too.
Note: when you run minikube ssh you connect to the VM using ssh and it uses private/public key ssh authentication.
As a based image Minikube uses boot2docker, and default login details are docker:tcuser, you can also login using minikube ssh and tokens created by Minikube will be used to login without prompting for your login details.
You should first remove the old cluster minikube delete and create a new one minikube start.
You do not need to have VirtualBox installed as Minikube will stat it's own VM.
Of course, you can specify which VM driver should be used, using minikube start --vm-driver=virtualbox.
Please read the instructions provided on kubernetes.io regarding Minikube installation.
Thanks Shivraj and Rico for the posting questions and replies. They were badly needed.
To your problem Shivraj, please fire the kubectl commands on host machine.
I have also done a similar setup on my laptop with minikube creating a Linux VM for me. Docker images are running within the VM and kubectl is on the host machine.
I am following the link below; issuing kubectl commands on my host and is working perfectly fine.
Hope it helps.

Can't Install Kubernetes on Ubuntu 16.04

I have tried to install Kubernetes on 3 separate Ubuntu 16.04 machines, with poor results. On all three machines, the recommended installation, using snap and conjure-up did not work:
gknight#pz1:~$ sudo snap install conjure-up --classic
[sudo] password for gknight:
gknight#pz1:~$ sudo reboot
gknight#pz1:~$ conjure-up kubernetes
dropping privs did not work
This is the snap version:
gknight#pz1:~$ snap --version
snap 2.33.1ubuntu2
snapd 2.33.1ubuntu2
series 16
ubuntu 16.04
kernel 4.4.0-130-generic
On two, local, machines, the repository method worked:
sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add
add the following to sources.list.d, as kubernetes.list:
deb http://apt.kubernetes.io/ kubernetes-xenial main
apt-get update
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
But, on a remote 512mb KVM VPS (PnZ Hosting), although Docker installs and runs just fine, when I install kubelet, etc. and do nothing else, it soon runs the uptime load average up to 12 or so, and I can barely get through to it to reboot. There are no obvious error messages (and swap is turned off).
So, does the "conjure-up" method work on any Ubuntu 16.04 today?
What is Kubernetes doing that's taking over the KVM machine?
Finally, is there any other way to install Kubernetes?
remote 512mb KVM VPS
That's almost certainly the problem, as I don't know of very much software nowadays that will run in that little memory. It matches your experience that the machine will start swapping like mad, driving the I/O pressure through the roof
Agree with #Matthew & #Michael - 512mb is not enough to run Kubernetes.
Increase your memory up to 1GB min and retry.
Apiserver and etcd together are fine on a machine with 1 core and 1GB
RAM for clusters with 10s of nodes.
You can read more documentation here.
Conjure method works fine for me using this instruction.
Ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Ways to install Kubernetes:
Local Kubernetes development with LXD
Running Kubernetes Locally via Minikube
Using kubeadm
Use prepared cloud solutions, for example Google Kubernetes Engine, Amazon EKS or many many others.

How to Mount Multiple CephFS on Client-Node?

I'd Created three CephFS and try to Mount it on Client node but didn't find any way to mount specific one Cephfs. I'd tried
mount -t ceph mon-node:/ /mnt/apachefs/ -o mds_namespace=webfs,secret=ceph-authtool -p /etc/ceph/ceph.client.admin.keyring
But it fails, Is there any other way to Mount Multiple File systems on Client node with use of kernel Driver, mount.ceph or ceph-fuse?
It is possible to specify multiple CephFS by following options.
-o mds_namespace ... kernel Driver (mount -t ceph)
--client_mds_namespace ... ceph fuse (cephf-fuse)
I am pretty sure that -o mds_namespace did not work due to old kernel version. If you are using CentOS7, please test it with ceph-fuse 12.2.4 or later version with (--client_mds_namespace). It worked fine on my env.
If you using Debian based system, you can install ceph-fs-common package with apt, like: apt-get install -y ceph-fs-common.
ceph fs volume create nextcloud [<placement>]
ceph fs volume create okd-admin [<placement>]
#/etc/fstab
### one
10.10.20.6:6789:/folder1 /USERDATA ceph name=admin,secretfile=/etc/ceph/secret.key,fs=nextcloud,noatime,_netdev 0 2
### two
10.10.20.5:6789:/folder2 /mnt/cephfs ceph name=okd-admin,secretfile=/etc/ceph/secret-openshift.key,fs=openshift,noatime,_netdev 0 2

sailsjs installation on digital ocean ubuntu vps

I am trying to install sailsjs globally on my digital ocean vps but every time process seems to get killed . Any idea why it is happening and how I can overcome this problem. Let me know if more debug info is required.
Try1:
Try2:
Try3:
You need to add a SWAP in digitalocean to temporarily store the data when installing sails or Shiny.
Try the following code to allocate storage to a swap file:
sudo fallocate -l xx /swapfile
xx is the disk storage you want to assign, I found 1G is enough for my sails project. Then make the file enable for swap
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
The information could be found in https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04