Skip to content

Commit

Permalink
Merge pull request #445 from bgraef/main
Browse files Browse the repository at this point in the history
update kubectl intro post
  • Loading branch information
bgraef authored Sep 25, 2024
2 parents 1248dbf + f7d0592 commit dce6f15
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions content/posts/ocne/post-19/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Introducing Kubectl"
date: 2023-04-28
date: 2024-09-26
draft: false
summary: "Kubectl is a versatile tool used to deploy and inspect the configurations and logs of the cluster resources and applications."
tags: ["ocne", "lab", "tutorial", "ocne-k8s"]
summary: "Learn how to use kubectl with Oracle Cloud Native Environment."
tags: ["ocne", "ocne2", "lab", "tutorial", "ocne-k8s"]
showDate: true
---

Expand All @@ -15,34 +15,24 @@ showDate: true

## Details

Although graphical tools can manage Kubernetes, many administrators prefer to use command-line tools. The command line tool provided within the Kubernetes ecosystem is called [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/). Kubectl is a versatile tool used to deploy and inspect the configurations and logs of the cluster resources and applications. Kubectl achieves this by using the Kubernetes API to authenticate with the Control Node of the Kubernetes cluster to complete any management actions requested by the administrator.
Although graphical tools can manage Kubernetes, many administrators prefer to use command-line tools. The command line tool provided within the Kubernetes ecosystem is called [kubectl](https://kubernetes.io/docs/reference/kubectl/kubectl/). Kubectl is a versatile tool used to deploy and inspect the configurations and logs of the cluster resources and applications. Kubectl achieves this by using the Kubernetes API to authenticate with the Control Node of the Kubernetes cluster to complete any management actions requested by the administrator.

Most of the operations/commands available for kubectl provide administrators with the ability to deploy and manage applications deployed onto the Kubernetes cluster and inspect and manage the Kubernetes cluster resources. Because this lab is an introduction to kubectl, it will only focus on using kubectl to discover what Kubernetes resources are available in a new install of Oracle Cloud Native Environment.
Most of the operations/commands available for kubectl provide administrators with the ability to deploy and manage applications deployed onto the Kubernetes cluster and inspect and manage the Kubernetes cluster resources. Because this tutorial is an introduction to kubectl, it will only focus on using kubectl to discover what Kubernetes resources are available in a new install of Oracle Cloud Native Environment.

> **Note:** Many kubectl commands have the `--all-namespaces` option appended. For this reason, a shorthand for this option is the `-A` flag. This lab uses kubectl `-A` instead of `kubectl --all-namespaces` in preference.
> **Note:** Many kubectl commands have the `--all-namespaces` option appended. For this reason, a shorthand for this option is the `-A` flag. This tutorial often uses `kubectl -A` instead of `kubectl --all-namespaces`.
### Objectives

This tutorial introduces kubectl, a widely used command-line tool for interacting with a Kubernetes cluster. Beginning with why it is helpful to learn about it, the lab will also introduce some basic kubectl commands that help to understand any services deployed on a Kubernetes cluster, for example:
This tutorial introduces kubectl, a widely used command-line tool for interacting with a Kubernetes cluster. Beginning with why it is helpful to learn about it, the tutorial will also introduce some basic kubectl commands that help to understand any services deployed on a Kubernetes cluster, for example:

- location of the configuration file
- _kubectl config_
- _kubectl get_
- _kubectl describe_
- _kubectl version_
- location of the configuration file
- _kubectl config_
- _kubectl get_
- _kubectl describe_
- _kubectl version_

Most of these commands provide both _getter_ (to review settings) and _setter_ (to define/update settings) functions. This tutorial only uses kubectl to view the current configuration information.

### Prerequisites

- 5 Oracle Linux systems to use:
- 1-off Operator node (ocne-operator)
- 1-off Kubernetes control plane node (ocne-control)
- 3-off Kubernetes worker node (ocne-worker)

Each system should have the latest Oracle Linux 8 (x86_64)

- The environment should be pre-configured with the following;
- An oracle user account (used during the installation) with sudo access
- Key-based SSH, also known as passwordless SSH, between the hosts
- Installation of Oracle Cloud Native Environment and CCM module
- Installation of Oracle Cloud Native Environment

0 comments on commit dce6f15

Please sign in to comment.