Tuesday, October 23, 2018

When delete a pod in kubernetes, it respawn the same again


When we delete a pod using kubectl command, it get respawn automatically. This is one of the feature of Kubernetes.

[root@compute-instance1 ~]# kubectl get pods | grep ImagePullBackOff
quickstart-se-68d7ffb868-l7pvk                    0/1       ImagePullBackOff   0          12m

[root@compute-instance1 ~]#

How to solve this?

[root@compute-instance1 ~]# kubectl get all
This command will list down all the details.

[root@compute-instance1 ~]# kubectl delete deploy/quickstart-se svc/quickstart-se
deployment "quickstart-se" deleted
service "quickstart-se" deleted
[root@compute-instance1 ~]#

This helps to delete that particular pod from K8s.

Thursday, October 18, 2018

Error starting host: Error getting state for host: machine does not exist

Error when starting minikube after a delete

C:\Windows\System32>minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E1018 10:37:54.731596    8556 start.go:174] Error starting host: Error getting state for host: machine does not exist.

E1018 10:37:54.750682    8556 start.go:180] Error starting host:  Error getting state for host: machine does not exist


Solution to fix this error:

1. Change the folder to your .minikube (for me its C:\Users\shvijai\.minikube\cache\iso)
2. Delete the minikube iso file
3. Try minikube start

It works.

Wednesday, October 17, 2018

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Error when i do "mvn package"

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

I am not using any IDE, i am using my cmd prompt. My java version is 1.8 and maven version is 3.5

1. Got to your project folder and find the pom.xml file
2. Find the line having "<artifactId>maven-compiler-plugin</artifactId>"
3. Add the following line (based on your java location path)

<executable>C:\Program Files\Java\jre1.8.0_181\bin\javacpl.exe</executable>


4. Save the pom.xml
5. Run "mvn package", it will work.

Wednesday, September 26, 2018

Compare Wercker and Jenkins

Here, I am trying to explore the features of Wercker and Jenkins. Its clear that the Jenkins has a good end-user count, and it can install in your local networks.

Here is a high level comparison

  • Wercker’s Open Source CLI tool enables developers to do much of the rapid iteration in a build/test/deploy model without leaving their local development environment, the Wercker CLI runs the same core tech of our online SaaS product so developers can move toward achieving dev/prod parity. Jenkins is a do-anything box. You have to spend time setting it up to do Docker runs, including keeping your build environment clean.
  • Wercker Pipelines enables full build, test and deployment pipelines to be executed, with Docker as a first class citizen, everything runs in a docker container and artifacts can be docker containers. In Jenkins we need to add slave node pools. The jobs will run on these nodes.
  • Wercker Releases is a private Docker registry that allows you to store your Docker container images on Oracle Cloud Infrastructure for fast, scalable retrieval and deployment. Wercker container registry is fully Integrated with Wercker pipelines and clusters. In Jenkins, we need to add and configure the registry.
  • Wercker clusters is a fully managed Kubernetes engine running on high performance Oracle Cloud Infrastructure. Tightly coupled to Wercker Releases and Pipelines. Clusters is dynamically scalable from one dashboard on the Wercker interface. For Jenkins, we need to manually configure to scale automatically.
  • Wercker is extensible and can be more deeply integrated in to other parts of the application development process. In the case of Jenkins, we need to depend on plugins and these plugins may not be the exact use case for us.

  • Wercker is based on simple yml instructions using our community of public steps (that don't need to be downloaded, installed). In Jenkins we need to learn groovy scripting

  • In Wercker your configuration is stored in your application repo rather than in a dedicated Jenkins repo which makes the project more portable and easier to on board new devs.

Monday, September 24, 2018

How to setup NFS filer (File Storage) in OCI

This document will help to create NFS file storage system in OCI. We mainly used this storage for Kubernetes application storage. The docker running on this host will automatically mount this storage. 

Steps in creating NFS filer are the following:

1. Login to your cloud account.
2. From Action Menu, select File Storage

3. Click on "Create File System", choose the compartment, input the name and availability domain.

4. Click on the "mydatastore" File Storage, you can see mount targets and its details.

5. Note down the commands for mounting this datastore into the client machines, by clicking on "mount commands"
6. Login to the client machine and issue the noted mount commands. 
7. Check df -h or fdisk -l to verify the mounts.

Wednesday, September 19, 2018

How to create Oracle MySQL Cloud Service

Oracle MySQL Cloud Service is a single MySQL server having full access to the features and its operations.

Steps in creating an instance of Oracle MySQL Cloud Service

1. Login to your cloud account.
2. From Action Menu, select Open Service Console

3. Click Create Service
4. Input the Instance Name, Region and Availability Domain

5. Next page, input the compute shape, ssh key, cloud storage container, username, password, storage size, administrator username, password, database schema name and port.

6. Once you confirm, you could see the mysql instance running in your dashboard.
7. With your ssh keys and inputed connection string, you can either ssh or connect database from your application.