4月15日
时间:20:30-21-:30
课时 3
课外基础
0.回顾Docker
1.预备课程所需要的环境 ,虚拟机Terminal工具和必须的记录工具
2.工具准备 :VirtualBox ,Ntepad+ , Wireshak ,Xeltc
3.做好和课程同步的时间安排计划 ,对应相的课节记录
4.要求至少需 1Master+1Nod 的环境,后期的课后作业需要使用到
课程重点
通过学习能快速搭建一个 Kubernts 集群,并且能够根据各组件之间的关系 ,掌握基本的TS技能。并且我们会根据已有的环境 ,搭建一个Project,从而掌握一个完成的项目所涉及到kubernts 的所有相关细节
kubernetes 基础介绍
Docker与Kubernetes的关系
Kubernetes是什么?
为什么要选择使用kubernetes
Kubernetes的架构介绍和主要组件的功能
Kubernetes的基本概念和集群术语
Kubernetes的资源对象介绍
4月16日
20:30-22:30
课程重点
Kubernetes集群安装和部署
Kubernetes的集群部署方式介绍
Minkube
Kubeadm
二进制
自动化部署
通过kubernetes部署应用服务实践
cat << EOF | kubectl create -f -xxxxxx...EOF
apiVersion: v1kind: Podmetadata:name: readiness-httpget-podnamespace: defaultspec:containers:- name: readiness-httpget-containerimage: ikubernetes/myapp:v1imagePullPolicy: IfNotPresentports:- name: httpcontainerPort: 80readinessProbe:httpGet:port: httppath: /index.htmlinitialDelaySeconds: 1periodSeconds: 3
静态pod
[root@master manifests]# pwd
/etc/kubernetes/manifests
[root@master manifests]# ll
total 16
-rw———- 1 root root 1783 Feb 4 21:26 etcd.yaml
-rw———- 1 root root 2709 Apr 12 19:59 kube-apiserver.yaml
-rw———- 1 root root 2566 Apr 12 19:59 kube-controller-manager.yaml
-rw———- 1 root root 1120 Apr 12 19:59 kube-scheduler.yaml
[root@master manifests]#
[root@master ~]# systemctl cat kubelet.service# /usr/lib/systemd/system/kubelet.service[Unit]Description=kubelet: The Kubernetes Node AgentDocumentation=https://kubernetes.io/docs/[Service]ExecStart=/usr/bin/kubeletRestart=alwaysStartLimitInterval=0RestartSec=10[Install]WantedBy=multi-user.target# /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf# Note: This dropin only works with kubeadm and kubelet v1.11+[Service]Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetesEnvironment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"# This is a file that "kubeadm init" and "kubeadm join" generates at runtimEnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env# This is a file that the user can use for overrides of the kubelet args as# the .NodeRegistration.KubeletExtraArgs object in the configuration filesEnvironmentFile=-/etc/sysconfig/kubeletExecStart=ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $Klines 1-26/26 (END)...skipping...# /usr/lib/systemd/system/kubelet.service[Unit]Description=kubelet: The Kubernetes Node AgentDocumentation=https://kubernetes.io/docs/[Service]ExecStart=/usr/bin/kubeletRestart=alwaysStartLimitInterval=0RestartSec=10[Install]WantedBy=multi-user.target# /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf# Note: This dropin only works with kubeadm and kubelet v1.11+[Service]Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubeletEnvironment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamicallyEnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this fileEnvironmentFile=-/etc/sysconfig/kubeletExecStart=ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS~~~~~~~~[root@master ~]#
升级内核
升级kernel:升级为最新版本的kernel。uname -rrpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgrpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpmyum --enablerepo=elrepo-kernel install kernel-ml-devel kernel-ml -ygrub2-set-default 0rebootuname -r
4月18日
14:00-16:00
课外基础
0.熟悉上次课中的 Demo
1.了解虚机和 pod的区别和 pod的优势
2.了解Pod的本质,以及Pod和Cntaier 的关系
3.Pod自动部署已经 CKA涉及到的应用
4.了解INT容器的应用场景
课程重点
通过学习 Kubernts 的基本单元Pod的概念和本质 ,数量的掌握该模块
Pod状态与生命周期管理 -健康性检查
Pod 概述与创建
Pod 解析与理
Init 容器介绍及案例分析
Pause 容器介绍及应用
Pod 安全策略及应用
Pod 的生命周期管理
Pod 自动部署
Pod Prest
Pod 健康性检查及探针
课外知识
1.掌握Kubernts 的Maer 和Nod角色定义,何为主,何为主工作节点 [掌握分布式架构 ]
2.掌握Kubernts 的Label和 Sector的概念和使用案例
3.掌握Kubernts 垃圾回收机制
[root@master yaml]# kubectl run demo --image=ikubernetes/myapp:v1 --restart=Never --dry-run=true -o yamlW0412 23:17:46.373425 76654 helpers.go:549] --dry-run=true is deprecated (boolean value) and can be replaced with --dry-run=client.apiVersion: v1kind: Podmetadata:creationTimestamp: nulllabels:run: demoname: demospec:containers:- image: ikubernetes/myapp:v1name: demoresources: {}dnsPolicy: ClusterFirstrestartPolicy: Neverstatus: {}[root@master yaml]# kubectl run demo --image=ikubernetes/myapp:v1 --restart=Never --dry-run=true -o yaml > demo.yamlW0412 23:18:09.561667 77168 helpers.go:549] --dry-run=true is deprecated (boolean value) and can be replaced with --dry-run=client.[root@master yaml]#[root@master yaml]# lltotal 4-rw-r----- 1 root root 243 Apr 12 23:18 demo.yaml[root@master yaml]# cat demo.yamlapiVersion: v1kind: Podmetadata:creationTimestamp: nulllabels:run: demoname: demospec:containers:- image: ikubernetes/myapp:v1name: demoresources: {}dnsPolicy: ClusterFirstrestartPolicy: Neverstatus: {}[root@master yaml]#[root@master yaml]# cat demo.yamlapiVersion: v1kind: Podmetadata:creationTimestamp: nulllabels:run: demoname: demospec:containers:- image: ikubernetes/myapp:v1name: demoresources: {}dnsPolicy: ClusterFirstrestartPolicy: Neverstatus: {}[root@master yaml]#
[root@master ~]# kubectl explainerror: You must specify the type of resource to explain. Use "kubectl api-resources" for a complete list of supported resources.[root@master ~]#[root@master ~]# kubectl explain --helpList the fields for supported resourcesThis command describes the fields associated with each supported API resource. Fields are identified via a simpleJSONPath identifier:<type>.<fieldName>[.<fieldName>]Add the --recursive flag to display all of the fields at once without descriptions. Information about each field isretrieved from the server in OpenAPI format.Use "kubectl api-resources" for a complete list of supported resources.Examples:# Get the documentation of the resource and its fieldskubectl explain pods# Get the documentation of a specific field of a resourcekubectl explain pods.spec.containersOptions:--api-version='': Get different explanations for particular API version--recursive=false: Print the fields of fields (Currently only 1 level deep)Usage:kubectl explain RESOURCE [options]Use "kubectl options" for a list of global command-line options (applies to all commands).[root@master ~]# kubectl explain pod --helpList the fields for supported resourcesThis command describes the fields associated with each supported API resource. Fields are identified via a simpleJSONPath identifier:<type>.<fieldName>[.<fieldName>]Add the --recursive flag to display all of the fields at once without descriptions. Information about each field isretrieved from the server in OpenAPI format.Use "kubectl api-resources" for a complete list of supported resources.Examples:# Get the documentation of the resource and its fieldskubectl explain pods# Get the documentation of a specific field of a resourcekubectl explain pods.spec.containersOptions:--api-version='': Get different explanations for particular API version--recursive=false: Print the fields of fields (Currently only 1 level deep)Usage:kubectl explain RESOURCE [options]Use "kubectl options" for a list of global command-line options (applies to all commands).[root@master ~]#
[root@master ~]# kubectl explain pod.specKIND: PodVERSION: v1RESOURCE: spec <Object>DESCRIPTION:Specification of the desired behavior of the pod. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-statusPodSpec is a description of a pod.FIELDS:activeDeadlineSeconds <integer>Optional duration in seconds the pod may be active on the node relative toStartTime before the system will actively try to mark it failed and killassociated containers. Value must be a positive integer.affinity <Object>If specified, the pod's scheduling constraintsautomountServiceAccountToken <boolean>AutomountServiceAccountToken indicates whether a service account tokenshould be automatically mounted.containers <[]Object> -required-List of containers belonging to the pod. Containers cannot currently beadded or removed. There must be at least one container in a Pod. Cannot beupdated.dnsConfig <Object>Specifies the DNS parameters of a pod. Parameters specified here will bemerged to the generated DNS configuration based on DNSPolicy.dnsPolicy <string>Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNSparameters given in DNSConfig will be merged with the policy selected withDNSPolicy. To have DNS options set along with hostNetwork, you have tospecify DNS policy explicitly to 'ClusterFirstWithHostNet'.enableServiceLinks <boolean>EnableServiceLinks indicates whether information about services should beinjected into pod's environment variables, matching the syntax of Dockerlinks. Optional: Defaults to true.ephemeralContainers <[]Object>List of ephemeral containers run in this pod. Ephemeral containers may berun in an existing pod to perform user-initiated actions such as debugging.This list cannot be specified when creating a pod, and it cannot bemodified by updating the pod spec. In order to add an ephemeral containerto an existing pod, use the pod's ephemeralcontainers subresource. Thisfield is alpha-level and is only honored by servers that enable theEphemeralContainers feature.hostAliases <[]Object>HostAliases is an optional list of hosts and IPs that will be injected intothe pod's hosts file if specified. This is only valid for non-hostNetworkpods.hostIPC <boolean>Use the host's ipc namespace. Optional: Default to false.hostNetwork <boolean>Host networking requested for this pod. Use the host's network namespace.If this option is set, the ports that will be used must be specified.Default to false.hostPID <boolean>Use the host's pid namespace. Optional: Default to false.hostname <string>Specifies the hostname of the Pod If not specified, the pod's hostname willbe set to a system-defined value.imagePullSecrets <[]Object>ImagePullSecrets is an optional list of references to secrets in the samenamespace to use for pulling any of the images used by this PodSpec. Ifspecified, these secrets will be passed to individual pullerimplementations for them to use. For example, in the case of docker, onlyDockerConfig type secrets are honored. More info:https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-podinitContainers <[]Object>List of initialization containers belonging to the pod. Init containers areexecuted in order prior to containers being started. If any init containerfails, the pod is considered to have failed and is handled according to itsrestartPolicy. The name for an init container or normal container must beunique among all containers. Init containers may not have Lifecycleactions, Readiness probes, Liveness probes, or Startup probes. TheresourceRequirements of an init container are taken into account duringscheduling by finding the highest request/limit for each resource type, andthen using the max of of that value or the sum of the normal containers.Limits are applied to init containers in a similar fashion. Init containerscannot currently be added or removed. Cannot be updated. More info:https://kubernetes.io/docs/concepts/workloads/pods/init-containers/nodeName <string>NodeName is a request to schedule this pod onto a specific node. If it isnon-empty, the scheduler simply schedules this pod onto that node, assumingthat it fits resource requirements.nodeSelector <map[string]string>NodeSelector is a selector which must be true for the pod to fit on a node.Selector which must match a node's labels for the pod to be scheduled onthat node. More info:https://kubernetes.io/docs/concepts/configuration/assign-pod-node/overhead <map[string]string>Overhead represents the resource overhead associated with running a pod fora given RuntimeClass. This field will be autopopulated at admission time bythe RuntimeClass admission controller. If the RuntimeClass admissioncontroller is enabled, overhead must not be set in Pod create requests. TheRuntimeClass admission controller will reject Pod create requests whichhave the overhead already set. If RuntimeClass is configured and selectedin the PodSpec, Overhead will be set to the value defined in thecorresponding RuntimeClass, otherwise it will remain unset and treated aszero. More info:https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md Thisfield is alpha-level as of Kubernetes v1.16, and is only honored by serversthat enable the PodOverhead feature.preemptionPolicy <string>PreemptionPolicy is the Policy for preempting pods with lower priority. Oneof Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.This field is alpha-level and is only honored by servers that enable theNonPreemptingPriority feature.priority <integer>The priority value. Various system components use this field to find thepriority of the pod. When Priority Admission Controller is enabled, itprevents users from setting this field. The admission controller populatesthis field from PriorityClassName. The higher the value, the higher thepriority.priorityClassName <string>If specified, indicates the pod's priority. "system-node-critical" and"system-cluster-critical" are two special keywords which indicate thehighest priorities with the former being the highest priority. Any othername must be defined by creating a PriorityClass object with that name. Ifnot specified, the pod priority will be default or zero if there is nodefault.readinessGates <[]Object>If specified, all readiness gates will be evaluated for pod readiness. Apod is ready when all its containers are ready AND all conditions specifiedin the readiness gates have status equal to "True" More info:https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.mdrestartPolicy <string>Restart policy for all containers within the pod. One of Always, OnFailure,Never. Default to Always. More info:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policyruntimeClassName <string>RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group,which should be used to run this pod. If no RuntimeClass resource matchesthe named class, the pod will not be run. If unset or empty, the "legacy"RuntimeClass will be used, which is an implicit class with an emptydefinition that uses the default runtime handler. More info:https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is abeta feature as of Kubernetes v1.14.schedulerName <string>If specified, the pod will be dispatched by specified scheduler. If notspecified, the pod will be dispatched by default scheduler.securityContext <Object>SecurityContext holds pod-level security attributes and common containersettings. Optional: Defaults to empty. See type description for defaultvalues of each field.serviceAccount <string>DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.Deprecated: Use serviceAccountName instead.serviceAccountName <string>ServiceAccountName is the name of the ServiceAccount to use to run thispod. More info:https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/shareProcessNamespace <boolean>Share a single process namespace between all of the containers in a pod.When this is set containers will be able to view and signal processes fromother containers in the same pod, and the first process in each containerwill not be assigned PID 1. HostPID and ShareProcessNamespace cannot bothbe set. Optional: Default to false.subdomain <string>If specified, the fully qualified Pod hostname will be"<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". If notspecified, the pod will not have a domainname at all.terminationGracePeriodSeconds <integer>Optional duration in seconds the pod needs to terminate gracefully. May bedecreased in delete request. Value must be non-negative integer. The valuezero indicates delete immediately. If this value is nil, the default graceperiod will be used instead. The grace period is the duration in secondsafter the processes running in the pod are sent a termination signal andthe time when the processes are forcibly halted with a kill signal. Setthis value longer than the expected cleanup time for your process. Defaultsto 30 seconds.tolerations <[]Object>If specified, the pod's tolerations.topologySpreadConstraints <[]Object>TopologySpreadConstraints describes how a group of pods ought to spreadacross topology domains. Scheduler will schedule pods in a way which abidesby the constraints. This field is only honored by clusters that enable theEvenPodsSpread feature. All topologySpreadConstraints are ANDed.volumes <[]Object>List of volumes that can be mounted by containers belonging to the pod.More info: https://kubernetes.io/docs/concepts/storage/volumes[root@master ~]# kubectl explain pod.spec.containersKIND: PodVERSION: v1RESOURCE: containers <[]Object>DESCRIPTION:List of containers belonging to the pod. Containers cannot currently beadded or removed. There must be at least one container in a Pod. Cannot beupdated.A single application container that you want to run within a pod.FIELDS:args <[]string>Arguments to the entrypoint. The docker image's CMD is used if this is notprovided. Variable references $(VAR_NAME) are expanded using thecontainer's environment. If a variable cannot be resolved, the reference inthe input string will be unchanged. The $(VAR_NAME) syntax can be escapedwith a double $$, ie: $$(VAR_NAME). Escaped references will never beexpanded, regardless of whether the variable exists or not. Cannot beupdated. More info:https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellcommand <[]string>Entrypoint array. Not executed within a shell. The docker image'sENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME)are expanded using the container's environment. If a variable cannot beresolved, the reference in the input string will be unchanged. The$(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).Escaped references will never be expanded, regardless of whether thevariable exists or not. Cannot be updated. More info:https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shellenv <[]Object>List of environment variables to set in the container. Cannot be updated.envFrom <[]Object>List of sources to populate environment variables in the container. Thekeys defined within a source must be a C_IDENTIFIER. All invalid keys willbe reported as an event when the container is starting. When a key existsin multiple sources, the value associated with the last source will takeprecedence. Values defined by an Env with a duplicate key will takeprecedence. Cannot be updated.image <string>Docker image name. More info:https://kubernetes.io/docs/concepts/containers/images This field isoptional to allow higher level config management to default or overridecontainer images in workload controllers like Deployments and StatefulSets.imagePullPolicy <string>Image pull policy. One of Always, Never, IfNotPresent. Defaults to Alwaysif :latest tag is specified, or IfNotPresent otherwise. Cannot be updated.More info:https://kubernetes.io/docs/concepts/containers/images#updating-imageslifecycle <Object>Actions that the management system should take in response to containerlifecycle events. Cannot be updated.livenessProbe <Object>Periodic probe of container liveness. Container will be restarted if theprobe fails. Cannot be updated. More info:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probesname <string> -required-Name of the container specified as a DNS_LABEL. Each container in a podmust have a unique name (DNS_LABEL). Cannot be updated.ports <[]Object>List of ports to expose from the container. Exposing a port here gives thesystem additional information about the network connections a containeruses, but is primarily informational. Not specifying a port here DOES NOTprevent that port from being exposed. Any port which is listening on thedefault "0.0.0.0" address inside a container will be accessible from thenetwork. Cannot be updated.readinessProbe <Object>Periodic probe of container service readiness. Container will be removedfrom service endpoints if the probe fails. Cannot be updated. More info:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probesresources <Object>Compute Resources required by this container. Cannot be updated. More info:https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/securityContext <Object>Security options the pod should run with. More info:https://kubernetes.io/docs/concepts/policy/security-context/ More info:https://kubernetes.io/docs/tasks/configure-pod-container/security-context/startupProbe <Object>StartupProbe indicates that the Pod has successfully initialized. Ifspecified, no other probes are executed until this completes successfully.If this probe fails, the Pod will be restarted, just as if thelivenessProbe failed. This can be used to provide different probeparameters at the beginning of a Pod's lifecycle, when it might take a longtime to load data or warm a cache, than during steady-state operation. Thiscannot be updated. This is a beta feature enabled by the StartupProbefeature flag. More info:https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probesstdin <boolean>Whether this container should allocate a buffer for stdin in the containerruntime. If this is not set, reads from stdin in the container will alwaysresult in EOF. Default is false.stdinOnce <boolean>Whether the container runtime should close the stdin channel after it hasbeen opened by a single attach. When stdin is true the stdin stream willremain open across multiple attach sessions. If stdinOnce is set to true,stdin is opened on container start, is empty until the first clientattaches to stdin, and then remains open and accepts data until the clientdisconnects, at which time stdin is closed and remains closed until thecontainer is restarted. If this flag is false, a container processes thatreads from stdin will never receive an EOF. Default is falseterminationMessagePath <string>Optional: Path at which the file to which the container's terminationmessage will be written is mounted into the container's filesystem. Messagewritten is intended to be brief final status, such as an assertion failuremessage. Will be truncated by the node if greater than 4096 bytes. Thetotal message length across all containers will be limited to 12kb.Defaults to /dev/termination-log. Cannot be updated.terminationMessagePolicy <string>Indicate how the termination message should be populated. File will use thecontents of terminationMessagePath to populate the container status messageon both success and failure. FallbackToLogsOnError will use the last chunkof container log output if the termination message file is empty and thecontainer exited with an error. The log output is limited to 2048 bytes or80 lines, whichever is smaller. Defaults to File. Cannot be updated.tty <boolean>Whether this container should allocate a TTY for itself, also requires'stdin' to be true. Default is false.volumeDevices <[]Object>volumeDevices is the list of block devices to be used by the container.volumeMounts <[]Object>Pod volumes to mount into the container's filesystem. Cannot be updated.workingDir <string>Container's working directory. If not specified, the container runtime'sdefault will be used, which might be configured in the container image.Cannot be updated.[root@master ~]#
[liwm@rmaster01 ~]$ kubectl api-resourcesNAME SHORTNAMES APIGROUP NAMESPACED KINDbindings true Bindingcomponentstatuses cs false ComponentStatusconfigmaps cm true ConfigMapendpoints ep true Endpointsevents ev true Eventlimitranges limits true LimitRangenamespaces ns false Namespacenodes no false Nodepersistentvolumeclaims pvc true PersistentVolumeClaimpersistentvolumes pv false PersistentVolumepods po true Podpodtemplates true PodTemplatereplicationcontrollers rc true ReplicationControllerresourcequotas quota true ResourceQuotasecrets true Secretserviceaccounts sa true ServiceAccountservices svc true Servicemutatingwebhookconfigurations admissionregistration.k8s.io false MutatingWebhookConfigurationvalidatingwebhookconfigurations admissionregistration.k8s.io false ValidatingWebhookConfigurationcustomresourcedefinitions crd,crds apiextensions.k8s.io false CustomResourceDefinitionapiservices apiregistration.k8s.io false APIServicecontrollerrevisions apps true ControllerRevisiondaemonsets ds apps true DaemonSetdeployments deploy apps true Deploymentreplicasets rs apps true ReplicaSetstatefulsets sts apps true StatefulSetmeshpolicies authentication.istio.io false MeshPolicypolicies authentication.istio.io true Policytokenreviews authentication.k8s.io false TokenReviewlocalsubjectaccessreviews authorization.k8s.io true LocalSubjectAccessReviewselfsubjectaccessreviews authorization.k8s.io false SelfSubjectAccessReviewselfsubjectrulesreviews authorization.k8s.io false SelfSubjectRulesReviewsubjectaccessreviews authorization.k8s.io false SubjectAccessReviewhorizontalpodautoscalers hpa autoscaling true HorizontalPodAutoscalercronjobs cj batch true CronJobjobs batch true Jobcertificatesigningrequests csr certificates.k8s.io false CertificateSigningRequestadapters config.istio.io true adapterattributemanifests config.istio.io true attributemanifesthandlers config.istio.io true handlerhttpapispecbindings config.istio.io true HTTPAPISpecBindinghttpapispecs config.istio.io true HTTPAPISpecinstances config.istio.io true instancequotaspecbindings config.istio.io true QuotaSpecBindingquotaspecs config.istio.io true QuotaSpecrules config.istio.io true ruletemplates config.istio.io true templateleases coordination.k8s.io true Leasebgpconfigurations crd.projectcalico.org false BGPConfigurationbgppeers crd.projectcalico.org false BGPPeerblockaffinities crd.projectcalico.org false BlockAffinityclusterinformations crd.projectcalico.org false ClusterInformationfelixconfigurations crd.projectcalico.org false FelixConfigurationglobalnetworkpolicies crd.projectcalico.org false GlobalNetworkPolicyglobalnetworksets crd.projectcalico.org false GlobalNetworkSethostendpoints crd.projectcalico.org false HostEndpointipamblocks crd.projectcalico.org false IPAMBlockipamconfigs crd.projectcalico.org false IPAMConfigipamhandles crd.projectcalico.org false IPAMHandleippools crd.projectcalico.org false IPPoolnetworkpolicies crd.projectcalico.org true NetworkPolicynetworksets crd.projectcalico.org true NetworkSetendpointslices discovery.k8s.io true EndpointSliceevents ev events.k8s.io true Eventingresses ing extensions true Ingressnodes metrics.k8s.io false NodeMetricspods metrics.k8s.io true PodMetricsalertmanagers monitoring.coreos.com true Alertmanagerpodmonitors monitoring.coreos.com true PodMonitorprometheuses monitoring.coreos.com true Prometheusprometheusrules monitoring.coreos.com true PrometheusRuleservicemonitors monitoring.coreos.com true ServiceMonitordestinationrules dr networking.istio.io true DestinationRuleenvoyfilters networking.istio.io true EnvoyFiltergateways gw networking.istio.io true Gatewayserviceentries se networking.istio.io true ServiceEntrysidecars networking.istio.io true Sidecarvirtualservices vs networking.istio.io true VirtualServiceingresses ing networking.k8s.io true Ingressnetworkpolicies netpol networking.k8s.io true NetworkPolicyruntimeclasses node.k8s.io false RuntimeClasspoddisruptionbudgets pdb policy true PodDisruptionBudgetpodsecuritypolicies psp policy false PodSecurityPolicyclusterrolebindings rbac.authorization.k8s.io false ClusterRoleBindingclusterroles rbac.authorization.k8s.io false ClusterRolerolebindings rbac.authorization.k8s.io true RoleBindingroles rbac.authorization.k8s.io true Roleclusterrbacconfigs rbac.istio.io false ClusterRbacConfigrbacconfigs rbac.istio.io true RbacConfigservicerolebindings rbac.istio.io true ServiceRoleBindingserviceroles rbac.istio.io true ServiceRolepriorityclasses pc scheduling.k8s.io false PriorityClassauthorizationpolicies security.istio.io true AuthorizationPolicycsidrivers storage.k8s.io false CSIDrivercsinodes storage.k8s.io false CSINodestorageclasses sc storage.k8s.io false StorageClassvolumeattachments storage.k8s.io false VolumeAttachment[liwm@rmaster01 ~]$
就绪
apiVersion: v1kind: Podmetadata:name: readiness-httpget-podnamespace: defaultspec:containers:- name: readiness-httpget-containerimage: nginximagePullPolicy: IfNotPresentports:- name: httpcontainerPort: 80readinessProbe:httpGet:port: httppath: /index.htmlinitialDelaySeconds: 1timeoutSeconds: 3
作业:
1.了解Kubernts 能为我们解决什么 ?
2.掌握Kubernts 的概念
3.安装Kubernts 集群
4.搭建HA模式的Kubernts 集群
5.INT Pod的使用场景
6.[Web+Rdis 方式]部署
7.Pause 容器的概念以应用
