Skip to content

dennyzhang/cheatsheet-pks-A4

Repository files navigation

1 PKS CheatSheet

linkedin
github
slack


PRs Welcome

File me Issues or star this repo.

1.1 PKS Reference

NameSummary
YouTubeYouTube: PKS Demos and Webcasts, YouTube: PKS overview
Referencepivnet download, Download stemcells
ReferencePKS Documentation, PKS Concepts, PKS 1.2 Release Notes, Managing PKS 1.2, PKS personal blog
ReferenceCheatSheet: IT Infrastructure Fundamentals, VMware CheatSheet
ReferenceOpenShift CheatSheet, Rancher CheatSheet
ReferenceBosh CheatSheet, Tile CheatSheet, UAA CheatSheet, CheatSheet: VMware Products

https://raw.githubusercontent.com/dennyzhang/cheatsheet-pks-A4/master/pks-highlevel.png

1.2 PKS Key Components

NameSummary
Computing virtualizationLink: VMware vSphere Documentation
SDN networkingNCP: CNI for Vmware NSX-T
VM/Cluster lifecycle managementLink: BOSH CHEATSHEET, Github: Bosh
Node healingLink: BOSH CHEATSHEET
Container optimized OSCloudFoundry Stemcell, bosh vsphere ubuntu stemcell
Container runtimedockerd
Container Image Compliance ScanHarbor Clair
Docker image registryVMware Harbor
Packages k8s cluster orchestratorCFCR/Kubo, cfcr-etcd-release, GitHub: kubo-release, kubo-deployment
Component PackagingCheatSheet: Cloudfoundry Tile & OpsManager
CSI for persistent volumeGitHub: hatchway
ReferenceLink: OpenShift Key Components, Link: PKS Key Components
ReferencePKS CheatSheet, Bosh CheatSheet, Tile CheatSheet, UAA CheatSheet

1.3 VMware Product Integrations

NameSummary
wavefrontYouTube: PKS and VMware Wavefront
log insightYouTube: PKS and VMware vRealize Log Insight
vropsYouTube: VMware vRealize Operations
vcd (VMware vCLoud Director)YouTube: VMware vCloud Director Overview

1.4 PKS cli

NameCommand
Check cli versionpks --version
List all pks clusterspks clusters
Create clusterpks create-cluster <cluster-name> -e <subdomain>.pks.local -p "plan 1" -n 1
Delete clusterpks delete-cluster <cluster-name>
Check cluster statuspks cluster cluster1
Get cluster kubectl credentialpks get-credentials <cluster_name>
Set kubectl contextkubectl config use-context <cluster_name>
List all available planspks plans
pks loginpks login -a <api.test.com> -u <username> -p <passwd> -k
pks loginpks login -k --username <username> --password <password> --api <myk8s1.test.com>
Default roles in pks UAApks.clusters.manage, pks.clusters.admin, Link: Manage Users in UAA

1.5 PKS Troubleshooting

NameSummary
Log files in pks vms/var/vcap/sys/log
How to run pks cli commandsrun-pks-cli.md
How to run bosh cli commands, like bosh sshrun-bosh-cli.md
How to run kubectl commandrun-kubectl-in-pks.md
How PKS supports k8s master HAGitHub: kubo-release, GitHub: cfcr-etcd-release
Workflow of how PKS creates a k8s clusterLink: Create a Kubernetes Cluster
How airgap integration tests are enforcedFor each node, load specific iptable rules. airgap-iptable.rules
ReferenceLink: PKS Troubleshoot

1.6 Deployment with NSX-T + NAT

https://raw.githubusercontent.com/dennyzhang/cheatsheet-pks-A4/master/pks-nsxt-nat.png

1.7 Deployment with NSX-T + No-NAT + vswitch

https://raw.githubusercontent.com/dennyzhang/cheatsheet-pks-A4/master/pks-nsxt-no-nat-virtual-switch.png

1.8 Deployment with NSX-T + No-NAT + logical switch

https://raw.githubusercontent.com/dennyzhang/cheatsheet-pks-A4/master/pks-nsxt-no-nat-logical-switch.png

1.9 PKS Assumptions

NameSummary
Multiple instances of K8SOne PKS Multiple K8S clusters. Use k8s clusters or k8s namespace for multi-tenancy
No mixed versionsVersions must match between master and node hosts, excluding upgrade
Support customization mainly at PKS levelNot at k8s clusters or k8s namespace level
No hybrid cloud providersSupport multi-clouds, but only can’t mix
Don’t run user workload in k8s master VMsAvoid messing up k8s control plane
Node rolesMaster nodes, worker nodes, and etcd nodes.

1.10 What PKS Adds to Kubernetes

NameSummary
Secure multi-tenant ingressNSX-T
Secure container registryVMware Harbor
Rolling upgrades to cluster infrastructureIaaS: bosh VM upgrade
Cluster provisioning and scalingIaaS: VM lifecycle management
Monitoring and recovery of cluster VMs and processesIaaS: VM lifecycle management
Embedded, hardened operating systemLinux release for OS hardening
Log sinkK8S Namespace multi-tenancy

1.11 PKS Challenges & Future Opportunities

NameSummary
Faster for typical use casesCreate k8s clusters, resize k8s cluster, create pods, etc
Tile & OpsManager is not agileIt slows down everything. The development, testing and deployment.
Extend PKS API layerEasy to add more functionalities for PKS admins
UX of PKS CLIThe usage of pks cli could be more intuitive
Improve PKS control panel HAOnline rolling upgrade for opsmanager, uaa, pks api, etc
Better storage support of PVHA for PV, and support more CSI providers
Cleanup for stale resourcesWhen operations have failed, need to do the cleanup in a safe way
More built-in security supportsPKS supports most common security enhancements, but it doesn’t provides them

1.12 PKS Strengths

NameSummary
Kubernetes FederationMultiple clusters on-demand. Not only one kubernetes cluster for your infra
End-to-end integrationMonitoring and logging works out of box
VM LCM: auto healingVM health check and auto-replacement
Less vendor lock-inVanilla Kubernetes; Any infra; Any OS
Networking with NSX-TAdvanced CNI
Image registry & securityImage sign, audit, replication; vulnerabilities scan

1.13 Deployment Diagram

NameSummary
Bosh director vmVM manager
Ops manager vmPackage manager
PKS API server vmSee below
Build-in process in k8s master vmSee below
Build-in process in k8s worker vmSee below

1.14 PKS footprint: in control panel

  • Get process list in pks 1.2.0: ssh to the pks api vm, then sudo monit summary
NameMemory (RES)
pks-api1 GB
uaa500 MB
mysqld500 MB
pks-nsx-t-osb-proxy25 MB
telemetry25 MB
bosh-agent17 MB
bosh-dns16 MB
on-demand-service-broker16 MB
event-emitter10 MB
galera-healthcheck7 MB
bosh-dns-healthcheck6 MB
cf-mysql-cluster-health-logger6 MB
gra-log-purger-executable2 MB

1.15 PKS footprint: in k8s master vms

  • Get process list in pks 1.2.0: ssh to k8s master vm, then sudo monit summary
NameSummary
etcd120 MB
kube-apiserver520 MB
kube-controller-manager100 MB
kube-scheduler35 MB
blackbox syslog530 MB
fluentd100 MB
ncp70 MB
bosh-dns19 MB
bosh-agent15 MB
bosh-dns-nameserverconfig5 MB
bosh-dns-health10 MB

1.16 PKS footprint: in k8s worker vms

  • Get process list in pks 1.2.0: ssh to the k8s worker vm, then sudo monit summary
NameSummary
kube-proxy30 MB
kubelet100 MB
docker70 MB
fluentd180 MB
cadvisor85 MB
blackbox syslog60 MB
metrics-server36 MB
ovs-vswitchd open vSwitch35 MB
bosh-dns20 MB
bosh-agent18 MB
bosh-dns-health7 MB
bosh-dns-namesever5 MB
ovsdb-server vSwitch database5 MB
nsx-node-agent3 MB
nsx_kube_proxy3 MB

1.17 PKS CLI Online Help

[ec2-user@ip-172-31-33-176 ~]$ pks --help

The Pivotal Container Service (PKS) CLI is used to create, manage, and delete Kubernetes clusters.
To deploy workloads to a Kubernetes cluster created using the PKS CLI, use the Kubernetes CLI, kubectl.

Version: 1.1.1-build.8

Usage:
  pks [command]

Available Commands:
  cluster         View the details of the cluster
  clusters        Show all clusters created with PKS
  create-cluster  Creates a kubernetes cluster, requires cluster name, an external host name, and plan
  delete-cluster  Deletes a kubernetes cluster, requires cluster name
  get-credentials Allows you to connect to a cluster and use kubectl
  help            Help about any command
  login           Log in to PKS
  logout          Log out of PKS
  plans           View the preconfigured plans available
  resize          Increases the number of worker nodes for a cluster

Flags:
  -h, --help      help for pks
      --version   version for pks

Use "pks [command] --help" for more information about a command.

1.18 More Resources

https://docs.pivotal.io/runtimes/pks/1-2/index.html

License: Code is licensed under MIT License.

linkedin github slack

Releases

No releases published

Packages

No packages published

Languages