gcloud & kubernetes

#####################################################
mshaikdevops@rising-artifact-164906:~$ kubectl config view
apiVersion: v1
clusters:
– cluster:
server: http://172.17.0.1:4321
name: cloudshell
contexts:
– context:
cluster: cloudshell
user: cloudshell
name: cloudshell
current-context: cloudshell
kind: Config
preferences: {}
users: []
#####################################################
mshaikdevops@rising-artifact-164906:~$ gcloud version
Google Cloud SDK 151.0.0
alpha 2017.03.24
app-engine-go
app-engine-go-linux-x86_64 1.9.50
app-engine-java 1.9.51
app-engine-php ” ”
app-engine-python 1.9.51
beta 2017.03.24
bq 2.0.24
bq-nix 2.0.24
cloud-datastore-emulator 1.2.1
core 2017.04.07
core-nix 2017.03.24
datalab 20170330
datalab-nix 20170323
gcd-emulator v1beta3-1.0.0
gcloud
gcloud-deps 2017.04.07
gcloud-deps-linux-x86_64 2017.03.31
gsutil 4.25
gsutil-nix 4.23
kubectl
kubectl-linux-x86_64 1.6.0
pubsub-emulator 2017.03.24
#####################################################
mshaikdevops@rising-artifact-164906:~$ gcloud compute instances list
Listed 0 items.
#####################################################
mshaikdevops@rising-artifact-164906:~$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:f6:12:78:79
inet addr:172.18.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:02
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1460 Metric:1
RX packets:914 errors:0 dropped:0 overruns:0 frame:0
TX packets:779 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:181864 (177.6 KiB) TX bytes:115966 (113.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:236 errors:0 dropped:0 overruns:0 frame:0
TX packets:236 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18349 (17.9 KiB) TX bytes:18349 (17.9 KiB)
##############################################
mshaikdevops@rising-artifact-164906:~$ kubectl
kubectl controls the Kubernetes cluster manager.

Find more information at https://github.com/kubernetes/kubernetes.

Basic Commands (Beginner):
create Create a resource by filename or stdin
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects

Basic Commands (Intermediate):
get Display one or many resources
explain Documentation of resources
edit Edit a resource on the server
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector

Deploy Commands:
rollout Manage a deployment rollout
rolling-update Perform a rolling update of the given ReplicationController
scale Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
autoscale Auto-scale a Deployment, ReplicaSet, or ReplicationController

Cluster Management Commands:
certificate Modify certificate resources.
cluster-info Display cluster info
top Display Resource (CPU/Memory/Storage) usage.
cordon Mark node as unschedulable
uncordon Mark node as schedulable
drain Drain node in preparation for maintenance
taint Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
logs Print the logs for a container in a pod
attach Attach to a running container
exec Execute a command in a container
port-forward Forward one or more local ports to a pod
proxy Run a proxy to the Kubernetes API server
cp Copy files and directories to and from containers.
auth Inspect authorization

Advanced Commands:
apply Apply a configuration to a resource by filename or stdin
patch Update field(s) of a resource using strategic merge patch
replace Replace a resource by filename or stdin
convert Convert config files between different API versions

Settings Commands:
label Update the labels on a resource
annotate Update the annotations on a resource
completion Output shell completion code for the specified shell (bash or zsh)

Other Commands:
api-versions Print the supported API versions on the server, in the form of “group/version”
config Modify kubeconfig files
help Help about any command
version Print the client and server version information

Use “kubectl –help” for more information about a given command.
Use “kubectl options” for a list of global command-line options (applies to all commands).

##############################################
mshaikdevops@rising-artifact-164906:~$ docker
Usage: docker [OPTIONS] COMMAND [arg…]
docker daemon [ –help | … ]
docker [ –help | -v | –version ]

A self-sufficient runtime for containers.

Options:

–config=~/.docker Location of client config files
-D, –debug Enable debug mode
-H, –host=[] Daemon socket(s) to connect to
-h, –help Print usage
-l, –log-level=info Set the logging level
–tls Use TLS; implied by –tlsverify
–tlscacert=~/.docker/ca.pem Trust certs signed only by this CA
–tlscert=~/.docker/cert.pem Path to TLS certificate file
–tlskey=~/.docker/key.pem Path to TLS key file
–tlsverify Use TLS and verify the remote
-v, –version Print version information and quit

Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container’s changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes on a container’s filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container’s filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
network Manage Docker networks
pause Pause all processes within a container
port List port mappings or a specific mapping for the CONTAINER
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart a container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop a running container
tag Tag an image into a repository
top Display the running processes of a container
unpause Unpause all processes within a container
update Update configuration of one or more containers
version Show the Docker version information
volume Manage Docker volumes
wait Block until a container stops, then print its exit code

Run ‘docker COMMAND –help’ for more information on a command.

mshaikdevops@rising-artifact-164906:~$ docker -v
Docker version 1.11.2, build b9f10c9
##############################################
mshaikdevops@rising-artifact-164906:~$ java -version
java version “1.7.0_121”
OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-2~deb8u1)
OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode)

mshaikdevops@rising-artifact-164906:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
none aufs 9.8G 6.1G 3.2G 67% /
tmpfs tmpfs 298M 0 298M 0% /dev
tmpfs tmpfs 298M 0 298M 0% /sys/fs/cgroup
/dev/sdb1 ext4 4.8G 11M 4.6G 1% /home
/dev/sda1 ext4 9.8G 6.1G 3.2G 67% /etc/hosts
shm tmpfs 64M 0 64M 0% /dev/shm

mshaikdevops@rising-artifact-164906:~$ free -m
total used free shared buffers cached
Mem: 594 495 98 0 20 241
-/+ buffers/cache: 233 360
Swap: 767 0 767
######################################################

mshaikdevops@rising-artifact-164906:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
none aufs 9.8G 6.2G 3.1G 67% /
tmpfs tmpfs 298M 0 298M 0% /dev
tmpfs tmpfs 298M 0 298M 0% /sys/fs/cgroup
/dev/sdb1 ext4 4.8G 11M 4.6G 1% /home
/dev/sda1 ext4 9.8G 6.2G 3.1G 67% /etc/hosts
shm tmpfs 64M 0 64M 0% /dev/shm

mshaikdevops@rising-artifact-164906:~$ kubectl version
Client Version: version.Info{Major:”1″, Minor:”6″, GitVersion:”v1.6.0″, GitCommit:”fff5156092b56e6bd60fff75aad4dc9de6b6ef37″, GitTreeState:”clean”, BuildDate:”2017-03-28T16:36:33Z”, GoVersion:”go1.7.5″, Compiler:”gc”, Platform:”linux/amd64″}
Unable to connect to the server: dial tcp 172.17.0.1:4321: i/o timeout

########################

mshaikdevops@rising-artifact-164906:~$ gcloud auth list
Credentialed Accounts:
– mshaikdevops@gmail.com ACTIVE
To set the active account, run:
$ gcloud config set account `ACCOUNT`

mshaikdevops@rising-artifact-164906:~$ gcloud config list project
[core]
project = rising-artifact-164906

Your active configuration is: [cloudshell-2843]
mshaikdevops@rising-artifact-164906:~$ gcloud compute zones list
NAME REGION STATUS NEXT_MAINTENANCE TURNDOWN_DATE
asia-east1-b asia-east1 UP
asia-east1-a asia-east1 UP
asia-east1-c asia-east1 UP
asia-northeast1-c asia-northeast1 UP
asia-northeast1-a asia-northeast1 UP
asia-northeast1-b asia-northeast1 UP
asia-southeast1-a asia-southeast1 UP
asia-southeast1-b asia-southeast1 UP
europe-west1-b europe-west1 UP
europe-west1-c europe-west1 UP
europe-west1-d europe-west1 UP
us-central1-c us-central1 UP
us-central1-f us-central1 UP
us-central1-b us-central1 UP
us-central1-a us-central1 UP
us-east1-d us-east1 UP
us-east1-c us-east1 UP
us-east1-b us-east1 UP
us-west1-a us-west1 UP
us-west1-b us-west1 UP

mshaikdevops@rising-artifact-164906:~$ gcloud config set compute/zone us-central1-a
Updated property [compute/zone].
mshaikdevops@rising-artifact-164906:~$ gcloud container –help
NAME
gcloud container – deploy and manage clusters of machines for running
containers

SYNOPSIS
gcloud container GROUP | COMMAND [GLOBAL-FLAG …]

DESCRIPTION
The gcloud container command group lets you create and manage Google
Container Engine containers and clusters.

Container Engine is a cluster manager and orchestration system for running
your Docker containers. Container Engine schedules your containers into the
cluster and manages them automatically based on requirements you define,
such as CPU and memory.

More information on Container Engine can be found here:
https://cloud.google.com/container-engine and detailed documentation can be
found here: https://cloud.google.com/container-engine/docs/

GLOBAL FLAGS
Run $ gcloud help for a description of flags available to all commands.

GROUPS
GROUP is one of the following:

builds
Create and manage container builds.

clusters
Deploy and teardown Google Container Engine clusters.

node-pools
:…skipping…
NAME
gcloud container – deploy and manage clusters of machines for running
containers

SYNOPSIS
gcloud container GROUP | COMMAND [GLOBAL-FLAG …]

DESCRIPTION
The gcloud container command group lets you create and manage Google
Container Engine containers and clusters.

Container Engine is a cluster manager and orchestration system for running
your Docker containers. Container Engine schedules your containers into the
cluster and manages them automatically based on requirements you define,
such as CPU and memory.

More information on Container Engine can be found here:
https://cloud.google.com/container-engine and detailed documentation can be
found here: https://cloud.google.com/container-engine/docs/

GLOBAL FLAGS
Run $ gcloud help for a description of flags available to all commands.

GROUPS
GROUP is one of the following:

builds
Create and manage container builds.

clusters
Deploy and teardown Google Container Engine clusters.

node-pools
Create and delete operations for Google Container Engine node pools.

operations
Get and list operations for Google Container Engine clusters.

COMMANDS
COMMAND is one of the following:

get-server-config
Get Container Engine server config.

(END)

mshaikdevops@rising-artifact-164906:~$ gcloud container clusters create my-app
Creating cluster my-app…done.
Created [https://container.googleapis.com/v1/projects/rising-artifact-164906/zones/us-central1-a/clusters/my-app].
kubeconfig entry generated for my-app.
NAME ZONE MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
my-app us-central1-a 1.5.6 104.154.38.90 n1-standard-1 1.5.6 3 RUNNING
mohammedrafi@NOC-RAFI:~$ ping 104.154.38.90
PING 104.154.38.90 (104.154.38.90) 56(84) bytes of data.
64 bytes from 104.154.38.90: icmp_seq=1 ttl=54 time=246 ms
64 bytes from 104.154.38.90: icmp_seq=2 ttl=54 time=250 ms
^C
— 104.154.38.90 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 246.022/248.088/250.154/2.066 ms
mshaikdevops@rising-artifact-164906:~$ gcloud container clusters describe my-app
clusterIpv4Cidr: 10.0.0.0/14
createTime: ‘2017-04-17T14:31:32+00:00’
currentMasterVersion: 1.5.6
currentNodeCount: 3
currentNodeVersion: 1.5.6
endpoint: 104.154.38.90
initialClusterVersion: 1.5.6
instanceGroupUrls:
https://www.googleapis.com/compute/v1/projects/rising-artifact-164906/zones/us-central1-a/instanceGroupManagers/gke-my-app-default-pool-a7192699-grp
locations:
– us-central1-a
loggingService: logging.googleapis.com
masterAuth:
clientCertificate: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMyakNDQWNLZ0F3SUJBZ0lRUE5jSHRhclBzMkhjRnRvN0t5dEZhakFOQmdrcWhraUc5dzBCQVFzRkFEQXYKTVMwd0t3WURWUVFERXlRek56bG1OemcxTUMwME9EUTFMVFExTmpFdE9EUTRPQzAxWXpNME5ERmpaV00yT1RBdwpIaGNOTVRjd05ERTNNVFF6TVRN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PMHVWTzkyCjFOb2hVUDBlV2xtMGRSU0ZRRFVJUFVZWnZTZE1ZcmtsN3YvcXkxaXhDRzdvcndJREFRQUJveU13SVRBT0JnTlYKSFE4QkFmOEVCQU1DQWdRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQQplVDlaSGhOYW8rNW1VTmh0Q2kyZ0d3dWNtRER2UlJ2eWFuR3FuTU0ybWRGQU1wU2tnRmprNEtMWGZXNk9HMld1CnRKWjFVU3JpWVNFS1o2bm5Ib3dYT29LekRlME5JcWZ0djZRTHlEVS9XL0dERStFMG02dE5IM0NOWUI2ZXkyQUcKNTVyZGFwbSsyTWw1RTI4NWhzNWhxVGxRU2lLMHhjdFhhRlVONXFERmdSK2hCZi92eUNZNEw5Z1pKbXZZY0dRMApCWTRmT0ZPTVMybGcwRzMwcXlhYzIveFJoZU1tQThOd21RWm1Fa0VMOWtSaDFmcDFXbExnMEZuYWVHZmo3aDcrCmh1VWhMOVd0Z1hDVy9ub1daamJXYW9odXV3VElxMDk2Nzd6VmNMSnIwVUdUNW5PU0tIS0FEUTBBRkI0Ri9LTVMKcUhxek43U2FEdnZSWEdjWTBtRW8wdz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
password: WeQYIFlWvVfUxwJH
username: admin
monitoringService: monitoring.googleapis.com
name: my-app
network: default
nodeConfig:
diskSizeGb: 100
imageType: COS
machineType: n1-standard-1
oauthScopes:
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/devstorage.read_only
https://www.googleapis.com/auth/service.management.readonly
https://www.googleapis.com/auth/servicecontrol
https://www.googleapis.com/auth/logging.write
https://www.googleapis.com/auth/monitoring
serviceAccount: default
nodeIpv4CidrSize: 24
nodePools:
– config:
diskSizeGb: 100
imageType: COS
machineType: n1-standard-1
oauthScopes:
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/devstorage.read_only
https://www.googleapis.com/auth/service.management.readonly
https://www.googleapis.com/auth/servicecontrol
https://www.googleapis.com/auth/logging.write
https://www.googleapis.com/auth/monitoring
serviceAccount: default
initialNodeCount: 3
instanceGroupUrls:
https://www.googleapis.com/compute/v1/projects/rising-artifact-164906/zones/us-central1-a/instanceGroupManagers/gke-my-app-default-pool-a7192699-grp
management: {}
name: default-pool
selfLink: https://container.googleapis.com/v1/projects/rising-artifact-164906/zones/us-central1-a/clusters/my-app/nodePools/default-pool
status: RUNNING
version: 1.5.6
selfLink: https://container.googleapis.com/v1/projects/rising-artifact-164906/zones/us-central1-a/clusters/my-app
servicesIpv4Cidr: 10.3.240.0/20
status: RUNNING
zone: us-central1-a
mshaikdevops@rising-artifact-164906:~$

mshaikdevops@rising-artifact-164906:~$ kubectl cluster-info
Kubernetes master is running at https://104.154.38.90
GLBCDefaultBackend is running at https://104.154.38.90/api/v1/proxy/namespaces/kube-system/services/default-http-backend
Heapster is running at https://104.154.38.90/api/v1/proxy/namespaces/kube-system/services/heapster
KubeDNS is running at https://104.154.38.90/api/v1/proxy/namespaces/kube-system/services/kube-dns
kubernetes-dashboard is running at https://104.154.38.90/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard

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

cluster1cluster2cluster3cluster4cluster5

mshaikdevops@rising-artifact-164906:~$ kubectl run wordpress –image=tutum/wordpress –port=80
deployment “wordpress” created

mshaikdevops@rising-artifact-164906:~$ kubectl expose deployment wordpress –type=LoadBalancer
service “wordpress” exposed

mshaikdevops@rising-artifact-164906:~$ kubectl describe services wordpress
Name: wordpress
Namespace: default
Labels: run=wordpress
Annotations: <none>
Selector: run=wordpress
Type: LoadBalancer
IP: 10.3.252.182
Port: <unset> 80/TCP
NodePort: <unset> 31269/TCP
Endpoints: <none>
Session Affinity: None
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
——— ——– —– —- ————- ——– —— ——-
23s 23s 1 service-controller Normal CreatingLoadBalancer Creating load balancer

mshaikdevops@rising-artifact-164906:~$ kubectl get services wordpress
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
wordpress 10.3.252.182 <pending> 80:31269/TCP 57s
mshaikdevops@rising-artifact-164906:~$ kubectl get services wordpress
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
wordpress 10.3.252.182 104.197.98.153 80:31269/TCP 1m

 

cluster6cluster7cluster8cluster9
mshaikdevops@rising-artifact-164906:~$ kubectl delete services wordpress
service “wordpress” deleted

mshaikdevops@rising-artifact-164906:~$ kubectl delete deployment wordpress
deployment “wordpress” deleted

mshaikdevops@rising-artifact-164906:~$ kubectl describe services wordpress
Error from server (NotFound): services “wordpress” not found

mshaikdevops@rising-artifact-164906:~$ gcloud container clusters delete my-app
The following clusters will be deleted.
– [my-app] in [us-central1-a]

Do you want to continue (Y/n)? y

Deleting cluster my-app…done.
Deleted [https://container.googleapis.com/v1/projects/rising-artifact-164906/zones/us-central1-a/clusters/my-app].

################################################

gcloud compute instances create ubuntu –image-project ubuntu-os-cloud –image ubuntu-1604-xenial-v20160429

 

Leave a comment