Welcome to the KodeKloud Hands-On lab
__ ______ ____ ________ __ __ ____ __ ______
/ //_/ __ \/ __ \/ ____/ //_// / / __ \/ / / / __ \
/ ,< / / / / / / / __/ / ,< / / / / / / / / / / / /
/ /| / /_/ / /_/ / /___/ /| |/ /___/ /_/ / /_/ / /_/ /
/_/ |_\____/_____/_____/_/ |_/_____/\____/\____/_____/
All rights reserved
controlplane ~ ➜ k get deploy -A
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
controlplane ~ ➜ k
kubectl controls the Kubernetes cluster manager.
Find more information at: https://kubernetes.io/docs/reference/kubectl/
Basic Commands (Beginner):
create Create a resource from a file or from 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):
explain Get documentation for a resource
get Display one or many resources
edit Edit a resource on the server
delete Delete resources by file names, stdin, resources and names, or by resources and label selector
Deploy Commands:
rollout Manage the rollout of a resource
scale Set a new size for a deployment, replica set, or replication controller
autoscale Auto-scale a deployment, replica set, stateful set, or replication controller
controlplane ~ ➜ k create -h
Create a resource from a file or from stdin.
JSON and YAML formats are accepted.
Examples:
# Create a pod using the data in pod.json
kubectl create -f ./pod.json
# Create a pod based on the JSON passed into stdin
cat pod.json | kubectl create -f -
# Edit the data in registry.yaml in JSON then create the resource using the edited data
kubectl create -f registry.yaml --edit -o json
Available Commands:
clusterrole Create a cluster role
clusterrolebinding Create a cluster role binding for a particular cluster role
configmap Create a config map from a local file, directory or literal value
cronjob Create a cron job with the specified name
deployment Create a deployment with the specified name
ingress Create an ingress with the specified name
job Create a job with the specified name
namespace Create a namespace with the specified name
poddisruptionbudget Create a pod disruption budget with the specified name
priorityclass Create a priority class with the specified name
quota Create a quota with the specified name
role Create a role with single rule
rolebinding Create a role binding for a particular role or cluster role
secret Create a secret using specified subcommand
service Create a service using a specified subcommand
serviceaccount Create a service account with the specified name
token Request a service account token
Options:
--allow-missing-template-keys=true:
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to
golang and jsonpath output formats.
--dry-run='none':
Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without
sending it. If server strategy, submit server-side request without persisting the resource.
--edit=false:
Edit the API resource before creating
--field-manager='kubectl-create':
Name of the manager used to track field ownership.
-f, --filename=[]:
Filename, directory, or URL to files to use to create the resource
controlplane ~ ➜ k create namespace -h
Create a namespace with the specified name.
Aliases:
controlplane ~ ➜
controlplane ~ ➜ k create namespace ingress-nginx
namespace/ingress-nginx created
controlplane ~ ➜
controlplane ~ ➜ k create configmap ingress-nginx-controller -n ingress-nginx
configmap/ingress-nginx-controller created
controlplane ~ ➜
controlplane ~ ✖ k get serviceaccounts -A
controlplane ~ ➜ k get tole
error: the server doesn't have a resource type "tole"
controlplane ~ ✖ k get role
No resources found in default namespace.
controlplane ~ ➜
controlplane ~ ➜ k get role -A
NAMESPACE NAME CREATED AT
ingress-nginx ingress-nginx 2023-02-21T08:11:25Z
ingress-nginx ingress-nginx-admission 2023-02-21T08:11:25Z
kube-public kubeadm:bootstrap-signer-clusterinfo 2023-02-21T08:02:53Z
kube-public system:controller:bootstrap-signer 2023-02-21T08:02:51Z
kube-system extension-apiserver-authentication-reader 2023-02-21T08:02:51Z
kube-system kube-proxy 2023-02-21T08:02:55Z
kube-system kubeadm:kubelet-config 2023-02-21T08:02:52Z
kube-system kubeadm:nodes-kubeadm-config 2023-02-21T08:02:52Z
kube-system system::leader-locking-kube-controller-manager 2023-02-21T08:02:51Z
kube-system system::leader-locking-kube-scheduler 2023-02-21T08:02:51Z
kube-system system:controller:bootstrap-signer 2023-02-21T08:02:51Z
kube-system system:controller:cloud-provider 2023-02-21T08:02:51Z
kube-system system:controller:token-cleaner 2023-02-21T08:02:51Z
controlplane ~ ➜
controlplane ~ ➜ k get rolebindings.rbac.authorization.k8s.io -A
NAMESPACE NAME ROLE AGE
ingress-nginx ingress-nginx Role/ingress-nginx 26s
ingress-nginx ingress-nginx-admission Role/ingress-nginx-admission 26s
kube-public kubeadm:bootstrap-signer-clusterinfo Role/kubeadm:bootstrap-signer-clusterinfo 8m58s
kube-public system:controller:bootstrap-signer Role/system:controller:bootstrap-signer 9m
kube-system kube-proxy Role/kube-proxy 8m56s
kube-system kubeadm:kubelet-config Role/kubeadm:kubelet-config 8m59s
kube-system kubeadm:nodes-kubeadm-config Role/kubeadm:nodes-kubeadm-config 8m59s
kube-system system::extension-apiserver-authentication-reader Role/extension-apiserver-authentication-reader 9m
kube-system system::leader-locking-kube-controller-manager Role/system::leader-locking-kube-controller-manager 9m
kube-system system::leader-locking-kube-scheduler Role/system::leader-locking-kube-scheduler 9m
kube-system system:controller:bootstrap-signer Role/system:controller:bootstrap-signer 9m
kube-system system:controller:cloud-provider Role/system:controller:cloud-provider 9m
kube-system system:controller:token-cleaner Role/system:controller:token-cleaner 9m
controlplane ~ ➜
controlplane ~ ➜ k describe ingress-nginx -n ingress-nginx
error: the server doesn't have a resource type "ingress-nginx"
controlplane ~ ✖ k describe role ingress-nginx -n ingress-nginx
Name: ingress-nginx
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/part-of=ingress-nginx
app.kubernetes.io/version=1.1.2
helm.sh/chart=ingress-nginx-4.0.18
Annotations: <none>
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
events [] [] [create patch]
configmaps [] [] [get list watch create]
endpoints [] [] [get list watch]
pods [] [] [get list watch]
secrets [] [] [get list watch]
services [] [] [get list watch]
ingressclasses.networking.k8s.io [] [] [get list watch]
ingresses.networking.k8s.io [] [] [get list watch]
configmaps [] [ingress-controller-leader] [get update]
namespaces [] [] [get]
ingresses.networking.k8s.io/status [] [] [update]
controlplane ~ ➜
controlplane ~ ➜ k describe role ingress-nginx-admission -n ingress-nginx
Name: ingress-nginx-admission
Labels: app.kubernetes.io/component=admission-webhook
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/part-of=ingress-nginx
app.kubernetes.io/version=1.1.2
helm.sh/chart=ingress-nginx-4.0.18
Annotations: helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
secrets [] [] [get create]
controlplane ~ ➜
controlplane ~ ➜ k describe rolebindings.rbac.authorization.k8s.io ingress-nginx-admission
Error from server (NotFound): rolebindings.rbac.authorization.k8s.io "ingress-nginx-admission" not found
controlplane ~ ✖ k describe rolebindings.rbac.authorization.k8s.io ingress-nginx-admission -n ingress-nginx
Name: ingress-nginx-admission
Labels: app.kubernetes.io/component=admission-webhook
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/part-of=ingress-nginx
app.kubernetes.io/version=1.1.2
helm.sh/chart=ingress-nginx-4.0.18
Annotations: helm.sh/hook: pre-install,pre-upgrade,post-install,post-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
Role:
Kind: Role
Name: ingress-nginx-admission
Subjects:
Kind Name Namespace
---- ---- ---------
ServiceAccount ingress-nginx-admission ingress-nginx
controlplane ~ ➜
controlplane ~ ➜ k describe rolebindings.rbac.authorization.k8s.io ingress-nginx -n ingress-nginx
Name: ingress-nginx
Labels: app.kubernetes.io/component=controller
app.kubernetes.io/instance=ingress-nginx
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=ingress-nginx
app.kubernetes.io/part-of=ingress-nginx
app.kubernetes.io/version=1.1.2
helm.sh/chart=ingress-nginx-4.0.18
Annotations: <none>
Role:
Kind: Role
Name: ingress-nginx
Subjects:
Kind Name Namespace
---- ---- ---------
ServiceAccount ingress-nginx ingress-nginx
controlplane ~ ➜
controlplane ~ ➜ cat /root/ingress-controller.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.1.2
helm.sh/chart: ingress-nginx-4.0.18
name: ingress-nginx-controller
namespace: ingress-
spec:
minReadySeconds: 0
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
template:
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
spec:
containers:
- args:
- /nginx-ingress-controller
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-controller
- --election-id=ingress-controller-leader
- --watch-ingress-without-class=true
- --default-backend-service=app-space/default-http-backend
- --controller-class=k8s.io/ingress-nginx
- --ingress-class=nginx
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
- --validating-webhook=:8443
- --validating-webhook-certificate=/usr/local/certificates/cert
- --validating-webhook-key=/usr/local/certificates/key
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: LD_PRELOAD
value: /usr/local/lib/libmimalloc.so
image: k8s.gcr.io/ingress-nginx/controller:v1.1.2@sha256:28b11ce69e57843de44e3db6413e98d09de0f6688e33d4bd384002a44f78405c
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- /wait-shutdown
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: controller
ports:
- name: http
containerPort: 80
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
- containerPort: 8443
name: webhook
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
memory: 90Mi
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
runAsUser: 101
volumeMounts:
- mountPath: /usr/local/certificates/
name: webhook-cert
readOnly: true
dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: ingress-nginx
terminationGracePeriodSeconds: 300
volumes:
- name: webhook-cert
secret:
secretName: ingress-nginx-admission
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.1.2
helm.sh/chart: ingress-nginx-4.0.18
name: ingress-controller
namespace: ingress-nginx
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
nodeport: 30080
selector:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
type: NodePort
controlplane ~ ➜
controlplane ~ ➜ cat /root/ingress-controller.yaml | grep -i namespace
namespace: ingress-
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-controller
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
- name: POD_NAMESPACE
fieldPath: metadata.namespace
namespace: ingress-nginx
controlplane ~ ➜
controlplane ~ ➜ cat /root/ingress-controller.yaml | grep -i namespace --color
namespace: ingress-
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-controller
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
- name: POD_NAMESPACE
fieldPath: metadata.namespace
namespace: ingress-nginx
controlplane ~ ➜
controlplane ~ ➜ cat /root/ingress-controller.yaml | grep -i replicas --color
controlplane ~ ✖ cat /root/ingress-controller.yaml | grep -i replica --color
controlplane ~ ✖ cat /root/ingress-controller.yaml | grep -i image --color
image: k8s.gcr.io/ingress-nginx/controller:v1.1.2@sha256:28b11ce69e57843de44e3db6413e98d09de0f6688e33d4bd384002a44f78405c
imagePullPolicy: IfNotPresent
controlplane ~ ➜
controlplane ~ ➜ cat /root/ingress-controller.yaml | grep -i ^C-color
controlplane ~ ✖
controlplane ~ ✖ cp -p /root/ingress-controller.yaml /root/ingress-controller.yaml_bk
controlplane ~ ➜ vi /root/ingress-controller.yaml
controlplane ~ ➜
controlplane ~ ➜ k apply -f /root/ingress-controller.yaml
error: error parsing /root/ingress-controller.yaml: error converting YAML to JSON: yaml: line 73: mapping values are not allowed in this context
controlplane ~ ✖ vi /root/ingress-controller.yaml
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜ k apply -f /root/ingress-controller.yaml
deployment.apps/ingress-nginx-controller created
Error from server (BadRequest): error when creating "/root/ingress-controller.yaml": Service in version "v1" cannot be handled as a Service: strict decoding error: unknown field "spec.ports[0].nodeport"
controlplane ~ ✖
controlplane ~ ✖
controlplane ~ ✖ vi /root/ingress-controller.yaml
controlplane ~ ➜
controlplane ~ ➜ vi /root/ingress-controller.yaml
controlplane ~ ➜
controlplane ~ ➜ k apply -f /root/ingress-controller.yaml
deployment.apps/ingress-nginx-controller configured
service/ingress-controller created
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜ vi /root/ingress-controller.yaml
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜ k apply -f /root/ingress-controller.yaml
deployment.apps/ingress-nginx-controller configured
The Service "ingress-nginx-controller" is invalid: spec.ports[0].nodePort: Invalid value: 30080: provided port is already allocated
controlplane ~ ✖ k get svc -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-controller NodePort 10.97.189.133 <none> 80:30080/TCP 58s
ingress-nginx-controller-admission ClusterIP 10.108.4.49 <none> 443/TCP 8m41s
controlplane ~ ➜
controlplane ~ ➜ kdelete^Cvc -n ingress-nginx
controlplane ~ ✖ k delete svc ingress-controller -n ingress-nginx
service "ingress-controller" deleted
controlplane ~ ➜
controlplane ~ ➜ k apply -f /root/ingress-controller.yaml
deployment.apps/ingress-nginx-controller configured
service/ingress-nginx-controller created
controlplane ~ ➜
controlplane ~ ➜ k create
clusterrolebinding (Create a cluster role binding for a particular cluster role)
clusterrole (Create a cluster role)
configmap (Create a config map from a local file, directory or literal value)
cronjob (Create a cron job with the specified name)
deployment (Create a deployment with the specified name)
ingress (Create an ingress with the specified name)
job (Create a job with the specified name)
namespace (Create a namespace with the specified name)
poddisruptionbudget (Create a pod disruption budget with the specified name)
priorityclass (Create a priority class with the specified name)
quota (Create a quota with the specified name)
rolebinding (Create a role binding for a particular role or cluster role)
role (Create a role with single rule)
secret (Create a secret using specified subcommand)
serviceaccount (Create a service account with the specified name)
service (Create a service using a specified subcommand)
token (Request a service account token)
controlplane ~ ➜ k create ingress -n app-space -h
Create an ingress with the specified name.
Aliases:
ingress, ing
Examples:
# Create a single ingress called 'simple' that directs requests to foo.com/bar to svc
# svc1:8080 with a tls secret "my-cert"
kubectl create ingress simple --rule="foo.com/bar=svc1:8080,tls=my-cert"
# Create a catch all ingress of "/path" pointing to service svc:port and Ingress Class as "otheringress"
kubectl create ingress catch-all --class=otheringress --rule="/path=svc:port"
# Create an ingress with two annotations: ingress.annotation1 and ingress.annotations2
kubectl create ingress annotated --class=default --rule="foo.com/bar=svc:port" \
--annotation ingress.annotation1=foo \
--annotation ingress.annotation2=bla
# Create an ingress with the same host and multiple paths
kubectl create ingress multipath --class=default \
--rule="foo.com/=svc:port" \
--rule="foo.com/admin/=svcadmin:portadmin"
# Create an ingress with multiple hosts and the pathType as Prefix
kubectl create ingress ingress1 --class=default \
--rule="foo.com/path*=svc:8080" \
--rule="bar.com/admin*=svc2:http"
# Create an ingress with TLS enabled using the default ingress certificate and different path types
kubectl create ingress ingtls --class=default \
--rule="foo.com/=svc:https,tls" \
--rule="foo.com/path/subpath*=othersvc:8080"
# Create an ingress with TLS enabled using a specific secret and pathType as Prefix
kubectl create ingress ingsecret --class=default \
--rule="foo.com/*=svc:8080,tls=secret1"
# Create an ingress with a default backend
kubectl create ingress ingdefault --class=default \
--default-backend=defaultsvc:http \
--rule="foo.com/*=svc:8080,tls=secret1"
Options:
--allow-missing-template-keys=true:
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to
golang and jsonpath output formats.
--annotation=[]:
Annotation to insert in the ingress object, in the format annotation=value
--class='':
Ingress Class to be used
--default-backend='':
Default service for backend, in format of svcname:port
--dry-run='none':
Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without
sending it. If server strategy, submit server-side request without persisting the resource.
--field-manager='kubectl-create':
Name of the manager used to track field ownership.
-o, --output='':
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath,
jsonpath-as-json, jsonpath-file).
--rule=[]:
Rule in format host/path=service:port[,tls=secretname]. Paths containing the leading character '*' are
considered pathType=Prefix. tls argument is optional.
--save-config=false:
If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will
be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
--show-managed-fields=false:
If true, keep the managedFields when printing objects in JSON or YAML format.
--template='':
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format
is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate='strict':
Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate
the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation
is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will
warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled
on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema
validation, silently dropping any unknown or duplicate fields.
Usage:
kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] [options]
Use "kubectl options" for a list of global command-line options (applies to all commands).
controlplane ~ ➜
controlplane ~ ➜ k create ingress -n app-space \
> --rule="foo.com/path*=svc:8080" \
> --rule="bar.com/admin*=svc2:http"^C
controlplane ~ ✖ k create ingress -n app-space --rule="/wear=svc:8080" --rule="/watch=svc:8080"^C
controlplane ~ ✖ k get svc -n app-space
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend ClusterIP 10.101.81.225 <none> 80/TCP 18m
video-service ClusterIP 10.110.73.250 <none> 8080/TCP 18m
wear-service ClusterIP 10.106.255.44 <none> 8080/TCP 18m
controlplane ~ ➜
controlplane ~ ➜ k get svc -n app-space ^C
controlplane ~ ✖ k create ingress -n app-space --rule="/wear=wear-service:8080" --rule="/watch=video-service:8080"
error: exactly one NAME is required, got 0
See 'kubectl create ingress -h' for help and examples
controlplane ~ ✖
controlplane ~ ✖ k create ingress ingress-app -n app-space --rule="/wear=wear-service:8080" --rule="/watch=video-service:8080"
ingress.networking.k8s.io/ingress-app created
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜ k edit ingress ingress-app -n app-space
ingress.networking.k8s.io/ingress-app edited
controlplane ~ ➜
controlplane ~ ➜
controlplane ~ ➜ k describe
apiservices.apiregistration.k8s.io mutatingwebhookconfigurations.admissionregistration.k8s.io
certificatesigningrequests.certificates.k8s.io namespaces
clusterrolebindings.rbac.authorization.k8s.io networkpolicies.networking.k8s.io
clusterroles.rbac.authorization.k8s.io nodes
componentstatuses persistentvolumeclaims
configmaps persistentvolumes
controllerrevisions.apps poddisruptionbudgets.policy
cronjobs.batch pods
csidrivers.storage.k8s.io podtemplates
csinodes.storage.k8s.io priorityclasses.scheduling.k8s.io
csistoragecapacities.storage.k8s.io prioritylevelconfigurations.flowcontrol.apiserver.k8s.io
customresourcedefinitions.apiextensions.k8s.io replicasets.apps
daemonsets.apps replicationcontrollers
deployments.apps resourcequotas
endpoints rolebindings.rbac.authorization.k8s.io
endpointslices.discovery.k8s.io roles.rbac.authorization.k8s.io
events runtimeclasses.node.k8s.io
events.events.k8s.io secrets
flowschemas.flowcontrol.apiserver.k8s.io serviceaccounts
horizontalpodautoscalers.autoscaling services
ingressclasses.networking.k8s.io statefulsets.apps
ingresses.networking.k8s.io storageclasses.storage.k8s.io
jobs.batch validatingwebhookconfigurations.admissionregistration.k8s.io
leases.coordination.k8s.io volumeattachments.storage.k8s.io
limitranges
controlplane ~ ➜ k describe
apiservices.apiregistration.k8s.io mutatingwebhookconfigurations.admissionregistration.k8s.io
certificatesigningrequests.certificates.k8s.io namespaces
clusterrolebindings.rbac.authorization.k8s.io networkpolicies.networking.k8s.io
clusterroles.rbac.authorization.k8s.io nodes
componentstatuses persistentvolumeclaims
configmaps persistentvolumes
controllerrevisions.apps poddisruptionbudgets.policy
cronjobs.batch pods
csidrivers.storage.k8s.io podtemplates
csinodes.storage.k8s.io priorityclasses.scheduling.k8s.io
csistoragecapacities.storage.k8s.io prioritylevelconfigurations.flowcontrol.apiserver.k8s.io
customresourcedefinitions.apiextensions.k8s.io replicasets.apps
daemonsets.apps replicationcontrollers
deployments.apps resourcequotas
endpoints rolebindings.rbac.authorization.k8s.io
endpointslices.discovery.k8s.io roles.rbac.authorization.k8s.io
events runtimeclasses.node.k8s.io
events.events.k8s.io secrets
flowschemas.flowcontrol.apiserver.k8s.io serviceaccounts
horizontalpodautoscalers.autoscaling services
ingressclasses.networking.k8s.io statefulsets.apps
ingresses.networking.k8s.io storageclasses.storage.k8s.io
jobs.batch validatingwebhookconfigurations.admissionregistration.k8s.io
leases.coordination.k8s.io volumeattachments.storage.k8s.io
limitranges
controlplane ~ ➜ k describe ingress
ingressclasses.networking.k8s.io ingresses.networking.k8s.io
controlplane ~ ➜ k get ingress ingress-app -o yaml -n app-space
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
creationTimestamp: "2023-02-21T08:24:49Z"
generation: 1
name: ingress-app
namespace: app-space
resourceVersion: "2489"
uid: 84e4eba1-3b79-4d41-88ea-f4e8262ae9b5
spec:
rules:
- http:
paths:
- backend:
service:
name: wear-service
port:
number: 8080
path: /wear
pathType: Exact
- backend:
service:
name: video-service
port:
number: 8080
path: /watch
pathType: Exact
status:
loadBalancer:
ingress:
- ip: 10.106.101.255
controlplane ~ ➜