$minikube start --vm-driver=kvm
Starting local Kubernetes v1.9.4 cluster...
Starting VM...
Downloading Minikube ISO
142.22 MB / 142.22 MB [============================================] 100.00% 0s
WARNING: The kvm driver is now deprecated and support for it will be removed in a future release.
Please consider switching to the kvm2 driver, which is intended to replace the kvm driver.
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver for more information.
To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
163.02 MB / 163.02 MB [============================================] 100.00% 0s
65 B / 65 B [======================================================] 100.00% 0s
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.
$virsh list
Id Name State
----------------------------------------------------
3 minikube running
$ docker build -t hello-node:v1 .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM node:6.9.2
6.9.2: Pulling from library/node
75a822cd7888: Pull complete
57de64c72267: Pull complete
4306be1e8943: Pull complete
871436ab7225: Downloading [============================================> ] 115.2MB/129.8MB
0110c26a367a: Download complete
871436ab7225: Downloading [============================================> ] 115.7MB/129.8MB
871436ab7225: Pull complete
0110c26a367a: Pull complete
1f04fe713f1b: Pull complete
ac7c0b5fb553: Pull complete
Digest: sha256:2e95be60faf429d6c97d928c762cb36f1940f4456ce4bd33fbdc34de94a5e043
Status: Downloaded newer image for node:6.9.2
---> faaadb4aaf9b
Step 2/4 : EXPOSE 8080
---> Running in 5c579151df63
---> f13d28c94fd9
Removing intermediate container 5c579151df63
Step 3/4 : COPY server.js .
---> 7daccb906f6c
Step 4/4 : CMD node server.js
---> Running in c90aabc99720
---> 83325cbbb853
Removing intermediate container c90aabc99720
Successfully built 83325cbbb853
Successfully tagged hello-node:v1
$kubectl run hello-node --image=hello-node:v1 --port=8080
deployment.apps "hello-node" created
$kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
hello-node 1 1 1 1 7s
$kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-node-9f5f775d6-d7lnt 1/1 Running 0 2m
$kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority: /home/cipher/.minikube/ca.crt
server: https://192.168.42.180:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /home/cipher/.minikube/client.crt
client-key: /home/cipher/.minikube/client.key
$ kubectl expose deployment hello-node --type=LoadBalancer
service "hello-node" exposed
$ curl https://192.168.42.180:32004
Hello world!
$ docker build -t hello-node:v2 .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM node:6.9.2
---> faaadb4aaf9b
Step 2/4 : EXPOSE 8080
---> Using cache
---> f13d28c94fd9
Step 3/4 : COPY server.js .
---> Using cache
---> 7daccb906f6c
Step 4/4 : CMD node server.js
---> Using cache
---> 83325cbbb853
Successfully built 83325cbbb853
Successfully tagged hello-node:v2
$ kubectl set image deployment/hello-node hello-node=hello-node:v2
deployment.apps "hello-node" image updated
$ minikube service hello-node<
curl https://192.168.42.180:32004
Hello world!
kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-node-77f86b59ff-gjjrz 1/1 Running 0 1m
$kubectl exec -it hello-node-77f86b59ff-gjjrz /bin/bash
root@hello-node-77f86b59ff-gjjrz:/# w
11:43:14 up 43 min, 0 users, load average: 0.27, 0.46, 0.58
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
/pre>
$sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
$sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
$
sudo yum install newrelic-infra -y
Last metadata expiration check: 0:00:19 ago on Thursday 29 March 2018 05:22:49 PM IST.
Dependencies resolved.
============================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================
Installing:
newrelic-infra x86_64 1.0.872-1 newrelic-infra 5.9 M
Transaction Summary
============================================================================================================================================================================================================================
Install 1 Package
Total download size: 5.9 M
Installed size: 19 M
Downloading Packages:
newrelic-infra-1.0.872-1.x86_64.rpm 907 kB/s | 5.9 MB 00:06
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 907 kB/s | 5.9 MB 00:06
warning: /var/cache/dnf/newrelic-infra-9ec6fa1107f0fe7e/packages/newrelic-infra-1.0.872-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8ecce87c: NOKEY
Importing GPG key 0x8ECCE87C:
Userid : "infrastructure-eng <infrastructure-eng@newrelic.com>"
Fingerprint: A758 B3FB CD43 BE8D 123A 3476 BB29 EE03 8ECC E87C
From : https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : newrelic-infra-1.0.872-1.x86_64 1/1
Running scriptlet: newrelic-infra-1.0.872-1.x86_64 1/1
Created symlink /etc/systemd/system/multi-user.target.wants/newrelic-infra.service → /etc/systemd/system/newrelic-infra.service.
Verifying : newrelic-infra-1.0.872-1.x86_64 1/1
Installed:
newrelic-infra.x86_64 1.0.872-1
Complete!