kubectl
introspection
get
pods
statuses
pending
images pulled
running
succeded
containers terminated
failed
uknonwn
likely communication error
crashloopbackoff
misconfiguration
container exit unexpected
describe
pod
name
namespace
lables
...
container
state
images
ports
...
shows events at the end
exec
-it
logs
syntax ->
Command
->
Action
->
Type
->
Name
->
Flags
Optional
cluster
commands
top
resize
auto-scale
disable by default
Types
Deployments
Roll out updates
Stateless applications
Create
declaratively
kubectl apply -f
imperatively
kubectl run
GKE console
Jobs/CronJobs
Subtopic 3
nodepool
same nodes
label
name=value
nodepool per zone
decrease cluser
random select
gracefull pods termination
Networking
Services
Types
ClusterIP
Static IP
Traffic distributon in Cluster
Not accesible from outside
Default
Select pods via lable
First Service THEN pods
Container port
Use cases
IntraCluster communication
NodePort
You manage loadbalancer
You check nodeport collisions
Specific port on each node
30000-30767
LoadBalancer
ExternalTrafficPolicy=local
Ingress
1 layer higher > services
Service for Services
Set of rules to govern external traffic to services
Single public IP address
Can route trafic to:
NodePort
LoadBalancer
Does not address double hop
Route to services by name
Rules in spec
Traffic routing
Based on host address
Based on address path
Can be multiple host-names/paths
If no rule matched
Sent to default
Update:
kubeclt edit ingress [name]
kubectl replace -f [name]
Security
IP
Blacklist
Whitelist
TLS termination
Manage all SSL certs in one place
HTTP2 support
gRPC support
gRPC needs HTTP2
Container Native LoadBalancing
Traffic to PODs
Group endpoints
Volumes